—widely attributed to Albert Einstein
%matplotlib inline
import numpy as np, matplotlib.pyplot as plt
x = np.linspace(0, 20, num=500)
plt.plot(x, np.sin(.5*x**2))
[<matplotlib.lines.Line2D at 0x7f7946f2a0f0>]
Nbconvert to other formats
View notebooks online:
https://nbviewer.jupyter.org/
Github, Indico can view notebook files
from ipywidgets import interact
@interact(a=(0.1, 5.0), func=['sin', 'cos', 'tan'])
def plot_func(a=1, func='sin'):
x = np.linspace(0.01, 2*np.pi, 200)
y = getattr(np, func)(a/x)
plt.plot(x, y)
and many more...
{
"header": {
"msg_type": "execute_request",
...
},
"content": {
"code": "print('Hello, world')",
...
},
...
}
Modular UI, to build more varied applications - like:
Thebe: https://oreillymedia.github.io/thebe/
Hydrogen
More support for notebook documents in various contexts - e.g.