http://ipython.org/ipython-doc/stable/interactive/tutorial.html
% timeit range(1000) # run this one line
%% timeit range(1000) # run this cell.
max(x)
% run -d myprogram.py # step through the program!
% debug # now works in the notebook! As does raw_input() !
System commands!
output = !ping www.bbc.co.uk
.. to provide the command with ipython variables, use $ or wrap in {} as follows:
output = !grep -rF $pattern ipython/*
a = 'hello'
output = !grep -rF {a} ipython/*
Grab external python programs, edit and execute!
%load http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/contour3d_demo.py
Set high quality plots: Put this at the start.
% config InlineBackend.figure_format = 'svg'
Undo
%connect_info
to display connection info for other ipython consoles.
Setting up clients and workers:
worker:
user@worker: $ ipython kernel
[IPKernelApp] To connect to another client on this kernel, use:
[IPKernelApp] --existing kernel-12345.json
client:
user@client $ ipython qtconsole --ssh=worker --existing /path/to/kernel-12345.json
Manual ssh tunnels. This is interesting even without ipython.
$ ssh
Blogger mangled. Check the source at
http://ipython.org/ipython-doc/stable/interactive/qtconsole.html
for this.
No comments:
Post a Comment