Example notebook

This is an example of the content available in a Jupyter notebook. It contains both “Markdown” cells (containing formated text and images) and code cells (in this case Python3 code).

Live code can be interacted with in a number of ways. Those reading on the Jupyter Book at https://acse-2020.github.io/introduction can start an in-page interactive session by clicking the following button:

# This is a code cell
# Click the button above, once it reads "Launching from mybinder.org; ready"
# the code here can be editted and re-run

x = 7
y = 10
z = x+y
z *= 2

print(x)
7

Code cells can contain any valid python statement, including the import command. Through IPython “magic” commands, they can even include graphics from the matplotlib package.

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt


x = np.linspace(0, 10)
plt.plot(x, np.sin(x))
[<matplotlib.lines.Line2D at 0x7fa0f0610310>]
../_images/example_notebook_3_1.png

The entire GitHub repository serving these pages can be served on a free community servive, https://mybinder.org by clicking the icon above and selcting “Binder”. This provides the classic Jupyter notebook interface.

Future ACSE students will be able to connect to a dedicated course Jupyterhub instance once they have created a correctly named GitHub account, as described elsewhere on this site.