Python Best Practices

Size: px
Start display at page:

Download "Python Best Practices"

Transcription

1 Python Best Practices for GIS Analysts Thomas Laxson GIS Programmer/Analyst Washington State Department of Natural Resources

2 Why Follow Python Best Practices? Save time Facilitate collaboration Develop transferable skills

3 globalnerdy.com

4 Python GIS ArcPy Concise High-level Not pythonic Broad Inconsistent ArcGIS is the state govt standard Open Source Verbose Lower-level Pythonic Focused Fiona Shapely GeoPandas GDAL Rasterio Laspy Object-oriented

5 Coding Principles DRY WET Abstraction Principle Agency package: single module to store file paths Single Responsibility Principle SLOC doesn t exist in a vacuum Write clear and intuitive interfaces

6 Norman Doors invisionapp.com brentmanke.com

7 User Centered Design oss.adm.ntu.edu.sg

8 Style PEP 8 Python s official style guide "Sometimes style guide recommendations just aren't applicable. When in doubt, use your best judgment. Not comprehensive Examples: Indent 4 spaces Lines 79 characters Do not use compound statements Classes use CapWordsNames Constants use UNDERSCORE_SEPARATED_UPPERCASE_NAMES All other variables use underscore_separated_lowercase_names No use for camelcase or CamelCase Comments are complete sentences, adhering to Strunk and White

9 Style Hungarian Notation Systems Hungarian DON T USE IT Indicates data type of the variable >>> str_name = Clark >>> int_age = 29 Apps Hungarian Indicates the use of the variable >>> fc_roads = r C:\\my_db.gdb\roads Example prefixes: fc feature class tbl table gdb geodatabase dir system directory fn field name lyr layer

10 Style Community Consensus Always use variables Use reverse notation E.g., fc_roads_paved paved_roads_fc Concatenate using Advanced String Formatting (PEP 3101) >>> John is {}.format(age) Concatenate paths using os.path.join >>> dir_demo = os.path.join(dir_root, 'My_Subdir')

11 Forward Compatibility Python 2 Only print my_variable 4 <> 2 for k, v in my_dict.iteritems(): keys = my_dict.keys() for value in xrange(10): input( Enter an integer: ) Python 2 and 3 print(my_variable) 4!= 2 for k, v in dict.items() keys = list(my_dict.keys()) for value in range(10): int(input( Enter an integer: ))

12 Documentation PEP 257 Docstrings NumPy-style docstring: def my_function(arg1, arg2): My description of the function. Further details or clarification. Parameters arg1 : int Description of arg1 arg2 : str Description of arg2 Returns bool Description of return value PyDoc, Doxygen, DoxyPy, ReadTheDocs.org

13 Code Examples arcpy.addfield_management("my_feature_class", "LOREM", "TEXT"); print arcpy.getmessages() arcpy.addfield_management("my_feature_class", "IPSUM", "TEXT"); print arcpy.getmessages() arcpy.addfield_management("my_feature_class", "DOLOR", "TEXT"); print arcpy.getmessages() arcpy.addfield_management("my_feature_class", "SIT", "TEXT"); print arcpy.getmessages() arcpy.addfield_management("my_feature_class", "AMET", "TEXT"); print arcpy.getmessages() arcpy.addfield_management("my_feature_class", "CONSECTETUR", "TEXT"); print arcpy.getmessages() arcpy.addfield_management("my_feature_class", "ADIPISCING", "TEXT"); print arcpy.getmessages() fc_dissolved = "my_feature_class fns_text = ('LOREM', 'IPSUM', 'DOLOR', 'SIT', 'AMET', 'CONSECTETUR', 'ADIPISCING') for fn in fns_text: arcpy.addfield_management(fc_dissolved, fn, 'TEXT') print(arcpy.getmessages())

14 rows = arcpy.da.updatecursor("streams", ["STREAM_TYPE", "BUFFER_DISTANCE"]) for row in rows: if row[0] == 1: row[1] = 100 elif row[0] == 2: row[1] = 50 elif row[0] == 3: row[1] = 25 elif row[0] == 4: row[1] = 15 else: row[1] = 10 rows.updaterow(row) del row, rows

15 fc_streams = 'STREAMS' fn_stream_type = 'STREAM_TYPE' fn_buffer = 'BUFFER_DISTANCE' with arcpy.da.updatecursor(fc_streams, [fn_stream_type, fn_buffer]) as rows: for row in rows: if row[0] == 1: row[1] = 100 elif row[0] == 2: row[1] = 50 elif row[0] == 3: row[1] = 25 elif row[0] == 4: row[1] = 15 else: row[1] = 10 rows.updaterow(row)

16 d_streams = {1:100, 2:50, 3:25, 4:15} with arcpy.da.updatecursor(fc_streams, [fn_stream_type, fn_buffer]) as rows: for row in rows: row[1] = d_streams.get(row[0], 10) rows.updaterow(row)

17 def set_values_by_dict(table, key_field, value_field, dictionary, default_value): with arcpy.da.updatecursor(table, [key_field, value_field]) as cur: for row in cur: row[1] = dictionary.get(row[0], default_value) cur.updaterow(row) d_streams = {1:100, 2:50, 3:25, 4:15} set_values_by_dict(fc_streams, fn_stream_type, fn_buffer, d_streams, 10) d_streams = {1:100, 2:50, 3:25, 4:15} v_default = 10 set_values_by_dict(fc_streams, fn_stream_type, fn_buffer, d_streams, v_default) set_values_by_dict(fc_streams, fn_stream_type, fn_buffer, {1:100, 2:50, 3:25, 4:15}, 10)

18 rows = arcpy.da.updatecursor("streams", ["STREAM_TYPE", "BUFFER_DISTANCE"]) for row in rows: if row[0] == 1: row[1] = 100 elif row[0] == 2: row[1] = 50 elif row[0] == 3: row[1] = 25 elif row[0] == 4: row[1] = 15 else: row[1] = 10 rows.updaterow(row) del row, rows d_streams = {1:100, 2:50, 3:25, 4:15} set_values_by_dict(fc_streams, fn_stream_type, fn_buffer, d_streams, 10)

19 rows = arcpy.updatecursor("my_feature_class", "", "", FIELD_NAME1; NOTES; OLD_NOTES") for row in rows: if "\n" in row.field_name1 or "\r" in row.field_name1: row.field_name1 = row.field_name1.replace('\n', ' ') row.field_name1 = row.field_name1.replace('\r', ' ') if "\n" in row.notes or "\r" in row.notes: row.notes = row.notes.replace('\n', ' ') row.notes = row.notes.replace('\r', ' ') if "\n" in row.old_notes or "\r" in row.old_notes: row.notes = row.notes.replace('\n', ' ') row.notes = row.notes.replace('\r', ' ') rows.updaterow(row) del rows, row

20 fc_mine = 'my_feature_class' with arcpy.da.updatecursor(fc_mine, ['FIELD_NAME1', 'NOTES', 'OLD_NOTES']) as rows: for row in rows: for index, value in enumerate(row): for v_replace in ['\n', '\r']: value = value.replace(v_replace, ' ') rows.updaterow(row)

21 def replace_characters(table, fields, strings_to_replace, replacement_string): with arcpy.da.updatecursor(table, fields) as cur: for row in cur: for index in range(len(fields_text)): value = row[index] if value: for string in strings_to_replace: value = value.replace(string, replacement_string) row[index] = value cur.updaterow(row) return fc_mine = 'my_feature_class' replace_characters(fc_mine, ['\n', '\r'], ' ', ['FIELD_NAME1', 'NOTES', 'OLD_NOTES'])

22 def replace_characters(table, fields, strings_to_replace, replacement_string): """(str, collection, str, str) -> None Replaces occurrences of the string(s) in the fields' values with the replacement string. Returns a count of the values that were changed. Parameters: table - The path/name of the feature class within which you wish to replace character fields A collection of fields on which the string replacement will be processed strings_to_replace - A collection of strings that you will be replaced in the feature class' attribute table replacement_string - A string with which you wish to replace all occurrences of all strings_to_replace in the feature class' attribute table. """

23 Packaging packaging.python.org DemoPackage/ demopackage/ init.py cursorwrapper.py LICENSE.txt MANIFEST.in README.rst setup.py

24 init.py import cursorwrapper all = ['cursorwrapper'] version = '0.0.0' author = 'Thomas A. Laxson' license = 'MIT' author_ = 'my @example.com' maintainer_ = 'my @example.com' url = 'mywebsite.example.com'

25 Installing Packages PyPI Python Package Index pypi.python.org Use command prompt > python -m pip install packagename > C:\Python27\ArcGISx6410.4\python.exe m pip install packagename > python -m pip install C:\\path\to\package

26 Version control Package distribution Virtual environments IDEs Programming paradigms

27 Programming Paradigms Imperative Functional Object-oriented (OOP) Procedural + OOP

28 Editor / Development Environment IDLE NotePad++ PyScripter PyCharm Eclipse/PyDev/Liclipse

29 Version Control git vs svn Github vs BitBucket

30 Virtual Environments Isolated workspaces for Python installations/configurations virtualenv Create a virtual environment > virtualenv C:\path\to\my\ve Operate within the virtual environment > C:\path\to\my\ve\Scripts\activate Now you can install packages, run scripts, etc. ArcPy compatibility USGS article: Calling arcpy from an external virtual Python environment

Python wrapper for Viscosity.app Documentation

Python wrapper for Viscosity.app Documentation Python wrapper for Viscosity.app Documentation Release Paul Kremer March 08, 2014 Contents 1 Python wrapper for Viscosity.app 3 1.1 Features.................................................. 3 2 Installation

More information

Roman Numeral Converter Documentation

Roman Numeral Converter Documentation Roman Numeral Converter Documentation Release 0.1.0 Adrian Cruz October 07, 2014 Contents 1 Roman Numeral Converter 3 1.1 Features.................................................. 3 2 Installation 5

More information

Python Basics. Lecture and Lab 5 Day Course. Python Basics

Python Basics. Lecture and Lab 5 Day Course. Python Basics Python Basics Lecture and Lab 5 Day Course Course Overview Python, is an interpreted, object-oriented, high-level language that can get work done in a hurry. A tool that can improve all professionals ability

More information

Python Project Example Documentation

Python Project Example Documentation Python Project Example Documentation Release 0.1.0 Neil Stoddard Mar 22, 2017 Contents 1 Neilvana Example 3 1.1 Features.................................................. 3 1.2 Credits..................................................

More information

sainsmart Documentation

sainsmart Documentation sainsmart Documentation Release 0.3.1 Victor Yap Jun 21, 2017 Contents 1 sainsmart 3 1.1 Install................................................... 3 1.2 Usage...................................................

More information

Release Nicholas A. Del Grosso

Release Nicholas A. Del Grosso wavefront r eaderdocumentation Release 0.1.0 Nicholas A. Del Grosso Apr 12, 2017 Contents 1 wavefront_reader 3 1.1 Features.................................................. 3 1.2 Credits..................................................

More information

TPS Documentation. Release Thomas Roten

TPS Documentation. Release Thomas Roten TPS Documentation Release 0.1.0 Thomas Roten Sep 27, 2017 Contents 1 TPS: TargetProcess in Python! 3 2 Installation 5 3 Contributing 7 3.1 Types of Contributions..........................................

More information

chatterbot-weather Documentation

chatterbot-weather Documentation chatterbot-weather Documentation Release 0.1.1 Gunther Cox Nov 23, 2018 Contents 1 chatterbot-weather 3 1.1 Installation................................................ 3 1.2 Example.................................................

More information

Python simple arp table reader Documentation

Python simple arp table reader Documentation Python simple arp table reader Documentation Release 0.0.1 David Francos Nov 17, 2017 Contents 1 Python simple arp table reader 3 1.1 Features.................................................. 3 1.2 Usage...................................................

More information

ARTIFICIAL INTELLIGENCE AND PYTHON

ARTIFICIAL INTELLIGENCE AND PYTHON ARTIFICIAL INTELLIGENCE AND PYTHON DAY 1 STANLEY LIANG, LASSONDE SCHOOL OF ENGINEERING, YORK UNIVERSITY WHAT IS PYTHON An interpreted high-level programming language for general-purpose programming. Python

More information

Using Python in ArcGIS Steven Beothy May 28, 2013

Using Python in ArcGIS Steven Beothy May 28, 2013 Using Python in ArcGIS 10.1 Steven Beothy sbeothy@esri.ca May 28, 2013 Today s Agenda This seminar is designed to help you understand: 1) Python and how it can be used 2) What s new in Python in ArcGIS

More information

Table of Contents EVALUATION COPY

Table of Contents EVALUATION COPY Table of Contents Introduction... 1-2 A Brief History of Python... 1-3 Python Versions... 1-4 Installing Python... 1-5 Environment Variables... 1-6 Executing Python from the Command Line... 1-7 IDLE...

More information

Poulpe Documentation. Release Edouard Klein

Poulpe Documentation. Release Edouard Klein Poulpe Documentation Release 0.0.5 Edouard Klein Jul 18, 2017 Contents 1 Poulpe 1 1.1 Features.................................................. 1 2 Usage 3 3 Installation 5 4 Contributing 7 4.1 Types

More information

Sphinx prototype Documentation

Sphinx prototype Documentation Sphinx prototype Documentation Release 0.1 Arthur Mar 03, 2017 General documentation 1 Support docs 3 2 Developer docs 5 3 API docs 7 3.1 About this setup.............................................

More information

Django-CSP Documentation

Django-CSP Documentation Django-CSP Documentation Release 3.0 James Socol, Mozilla September 06, 2016 Contents 1 Installing django-csp 3 2 Configuring django-csp 5 2.1 Policy Settings..............................................

More information

Dragon Mapper Documentation

Dragon Mapper Documentation Dragon Mapper Documentation Release 0.2.6 Thomas Roten March 21, 2017 Contents 1 Support 3 2 Documentation Contents 5 2.1 Dragon Mapper.............................................. 5 2.2 Installation................................................

More information

Python Release September 11, 2014

Python Release September 11, 2014 Python Release September 11, 2014 Contents 1 Overview 3 2 History 5 3 Changes 7 4 API 9 4.1 Basic usage................................................ 9 4.2 Exceptions................................................

More information

Simple libtorrent streaming module Documentation

Simple libtorrent streaming module Documentation Simple libtorrent streaming module Documentation Release 0.1.0 David Francos August 31, 2015 Contents 1 Simple libtorrent streaming module 3 1.1 Dependences...............................................

More information

ArcPy Tips & Tricks. Clinton Dow Geoprocessing Product Esri

ArcPy Tips & Tricks. Clinton Dow Geoprocessing Product Esri ArcPy Tips & Tricks Clinton Dow Geoprocessing Product Engineer @ Esri Tip #1 ArcPy in an IDE GIS from the comfort of your development environment Recommended IDEs - PyCharm - Python Tools for Visual Studio

More information

PYTHON. Varun Jain & Senior Software Engineer. Pratap, Mysore Narasimha Raju & TEST AUTOMATION ARCHITECT. CenturyLink Technologies India PVT LTD

PYTHON. Varun Jain & Senior Software Engineer. Pratap, Mysore Narasimha Raju & TEST AUTOMATION ARCHITECT. CenturyLink Technologies India PVT LTD PYTHON Varun Jain & Senior Software Engineer Pratap, Mysore Narasimha Raju & TEST AUTOMATION ARCHITECT CenturyLink Technologies India PVT LTD 1 About Python Python is a general-purpose interpreted, interactive,

More information

django-idioticon Documentation

django-idioticon Documentation django-idioticon Documentation Release 0.0.1 openpolis June 10, 2014 Contents 1 django-idioticon 3 1.1 Documentation.............................................. 3 1.2 Quickstart................................................

More information

Python Getting Started

Python Getting Started Esri European User Conference October 15-17, 2012 Oslo, Norway Hosted by Esri Official Distributor Python Getting Started Jason Pardy Does this describe you? New to Python Comfortable using ArcGIS but

More information

Table of Contents. Preface... xxi

Table of Contents. Preface... xxi Table of Contents Preface... xxi Chapter 1: Introduction to Python... 1 Python... 2 Features of Python... 3 Execution of a Python Program... 7 Viewing the Byte Code... 9 Flavors of Python... 10 Python

More information

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D 1/60 Interactive use $ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information.

More information

I2C LCD Documentation

I2C LCD Documentation I2C LCD Documentation Release 0.1.0 Peter Landoll Sep 04, 2017 Contents 1 I2C LCD 3 1.1 Features.................................................. 3 1.2 Credits..................................................

More information

Pulp Python Support Documentation

Pulp Python Support Documentation Pulp Python Support Documentation Release 1.0.1 Pulp Project October 20, 2015 Contents 1 Release Notes 3 1.1 1.0 Release Notes............................................ 3 2 Administrator Documentation

More information

e24paymentpipe Documentation

e24paymentpipe Documentation e24paymentpipe Documentation Release 1.2.0 Burhan Khalid Oct 30, 2017 Contents 1 e24paymentpipe 3 1.1 Features.................................................. 3 1.2 Todo...................................................

More information

Advanced Systems Security: Future

Advanced Systems Security: Future Advanced Systems Security: Future Trent Jaeger Systems and Internet Infrastructure Security (SIIS) Lab Penn State University 1 Privilege Separation Has been promoted for some time Software-Fault Isolation

More information

google-search Documentation

google-search Documentation google-search Documentation Release 1.0.0 Anthony Hseb May 08, 2017 Contents 1 google-search 3 1.1 Features.................................................. 3 1.2 Credits..................................................

More information

Using Python in ArcGIS Oli Helm May 2, 2013

Using Python in ArcGIS Oli Helm May 2, 2013 Using Python in ArcGIS 10.1 Oli Helm May 2, 2013 ohelm@esri.ca Today s Agenda This seminar is designed to help you understand: 1) Python Essentials 2) What s new in Python in ArcGIS 10.1 3) Python Add-Ins

More information

Flow Control: Branches and loops

Flow Control: Branches and loops Flow Control: Branches and loops In this context flow control refers to controlling the flow of the execution of your program that is, which instructions will get carried out and in what order. In the

More information

json2xls Documentation

json2xls Documentation json2xls Documentation Release 0.1.3c axiaoxin Aug 10, 2017 Contents 1 3 2 5 3 API 9 i ii json2xls Documentation, Release 0.1.3c jsonexceljsonexceljson jsonjsonurljsonjson Contents 1 json2xls Documentation,

More information

Python: Getting Started. Ben

Python: Getting Started. Ben Python: Getting Started Ben Ramseth bramseth@esri.com @esrimapninja E M E R A L D S A P P H I R E T H A N K Y O U T O O UR SPONSORS Topics covered What s is python? Why use python? Basics of python ArcPy

More information

django-reinhardt Documentation

django-reinhardt Documentation django-reinhardt Documentation Release 0.1.0 Hyuntak Joo December 02, 2016 Contents 1 django-reinhardt 3 1.1 Installation................................................ 3 1.2 Usage...................................................

More information

Google Domain Shared Contacts Client Documentation

Google Domain Shared Contacts Client Documentation Google Domain Shared Contacts Client Documentation Release 0.1.0 Robert Joyal Mar 31, 2018 Contents 1 Google Domain Shared Contacts Client 3 1.1 Features..................................................

More information

PYTHON FOR MEDICAL PHYSICISTS. Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital

PYTHON FOR MEDICAL PHYSICISTS. Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital PYTHON FOR MEDICAL PHYSICISTS Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital TUTORIAL 1: INTRODUCTION Thursday 1 st October, 2015 AGENDA 1. Reference list 2.

More information

CSC148, Lab #4. General rules. Overview. Tracing recursion. Greatest Common Denominator GCD

CSC148, Lab #4. General rules. Overview. Tracing recursion. Greatest Common Denominator GCD CSC148, Lab #4 This document contains the instructions for lab number 4 in CSC148H. To earn your lab mark, you must actively participate in the lab. We mark you in order to ensure a serious attempt at

More information

Aircrack-ng python bindings Documentation

Aircrack-ng python bindings Documentation Aircrack-ng python bindings Documentation Release 0.1.1 David Francos Cuartero January 20, 2016 Contents 1 Aircrack-ng python bindings 3 1.1 Features..................................................

More information

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D 1/58 Interactive use $ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information.

More information

Django Wordpress API Documentation

Django Wordpress API Documentation Django Wordpress API Documentation Release 0.1.0 Swapps Jun 28, 2017 Contents 1 Django Wordpress API 3 1.1 Documentation.............................................. 3 1.2 Quickstart................................................

More information

Frontier Documentation

Frontier Documentation Frontier Documentation Release 0.1.3-dev Sam Nicholls August 14, 2014 Contents 1 Frontier 3 1.1 Requirements............................................... 3 1.2 Installation................................................

More information

Python for Earth Scientists

Python for Earth Scientists Python for Earth Scientists Andrew Walker andrew.walker@bris.ac.uk Python is: A dynamic, interpreted programming language. Python is: A dynamic, interpreted programming language. Data Source code Object

More information

FROM SCRIPT TO PACKAGES. good practices for hassle-free code reuse

FROM SCRIPT TO PACKAGES. good practices for hassle-free code reuse FROM SCRIPT TO PACKAGES good practices for hassle-free code reuse WHAT S THIS TUTORIAL IS ABOUT How to make your code usable by someone else WHO AM I? Contributor to numpy/scipy since 2007 Windows, Mac

More information

withenv Documentation

withenv Documentation withenv Documentation Release 0.7.0 Eric Larson Aug 02, 2017 Contents 1 withenv 3 2 Installation 5 3 Usage 7 3.1 YAML Format.............................................. 7 3.2 Command Substitutions.........................................

More information

Python I. Some material adapted from Upenn cmpe391 slides and other sources

Python I. Some material adapted from Upenn cmpe391 slides and other sources Python I Some material adapted from Upenn cmpe391 slides and other sources Overview Names & Assignment Data types Sequences types: Lists, Tuples, and Strings Mutability Understanding Reference Semantics

More information

Lecture 27. Lecture 27: Regular Expressions and Python Identifiers

Lecture 27. Lecture 27: Regular Expressions and Python Identifiers Lecture 27 Lecture 27: Regular Expressions and Python Identifiers Python Syntax Python syntax makes very few restrictions on the ways that we can name our variables, functions, and classes. Variables names

More information

doconv Documentation Release Jacob Mourelos

doconv Documentation Release Jacob Mourelos doconv Documentation Release 0.1.6 Jacob Mourelos October 17, 2016 Contents 1 Introduction 3 2 Features 5 2.1 Available Format Conversions...................................... 5 3 Installation 7 3.1

More information

Introduction to Python

Introduction to Python Introduction to Python Why is Python? Object-oriented Free (open source) Portable Powerful Mixable Easy to use Easy to learn Running Python Immediate mode Script mode Integrated Development Environment

More information

Doing more with Views. Creating an inline menu

Doing more with Views. Creating an inline menu Doing more with Views Creating an inline menu About Me Caryl Westerberg Web Producer Stanford Web Services Views topics we ll cover Contextual Filters Relationships Global: View result counter Global:

More information

Mantis STIX Importer Documentation

Mantis STIX Importer Documentation Mantis STIX Importer Documentation Release 0.2.0 Siemens February 27, 2014 Contents 1 Mantis STIX Importer 3 1.1 Documentation.............................................. 3 1.2 Quickstart................................................

More information

pydocstyle Documentation

pydocstyle Documentation pydocstyle Documentation Release 1.0.0 Amir Rachum Oct 14, 2018 Contents 1 Quick Start 3 1.1 Usage................................................... 3 1.2 Error Codes................................................

More information

smsghussd Documentation

smsghussd Documentation smsghussd Documentation Release 0.1.0 Mawuli Adzaku July 11, 2015 Contents 1 How to use 3 2 Author 7 3 LICENSE 9 3.1 Contents:................................................. 9 3.2 Feedback.................................................

More information

Aldryn Installer Documentation

Aldryn Installer Documentation Aldryn Installer Documentation Release 0.2.0 Iacopo Spalletti February 06, 2014 Contents 1 django CMS Installer 3 1.1 Features.................................................. 3 1.2 Installation................................................

More information

Using Python with ArcGIS

Using Python with ArcGIS Using Python with ArcGIS Jason Pardy (jpardy@esri.com) Esri UC2013. Technical Workshop. Agenda A whirlwind tour Python Essentials Using Python in ArcGIS Python Tools Accessing Data Map Automation ArcGIS

More information

Python Schema Generator Documentation

Python Schema Generator Documentation Python Schema Generator Documentation Release 1.0.0 Peter Demin June 26, 2016 Contents 1 Mutant - Python code generator 3 1.1 Project Status............................................... 3 1.2 Design..................................................

More information

What s New for Developers in ArcGIS Maura Daffern October 16

What s New for Developers in ArcGIS Maura Daffern October 16 What s New for Developers in ArcGIS 10.1 Maura Daffern October 16 mdaffern@esri.ca Today s Agenda This seminar is designed to help you understand: 1) Using Python to increase productivity 2) Overview of

More information

nacelle Documentation

nacelle Documentation nacelle Documentation Release 0.4.1 Patrick Carey August 16, 2014 Contents 1 Standing on the shoulders of giants 3 2 Contents 5 2.1 Getting Started.............................................. 5 2.2

More information

Lecture 12 Programming for automation of common data management tasks

Lecture 12 Programming for automation of common data management tasks Lecture 12 Programming for automation of common data management tasks Daniel P. Ames Hydroinformatics Fall 2012 This work was funded by National Science Foundation Grant EPS Goals this Week To learn the

More information

Part 6b: The effect of scale on raster calculations mean local relief and slope

Part 6b: The effect of scale on raster calculations mean local relief and slope Part 6b: The effect of scale on raster calculations mean local relief and slope Due: Be done with this section by class on Monday 10 Oct. Tasks: Calculate slope for three rasters and produce a decent looking

More information

django-cas Documentation

django-cas Documentation django-cas Documentation Release 2.3.6 Parth Kolekar January 17, 2016 Contents 1 django-cas 3 1.1 Documentation.............................................. 3 1.2 Quickstart................................................

More information

Redis Timeseries Documentation

Redis Timeseries Documentation Redis Timeseries Documentation Release 0.1.8 Ryan Anguiano Jul 26, 2017 Contents 1 Redis Timeseries 3 1.1 Install................................................... 3 1.2 Usage...................................................

More information

django-telegram-bot Documentation

django-telegram-bot Documentation django-telegram-bot Documentation Release 0.6.0 Juan Madurga December 21, 2016 Contents 1 django-telegram-bot 3 1.1 Documentation.............................................. 3 1.2 Quickstart................................................

More information

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd. Python Training Complete Practical & Real-time Trainings A Unit of. ISO Certified Training Institute Microsoft Certified Partner Training Highlights : Complete Practical and Real-time Scenarios Session

More information

PyCRC Documentation. Release 1.0

PyCRC Documentation. Release 1.0 PyCRC Documentation Release 1.0 Cristian Năvălici May 12, 2018 Contents 1 PyCRC 3 1.1 Features.................................................. 3 2 Installation 5 3 Usage 7 4 Contributing 9 4.1 Types

More information

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes GIS 4653/5653: Spatial Programming and GIS More Python: Statements, Types, Functions, Modules, Classes Statement Syntax The if-elif-else statement Indentation and and colons are important Parentheses and

More information

xmodels Documentation

xmodels Documentation xmodels Documentation Release 0.1.0 Bernd Meyer November 02, 2014 Contents 1 xmodels 1 2 Overview 3 2.1 Installation................................................ 3 2.2 Usage...................................................

More information

Python Packaging. Jakub Wasielak

Python Packaging. Jakub Wasielak Python Packaging Jakub Wasielak http://blog.pykonik.org/ http://koderek.edu.pl/ facebook.com/startechkrk https://pl.pycon.org/2017/ What? Why? Architecture https://packaging.python.org/current/ Installation

More information

Webgurukul Programming Language Course

Webgurukul Programming Language Course Webgurukul Programming Language Course Take One step towards IT profession with us Python Syllabus Python Training Overview > What are the Python Course Pre-requisites > Objectives of the Course > Who

More information

CIS192: Python Programming

CIS192: Python Programming CIS192: Python Programming Introduction Harry Smith University of Pennsylvania January 18, 2017 Harry Smith (University of Pennsylvania) CIS 192 Lecture 1 January 18, 2017 1 / 34 Outline 1 Logistics Rooms

More information

ENGR 102 Engineering Lab I - Computation

ENGR 102 Engineering Lab I - Computation ENGR 102 Engineering Lab I - Computation Learning Objectives by Week 1 ENGR 102 Engineering Lab I Computation 2 Credits 2. Introduction to the design and development of computer applications for engineers;

More information

Nirvana Documentation

Nirvana Documentation Nirvana Documentation Release 0.0.1 Nick Wilson Nov 17, 2017 Contents 1 Overview 3 2 Installation 5 3 User Guide 7 4 Developer Guide 9 5 Sitemap 11 5.1 User Guide................................................

More information

xmljson Documentation

xmljson Documentation xmljson Documentation Release 0.1.9 S Anand Aug 01, 2017 Contents 1 About 3 2 Convert data to XML 5 3 Convert XML to data 7 4 Conventions 9 5 Options 11 6 Installation 13 7 Roadmap 15 8 More information

More information

Jython. secondary. memory

Jython. secondary. memory 2 Jython secondary memory Jython processor Jython (main) memory 3 Jython secondary memory Jython processor foo: if Jython a

More information

smartfilesorter Documentation

smartfilesorter Documentation smartfilesorter Documentation Release 0.2.0 Jason Short September 14, 2014 Contents 1 Smart File Sorter 3 1.1 Features.................................................. 3 2 Installation 5 3 Usage Example

More information

Lotus IT Hub. Module-1: Python Foundation (Mandatory)

Lotus IT Hub. Module-1: Python Foundation (Mandatory) Module-1: Python Foundation (Mandatory) What is Python and history of Python? Why Python and where to use it? Discussion about Python 2 and Python 3 Set up Python environment for development Demonstration

More information

Release Ralph Offinger

Release Ralph Offinger nagios c heck p aloaltodocumentation Release 0.3.2 Ralph Offinger May 30, 2017 Contents 1 nagios_check_paloalto: a Nagios/Icinga Plugin 3 1.1 Documentation..............................................

More information

Release Fulfil.IO Inc.

Release Fulfil.IO Inc. api a idocumentation Release 0.1.0 Fulfil.IO Inc. July 29, 2016 Contents 1 api_ai 3 1.1 Features.................................................. 3 1.2 Installation................................................

More information

Course Structure of Python Training: UNIT - 1: COMPUTER FUNDAMENTALS. Computer Fundamentals. Installation of Development Tools:

Course Structure of Python Training: UNIT - 1: COMPUTER FUNDAMENTALS. Computer Fundamentals. Installation of Development Tools: Course Structure of Python Training: UNIT - 1: COMPUTER FUNDAMENTALS Computer Fundamentals o What is a Computer? o Computation vs calculation Microprocessors and Memory Concepts o Discussion on register,

More information

Python Getting Started

Python Getting Started 2013 Esri International User Conference July 8 12, 2013 San Diego, California Technical Workshop Python Getting Started Drew Flater, Ghislain Prince Esri UC2013. Technical cal Workshop op. Does this describe

More information

DNS Zone Test Documentation

DNS Zone Test Documentation DNS Zone Test Documentation Release 1.1.3 Maarten Diemel Dec 02, 2017 Contents 1 DNS Zone Test 3 1.1 Features.................................................. 3 1.2 Credits..................................................

More information

gunny Documentation Release David Blewett

gunny Documentation Release David Blewett gunny Documentation Release 0.1.0 David Blewett December 29, 2013 Contents 1 gunny 3 1.1 Features.................................................. 3 2 Installation 5 2.1 Dependencies...............................................

More information

Game Server Manager Documentation

Game Server Manager Documentation Game Server Manager Documentation Release 0.1.1+0.gc111f9c.dirty Christopher Bailey Dec 16, 2017 Contents 1 Game Server Manager 3 1.1 Requirements............................................... 3 1.2

More information

CS 115 Exam 1, Fall 2015 Thu. 09/24/2015

CS 115 Exam 1, Fall 2015 Thu. 09/24/2015 CS 115 Exam 1, Fall 2015 Thu. 09/24/2015 Name: Section: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this

More information

Sphinx Bulma Theme Documentation

Sphinx Bulma Theme Documentation Sphinx Bulma Theme Documentation Release 0.2.9 Gabriel Falcao Apr 30, 2018 Contents 1 Installing 1 2 Configuring 3 3 Writing Python Documentation 5 3.1 Annotating Code.............................................

More information

Simple Binary Search Tree Documentation

Simple Binary Search Tree Documentation Simple Binary Search Tree Documentation Release 0.4.1 Adrian Cruz October 23, 2014 Contents 1 Simple Binary Search Tree 3 1.1 Features.................................................. 3 2 Installation

More information

UNIVERSITY OF TORONTO SCARBOROUGH. Fall 2015 EXAMINATIONS. CSC A20H Duration 3 hours. No Aids Allowed

UNIVERSITY OF TORONTO SCARBOROUGH. Fall 2015 EXAMINATIONS. CSC A20H Duration 3 hours. No Aids Allowed Student Number: Last Name: First Name: UNIVERSITY OF TORONTO SCARBOROUGH Fall 2015 EXAMINATIONS CSC A20H Duration 3 hours No Aids Allowed Do not turn this page until you have received the signal to start.

More information

Fundamentals of Programming (Python) Getting Started with Programming

Fundamentals of Programming (Python) Getting Started with Programming Fundamentals of Programming (Python) Getting Started with Programming Ali Taheri Sharif University of Technology Some slides have been adapted from Python Programming: An Introduction to Computer Science

More information

CSC A20H3 S 2011 Test 1 Duration 90 minutes Aids allowed: none. Student Number:

CSC A20H3 S 2011 Test 1 Duration 90 minutes Aids allowed: none. Student Number: CSC A20H3 S 2011 Test 1 Duration 90 minutes Aids allowed: none Last Name: Lecture Section: L0101 Student Number: First Name: Instructor: Bretscher Do not turn this page until you have received the signal

More information

tolerance Documentation

tolerance Documentation tolerance Documentation Release Alisue Apr 1, 217 Contents 1 tolerance 1 1.1 Features.................................................. 1 1.2 Installation................................................

More information

django-responsive2 Documentation

django-responsive2 Documentation django-responsive2 Documentation Release 0.1.3 Mishbah Razzaque Sep 27, 2017 Contents 1 django-responsive2 3 1.1 Why would you use django-responsive2?................................ 3 1.2 Using django-responsive2

More information

Python Unit

Python Unit Python Unit 1 1.1 1.3 1.1: OPERATORS, EXPRESSIONS, AND VARIABLES 1.2: STRINGS, FUNCTIONS, CASE SENSITIVITY, ETC. 1.3: OUR FIRST TEXT- BASED GAME Python Section 1 Text Book for Python Module Invent Your

More information

Course Title: Python + Django for Web Application

Course Title: Python + Django for Web Application Course Title: Python + Django for Web Application Duration: 6 days Introduction This course offer Python + Django framework ( MTV ) training with hands on session using Eclipse+Pydev Environment. Python

More information

Getting Started with Python

Getting Started with Python Fundamentals of Programming (Python) Getting Started with Python Sina Sajadmanesh Sharif University of Technology Some slides have been adapted from Python Programming: An Introduction to Computer Science

More information

PYTHON. Scripting for ArcGIS. writeoutput = Inputfc = ar. .ext.{) OUtpUt fc =.. Paul A. Zandbergen. axcpy random. .arcpy, Describe (' is.

PYTHON. Scripting for ArcGIS. writeoutput = Inputfc = ar. .ext.{) OUtpUt fc =.. Paul A. Zandbergen. axcpy random. .arcpy, Describe (' is. ' Esri Press REDLANDS CALIFORNIA 'Ti axcpy random From arcpy import env writeoutput = Inputfc = ar OUtpUt fc = I aitcount = int (arcpy,g arcpy, Describe (' st [f = c ~- ist = [] = clesc,oidfrel ext{) r

More information

Part III Appendices 165

Part III Appendices 165 Part III Appendices 165 Appendix A Technical Instructions Learning Outcomes This material will help you learn how to use the software you need to do your work in this course. You won t be tested on it.

More information

Python Project Documentation

Python Project Documentation Python Project Documentation Release 1.0 Tim Diels Jan 10, 2018 Contents 1 Simple project structure 3 1.1 Code repository usage.......................................... 3 1.2 Versioning................................................

More information

Snooping IoT devices with a Raspberry Pi. a UWC/CSIR project

Snooping IoT devices with a Raspberry Pi. a UWC/CSIR project Term 2 Snooping IoT devices with a Raspberry Pi a UWC/CSIR project Hi, Name:Lorem Samuel Abu ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eleifend a diam quis suscipit. Class aptent taciti

More information

dj-libcloud Documentation

dj-libcloud Documentation dj-libcloud Documentation Release 0.2.0 Daniel Greenfeld December 19, 2016 Contents 1 dj-libcloud 3 1.1 Documentation.............................................. 3 1.2 Quickstart................................................

More information

Python Programming, bridging course 2011

Python Programming, bridging course 2011 Python Programming, bridging course 2011 About the course Few lectures Focus on programming practice Slides on the homepage No course book. Using online resources instead. Online Python resources http://www.python.org/

More information

Django-frontend-notification Documentation

Django-frontend-notification Documentation Django-frontend-notification Documentation Release 0.2.0 Arezqui Belaid February 25, 2016 Contents 1 Introduction 3 1.1 Overview................................................. 3 1.2 Documentation..............................................

More information