• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Introduction to IPython & Notebook

Introduction to IPython & Notebook



IPython is an interactive Python shell, it provides tools for interactive and parallel computing that are widely used in the scientific world. It can also benefit any other Python developer.

IPython is an interactive Python shell, it provides tools for interactive and parallel computing that are widely used in the scientific world. It can also benefit any other Python developer.



Total Views
Views on SlideShare
Embed Views



2 Embeds 19

https://twitter.com 15
http://www.docshut.com 4



Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Introduction to IPython & Notebook Introduction to IPython & Notebook Presentation Transcript

    • Introduction toIPython & Notebook Areski Belaid <areski@gmail.com> github.com/areski twitter.com/areskib
    • Introduction to IPython- Fernando Perez started IPython in 2001, hewanted a better interactive Python interpreter- 259 lines of code, written in few hourshttps://gist.github.com/1579699- Today: 78,481 lines of code & more than 100contributors in the last 12 monthshttp://www.ohloh.net/p/ipython
    • What is IPython?IPython is an interactive shell for Python● additional shell syntax● introspection● tab completion● rich history● better debugging● parallel computing
    • Install IPythonhttp://ipython.org/ipython-doc/stable/install/install.html$ mkvirtualenv testipython$ pip install ipython- You could also use easy_install, but do youwant to, really?
    • Hands On IPython- Shell $ ls, pwd, !vim- Code completion $ import os $ os.[press tab]- Introspection $ os? $ os??- History > use the key up and down- Execute previous command $ _i, _ii, _iii : Previous, next previous, next next previous input- Load Code > %loadpy- Traceback and Debugger %pdb
    • Integration with your IDE- Vim https://github.com/ivanov/vim-ipython- Sublime Text https://github.com/iambus/SublimeIPython- TextMate http://wiki.ipython.org/Cookbook/Using_IPython_with_TextMate
    • What is Notebook?A web-based application that can execute code and also containrich text and figures, mathematical equations and arbitrary HTML- a web-based shell to an IPython- a mix of notes, code, html, images, video, ...- a great tool for debugging, teaching- has ability to save, edit and delete“notebooks”
    • Install NotebookLets forget about easy_install, seriously? $ pip install ipython $ pip install pyzmq $ pip install tornado $ ipython notebookFor some of the online examples : $ pip install numpy $ apt-get install libatlas-base-dev gfortran $ pip install scipy $ pip install matplotlib
    • Hands on Notebook$ ipython notebook- Cell-based execution workflow- Load previous code- Share IPython Notebook http://nbviewer.ipython.org/
    • Notebook - Django ExtensionNotebook is not only for Physicists !!!- Use it with Django: https://github.com/django-extensions/django-extensions/pull/234$ ./manage.py shell_plus --notebookThere is a little bug with the last IPython, that you can fix easily:export PYTHONPATH=/home/areski/public_html/django/MyProjects/newfies-dialerAdd this in your settings.py:IPYTHON_ARGUMENTS = [--ext, django_extensions.management.notebook_extension,--debug]
    • Conclusion- IPythonIntrospection, additional shell, tab completion, rich history,parallel computer, etc...- NotebookAll the benefits of IPython on the webIPython received a Grant Sloan Foundation grant: IPython has been awarded a $1.15 million grant from the Alfred P. Sloan Foundation. This will support several core developers, allowing them to focus on building the IPython Notebook into a tool for open, collaborative, reproducible scientific computing. The Future is Bright !!!
    • References- IPython : Python at your fingertips:http://www.youtube.com/watch?v=26wgEsg9Mcc- Using IPython Notebook with Django:http://andrewbrookins.com/python/using-ipython-notebook-with-django/- IPython Docs:http://ipython.org/documentation.html- IPython Notebook Viewer:http://nbviewer.ipython.org/
    • Hope you enjoyed it! slideshare.net/areski github.com/areski twitter.com/areskib