Some basic programming background, be it C/C++, Fortran, matlab, mathematica, ..., (enough to understand the logic of programming, control statements, basic data structures, etc.) is assumed.

This is a 1-credit class. The primary method of evaluation is class participation.

To make the most of this class, you should have python 3.x installed on a laptop that you can bring to the seminar. On Linux machines, you can get python and the needed libraries through your package manager. For Mac and Windows, you might want to consider the free distributions provided by Enthought Canopy or Anaconda. These both install everything you need.

All of the course material (Jupyter notebooks, examples, etc.) are availble on the course github page: https://github.com/marivifs-teaching/python-class

Introduction to Python

The core language, data structures, control flow, functions, classes...

Lecture slides: Jupyter notebooks: Readings Practice on your own: Online books: Some python resources by disicipline
  • Astronomy: AstroPy
  • Atmospheric sciences: PyAOS
  • Biology resources: Biopython
  • Ocean and marine sciences: OceanPython.org
  • Physics resources: QuTiP: the Quantum Toolbok in Python
  • Social sciences resources: NetworkX: a library for exploring the structure and complexity of social networks
  • Solar physics: SunPy
  • Psychology resources: PyschoPy


The core array library for scientific computing in python

Jupyter notebooks: Readings

Software Development Practices

How to write, test, and debug code effectively...

Matplotlib and plotting

The core array library for scientific computing in python

Jupyter notebooks: Readings:

SciPy and numerical methods

The core array library for scientific computing in python

Jupyter notebooks: Lecture slides: Other examples: Readings


Symbolic math in python

Jupyter notebooks: Readings:

Pandas and the DataFrame

a library for data analysis

Jupyter notebooks: Sample datasets: Readings:

Extending python with C/Fortran

interacting with external code and the OS

Lecture slides: Example codes: Readings:

Python applications and packaging

wrapping your code up for others to use


testing to ensure that your code performs well

Lecture slides: Examples:

Machine Learning

a quick example of machine learning using python libraries

Lecture slides: Jupyter notebooks: Examples: