This course will cover the basics of Python programming and provide introductions to using the most important concepts and modules for data processing and data analysis, including numpy for processing large amounts of data; scipy for optimization, mathematical functions, and statistics; matplotlib for plotting; scikit-learn for machine-learning methods.
This course is being taught at Northern Arizona University, Department of Physics and Astronomy, in the 2016 Fall semester.
- Anaconda (probably the easiest way to install python)
- The Python Tutorial (the official tutorial)
- Python Standard Library (standard library resources)
- Style Guide for Python (how to do it)
- The Zen of Python (>> import this)
NEW: I have a book recommendation for you guys: Python for Scientists, John Stewart, Cambridge University Press (https://books.google.com/books/about/Python_for_Scientists.html?id=iekRBAAAQBAJ)
Lecture | Topics | Files |
---|---|---|
Sept 2 | no class homework: make python work on your computer! Feel free to use an integrated development environment (IDE), but you might as well just use a text editor and a terminal/shell (that's what I usually do). |
|
Sept 9 | some logistics, python basics, datatypes, strings | introduction 20160909_notes |
Sept 16 | lists, dictionaries, sets, control flow | 20160916_notes assignment 1 |
Sept 23 | file i/o, string formatting, errors, exceptions | 20160923_notes assignment 2 |
Sept 30 | functions, modules, namespaces, standard library: math, os, datetime, urllib2, subprocess | 20160930_notes assignment 3 |
Oct 7 | no class | |
Oct 14 | numpy: basics, arrays | 20161014_notes assignment 4 |
Oct 21 | no class | |
Oct 28 | plotting and fitting | 20161028_notes assignment 5 |
Nov 4 | interpolation | 20161104_notes assignment 6 |
Nov 11 | no class (Veteran's Day) | |
Nov 18 | no class | assignment 7 |
Nov 25 | no class (Thanksgiving) | |
Dec 2 | machine learning (scikit-learn) | 20161202_notes assignment 8 |
Dec 9 | code optimization and multi-threading | 20161209_notes assignment 9 |