SlideShare a Scribd company logo
Introduction to
IPython & Notebook
 Areski Belaid <areski@gmail.com>

            github.com/areski
            twitter.com/areskib
Introduction to IPython
- Fernando Perez started IPython in 2001, he
wanted a better interactive Python interpreter

- 259 lines of code, written in few hours
https://gist.github.com/1579699

- Today: 78,481 lines of code & more than 100
contributors in the last 12 months
http://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
Introduction to IPython & Notebook
Install IPython
http://ipython.org/ipython-
doc/stable/install/install.html

$ mkvirtualenv testipython
$ pip install ipython

- You could also use easy_install, but do you
want 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
NOTEBOOK
What is Notebook?
A web-based application that can execute code and also contain
rich 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 Notebook
Let's forget about easy_install, seriously?
   $ pip install ipython
   $ pip install pyzmq
   $ pip install tornado

   $ ipython notebook
For 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 Extension
Notebook is not only for Physicists !!!

- Use it with Django:
     https://github.com/django-extensions/django-extensions/pull/234

$ ./manage.py shell_plus --notebook

There is a little bug with the last IPython, that you can fix easily:
export PYTHONPATH=/home/areski/public_html/django/MyProjects/newfies-dialer

Add this in your settings.py:
IPYTHON_ARGUMENTS = [
'--ext', 'django_extensions.management.notebook_extension',
'--debug'
]
Conclusion
- IPython
Introspection, additional shell, tab completion, rich history,
parallel computer, etc...

- Notebook
All the benefits of IPython on the web

IPython 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

More Related Content

PDF
Intro to Jupyter Notebooks
Francis Michael Bautista
 
PDF
Introduction to ipython notebook
Go Asgard
 
PDF
A quick overview of why to use and how to set up iPython notebooks for research
Adam Pah
 
PDF
The magic of IPython Notebook
Alexey Agapov
 
PDF
Introduction to IPython & Jupyter Notebooks
Eueung Mulyana
 
PDF
Jupyter, A Platform for Data Science at Scale
Matthias Bussonnier
 
PDF
Building custom kernels for IPython
Narahari (Hari) Allamraju
 
PDF
IPython: A Modern Vision of Interactive Computing (PyData SV 2013)
PyData
 
Intro to Jupyter Notebooks
Francis Michael Bautista
 
Introduction to ipython notebook
Go Asgard
 
A quick overview of why to use and how to set up iPython notebooks for research
Adam Pah
 
The magic of IPython Notebook
Alexey Agapov
 
Introduction to IPython & Jupyter Notebooks
Eueung Mulyana
 
Jupyter, A Platform for Data Science at Scale
Matthias Bussonnier
 
Building custom kernels for IPython
Narahari (Hari) Allamraju
 
IPython: A Modern Vision of Interactive Computing (PyData SV 2013)
PyData
 

What's hot (20)

PPTX
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Muralidharan Deenathayalan
 
PDF
Data analytics in the cloud with Jupyter notebooks.
Graham Dumpleton
 
PDF
Jupyter Kernel: How to Speak in Another Language
Wey-Han Liaw
 
PPT
Django Python(2)
tomcoh
 
PPT
Python Introduction
Mohammad Javad Beheshtian
 
PDF
Open source projects with python
roskakori
 
PPTX
Introduction to python programming, Why Python?, Applications of Python
Pro Guide
 
PDF
Introduction to python programming
Kiran Vadakkath
 
PPT
Python Introduction
Sofian Hadiwijaya
 
PPTX
Intro to-venv-py3
Dhineshsunder ganapathi
 
PDF
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
Tomomi Imura
 
PPTX
Clean code in Jupyter notebooks
Katerina Nerush
 
PPTX
Chapter 8 getting started with python
Praveen M Jigajinni
 
PDF
Python 3.5: An agile, general-purpose development language.
Carlos Miguel Ferreira
 
PDF
Welcome to Python
Elena Williams
 
PDF
Virtualenv
WEBdeBS
 
PDF
GPU Computing for Data Science
Domino Data Lab
 
PDF
PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...
Plotly
 
PPTX
Introduction to python
ManishJha237
 
PDF
Intro to Python Workshop San Diego, CA (January 19, 2013)
Kendall
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Muralidharan Deenathayalan
 
Data analytics in the cloud with Jupyter notebooks.
Graham Dumpleton
 
Jupyter Kernel: How to Speak in Another Language
Wey-Han Liaw
 
Django Python(2)
tomcoh
 
Python Introduction
Mohammad Javad Beheshtian
 
Open source projects with python
roskakori
 
Introduction to python programming, Why Python?, Applications of Python
Pro Guide
 
Introduction to python programming
Kiran Vadakkath
 
Python Introduction
Sofian Hadiwijaya
 
Intro to-venv-py3
Dhineshsunder ganapathi
 
[Forward4 Webinar 2016] Building IoT Prototypes w/ Raspberry Pi
Tomomi Imura
 
Clean code in Jupyter notebooks
Katerina Nerush
 
Chapter 8 getting started with python
Praveen M Jigajinni
 
Python 3.5: An agile, general-purpose development language.
Carlos Miguel Ferreira
 
Welcome to Python
Elena Williams
 
Virtualenv
WEBdeBS
 
GPU Computing for Data Science
Domino Data Lab
 
PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...
Plotly
 
Introduction to python
ManishJha237
 
Intro to Python Workshop San Diego, CA (January 19, 2013)
Kendall
 
Ad

Viewers also liked (9)

PDF
IPython & Jupyter
Big Data Colombia
 
PDF
JupyterHub for Interactive Data Science Collaboration
Carol Willing
 
PDF
도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day
Amazon Web Services Korea
 
PDF
20150306 파이썬기초 IPython을이용한프로그래밍_이태영
Tae Young Lee
 
PDF
Docker로 서버 개발 편하게 하기
Dronix
 
PDF
2016317 파이썬기초_파이썬_다중설치부터_Jupyter를이용한프로그래밍_이태영
Tae Young Lee
 
PDF
[1A6]Docker로 보는 서버 운영의 미래
NAVER D2
 
PDF
Docker란 무엇인가? : Docker 기본 사용법
pyrasis
 
PDF
도커 무작정 따라하기: 도커가 처음인 사람도 60분이면 웹 서버를 올릴 수 있습니다!
pyrasis
 
IPython & Jupyter
Big Data Colombia
 
JupyterHub for Interactive Data Science Collaboration
Carol Willing
 
도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day
Amazon Web Services Korea
 
20150306 파이썬기초 IPython을이용한프로그래밍_이태영
Tae Young Lee
 
Docker로 서버 개발 편하게 하기
Dronix
 
2016317 파이썬기초_파이썬_다중설치부터_Jupyter를이용한프로그래밍_이태영
Tae Young Lee
 
[1A6]Docker로 보는 서버 운영의 미래
NAVER D2
 
Docker란 무엇인가? : Docker 기본 사용법
pyrasis
 
도커 무작정 따라하기: 도커가 처음인 사람도 60분이면 웹 서버를 올릴 수 있습니다!
pyrasis
 
Ad

Similar to Introduction to IPython & Notebook (20)

PDF
Jupyter notebooks on steroids
Jose Enrique Ruiz
 
PDF
Open source project of the week
venturesity
 
PDF
Tips for Happier Python Debugging
Chun-Hao Chang
 
PDF
1203 ipython pycon
kkumar9034
 
PDF
USING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNED
ijseajournal
 
PDF
Wait, IPython can do that?
Sebastian Witowski
 
PDF
Fast data mining flow prototyping using IPython Notebook
Jimmy Lai
 
PDF
Wait, IPython can do that?! (30 minutes)
Sebastian Witowski
 
PDF
Setting-Up Python Environment (Jupyter Notebook)
NopphawanTamkuan
 
PDF
Making Media with Jupyter
Domino Data Lab
 
PDF
London level39
Travis Oliphant
 
PPTX
Python py charm anaconda jupyter installation and basic commands
Sayed Ahmed
 
PDF
The Joy of SciPy, Part I
Dinu Gherman
 
PDF
Jupyter machine learning crash course
Olga Scrivner
 
PDF
jupyternotebook_tutorial_bypaige python lib
ManjeetKaur941432
 
PDF
Boosting Productivity With IPython
Boey Pak Cheong
 
PDF
Jupyter Notebook_CheatSheet.pdf
hesam ahmadian
 
PPTX
Python-data-science.pptx
KabileshCm
 
PDF
Chapter 2 Python Language Basics, IPython, and Jupyter Notebooks.pdf
PyaeSone96
 
PPTX
What is Python? An overview of Python for science.
Nicholas Pringle
 
Jupyter notebooks on steroids
Jose Enrique Ruiz
 
Open source project of the week
venturesity
 
Tips for Happier Python Debugging
Chun-Hao Chang
 
1203 ipython pycon
kkumar9034
 
USING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNED
ijseajournal
 
Wait, IPython can do that?
Sebastian Witowski
 
Fast data mining flow prototyping using IPython Notebook
Jimmy Lai
 
Wait, IPython can do that?! (30 minutes)
Sebastian Witowski
 
Setting-Up Python Environment (Jupyter Notebook)
NopphawanTamkuan
 
Making Media with Jupyter
Domino Data Lab
 
London level39
Travis Oliphant
 
Python py charm anaconda jupyter installation and basic commands
Sayed Ahmed
 
The Joy of SciPy, Part I
Dinu Gherman
 
Jupyter machine learning crash course
Olga Scrivner
 
jupyternotebook_tutorial_bypaige python lib
ManjeetKaur941432
 
Boosting Productivity With IPython
Boey Pak Cheong
 
Jupyter Notebook_CheatSheet.pdf
hesam ahmadian
 
Python-data-science.pptx
KabileshCm
 
Chapter 2 Python Language Basics, IPython, and Jupyter Notebooks.pdf
PyaeSone96
 
What is Python? An overview of Python for science.
Nicholas Pringle
 

More from Areski Belaid (11)

PDF
Newfies dialer Auto dialer Software
Areski Belaid
 
PDF
Whitepaper newfies-dialer Autodialer
Areski Belaid
 
PDF
Newfies dialer Brief Introduction
Areski Belaid
 
PDF
Nikola, a static blog & site generator python meetup 19 feb2014
Areski Belaid
 
PDF
Flask Introduction - Python Meetup
Areski Belaid
 
PDF
Newfies dialer - autodialer : freeswitch weekly conference 13 march2013
Areski Belaid
 
PDF
CDR-Stats : VoIP Analytics Solution for Asterisk and FreeSWITCH with MongoDB
Areski Belaid
 
PDF
Newfies-Dialer : Autodialer software - Documentation version 1.1.0
Areski Belaid
 
PDF
Newfies dialer : freeswitch weekly conference
Areski Belaid
 
ODP
A2Billing : Turning VoIP into Business
Areski Belaid
 
PDF
A2Billing : Turning VoIP into business
Areski Belaid
 
Newfies dialer Auto dialer Software
Areski Belaid
 
Whitepaper newfies-dialer Autodialer
Areski Belaid
 
Newfies dialer Brief Introduction
Areski Belaid
 
Nikola, a static blog & site generator python meetup 19 feb2014
Areski Belaid
 
Flask Introduction - Python Meetup
Areski Belaid
 
Newfies dialer - autodialer : freeswitch weekly conference 13 march2013
Areski Belaid
 
CDR-Stats : VoIP Analytics Solution for Asterisk and FreeSWITCH with MongoDB
Areski Belaid
 
Newfies-Dialer : Autodialer software - Documentation version 1.1.0
Areski Belaid
 
Newfies dialer : freeswitch weekly conference
Areski Belaid
 
A2Billing : Turning VoIP into Business
Areski Belaid
 
A2Billing : Turning VoIP into business
Areski Belaid
 

Recently uploaded (20)

PDF
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
georgschmitzdoerner
 
PDF
Doc9.....................................
SofiaCollazos
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
DOCX
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
PDF
GYTPOL If You Give a Hacker a Host
linda296484
 
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
madgavkar20181017ppt McKinsey Presentation.pdf
georgschmitzdoerner
 
Doc9.....................................
SofiaCollazos
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
GYTPOL If You Give a Hacker a Host
linda296484
 

Introduction to IPython & Notebook

  • 1. Introduction to IPython & Notebook Areski Belaid <[email protected]> github.com/areski twitter.com/areskib
  • 2. Introduction to IPython - Fernando Perez started IPython in 2001, he wanted a better interactive Python interpreter - 259 lines of code, written in few hours https://gist.github.com/1579699 - Today: 78,481 lines of code & more than 100 contributors in the last 12 months http://www.ohloh.net/p/ipython
  • 3. What is IPython? IPython is an interactive shell for Python ● additional shell syntax ● introspection ● tab completion ● rich history ● better debugging ● parallel computing
  • 5. Install IPython http://ipython.org/ipython- doc/stable/install/install.html $ mkvirtualenv testipython $ pip install ipython - You could also use easy_install, but do you want to, really?
  • 6. 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
  • 7. 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
  • 9. What is Notebook? A web-based application that can execute code and also contain rich 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”
  • 10. Install Notebook Let's forget about easy_install, seriously? $ pip install ipython $ pip install pyzmq $ pip install tornado $ ipython notebook For some of the online examples : $ pip install numpy $ apt-get install libatlas-base-dev gfortran $ pip install scipy $ pip install matplotlib
  • 11. Hands on Notebook $ ipython notebook - Cell-based execution workflow - Load previous code - Share IPython Notebook http://nbviewer.ipython.org/
  • 12. Notebook - Django Extension Notebook is not only for Physicists !!! - Use it with Django: https://github.com/django-extensions/django-extensions/pull/234 $ ./manage.py shell_plus --notebook There is a little bug with the last IPython, that you can fix easily: export PYTHONPATH=/home/areski/public_html/django/MyProjects/newfies-dialer Add this in your settings.py: IPYTHON_ARGUMENTS = [ '--ext', 'django_extensions.management.notebook_extension', '--debug' ]
  • 13. Conclusion - IPython Introspection, additional shell, tab completion, rich history, parallel computer, etc... - Notebook All the benefits of IPython on the web IPython 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 !!!
  • 14. 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/
  • 15. Hope you enjoyed it! slideshare.net/areski github.com/areski twitter.com/areskib