With IPython Notebooks, individuals and groups can:
- Rapidly prototype and explore algorithmic ideas
- Easily share results
- Replicate work
- Freely collaborate
- Leverage a large body of existing libraries
The IPython Notebook interface runs in your browser, and you don't need to know any Python to view or modify the contents. Charles set up a server running the IPython kernel on one laptop, and audience members connected through a router using their browsers. The setup demonstrated that IPython genuinely works cross-platform, and that users need not install anything (except a browser) on their local machines.
Notebooks consist of "cells" of different types:
|Markdown||- for expository content|
|Code||- for actual computing|
|Headings||- for providing linkable sections|
|Raw||- for just raw text or for disabling code cells|
Code cells produce output that appears inline with the document. Charles demonstrated a notebook he developed to explore the Karplus-Strong algorithm that Jim Rulla presented to the group in our second meeting. The algorithm synthesizes random input into sounds that sound remarkably like plucked strings. You can adjust the pitch, see the graph of the waveform, and play the sound in the notebook (even the static notebook has a sound you can play). Imagine how much more you'd learn — and how much more fun you'd have — by playing with the algorithm than by simply reading this description!
Other examples Charles developed include a csv (comma-separated-value) file reader with data plots and a Mandelbrot Set generator.
- The IPython and Python online help are helpful.
- Type "help()" in a code cell to bring up Python's interactive help.
- Click the "Help" menu item for much useful information.
- Press Enter to edit a cell, and ESC or
+ Enter to enter "command mode". These and other keyboard shortcuts are available under the Help menu item.
- Use the Cell menu item to Run the code.
- Pat Nystrom discovered that, if the kernel is running locally, disabling the "inlining" of matplotlib brings up plot windows with zoom buttons and scroll bars — a useful discovery, indeed!
- http://github.com/eastknowledge/ipython-intro - EAST Knowledge github page for notebooks
- http://nbviewer.ipython.org/github/eastknowledge/ipython-intro/tree/executed/ - Static examples of executed notebooks