Sample notebooks

In this course we use Jupyter notebooks to combine code, text, plots and media. You can view the notebooks directly in your internet browser. Alternatively, copy-and-paste the notebook's URL in to the box at nbviewer.jupyter.org.

To interact and modify a notebook, click the .ipynb link and download to your Jupyter notebook directory.

Fern

The Barnsley Fern: An image of a fern with self-similar (fractal) properties, generated by iterating certain affine transformations.

View notebook | .ipynb (39KB)

ODE_Example

Shows how to:

  1. Solve a first-order single-variable ODE using scipy.integrate.odeint, and plot.

  2. Solve a second-order equation by writing as a pair of first-order equations

  3. Solve predator-prey equations.

View notebook | .ipynb (221KB)

Curve_Fit_Example

Shows how to:

  1. Generate a data set with simulated noise.

  2. Save and then reload the data.

  3. Fit the data to a simple model using scipy.optimize.curve_fit().

View notebook | .ipynb (47KB)

Media_Example

Shows how to load and interact with various media: data, images, web pages, YouTube videos and maps.

View notebook | .ipynb (42KB)