Appendix: Jupyter notebook 101¶
Introduction¶
In [ ]:
1+1
Out[ ]:
2
Writing¶
In [ ]:
3/2
Out[ ]:
1.5
Modes¶
Other Important Considerations¶
Markdown formatting¶
Italics, Bold, Strikethrough, Inline, Blockquotes and Links¶
Headings¶
Lists¶
Code Capabilities¶
In [ ]:
# Import necessary libraries
from fastai2.vision.all import *
import matplotlib.pyplot as plt
In [ ]:
from PIL import Image
In [ ]:
a = 1
b = a + 1
c = b + a + 1
d = c + b + a + 1
a, b, c ,d
Out[ ]:
(1, 2, 4, 8)
In [ ]:
plt.plot([a,b,c,d])
plt.show()
In [ ]:
Image.open('images/chapter1_cat_example.jpg')
Out[ ]:
Running the app locally¶
Creating a notebook¶
Shortcuts and tricks¶
Command Mode Shortcuts¶
Cell Tricks¶
Line Magics¶
In [ ]:
%timeit [i+1 for i in range(1000)]
56.1 µs ± 592 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)