-
Notifications
You must be signed in to change notification settings - Fork 83
Think python
Curriculum for the inaugural "Python Boot Camp" held for the Scottish Graduate Programme in Economics at the University of Edinburgh, June 3-7 2013. The curriculum mainly follows Think Python by Allen Downey, and the excellent SciPy lectures series on Scientific Programming in Python. Think Python is freely available on-line in both pdf and html. All code and additional documentation for the Scipy lecture series can be forked from its github repository.
- Chapter 1: The way of the program
- Chapter 2: Variables, expressions and statements
- Chapter 3: Functions
-
Chapter 4: Case Study on Interface Design We will use a Python module called Swampy which can be downloaded from PyPi using
pip install swampy
from the command line.
For the afternoon sessions, I will switch from discussing the basics of Python programming to more specialized topics. I will start by covering Chapter 3 from Wes McKinney's book Python for Data Analysis on IPython. If you wish, you can download the code for the entire book by forking the book's github repository.
An in depth introduction to [NumPy]((http://www.numpy.org/). I will cover the entirety of lecture 1.3(http://scipy-lectures.github.io/intro/numpy/index.html) from the SciPy lecture series. Note that much of this material is also covered, though in less detail, in Chapters 4 and 12 of Python for Data Analysis.
Basic plotting and data visualization using Matplotlib. I will cover the entirety of the lecture 1.4 from the SciPy lectures series.
- Chapter 11: Dictionaries
- Chapter 12: Tuples
- Chapter 13: Case Study on Data Structures
- Chapter 14: Files Optional.
Selected, economics relevant, topics from [lecture 1.5(http://scipy-lectures.github.io/intro/scipy.html) from the SciPy lecture series on high-level scientific computing using SciPy.
Introduction to object-oriented programming (OOP) and agent-based modelling (ABM) by replicating results from Allan Issac's paper on Simulating Evolutionary Games. You will write a program that will simulate a large number of agents repeatedly playing the Prisoner's Dilemma with one another. Along the way you will learn some of the basic concepts of OOP.
More detail on the theory/practice of OOP can be found in chapters 15-19 of Think Python:
- Chapter 15: Classes and Objects
- Chapter 16: Classes and Functions
- Chapter 17: Classes and Methods
- Chapter 18: Inheritance
- Chapter 19: Case Study on Tkinter
Hopefully, by this point you will have fallen in love with Python programming and want to know where you can learn more...
Allen Downey also has two other books on Python programming that you might find interesting:
- Think Complexity: Picking up where Think Python leaves off, this book is about complexity science, data structures and algorithms, intermediate programming in Python, and the philosophy of science. Available in both .html and .pdf formats.
- Think Stats: Introduction to Bayesian and Frequentist statistics for Python programmers. Available in both .html and .pdf formats.