In [1]:
%lsmagic


Out[1]:
Available line magics:
%alias  %alias_magic  %autocall  %automagic  %autosave  %bookmark  %cat  %cd  %clear  %colors  %config  %connect_info  %cp  %debug  %dhist  %dirs  %doctest_mode  %ed  %edit  %env  %gui  %hist  %history  %install_default_config  %install_ext  %install_profiles  %killbgscripts  %ldir  %less  %lf  %lk  %ll  %load  %load_ext  %loadpy  %logoff  %logon  %logstart  %logstate  %logstop  %ls  %lsmagic  %lx  %macro  %magic  %man  %matplotlib  %mkdir  %more  %mv  %notebook  %page  %pastebin  %pdb  %pdef  %pdoc  %pfile  %pinfo  %pinfo2  %popd  %pprint  %precision  %profile  %prun  %psearch  %psource  %pushd  %pwd  %pycat  %pylab  %qtconsole  %quickref  %recall  %rehashx  %reload_ext  %rep  %rerun  %reset  %reset_selective  %rm  %rmdir  %run  %save  %sc  %store  %sx  %system  %tb  %time  %timeit  %unalias  %unload_ext  %who  %who_ls  %whos  %xdel  %xmode

Available cell magics:
%%!  %%HTML  %%SVG  %%bash  %%capture  %%debug  %%file  %%html  %%javascript  %%latex  %%perl  %%prun  %%pypy  %%python  %%python2  %%python3  %%ruby  %%script  %%sh  %%svg  %%sx  %%system  %%time  %%timeit  %%writefile

Automagic is ON, % prefix IS NOT needed for line magics.

In [2]:
%%bash
ls theother*


theothers.ipynb

In [4]:
a = !ls 
a[:3]


Out[4]:
['a.out', 'calc.py', 'checkers.ipynb']

In [10]:
%%javascript
$('#ipython_notebook').fadeOut('slow')
$('#ipython_notebook').fadeIn('slow')



In [11]:
%%html
<div style="font-size:200%">Big</div.


Big

In [50]:
%%svg
<svg width="100" height="100">
<circle r="10" cx="50" cy="50" />
</svg>



In [12]:
%%file test.f90
program main
write(*,*) "Hello world!"
end program main


Overwriting test.f90

In [13]:
%%bash
gfortran test.f90
./a.out


 Hello world!

In [14]:
%%ruby 
for n in 1...10
    puts "line #{n}"
    STDOUT.flush
end


line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8
line 9

In [15]:
%%latex
\[ SS = \sum_i^n (x_i-\bar{x})^2 \]


\[ SS = \sum_i^n (x_i-\bar{x})^2 \]

In [16]:
%load_ext rmagic

In [17]:
%%R
plot(c(1,2,5))



In [ ]: