Writing Python Scripts for Processing Framework
|
|
- ÊἙρμῆς Κοσμόπουλος
- 8 χρόνια πριν
- Προβολές:
Transcript
1 Writing Python Scripts for Processing Framework QGIS Tutorials and Tips Author Ujaval Gandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi This work is licensed under a Creative Commons Attribution 4.0 International License.
2 Δημιουργία κώδικα στην Python για το πλαίσιο επεξεργασίας. Μπορεί κανείς να γράψει αυτόνομο pygis κώδικα που να μπορεί να εκτελεστεί μέσω της κονσόλας Python στο QGIS. Με μερικά κόλπακια, μπορείτε να κάνετε τα αυτόνομα κομμάτια του κώδικά σας να εκτελούνται μέσα στο Πλαίσιο Επεξεργασίας. Αυτό έχει πολλαπλά πλεονεκτήματα. Πρώτον, παίρνοντας τα στοιχεία που εισάγει ο χρήστης και με βάση αυτά δημιουργώντας νεα αρχεία είναι σαφώς πιο εύκολο γιατί το Πλαίσιο Επεξεργασίας παρέχει μια τυποποιημένη διεπαφή χρήστη για αυτές τις λειτουργίες. Δεύτερον, το να έχετε τον κώδικά σας στην Εργαλειοθήκη Επεξεργασίας, επιτρέπει στον κώδικα να είναι μέρος από το Μοντέλο Επεκεργασίας ή να εκτελείται ως μια συνολική δουλειά με πολλαπλές εισαγωγές. Αυτή η άσκηση θα σας δείξει πως να γράψετε ένα προσαρμοσμένο κομμάτι κώδικα το οποίο θα μπορεί να είναι μέρος από το Πλαίσιο Επεξεργασίας στο QGIS. Επισκόπηση της εργασίας Ο κώδικάς μας θα πραγματοποιήσει μια διαδικασία διάλυσης με βάση το πεδίο επιλογής του χρήστη. Θα προσθέσει επίσης τις τιμές από ένα άλλο πεδίο για τα κατακερματισμένα χαρακτηριστικά. Για παράδειγμα., θα κατακερματίσουμε το shapefile με τα παγκόσμια δεδομένα βασιζόμενοι στο γνώρισμα SUBREGION``και θα προσθ σουµε το πεδ ο ``POP_EST ώστε να υπολογίσουμε τον συνολικό πληθυσμό στην κατακερματισμένη περιοχή. Note Αν θέλετε να κάνετε την διαδικασία κατακερματισμού υπολογίζοντας και κάποια στατιστικά στοιχεία, μπορείτε να χρησιμοποιήσετε το πρόσθετο DissolveWithStats. Αυτός ο κώδικας είναι μια παρουσίαση για το πως να εφαρμόσετε παρόμοιες συναρτήσεις μέσω ενός Κώδικα Επεξεργασίας. Λήψη δεδομένων Θα χρησιμοποιήσουμε το σύνολο δεδομένων Αdmin 0 - Χώρες από την σελίδα Natural Earth. Κατεβάστε το Admin 0 - χώρες shapefile.. Πηγή δεδομένων [naturalearth] _ Για ευκολία, μπορείτε να κατεβάσετε απευθείας ένα αντίγραφο και από το σύνολο των δεδομένων από τις παρακάτω συνδέσεις ne_10m_admin_0_countries.zip Διαδικασία 1. Ανοίξτε το QGIS και πηγαίνετε στο Layers Add Vector Add Vector Layer. Πηγαίνετε στο κατεβασμένο αρχείο ne_10_admin_0_countries.zip και φορτώστε το στρώμα ne_10_admin_0_countries. Πηγαίνετε στο Processing Toolbox.
3 2. Επεκτείνετε την ομάδα Scripts`στο :guilabel:`processing Toolbox και επιλέξτε Create a new script.
4 3. For a python script to be recognized as a Processing script, the beginning of the script must be the specifications of the input and outputs. This will be used to construct the user interface to run the script. You can learn more about the format of these lines from QGIS Processing Documentation. Enter the following lines in the Script editor. Here we are specifying 3 user inputs: dissolve_layer, dissolve_field and sum_field. Note that we are adding dissolve_layer after both the field input definitions. This means that input will be pre-populated with choice of fields from the dissolve_layer. We also specify the output_layer as the output vector layer. Click Save button. ##dissolve_layer=vector ##dissolve_field=field dissolve_layer ##sum_field=field dissolve_layer ##output_layer=output vector
5 4. Name the script dissolve_with_sum and save it at the default location under.qgis2 processing scripts folder.
6 5. Back in the Script editor, click Run algorithm button to preview the user interface.
7 6. You can see that just by adding a few lines, we have a nice user interface for the user to specify the inputs. It is also consistent with all other Processing algorithms, so there is no learning curve involved in using your custom algorithm.
8 7. In the Script editor, enter the following code. You will notice that we are using some special methods such as processing.getobject() and processing.features(). These are convenience wrappers that make it easy to work with data. You can learn more about these from Additional functions for handling data section of QGIS Processing Documentation. Click Save to save the newly entered code and then the X button to close the editor. Note This script uses python list comprehensions extensively. Take a look at this list comprehension tutorial to get familiar with the syntax. from qgis.core import * from PyQt4.QtCore import * inlayer = processing.getobject(dissolve_layer) dissolve_field_index = inlayer.fieldnameindex(dissolve_field) sum_field_index = inlayer.fieldnameindex(sum_field) # Find unique values present in the dissolve field unique_values = set([f[dissolve_field] for f in processing.features(inlayer)]) print unique_values
9 8. While writing code, it is important to be able to see errors and debug your code. Your processing scripts can be debugged easily via the built-in Python Console. In the main QGIS window, go to Plugins Python Console. Once the console is open, find your script in the Processing Toolbox and double-click it to launch it.
10 9. Select SUBREGION as the dissolve field. You may choose any field as the sum field as the script doesn't have any code yet to deal with it. Click Run.
11 10. You will see an error dialog. This is expected since the script is incomplete and doesn't generate any output yet. 11. In the main QGIS windows, you will see the debug output from the script printed in the console. This is useful way to add print statements and see intermediate variable values.
12 12. Let's go back to editing the script by right-clicking the script and select Edit script.
13 13. Enter the following code to complete the script. Note that we are using the existing dissolve algorithm in QGIS via processing using processing.runalg() method. # Create a dictionary to hold values from the sum field sum_unique_values = {} attrs = [f.attributes() for f in processing.features(inlayer)] for unique_value in unique_values: val_list = [ f_attr[sum_field_index] for f_attr in attrs if f_attr[dissolve_field_index sum_unique_values[unique_value] = sum(val_list) # Run the regular Dissolve algorithm processing.runalg("qgis:dissolve", dissolve_layer, "false", dissolve_field, output_layer) # Add a new attribute called 'SUM' in the output layer outlayer = processing.getobject(output_layer) provider = outlayer.dataprovider() provider.addattributes([qgsfield('sum', QVariant.Double)]) outlayer.updatefields() # Set the value of the 'SUM' field for each feature outlayer.startediting() new_field_index = outlayer.fieldnameindex('sum') for f in processing.features(outlayer): outlayer.changeattributevalue(f.id(), new_field_index, sum_unique_values[f[dissolve_field outlayer.commitchanges()
14 14. Run the algorithm by selecting SUBREGION as the dissolve field and POP_EST as the sum field. Click Run. Note The processing algorithm may take upto 10 minutes to finish depending on your system.
15 15. Once the processing finishes, you can use the Identify tool and click on any polygon. You will see the newly added SUM field with the POP_EST values from all original polygons added up.
16 16. You will note that all other fields in the output are still present. When you dissolve many features to create a single feature, it doesn't make sense to keep the original fields in the output. Go back to the Script editor and add the following code to delete all fields except the SUM field and the field that was used to dissolve the original layer. Click Save button and close the window. # Delete all fields except dissolve field and the newly created 'SUM' field. olayer.startediting() fields_to_delete = [fid for fid in range(len(provider.fields())) if fid!= new_field_index provider.deleteattributes(fields_to_delete) olayer.updatefields() olayer.commitchanges()
17 17. One of the hidden features of the Processing Framework is that all algorithms can work on selected features of a layer. This is very helpful when you want to run an algorithm on the subset of a layer. As our script uses processing.features() method to read features, it will respect the current selection. To demonstrate that, let's make a selection first. Click on the Select features using an expression button.
18 18. Enter the following expression to select features from North and South America and click Select. "CONTINENT" = 'North America' OR "CONTINENT" = 'South America'
19 19. You will see the selected features highlighted in yellow. Right-click the dissolve_with_sum script and select Execute.
20 20. Select the inputs as before and click Run.
21 22. A new output layer will be added to QGIS. This will contain dissolved geometries only from the selected features in the input layer. You will also note that the output layer will contain only 2 fields as expected. 23. One last but important remmaining work is to document our algorithm. The Processing Framework has nice tools to write and access help. Go to the Script editor and click the Edit script help button.
22 24. Fill in the details for different elements and click OK. Now a detailed help will be available to all users of your script in the Help tab when they launch the algorithm.
23 Below is the complete script for reference. You may modify it to suit your needs. ##dissolve_layer=vector ##dissolve_field=field dissolve_layer ##sum_field=field dissolve_layer ##output_layer=output vector from qgis.core import * from PyQt4.QtCore import * inlayer = processing.getobject(dissolve_layer) dissolve_field_index = inlayer.fieldnameindex(dissolve_field) sum_field_index = inlayer.fieldnameindex(sum_field) # Find unique values present in the dissolve field unique_values = set([f[dissolve_field] for f in processing.features(inlayer)]) # Create a dictionary to hold values from the sum field sum_unique_values = {} attrs = [f.attributes() for f in processing.features(inlayer)] for unique_value in unique_values: val_list = [ f_attr[sum_field_index] for f_attr in attrs if f_attr[dissolve_field_index sum_unique_values[unique_value] = sum(val_list) # Run the regular Dissolve algorithm processing.runalg("qgis:dissolve", dissolve_layer, "false", dissolve_field, output_layer)
24 # Add a new attribute called 'SUM' in the output layer outlayer = processing.getobject(output_layer) provider = outlayer.dataprovider() provider.addattributes([qgsfield('sum', QVariant.Double)]) outlayer.updatefields() # Set the value of the 'SUM' field for each feature outlayer.startediting() new_field_index = outlayer.fieldnameindex('sum') for f in processing.features(outlayer): outlayer.changeattributevalue(f.id(), new_field_index, sum_unique_values[f[dissolve_field outlayer.commitchanges() # Delete all fields except dissolve field and the newly created 'SUM' field outlayer.startediting() fields_to_delete = [fid for fid in range(len(provider.fields())) if fid!= new_field_index provider.deleteattributes(fields_to_delete) outlayer.updatefields() outlayer.commitchanges()
Automating Complex Workflows using Processing Modeler
Automating Complex Workflows using Processing Modeler QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis
Διαβάστε περισσότεραBatch Processing using Processing Framework
Batch Processing using Processing Framework QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis
Διαβάστε περισσότεραUsing Custom Python Expression Functions
Using Custom Python Expression Functions QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina
Διαβάστε περισσότεραBasic Raster Styling and Analysis
Basic Raster Styling and Analysis QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi
Διαβάστε περισσότεραSearching and Downloading OpenStreetMap Data
Searching and Downloading OpenStreetMap Data QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis
Διαβάστε περισσότεραGeoreferencing Topo Sheets and Scanned Maps
Georeferencing Topo Sheets and Scanned Maps QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis
Διαβάστε περισσότεραPerforming Spatial Queries
Performing Spatial Queries QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi This
Διαβάστε περισσότεραLeaflet Web Maps with qgis2leaf
Leaflet Web Maps with qgis2leaf QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi
Διαβάστε περισσότεραUsing the QGIS Browser
Using the QGIS Browser QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi This work
Διαβάστε περισσότεραPerforming Spatial Joins
Performing Spatial Joins QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi This
Διαβάστε περισσότεραNearest Neighbor Analysis
Nearest Neighbor Analysis QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi This
Διαβάστε περισσότεραΟδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook
Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook Βήμα 1: Step 1: Βρείτε το βιβλίο που θα θέλατε να αγοράσετε και πατήστε Add to Cart, για να το προσθέσετε στο καλάθι σας. Αυτόματα θα
Διαβάστε περισσότεραderivation of the Laplacian from rectangular to spherical coordinates
derivation of the Laplacian from rectangular to spherical coordinates swapnizzle 03-03- :5:43 We begin by recognizing the familiar conversion from rectangular to spherical coordinates (note that φ is used
Διαβάστε περισσότεραSection 9.2 Polar Equations and Graphs
180 Section 9. Polar Equations and Graphs In this section, we will be graphing polar equations on a polar grid. In the first few examples, we will write the polar equation in rectangular form to help identify
Διαβάστε περισσότεραHow to register an account with the Hellenic Community of Sheffield.
How to register an account with the Hellenic Community of Sheffield. (1) EN: Go to address GR: Πηγαίνετε στη διεύθυνση: http://www.helleniccommunityofsheffield.com (2) EN: At the bottom of the page, click
Διαβάστε περισσότεραSection 8.3 Trigonometric Equations
99 Section 8. Trigonometric Equations Objective 1: Solve Equations Involving One Trigonometric Function. In this section and the next, we will exple how to solving equations involving trigonometric functions.
Διαβάστε περισσότερα2 Composition. Invertible Mappings
Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Composition. Invertible Mappings In this section we discuss two procedures for creating new mappings from old ones, namely,
Διαβάστε περισσότεραInstruction Execution Times
1 C Execution Times InThisAppendix... Introduction DL330 Execution Times DL330P Execution Times DL340 Execution Times C-2 Execution Times Introduction Data Registers This appendix contains several tables
Διαβάστε περισσότεραUsing Google Maps Engine Connector for QGIS
Using Google Maps Engine Connector for QGIS QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis
Διαβάστε περισσότεραΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα είναι μικρότεροι το 1000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Διάρκεια: 3,5 ώρες Καλή
Διαβάστε περισσότεραHOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:
HOMEWORK 4 Problem a For the fast loading case, we want to derive the relationship between P zz and λ z. We know that the nominal stress is expressed as: P zz = ψ λ z where λ z = λ λ z. Therefore, applying
Διαβάστε περισσότεραWorking with Terrain Data
Working with Terrain Data QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi This
Διαβάστε περισσότεραΕγκατάσταση λογισμικού και αναβάθμιση συσκευής Device software installation and software upgrade
Για να ελέγξετε το λογισμικό που έχει τώρα η συσκευή κάντε κλικ Menu > Options > Device > About Device Versions. Στο πιο κάτω παράδειγμα η συσκευή έχει έκδοση λογισμικού 6.0.0.546 με πλατφόρμα 6.6.0.207.
Διαβάστε περισσότεραPartial Trace and Partial Transpose
Partial Trace and Partial Transpose by José Luis Gómez-Muñoz http://homepage.cem.itesm.mx/lgomez/quantum/ jose.luis.gomez@itesm.mx This document is based on suggestions by Anirban Das Introduction This
Διαβάστε περισσότεραVBA ΣΤΟ WORD. 1. Συχνά, όταν ήθελα να δώσω ένα φυλλάδιο εργασίας με ασκήσεις στους μαθητές έκανα το εξής: Version 25-7-2015 ΗΜΙΤΕΛΗΣ!!!!
VBA ΣΤΟ WORD Version 25-7-2015 ΗΜΙΤΕΛΗΣ!!!! Μου παρουσιάστηκαν δύο θέματα. 1. Συχνά, όταν ήθελα να δώσω ένα φυλλάδιο εργασίας με ασκήσεις στους μαθητές έκανα το εξής: Εγραφα σε ένα αρχείο του Word τις
Διαβάστε περισσότεραΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Αν κάπου κάνετε κάποιες υποθέσεις να αναφερθούν στη σχετική ερώτηση. Όλα τα αρχεία που αναφέρονται στα προβλήματα βρίσκονται στον ίδιο φάκελο με το εκτελέσιμο
Διαβάστε περισσότερα3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β
3.4 SUM AND DIFFERENCE FORMULAS Page Theorem cos(αβ cos α cos β -sin α cos(α-β cos α cos β sin α NOTE: cos(αβ cos α cos β cos(α-β cos α -cos β Proof of cos(α-β cos α cos β sin α Let s use a unit circle
Διαβάστε περισσότεραFinite Field Problems: Solutions
Finite Field Problems: Solutions 1. Let f = x 2 +1 Z 11 [x] and let F = Z 11 [x]/(f), a field. Let Solution: F =11 2 = 121, so F = 121 1 = 120. The possible orders are the divisors of 120. Solution: The
Διαβάστε περισσότεραΔημιουργία Λογαριασμού Διαχείρισης Business Telephony Create a Management Account for Business Telephony
Δημιουργία Λογαριασμού Διαχείρισης Business Telephony Create a Management Account for Business Telephony Ελληνικά Ι English 1/7 Δημιουργία Λογαριασμού Διαχείρισης Επιχειρηματικής Τηλεφωνίας μέσω της ιστοσελίδας
Διαβάστε περισσότεραdepartment listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι
She selects the option. Jenny starts with the al listing. This has employees listed within She drills down through the employee. The inferred ER sttricture relates this to the redcords in the databasee
Διαβάστε περισσότεραΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial
ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial Introduction Το Javadoc είναι ένα εργαλείο που παράγει αρχεία html (παρόμοιο με τις σελίδες στη διεύθυνση http://docs.oracle.com/javase/8/docs/api/index.html) από τα σχόλια
Διαβάστε περισσότεραEE512: Error Control Coding
EE512: Error Control Coding Solution for Assignment on Finite Fields February 16, 2007 1. (a) Addition and Multiplication tables for GF (5) and GF (7) are shown in Tables 1 and 2. + 0 1 2 3 4 0 0 1 2 3
Διαβάστε περισσότεραSPEEDO AQUABEAT. Specially Designed for Aquatic Athletes and Active People
SPEEDO AQUABEAT TM Specially Designed for Aquatic Athletes and Active People 1 2 Decrease Volume Increase Volume Reset EarphonesUSBJack Power Off / Rewind Power On / Fast Forward Goggle clip LED Status
Διαβάστε περισσότεραPortSip Softphone. Ελληνικά Ι English 1/20
PortSip Softphone Ελληνικά Ι English 1/20 1. Περιεχόμενα 2. Εγκατάσταση σε Smartphone & Tablet (Android ή ios)... 1 3. Εγκατάσταση σε ηλεκτρονικό υπολογιστή (Windows ή Mac).... 5 4. Installation in Smartphone
Διαβάστε περισσότεραΕργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Procedures and Functions Stored procedures and functions are named blocks of code that enable you to group and organize a series of SQL and PL/SQL
Διαβάστε περισσότεραΕργαστήριο 9. Styling with Javascript
Εργαστήριο 9 Styling with Javascript Pimp my Text with Javascript Today you'll write a page where the user can type text into a box, and by clicking on UI controls, the user can "pimp out" the text by
Διαβάστε περισσότεραC.S. 430 Assignment 6, Sample Solutions
C.S. 430 Assignment 6, Sample Solutions Paul Liu November 15, 2007 Note that these are sample solutions only; in many cases there were many acceptable answers. 1 Reynolds Problem 10.1 1.1 Normal-order
Διαβάστε περισσότεραSection 7.6 Double and Half Angle Formulas
09 Section 7. Double and Half Angle Fmulas To derive the double-angles fmulas, we will use the sum of two angles fmulas that we developed in the last section. We will let α θ and β θ: cos(θ) cos(θ + θ)
Διαβάστε περισσότεραSCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions
SCHOOL OF MATHEMATICAL SCIENCES GLMA Linear Mathematics 00- Examination Solutions. (a) i. ( + 5i)( i) = (6 + 5) + (5 )i = + i. Real part is, imaginary part is. (b) ii. + 5i i ( + 5i)( + i) = ( i)( + i)
Διαβάστε περισσότεραUNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:
UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS 150 Fall 2001 Prof. Subramanian Midterm II 1) You are implementing an 4:1 Multiplexer that has the following specifications:
Διαβάστε περισσότεραExample of the Baum-Welch Algorithm
Example of the Baum-Welch Algorithm Larry Moss Q520, Spring 2008 1 Our corpus c We start with a very simple corpus. We take the set Y of unanalyzed words to be {ABBA, BAB}, and c to be given by c(abba)
Διαβάστε περισσότεραThe Simply Typed Lambda Calculus
Type Inference Instead of writing type annotations, can we use an algorithm to infer what the type annotations should be? That depends on the type system. For simple type systems the answer is yes, and
Διαβάστε περισσότεραPARTIAL NOTES for 6.1 Trigonometric Identities
PARTIAL NOTES for 6.1 Trigonometric Identities tanθ = sinθ cosθ cotθ = cosθ sinθ BASIC IDENTITIES cscθ = 1 sinθ secθ = 1 cosθ cotθ = 1 tanθ PYTHAGOREAN IDENTITIES sin θ + cos θ =1 tan θ +1= sec θ 1 + cot
Διαβάστε περισσότεραCYTA Cloud Server Set Up Instructions
CYTA Cloud Server Set Up Instructions ΕΛΛΗΝΙΚΑ ENGLISH Initial Set-up Cloud Server To proceed with the initial setup of your Cloud Server first login to the Cyta CloudMarketPlace on https://cloudmarketplace.cyta.com.cy
Διαβάστε περισσότεραCHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS
CHAPTER 5 SOLVING EQUATIONS BY ITERATIVE METHODS EXERCISE 104 Page 8 1. Find the positive root of the equation x + 3x 5 = 0, correct to 3 significant figures, using the method of bisection. Let f(x) =
Διαβάστε περισσότεραHomework 3 Solutions
Homework 3 Solutions Igor Yanovsky (Math 151A TA) Problem 1: Compute the absolute error and relative error in approximations of p by p. (Use calculator!) a) p π, p 22/7; b) p π, p 3.141. Solution: For
Διαβάστε περισσότεραΟδηγός εκκαθάρισης ιστορικού cookies περιηγητή
Οδηγός εκκαθάρισης ιστορικού cookies περιηγητή «Δουλεύω Ηλεκτρονικά, Δουλεύω Γρήγορα και με Ασφάλεια - by e-base.gr» Web : www.e-base.gr E-mail : support@e-base.gr Facebook : Like Παρακάτω μπορείτε να
Διαβάστε περισσότεραAdvanced Subsidiary Unit 1: Understanding and Written Response
Write your name here Surname Other names Edexcel GE entre Number andidate Number Greek dvanced Subsidiary Unit 1: Understanding and Written Response Thursday 16 May 2013 Morning Time: 2 hours 45 minutes
Διαβάστε περισσότερα6.1. Dirac Equation. Hamiltonian. Dirac Eq.
6.1. Dirac Equation Ref: M.Kaku, Quantum Field Theory, Oxford Univ Press (1993) η μν = η μν = diag(1, -1, -1, -1) p 0 = p 0 p = p i = -p i p μ p μ = p 0 p 0 + p i p i = E c 2 - p 2 = (m c) 2 H = c p 2
Διαβάστε περισσότεραMath 6 SL Probability Distributions Practice Test Mark Scheme
Math 6 SL Probability Distributions Practice Test Mark Scheme. (a) Note: Award A for vertical line to right of mean, A for shading to right of their vertical line. AA N (b) evidence of recognizing symmetry
Διαβάστε περισσότεραΣυστήματα Διαχείρισης Βάσεων Δεδομένων
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Συστήματα Διαχείρισης Βάσεων Δεδομένων Φροντιστήριο 9: Transactions - part 1 Δημήτρης Πλεξουσάκης Τμήμα Επιστήμης Υπολογιστών Tutorial on Undo, Redo and Undo/Redo
Διαβάστε περισσότεραModbus basic setup notes for IO-Link AL1xxx Master Block
n Modbus has four tables/registers where data is stored along with their associated addresses. We will be using the holding registers from address 40001 to 49999 that are R/W 16 bit/word. Two tables that
Διαβάστε περισσότεραCongruence Classes of Invertible Matrices of Order 3 over F 2
International Journal of Algebra, Vol. 8, 24, no. 5, 239-246 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/.2988/ija.24.422 Congruence Classes of Invertible Matrices of Order 3 over F 2 Ligong An and
Διαβάστε περισσότεραApproximation of distance between locations on earth given by latitude and longitude
Approximation of distance between locations on earth given by latitude and longitude Jan Behrens 2012-12-31 In this paper we shall provide a method to approximate distances between two points on earth
Διαβάστε περισσότεραΡύθμιση e-mail σε whitelist
Ρύθμιση e-mail σε whitelist «Δουλεύω Ηλεκτρονικά, Δουλεύω Γρήγορα και με Ασφάλεια - by e-base.gr» Web : www.e-base.gr E-mail : support@e-base.gr Facebook : Like Twitter : @ebasegr Πολλές φορές αντιμετωπίζετε
Διαβάστε περισσότεραOther Test Constructions: Likelihood Ratio & Bayes Tests
Other Test Constructions: Likelihood Ratio & Bayes Tests Side-Note: So far we have seen a few approaches for creating tests such as Neyman-Pearson Lemma ( most powerful tests of H 0 : θ = θ 0 vs H 1 :
Διαβάστε περισσότεραRight Rear Door. Let's now finish the door hinge saga with the right rear door
Right Rear Door Let's now finish the door hinge saga with the right rear door You may have been already guessed my steps, so there is not much to describe in detail. Old upper one file:///c /Documents
Διαβάστε περισσότερα4.6 Autoregressive Moving Average Model ARMA(1,1)
84 CHAPTER 4. STATIONARY TS MODELS 4.6 Autoregressive Moving Average Model ARMA(,) This section is an introduction to a wide class of models ARMA(p,q) which we will consider in more detail later in this
Διαβάστε περισσότεραMathCity.org Merging man and maths
MathCity.org Merging man and maths Exercise 10. (s) Page Textbook of Algebra and Trigonometry for Class XI Available online @, Version:.0 Question # 1 Find the values of sin, and tan when: 1 π (i) (ii)
Διαβάστε περισσότεραPartial Differential Equations in Biology The boundary element method. March 26, 2013
The boundary element method March 26, 203 Introduction and notation The problem: u = f in D R d u = ϕ in Γ D u n = g on Γ N, where D = Γ D Γ N, Γ D Γ N = (possibly, Γ D = [Neumann problem] or Γ N = [Dirichlet
Διαβάστε περισσότεραPhys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)
Phys460.nb 81 ψ n (t) is still the (same) eigenstate of H But for tdependent H. The answer is NO. 5.5.5. Solution for the tdependent Schrodinger s equation If we assume that at time t 0, the electron starts
Διαβάστε περισσότεραLecture 2. Soundness and completeness of propositional logic
Lecture 2 Soundness and completeness of propositional logic February 9, 2004 1 Overview Review of natural deduction. Soundness and completeness. Semantics of propositional formulas. Soundness proof. Completeness
Διαβάστε περισσότεραPractice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1
Conceptual Questions. State a Basic identity and then verify it. a) Identity: Solution: One identity is cscθ) = sinθ) Practice Exam b) Verification: Solution: Given the point of intersection x, y) of the
Διαβάστε περισσότεραThe municipality of Apokoronas has created a new app for your smart phone.
1 The municipality of Apokoronas has created a new app for your smart phone. It is now available from itunes and the Google Play Store For Apple Smart Phones: https://itunes.apple.com/us/app/%ce%b4%ce%ae%ce%bc%ce%bf%cf%82-
Διαβάστε περισσότεραThe challenges of non-stable predicates
The challenges of non-stable predicates Consider a non-stable predicate Φ encoding, say, a safety property. We want to determine whether Φ holds for our program. The challenges of non-stable predicates
Διαβάστε περισσότερα9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr
9.9 #. Area inside the oval limaçon r = + cos. To graph, start with = so r =. Compute d = sin. Interesting points are where d vanishes, or at =,,, etc. For these values of we compute r:,,, and the values
Διαβάστε περισσότεραTMA4115 Matematikk 3
TMA4115 Matematikk 3 Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet Trondheim Spring 2010 Lecture 12: Mathematics Marvellous Matrices Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet
Διαβάστε περισσότεραExample Sheet 3 Solutions
Example Sheet 3 Solutions. i Regular Sturm-Liouville. ii Singular Sturm-Liouville mixed boundary conditions. iii Not Sturm-Liouville ODE is not in Sturm-Liouville form. iv Regular Sturm-Liouville note
Διαβάστε περισσότεραΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007
Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Όλοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι του 10000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Αν κάπου κάνετε κάποιες υποθέσεις
Διαβάστε περισσότεραSOAP API. https://bulksmsn.gr. Table of Contents
SOAP API https://bulksmsn.gr Table of Contents Send SMS...2 Query SMS...3 Multiple Query SMS...4 Credits...5 Save Contact...5 Delete Contact...7 Delete Message...8 Email: sales@bulksmsn.gr, Τηλ: 211 850
Διαβάστε περισσότεραΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011
Διάρκεια Διαγωνισμού: 3 ώρες Απαντήστε όλες τις ερωτήσεις Μέγιστο Βάρος (20 Μονάδες) Δίνεται ένα σύνολο από N σφαιρίδια τα οποία δεν έχουν όλα το ίδιο βάρος μεταξύ τους και ένα κουτί που αντέχει μέχρι
Διαβάστε περισσότεραMaking A Map. QGIS Tutorials and Tips. Author. Ujaval Gandhi http://google.com/+ujavalgandhi. Translations by
Making A Map QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi This work is licensed
Διαβάστε περισσότεραNumerical Analysis FMN011
Numerical Analysis FMN011 Carmen Arévalo Lund University carmen@maths.lth.se Lecture 12 Periodic data A function g has period P if g(x + P ) = g(x) Model: Trigonometric polynomial of order M T M (x) =
Διαβάστε περισσότεραDynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016
Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Dynamic types, Lambda calculus machines Apr 21 22, 2016 1 Dynamic types and contracts (a) To make sure you understand the
Διαβάστε περισσότεραStatistical Inference I Locally most powerful tests
Statistical Inference I Locally most powerful tests Shirsendu Mukherjee Department of Statistics, Asutosh College, Kolkata, India. shirsendu st@yahoo.co.in So far we have treated the testing of one-sided
Διαβάστε περισσότεραGalatia SIL Keyboard Information
Galatia SIL Keyboard Information Keyboard ssignments The main purpose of the keyboards is to provide a wide range of keying options, so many characters can be entered in multiple ways. If you are typing
Διαβάστε περισσότεραΕργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Oracle SQL Developer An Oracle Database stores and organizes information. Oracle SQL Developer is a tool for accessing and maintaining the data
Διαβάστε περισσότεραExercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.
Exercises 0 More exercises are available in Elementary Differential Equations. If you have a problem to solve any of them, feel free to come to office hour. Problem Find a fundamental matrix of the given
Διαβάστε περισσότεραAreas and Lengths in Polar Coordinates
Kiryl Tsishchanka Areas and Lengths in Polar Coordinates In this section we develop the formula for the area of a region whose boundary is given by a polar equation. We need to use the formula for the
Διαβάστε περισσότεραΌλγα Κασσώτη
Όλγα Κασσώτη okassoti@gmail.com Τι είναι οι καυτές πατάτες? Αρχίζοντας Βασικά εργαλεία Σύντομος οδηγός / Διαμόρφωση JCloze JMatch JQuiz JCross JMix The Masher Χρήσιμες συμβουλές Εισαγωγή εικόνων Το Hot
Διαβάστε περισσότεραDigitizing Map Data. QGIS Tutorials and Tips. Author. Ujaval Gandhi http://google.com/+ujavalgandhi. Translations by
Digitizing Map Data QGIS Tutorials and Tips Author Ujaval Gandhi http://google.com/+ujavalgandhi Translations by Christina Dimitriadou Paliogiannis Konstantinos Tom Karagkounis Despoina Karfi This work
Διαβάστε περισσότεραEvery set of first-order formulas is equivalent to an independent set
Every set of first-order formulas is equivalent to an independent set May 6, 2008 Abstract A set of first-order formulas, whatever the cardinality of the set of symbols, is equivalent to an independent
Διαβάστε περισσότεραPhysical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.
B-Trees Index files can become quite large for large main files Indices on index files are possible 3 rd -level index 2 nd -level index 1 st -level index Main file 1 The 1 st -level index consists of pairs
Διαβάστε περισσότεραCORDIC Background (4A)
CORDIC Background (4A Copyright (c 20-202 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version.2 or any later
Διαβάστε περισσότερα(C) 2010 Pearson Education, Inc. All rights reserved.
Connectionless transmission with datagrams. Connection-oriented transmission is like the telephone system You dial and are given a connection to the telephone of fthe person with whom you wish to communicate.
Διαβάστε περισσότεραEcon 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1
Eon : Fall 8 Suggested Solutions to Problem Set 8 Email questions or omments to Dan Fetter Problem. Let X be a salar with density f(x, θ) (θx + θ) [ x ] with θ. (a) Find the most powerful level α test
Διαβάστε περισσότεραΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ
ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ Ενότητα 12: Συνοπτική Παρουσίαση Ανάπτυξης Κώδικα με το Matlab Σαμαράς Νικόλαος Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται σε άδειες χρήσης Creative Commons.
Διαβάστε περισσότεραBusiness English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ Ανώτατο Εκπαιδευτικό Ίδρυμα Πειραιά Τεχνολογικού Τομέα Business English Ενότητα # 9: Financial Planning Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων Άδειες Χρήσης Το παρόν εκπαιδευτικό
Διαβάστε περισσότεραChapter 2 * * * * * * * Introduction to Verbs * * * * * * *
Chapter 2 * * * * * * * Introduction to Verbs * * * * * * * In the first chapter, we practiced the skill of reading Greek words. Now we want to try to understand some parts of what we read. There are a
Διαβάστε περισσότεραΕργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο
Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο JDBC JDBC is a set of classes and interfaces written in Java that allows Java programs to send SQL statements to a database like Oracle JDBC
Διαβάστε περισσότεραΜΕΤΑΠΤΥΧΙΑΚΗ ΔΙΠΛΩΜΑΤΙΚΗ ΕΡΓΑΣΙΑ «ΘΕΜΑ»
ΠΑΝΕΠΙΣΤΗΜΙΟ ΑΙΓΑΙΟΥ ΣΧΟΛΗ ΑΝΘΡΩΠΙΣΤΙΚΩΝ ΕΠΙΣΤΗΜΩΝ ΤΜΗΜΑ ΕΠΙΣΤΗΜΩΝ ΤΗΣ ΠΡΟΣΧΟΛΙΚΗΣ ΑΓΩΓΗΣ ΚΑΙ ΤΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΣΧΕΔΙΑΣΜΟΥ Π.Μ.Σ. «ΠΕΡΙΒΑΛΛΟΝΤΙΚΗ ΕΚΠΑΙΔΕΥΣΗ» ΜΕΤΑΠΤΥΧΙΑΚΗ ΔΙΠΛΩΜΑΤΙΚΗ ΕΡΓΑΣΙΑ «ΘΕΜΑ» «Εφαρμογή
Διαβάστε περισσότεραΙΚΤΥΩΤΟ ΜΟΝΤΕΛΟ (Network Model) Μαθ. # 15
ΙΚΤΥΩΤΟ ΜΟΝΤΕΛΟ (Network Model) Μαθ. # 15 DBTG Γλώσσα επεξεργασίας Σκελετός ενός προγράµµατος Βρες την εγγραφή FIND FIND...... FIND Ανάκτησε την τιµή εγγραφής στον κατάλληλο επίγραµµα τύπου GET RECORD
Διαβάστε περισσότεραLESSON 14 (ΜΑΘΗΜΑ ΔΕΚΑΤΕΣΣΕΡΑ) REF : 202/057/34-ADV. 18 February 2014
LESSON 14 (ΜΑΘΗΜΑ ΔΕΚΑΤΕΣΣΕΡΑ) REF : 202/057/34-ADV 18 February 2014 Slowly/quietly Clear/clearly Clean Quickly/quick/fast Hurry (in a hurry) Driver Attention/caution/notice/care Dance Σιγά Καθαρά Καθαρός/η/ο
Διαβάστε περισσότεραMath221: HW# 1 solutions
Math: HW# solutions Andy Royston October, 5 7.5.7, 3 rd Ed. We have a n = b n = a = fxdx = xdx =, x cos nxdx = x sin nx n sin nxdx n = cos nx n = n n, x sin nxdx = x cos nx n + cos nxdx n cos n = + sin
Διαβάστε περισσότεραΟΔΗΓΟΣ ΓΙΑ ΔΗΜΙΟΥΡΓΙΑ ΣΠΙΤΙΟΥ ΜΟΝΤΕΛΟ-1. Θα δημιουργήσουμε αυτό το μοντέλο με 2 κομμάτια, τη βάση και τη σκεπή.
ΟΔΗΓΟΣ ΓΙΑ ΔΗΜΙΟΥΡΓΙΑ ΣΠΙΤΙΟΥ ΜΟΝΤΕΛΟ-1 Θα δημιουργήσουμε αυτό το μοντέλο με 2 κομμάτια, τη βάση και τη σκεπή. Κατ αρχήν, χρησιμοποιώντας μιλλιμετρέ χαρτί, σχεδιάστε το σχήμα σας, όπως στο σχήμα που ακολουθεί.
Διαβάστε περισσότεραΜηχανική Μάθηση Hypothesis Testing
ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Μηχανική Μάθηση Hypothesis Testing Γιώργος Μπορμπουδάκης Τμήμα Επιστήμης Υπολογιστών Procedure 1. Form the null (H 0 ) and alternative (H 1 ) hypothesis 2. Consider
Διαβάστε περισσότεραAreas and Lengths in Polar Coordinates
Kiryl Tsishchanka Areas and Lengths in Polar Coordinates In this section we develop the formula for the area of a region whose boundary is given by a polar equation. We need to use the formula for the
Διαβάστε περισσότεραΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006
ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/26 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι το 1 εκτός αν ορίζεται διαφορετικά στη διατύπωση
Διαβάστε περισσότεραNowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in
Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in : tail in X, head in A nowhere-zero Γ-flow is a Γ-circulation such that
Διαβάστε περισσότερα