SlideShare a Scribd company logo
1 of 34
Download to read offline

IPython + [Jupyter] Notebook
Eueung Mulyana
http://eueung.github.io/python/ipython-intro
Hint: Navigate with Arrow Keys | Attribution-ShareAlike CC BY-SA
1 / 34
Agenda
1. Introduction to IPython
2. IPython QtConsole
3. Jupyter Notebook
4. Notebook: Getting Started
2 / 34
 Introduction to IPython
3 / 34
One of Python’s most useful features is its interactive
interpreter. It allows for very fast testing of ideas without the
overhead of creating test files as is typical in most programming
languages. However, the interpreter supplied with the standard
Python distribution is somewhat limited for extended interactive
use.
IPython
A comprehensive environment for interactive and exploratory
computing
Three Main Components:
An enhanced interactive Python shell.
A decoupled two-process communication model, which
allows for multiple clients to connect to a computation
kernel, most notably the web-based notebook.
An architecture for interactive parallel computing.
Some of the many useful features of IPython includes:
Command history, which can be browsed with the up and
down arrows on the keyboard.
Tab auto-completion.
In-line editing of code.
Object introspection, and automatic extract of
documentation strings from python objects like classes
and functions.
Good interaction with operating system shell.
Support for multiple parallel back-end processes, that can
run on computing clusters or cloud services like Amazon
EC2.
4 / 34
IPython provides a rich architecture for interactive computing
with:
A powerful interactive shell.
A kernel for Jupyter.
Easy to use, high performance tools for parallel
computing.
Support for interactive data visualization and use of GUI
toolkits.
Flexible, embeddable interpreters to load into your own
projects.
IPython
IPython is an interactive shell that addresses the limitation of the
standard python interpreter, and it is a work-horse for scientific
use of python. It provides an interactive prompt to the python
interpreter with a greatly improved user-friendliness.
It comes with a browser-based notebook with support for code,
text, mathematical expressions, inline plots and other rich
media.
You don’t need to know anything beyond Python to start using
IPython – just type commands as you would at the standard
Python prompt. But IPython can do much more than the
standard prompt...
5 / 34
IPython
Beyond the Terminal ...
The REPL as a Network Protocol
Kernels
Execute Code
Clients
Read input
Present Output
Simple abstractions enable rich, sophisticated clients
6 / 34
The Four Most Helpful Commands
The four most helpful commands is shown to you in a banner,
every time you start IPython:
Command Description
?
Introduction and overview of
IPython’s features.
%quickref Quick reference.
help Python’s own help system.
object?
Details about object, use
object??for extra details.
Tab Completion
Tab completion, especially for attributes, is a convenient way to
explore the structure of any object you’re dealing with. Simply
type object_name.<TAB>to view the object’s attributes.
Besides Python objects and keywords, tab completion also
works on file and directory names.
Running and Editing
The %runmagic command allows you to run any python script
and load all of its data directly into the interactive namespace.
Since the file is re-read from disk each time, changes you make
to it are reflected immediately (unlike imported modules, which
have to be specifically reloaded). IPython also includes
dreload, a recursive reload function.
%runhas special flags for timing the execution of your scripts
(-t), or for running them under the control of either Python’s
pdb debugger (-d) or profiler (-p).
The %editcommand gives a reasonable approximation of
multiline editing, by invoking your favorite editor on the spot.
IPython will execute the code you type in there as if it were
typed interactively.
7 / 34
Magic Functions ...
The following examples show how to call the builtin %timeit
magic, both in line and cell mode:
In[1]:%timeitrange(1000)
100000loops,bestof3:7.76usperloop
In[2]:%%timeitx=range(10000)
...:max(x)
...:
1000loops,bestof3:223usperloop
The builtin magics include:
Functions that work with code: %run, %edit, %save,
%macro, %recall, etc.
Functions which affect the shell: %colors, %xmode,
%autoindent, %automagic, etc.
Other functions such as %reset, %timeit,
%%writefile, %load, or %paste.
Exploring your Objects
Typing object_name?will print all sorts of details about any
object, including docstrings, function definition lines (for call
arguments) and constructor details for classes. To get specific
information on an object, you can use the magic commands
%pdoc, %pdef, %psourceand %pfile.
Magic Functions
IPython has a set of predefined magic functions that you can call
with a command line style syntax. There are two kinds of
magics, line-oriented and cell-oriented.
Line magics are prefixed with the %character and work
much like OS command-line calls: they get as an
argument the rest of the line, where arguments are
passed without parentheses or quotes.
Cell magics are prefixed with a double %%, and they are
functions that get as an argument not only the rest of the
line, but also the lines below it in a separate argument.
8 / 34
System Shell Commands
To run any command at the system shell, simply prefix it with !.
You can capture the output into a Python list. To pass the values
of Python variables or expressions to system commands, prefix
them with $.
System Aliases
It’s convenient to have aliases to the system commands you use
most often. This allows you to work seamlessly from inside
IPython with the same commands you are used to in your
system shell. IPython comes with some pre-defined aliases and
a complete system for changing directories, both via a stack
(%pushd, %popdand %dhist) and via direct %cd. The latter
keeps a history of visited directories and allows you to go to any
previously visited one.
Magic Functions ...
You can always call them using the %prefix, and if you’re calling
a line magic on a line by itself, you can omit even that: run
thescript.py. You can toggle this behavior by running the
%automagicmagic.
Cell magics must always have the %%prefix.
A more detailed explanation of the magic system can be
obtained by calling %magic, and for more details on any magic
function, call %somemagic?to read its docstring. To see all
the available magic functions, call %lsmagic.
System Shell Commands ...
!pingwww.bbc.co.uk
files=!ls #capture
!grep-rF$patternipython/* #passingvars
9 / 34
History ...
Input and output history are kept in variables called In and Out,
keyed by the prompt numbers. The last three objects in output
history are also kept in variables named _, __and ___.
You can use the %historymagic function to examine past
input and output. Input history from previous sessions is saved
in a database, and IPython can be configured to save output
history.
Several other magic functions can use your input history,
including %edit, %rerun, %recall, %macro, %saveand
%pastebin. You can use a standard format to refer to lines:
%pastebin318-20~1/1-5
This will take line 3 and lines 18 to 20 from the current session,
and lines 1-5 from the previous session.
History
IPython stores both the commands you enter, and the results it
produces. You can easily go through previous commands with
the up- and down-arrow keys, or access your history in more
sophisticated ways.
Debugging
After an exception occurs, you can call %debugto jump into the
Python debugger (pdb) and examine the problem. Alternatively,
if you call %pdb, IPython will automatically start the debugger
on any uncaught exception. You can print variables, see code,
execute statements and even walk up and down the call stack to
track down the true source of the problem. This can be an
efficient way to develop and debug code, in many cases
eliminating the need for print statements or external debugging
tools.
You can also step through a program from the beginning by
calling %run-dtheprogram.py.
10 / 34
 IPython QtConsole
11 / 34
To force multiline input, hit Ctrl-Enterat the end of
the first line instead of Enter
Shift-Enterto execute!
IPython QtConsole
a version of IPython, using the new two-process ZeroMQ
Kernel, running in a PyQt GUI
a very lightweight widget that largely feels like a terminal,
but provides a number of enhancements only possible in
a GUI, such as inline figures, proper multiline editing with
syntax highlighting, graphical calltips, and much more.
#TostarttheQtConsole
ipythonqtconsole
#Toseeaquickintroductionofthemainfeatures
%guiref
See: Qt Console @ RTD
12 / 34
IPython QtConsole
MF %load
The new %loadmagic takes any script, and pastes its contents
as your next input, so you can edit it before executing. The script
may be on your machine, but you can also specify an history
range, or a url, and it will download the script from the web.
This is particularly useful for playing with examples from
documentation, such as matplotlib.
In[6]:%loadhttp://matplotlib.org/plot_directive/mpl_example
In[7]:frommpl_toolkits.mplot3dimportaxes3d
...:importmatplotlib.pyplotasplt
...:
...:fig=plt.figure()
...:ax=fig.add_subplot(111,projection='3d')
...:X,Y,Z=axes3d.get_test_data(0.05)
...:cset=ax.contour(X,Y,Z)
...:ax.clabel(cset,fontsize=9,inline=1)
...:
...:plt.show()
13 / 34
MF %load...
The %loadmagic can also load source code from objects in the
user or global namespace by invoking the -noption.
In[1]:importhello_world
...:%load-nhello_world.say_hello
In[3]:defsay_hello():
...: print("HelloWorld!")
Inline Matplotlib
One of the most exciting features of the QtConsole is embedded
matplotlib figures. You can use any standard matplotlib GUI
backend to draw the figures, and since there is now a two-
process model, there is no longer a conflict between user input
and the drawing eventloop.
14 / 34
If you have a reference to a matplotlib figure object, you can
always display that specific figure:
In[1]:f=plt.figure()
In[2]:plt.plot(np.rand(100))
Out[2]:[<matplotlib.lines.Line2Dat0x7fc6ac03dd90>]
In[3]:display(f)
#Plotisshownhere
In[4]:plt.title('Atitle')
Out[4]:<matplotlib.text.Textat0x7fc6ac023450>
In[5]:display(f)
#Updatedplotwithtitleisshownhere.
Matplotlib: display()
IPython provides a function display()for displaying rich
representations of objects if they are available. The IPython
display system provides a mechanism for specifying PNG or SVG
(and more) representations of objects for GUI frontends. When
you enable matplotlib integration via the %matplotlib magic,
IPython registers convenient PNG and SVG renderers for
matplotlib figures, so you can embed them in your document by
calling display() on one or more of them. This is especially
useful for saving your work.
In[4]:fromIPython.displayimportdisplay
In[5]:plt.plot(range(5))#plotsinthematplotlibwindow
In[6]:display(plt.gcf())#embedsthecurrentfigureinthe
In[7]:display(*getfigs())#embedsallactivefiguresinthe
15 / 34
--matplotlibinline
If you want to have all of your figures embedded in your
session, instead of calling display(), you can specify --
matplotlibinlinewhen you start the console, and each
time you make a plot, it will show up in your document, as if you
had called display(fig)().
The inline backend can use either SVG or PNG figures (PNG
being the default). To switch between them, set the
InlineBackend.figure_format configurable in a config file, or via
the %configmagic:
In[10]:%configInlineBackend.figure_format='svg'
Changing the inline figure format also affects calls to display()
above, even if you are not using the inline backend for all
figures.
In[13]:[fig.close()forfigingetfigs()]
By default, IPython closes all figures at the completion of each
execution. It also means that the first matplotlib call in each cell
will always create a new figure. However, it does prevent the list
of active figures surviving from one input cell to the next, so if
you want to continue working with a figure, you must hold on to
a reference to it.
In[11]:plt.plot(range(100))
<single-lineplot>
In[12]:plt.plot([1,3,2])
<anothersingle-lineplot>
#-----
In[11]:fig=gcf()
....:fig.plot(rand(100))
<plot>
In[12]:fig.title('RandomTitle')
<redrawplotwithtitle>
This behavior is controlled by the InlineBackend.close_figures
configurable, and if you set it to False, via %config or config file,
then IPython will not close figures, and tools like gcf(), gca(),
getfigs() will behave the same as they do with other backends.
You will, however, have to manually close figures:
16 / 34
 Jupyter Notebook
17 / 34
Jupyter Notebook
The Jupyter Notebook is a web application for interactive data
science and scientific computing.
Using the Jupyter Notebook, you can author engaging
documents that combine live-code with narrative text,
equations, images, video, and visualizations. By encoding a
complete and reproducible record of a computation, the
documents can be shared with others on GitHub, Dropbox, and
the Jupyter Notebook Viewer.
#Install
sudoapt-getinstallbuild-essentialpython-dev
pipinstalljupyter
#Start
jupyternotebook
#Previously
pipinstall"ipython[notebook]"
ipythonnotebook
See: Jupyter@RTD
18 / 34
Open source, interactive data science and scientific
computing across over 40 programming languages.
The Jupyter Notebook is a web application that allows you
to create and share documents that contain live code,
equations, visualizations and explanatory text.
Uses include: data cleaning and transformation,
numerical simulation, statistical modeling, machine
learning and much more.
Language of Choice
The Notebook has support for over 40 programming languages,
including those popular in Data Science such as Python, R, Julia
and Scala.
Share Notebooks
Notebooks can be shared with others using email, Dropbox,
GitHub and the Jupyter Notebook Viewer.
Interactive Widgets
Code can produce rich output such as images, videos, LaTeX,
and JavaScript. Interactive widgets can be used to manipulate
and visualize data in realtime.
Big-Data Integration
Leverage big data tools, such as Apache Spark, from Python, R
and Scala. Explore that same data with pandas, scikit-learn,
ggplot2, dplyr, etc.
See: Jupyter.ORG Website
19 / 34
Project Jupyter
The IPython Notebook (2011)
Rich Web Client
Text & Math
Code
Results
Share, Reproduce.
See: Fernando Perez, IPython & Project Jupyter
20 / 34
Project Jupyter
IPython
Interactive Python shell at the terminal
Kernel for this protocol in Python
Tools for Interactive Parallel computing
Jupyter
Network protocol for interactive computing
Clients for protocol
Console
Qt Console
Notebook
Notebook file format & tools (nbconvert...)
Nbviewer
What’s in a name?
Inspired by the open languages of science:
Julia, Python & R
Not an acronym: all languages equal class citizens.
Astronomy and Scientific Python: A long and fruitful
collaboration
Galileo's notebooks:
The original, open science, data-and-narrative
papers
Authorea: “Science was Always meant to be Open”
See: Fernando Perez, IPython & Project Jupyter
21 / 34
Project Jupyter
From IPython to Project Jupyter
Not just about Python: Kernels in any language
IPython : "Official"
IJulia, IRKernel, IHaskell, IFSharp, Ruby, IScala, IErlang, ..
Lots more! ~37 and counting
Why is it called IPython, if it can do Julia, R, Haskell, Ruby,
… ?”
TL;DR
Separation of the language-agnostic components
Jupyter: protocol, format, multi-user server
IPython: interactive Python console, Jupyter kernel
Jupyter kernels = Languages which can be used from the
notebook (37 and counting)
A Simple and Generic Architecture
 
See: Fernando Perez, IPython & Project Jupyter
22 / 34
Convention
In this document, we use the terms Jupyter and IPython
Notebooks interchangeably. It might refer to the previous
version of the Notebook (IPython).
23 / 34
The Notebook
Notebook mode supports literate computing and reproducible
sessions
Allows to store chunks of python along side the results
and additional comments (HTML, Latex, MarkDown)
Can be exported in various file formats
Notebook are the de-facto standard for sharing python sessions.
The Notebook: “Literate Computing”
Computational Narratives
Computers deal with code and data.
Humans deal with narratives that communicate.
Literate Computing (not Literate Programming)
Narratives anchored in a live computation, that
communicate a story based on data and results.
24 / 34
Seamless Notebook Sharing
nbviewer
Zero-install reading of notebooks
Just share a URL
nbviewer.ipython.org
25 / 34
Jupyter Ecosystem
Reproducible Research
Paper, Notebooks and Virtual Machine
Scientific Blogging
Executable books
MOOCs and University Courses
Executable Papers
...
Jose Unpingco
Python for Signal Processing
Springer hardcover book
Chapters: IPython Notebooks
Posted as a blog entry
All available as a Github repo
26 / 34
Notebook Workflows
 
Credit: Joshua Barrat (via F. Perez)
27 / 34
 Notebook: Getting Started
28 / 34
Review
IPython Notebook
IPython notebook is an HTML-based notebook environment for
Python. It is based on the IPython shell, but provides a cell-
based environment with great interactivity, where calculations
can be organized and documented in a structured way.
Although using a web browser as graphical interface, IPython
notebooks are usually run locally, from the same computer that
run the browser.
IPython Notebook
Web-based user interface to IPython, Interactive Python
interpreter in the browser
Literate computing, Open format combining executable
code, text and multimedia
Pretty graphs
Version controlled science!
To start a new IPython notebook session, run the following
command:
ipythonnotebook
#or
jupyternotebook
from a directory where you want the notebooks to be stored.
This will open a new browser window (or a new tab in an
existing window) with an index page where existing notebooks
are shown and from which new notebooks can be created.
29 / 34
Up and Running
An IPython notebook lets you write and execute Python code in
your web browser. IPython notebooks make it very easy to tinker
with code and execute it in bits and pieces; for this reason
IPython notebooks are widely used in scientific computing.
Once IPython is running, point your web browser at
http://localhost:8888 to start using IPython notebooks. If
everything worked correctly, you should see a screen showing
all available IPython notebooks in the current directory.
If you click through to a notebook file, it will be executed and
displayed on a new page.
See: CS231n: IPython Tutorial
30 / 34
Up and Running
An IPython notebook is made up of a number of cells. Each cell
can contain Python code. You can execute a cell by clicking on it
and pressing Shift-Enter. When you do so, the code in the
cell will run, and the output of the cell will be displayed beneath
the cell. See example.
Global variables are shared between cells. See the notebook
after executing the second cell.
By convention, IPython notebooks are expected to be run from
top to bottom. Failing to execute some cells or executing cells
out of order can result in errors.
See: CS231n: IPython Tutorial
31 / 34
Collections and Links
A gallery of interesting IPython Notebooks
Notebooks for Learning
Python Fundamentals | DLAB @ Berkeley
Python Lectures | Rajath Kumar MP
Intro Programming | Eric Matthes
Python Crash Course | Eric Matthes
IPython Minibook | Cyrille Rossant
IPython & Project Jupyter | Fernando Perez
32 / 34
References
1. IPython Documentation @ readthedocs.org
2. Jupyter Documentation @ readthedocs.org
3. Fernando Perez, IPython & Project Jupyter | A language-independent architecture for open computing and
data science
4. Juan Luis Cano Rodriguez, IPython: How a notebook is changing science | Python as a real alternative to
MATLAB, Mathematica and other commercial software
5. Olivier Hervieu: Introduction to scientific programming in python
6. CS231n: IPython Tutorial, http://cs231n.github.io/ipython-tutorial/
7. J.R. Johansson: Introduction to scientific computing with Python
33 / 34

END
Eueung Mulyana
http://eueung.github.io/python/ipython-intro
Hint: Navigate with Arrow Keys | Attribution-ShareAlike CC BY-SA
34 / 34

More Related Content

What's hot

Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programmingSrinivas Narasegouda
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python pptPriyanka Pradhan
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on pythonwilliam john
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To PythonVanessa Rene
 
Python Exception Handling
Python Exception HandlingPython Exception Handling
Python Exception HandlingMegha V
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-pythonAakashdata
 
Data Visualization in Python
Data Visualization in PythonData Visualization in Python
Data Visualization in PythonJagriti Goswami
 
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaEdureka!
 
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaEdureka!
 

What's hot (20)

Python OOPs
Python OOPsPython OOPs
Python OOPs
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python ppt
 
Chapter 03 python libraries
Chapter 03 python librariesChapter 03 python libraries
Chapter 03 python libraries
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
NUMPY
NUMPY NUMPY
NUMPY
 
Python Exception Handling
Python Exception HandlingPython Exception Handling
Python Exception Handling
 
Intro to Jupyter Notebooks
Intro to Jupyter NotebooksIntro to Jupyter Notebooks
Intro to Jupyter Notebooks
 
What is Jupyter Notebook?
What is Jupyter Notebook?What is Jupyter Notebook?
What is Jupyter Notebook?
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
Data Visualization in Python
Data Visualization in PythonData Visualization in Python
Data Visualization in Python
 
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Python
PythonPython
Python
 
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
 
Python exception handling
Python   exception handlingPython   exception handling
Python exception handling
 

Viewers also liked

Jupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at ScaleJupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at ScaleMatthias Bussonnier
 
Introduction to IPython & Notebook
Introduction to IPython & NotebookIntroduction to IPython & Notebook
Introduction to IPython & NotebookAreski Belaid
 
HadoopCon 2016 - 用 Jupyter Notebook Hold 住一個上線 Spark Machine Learning 專案實戰
HadoopCon 2016  - 用 Jupyter Notebook Hold 住一個上線 Spark  Machine Learning 專案實戰HadoopCon 2016  - 用 Jupyter Notebook Hold 住一個上線 Spark  Machine Learning 專案實戰
HadoopCon 2016 - 用 Jupyter Notebook Hold 住一個上線 Spark Machine Learning 專案實戰Wayne Chen
 
JupyterHub for Interactive Data Science Collaboration
JupyterHub for Interactive Data Science CollaborationJupyterHub for Interactive Data Science Collaboration
JupyterHub for Interactive Data Science CollaborationCarol Willing
 
20150306 파이썬기초 IPython을이용한프로그래밍_이태영
20150306 파이썬기초 IPython을이용한프로그래밍_이태영20150306 파이썬기초 IPython을이용한프로그래밍_이태영
20150306 파이썬기초 IPython을이용한프로그래밍_이태영Tae Young Lee
 
IPython: A Modern Vision of Interactive Computing (PyData SV 2013)
IPython: A Modern Vision of Interactive Computing (PyData SV 2013)IPython: A Modern Vision of Interactive Computing (PyData SV 2013)
IPython: A Modern Vision of Interactive Computing (PyData SV 2013)PyData
 
Clean code in Jupyter notebooks
Clean code in Jupyter notebooksClean code in Jupyter notebooks
Clean code in Jupyter notebooksKaterina Nerush
 
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.Graham Dumpleton
 
Jupyterの機能を拡張してみた
Jupyterの機能を拡張してみたJupyterの機能を拡張してみた
Jupyterの機能を拡張してみたtaka400k
 
Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.Graham Dumpleton
 
PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...
PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...
PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...Plotly
 
[數學、邏輯與人生] 05 數,三聲數
[數學、邏輯與人生] 05 數,三聲數[數學、邏輯與人生] 05 數,三聲數
[數學、邏輯與人生] 05 數,三聲數Yen-lung Tsai
 
D3 in Jupyter : PyData NYC 2015
D3 in Jupyter : PyData NYC 2015D3 in Jupyter : PyData NYC 2015
D3 in Jupyter : PyData NYC 2015Brian Coffey
 
도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day
도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day
도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container DayAmazon Web Services Korea
 
Data science apps: beyond notebooks
Data science apps: beyond notebooksData science apps: beyond notebooks
Data science apps: beyond notebooksNatalino Busa
 

Viewers also liked (20)

Jupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at ScaleJupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at Scale
 
Introduction to IPython & Notebook
Introduction to IPython & NotebookIntroduction to IPython & Notebook
Introduction to IPython & Notebook
 
HadoopCon 2016 - 用 Jupyter Notebook Hold 住一個上線 Spark Machine Learning 專案實戰
HadoopCon 2016  - 用 Jupyter Notebook Hold 住一個上線 Spark  Machine Learning 專案實戰HadoopCon 2016  - 用 Jupyter Notebook Hold 住一個上線 Spark  Machine Learning 專案實戰
HadoopCon 2016 - 用 Jupyter Notebook Hold 住一個上線 Spark Machine Learning 專案實戰
 
JupyterHub for Interactive Data Science Collaboration
JupyterHub for Interactive Data Science CollaborationJupyterHub for Interactive Data Science Collaboration
JupyterHub for Interactive Data Science Collaboration
 
20150306 파이썬기초 IPython을이용한프로그래밍_이태영
20150306 파이썬기초 IPython을이용한프로그래밍_이태영20150306 파이썬기초 IPython을이용한프로그래밍_이태영
20150306 파이썬기초 IPython을이용한프로그래밍_이태영
 
IPython: A Modern Vision of Interactive Computing (PyData SV 2013)
IPython: A Modern Vision of Interactive Computing (PyData SV 2013)IPython: A Modern Vision of Interactive Computing (PyData SV 2013)
IPython: A Modern Vision of Interactive Computing (PyData SV 2013)
 
IPython & Jupyter
IPython & JupyterIPython & Jupyter
IPython & Jupyter
 
Building custom kernels for IPython
Building custom kernels for IPythonBuilding custom kernels for IPython
Building custom kernels for IPython
 
Clean code in Jupyter notebooks
Clean code in Jupyter notebooksClean code in Jupyter notebooks
Clean code in Jupyter notebooks
 
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
 
Jupyterの機能を拡張してみた
Jupyterの機能を拡張してみたJupyterの機能を拡張してみた
Jupyterの機能を拡張してみた
 
Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.Data analytics in the cloud with Jupyter notebooks.
Data analytics in the cloud with Jupyter notebooks.
 
PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...
PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...
PLOTCON NYC: The Architecture of Jupyter: Protocols for Interactive Data Expl...
 
Days on Jupyter
Days on JupyterDays on Jupyter
Days on Jupyter
 
[數學、邏輯與人生] 05 數,三聲數
[數學、邏輯與人生] 05 數,三聲數[數學、邏輯與人生] 05 數,三聲數
[數學、邏輯與人生] 05 數,三聲數
 
Python basics
Python basicsPython basics
Python basics
 
D3 in Jupyter : PyData NYC 2015
D3 in Jupyter : PyData NYC 2015D3 in Jupyter : PyData NYC 2015
D3 in Jupyter : PyData NYC 2015
 
도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day
도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day
도커 컨테이너 활용 사례 Codigm - 남 유석 개발팀장 :: AWS Container Day
 
Python basics
Python basicsPython basics
Python basics
 
Data science apps: beyond notebooks
Data science apps: beyond notebooksData science apps: beyond notebooks
Data science apps: beyond notebooks
 

Similar to Introduction to IPython & Jupyter Notebooks

Tutorial_Python1.pdf
Tutorial_Python1.pdfTutorial_Python1.pdf
Tutorial_Python1.pdfMuzamilFaiz
 
Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Sebastian Witowski
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python ProgrammingDozie Agbo
 
Python Programming | JNTUK | UNIT 1 | Lecture 3
Python Programming | JNTUK | UNIT 1 | Lecture 3Python Programming | JNTUK | UNIT 1 | Lecture 3
Python Programming | JNTUK | UNIT 1 | Lecture 3FabMinds
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdfsamiwaris2
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughgabriellekuruvilla
 
python presentation
python presentationpython presentation
python presentationVaibhavMawal
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experiencedzynofustechnology
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine LearningStudent
 
Python Evolution
Python EvolutionPython Evolution
Python EvolutionQuintagroup
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh MalothBhavsingh Maloth
 

Similar to Introduction to IPython & Jupyter Notebooks (20)

Tutorial_Python1.pdf
Tutorial_Python1.pdfTutorial_Python1.pdf
Tutorial_Python1.pdf
 
PYTHON PROGRAMMING NOTES RKREDDY.pdf
PYTHON PROGRAMMING NOTES RKREDDY.pdfPYTHON PROGRAMMING NOTES RKREDDY.pdf
PYTHON PROGRAMMING NOTES RKREDDY.pdf
 
Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)Wait, IPython can do that?! (30 minutes)
Wait, IPython can do that?! (30 minutes)
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
 
Python Programming | JNTUK | UNIT 1 | Lecture 3
Python Programming | JNTUK | UNIT 1 | Lecture 3Python Programming | JNTUK | UNIT 1 | Lecture 3
Python Programming | JNTUK | UNIT 1 | Lecture 3
 
Wait, IPython can do that?
Wait, IPython can do that?Wait, IPython can do that?
Wait, IPython can do that?
 
Introduction to python3.pdf
Introduction to python3.pdfIntroduction to python3.pdf
Introduction to python3.pdf
 
PHYTON-REPORT.pdf
PHYTON-REPORT.pdfPHYTON-REPORT.pdf
PHYTON-REPORT.pdf
 
Python
Python Python
Python
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
INTERNSHIP REPORT.docx
 INTERNSHIP REPORT.docx INTERNSHIP REPORT.docx
INTERNSHIP REPORT.docx
 
python presentation
python presentationpython presentation
python presentation
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experienced
 
Python PPT1.pdf
Python PPT1.pdfPython PPT1.pdf
Python PPT1.pdf
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
 
Python Evolution
Python EvolutionPython Evolution
Python Evolution
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
 

More from Eueung Mulyana

Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem PerspectiveHyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem PerspectiveEueung Mulyana
 
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated WorldIndustry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated WorldEueung Mulyana
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain IntroductionEueung Mulyana
 
Bringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based ApproachBringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based ApproachEueung Mulyana
 
FinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency IntroductionFinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency IntroductionEueung Mulyana
 
Open Source Networking Overview
Open Source Networking OverviewOpen Source Networking Overview
Open Source Networking OverviewEueung Mulyana
 
ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments Eueung Mulyana
 
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorialOpen stack pike-devstack-tutorial
Open stack pike-devstack-tutorialEueung Mulyana
 
ONOS SDN Controller - Introduction
ONOS SDN Controller - IntroductionONOS SDN Controller - Introduction
ONOS SDN Controller - IntroductionEueung Mulyana
 
OpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - IntroductionOpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - IntroductionEueung Mulyana
 
Android Programming Basics
Android Programming BasicsAndroid Programming Basics
Android Programming BasicsEueung Mulyana
 
Cloud Computing: Overview and Examples
Cloud Computing: Overview and ExamplesCloud Computing: Overview and Examples
Cloud Computing: Overview and ExamplesEueung Mulyana
 
selected input/output - sensors and actuators
selected input/output - sensors and actuatorsselected input/output - sensors and actuators
selected input/output - sensors and actuatorsEueung Mulyana
 
Connected Things, IoT and 5G
Connected Things, IoT and 5GConnected Things, IoT and 5G
Connected Things, IoT and 5GEueung Mulyana
 
Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+Eueung Mulyana
 
NodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseNodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseEueung Mulyana
 
Trends and Enablers - Connected Services and Cloud Computing
Trends and Enablers  - Connected Services and Cloud ComputingTrends and Enablers  - Connected Services and Cloud Computing
Trends and Enablers - Connected Services and Cloud ComputingEueung Mulyana
 

More from Eueung Mulyana (20)

FGD Big Data
FGD Big DataFGD Big Data
FGD Big Data
 
Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem PerspectiveHyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
 
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated WorldIndustry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain Introduction
 
Bringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based ApproachBringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based Approach
 
FinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency IntroductionFinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency Introduction
 
Open Source Networking Overview
Open Source Networking OverviewOpen Source Networking Overview
Open Source Networking Overview
 
ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments
 
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorialOpen stack pike-devstack-tutorial
Open stack pike-devstack-tutorial
 
Basic onos-tutorial
Basic onos-tutorialBasic onos-tutorial
Basic onos-tutorial
 
ONOS SDN Controller - Introduction
ONOS SDN Controller - IntroductionONOS SDN Controller - Introduction
ONOS SDN Controller - Introduction
 
OpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - IntroductionOpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - Introduction
 
Mininet Basics
Mininet BasicsMininet Basics
Mininet Basics
 
Android Programming Basics
Android Programming BasicsAndroid Programming Basics
Android Programming Basics
 
Cloud Computing: Overview and Examples
Cloud Computing: Overview and ExamplesCloud Computing: Overview and Examples
Cloud Computing: Overview and Examples
 
selected input/output - sensors and actuators
selected input/output - sensors and actuatorsselected input/output - sensors and actuators
selected input/output - sensors and actuators
 
Connected Things, IoT and 5G
Connected Things, IoT and 5GConnected Things, IoT and 5G
Connected Things, IoT and 5G
 
Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+
 
NodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseNodeMCU with Blynk and Firebase
NodeMCU with Blynk and Firebase
 
Trends and Enablers - Connected Services and Cloud Computing
Trends and Enablers  - Connected Services and Cloud ComputingTrends and Enablers  - Connected Services and Cloud Computing
Trends and Enablers - Connected Services and Cloud Computing
 

Recently uploaded

SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 

Recently uploaded (17)

SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 

Introduction to IPython & Jupyter Notebooks

  • 1.  IPython + [Jupyter] Notebook Eueung Mulyana http://eueung.github.io/python/ipython-intro Hint: Navigate with Arrow Keys | Attribution-ShareAlike CC BY-SA 1 / 34
  • 2. Agenda 1. Introduction to IPython 2. IPython QtConsole 3. Jupyter Notebook 4. Notebook: Getting Started 2 / 34
  • 3.  Introduction to IPython 3 / 34
  • 4. One of Python’s most useful features is its interactive interpreter. It allows for very fast testing of ideas without the overhead of creating test files as is typical in most programming languages. However, the interpreter supplied with the standard Python distribution is somewhat limited for extended interactive use. IPython A comprehensive environment for interactive and exploratory computing Three Main Components: An enhanced interactive Python shell. A decoupled two-process communication model, which allows for multiple clients to connect to a computation kernel, most notably the web-based notebook. An architecture for interactive parallel computing. Some of the many useful features of IPython includes: Command history, which can be browsed with the up and down arrows on the keyboard. Tab auto-completion. In-line editing of code. Object introspection, and automatic extract of documentation strings from python objects like classes and functions. Good interaction with operating system shell. Support for multiple parallel back-end processes, that can run on computing clusters or cloud services like Amazon EC2. 4 / 34
  • 5. IPython provides a rich architecture for interactive computing with: A powerful interactive shell. A kernel for Jupyter. Easy to use, high performance tools for parallel computing. Support for interactive data visualization and use of GUI toolkits. Flexible, embeddable interpreters to load into your own projects. IPython IPython is an interactive shell that addresses the limitation of the standard python interpreter, and it is a work-horse for scientific use of python. It provides an interactive prompt to the python interpreter with a greatly improved user-friendliness. It comes with a browser-based notebook with support for code, text, mathematical expressions, inline plots and other rich media. You don’t need to know anything beyond Python to start using IPython – just type commands as you would at the standard Python prompt. But IPython can do much more than the standard prompt... 5 / 34
  • 6. IPython Beyond the Terminal ... The REPL as a Network Protocol Kernels Execute Code Clients Read input Present Output Simple abstractions enable rich, sophisticated clients 6 / 34
  • 7. The Four Most Helpful Commands The four most helpful commands is shown to you in a banner, every time you start IPython: Command Description ? Introduction and overview of IPython’s features. %quickref Quick reference. help Python’s own help system. object? Details about object, use object??for extra details. Tab Completion Tab completion, especially for attributes, is a convenient way to explore the structure of any object you’re dealing with. Simply type object_name.<TAB>to view the object’s attributes. Besides Python objects and keywords, tab completion also works on file and directory names. Running and Editing The %runmagic command allows you to run any python script and load all of its data directly into the interactive namespace. Since the file is re-read from disk each time, changes you make to it are reflected immediately (unlike imported modules, which have to be specifically reloaded). IPython also includes dreload, a recursive reload function. %runhas special flags for timing the execution of your scripts (-t), or for running them under the control of either Python’s pdb debugger (-d) or profiler (-p). The %editcommand gives a reasonable approximation of multiline editing, by invoking your favorite editor on the spot. IPython will execute the code you type in there as if it were typed interactively. 7 / 34
  • 8. Magic Functions ... The following examples show how to call the builtin %timeit magic, both in line and cell mode: In[1]:%timeitrange(1000) 100000loops,bestof3:7.76usperloop In[2]:%%timeitx=range(10000) ...:max(x) ...: 1000loops,bestof3:223usperloop The builtin magics include: Functions that work with code: %run, %edit, %save, %macro, %recall, etc. Functions which affect the shell: %colors, %xmode, %autoindent, %automagic, etc. Other functions such as %reset, %timeit, %%writefile, %load, or %paste. Exploring your Objects Typing object_name?will print all sorts of details about any object, including docstrings, function definition lines (for call arguments) and constructor details for classes. To get specific information on an object, you can use the magic commands %pdoc, %pdef, %psourceand %pfile. Magic Functions IPython has a set of predefined magic functions that you can call with a command line style syntax. There are two kinds of magics, line-oriented and cell-oriented. Line magics are prefixed with the %character and work much like OS command-line calls: they get as an argument the rest of the line, where arguments are passed without parentheses or quotes. Cell magics are prefixed with a double %%, and they are functions that get as an argument not only the rest of the line, but also the lines below it in a separate argument. 8 / 34
  • 9. System Shell Commands To run any command at the system shell, simply prefix it with !. You can capture the output into a Python list. To pass the values of Python variables or expressions to system commands, prefix them with $. System Aliases It’s convenient to have aliases to the system commands you use most often. This allows you to work seamlessly from inside IPython with the same commands you are used to in your system shell. IPython comes with some pre-defined aliases and a complete system for changing directories, both via a stack (%pushd, %popdand %dhist) and via direct %cd. The latter keeps a history of visited directories and allows you to go to any previously visited one. Magic Functions ... You can always call them using the %prefix, and if you’re calling a line magic on a line by itself, you can omit even that: run thescript.py. You can toggle this behavior by running the %automagicmagic. Cell magics must always have the %%prefix. A more detailed explanation of the magic system can be obtained by calling %magic, and for more details on any magic function, call %somemagic?to read its docstring. To see all the available magic functions, call %lsmagic. System Shell Commands ... !pingwww.bbc.co.uk files=!ls #capture !grep-rF$patternipython/* #passingvars 9 / 34
  • 10. History ... Input and output history are kept in variables called In and Out, keyed by the prompt numbers. The last three objects in output history are also kept in variables named _, __and ___. You can use the %historymagic function to examine past input and output. Input history from previous sessions is saved in a database, and IPython can be configured to save output history. Several other magic functions can use your input history, including %edit, %rerun, %recall, %macro, %saveand %pastebin. You can use a standard format to refer to lines: %pastebin318-20~1/1-5 This will take line 3 and lines 18 to 20 from the current session, and lines 1-5 from the previous session. History IPython stores both the commands you enter, and the results it produces. You can easily go through previous commands with the up- and down-arrow keys, or access your history in more sophisticated ways. Debugging After an exception occurs, you can call %debugto jump into the Python debugger (pdb) and examine the problem. Alternatively, if you call %pdb, IPython will automatically start the debugger on any uncaught exception. You can print variables, see code, execute statements and even walk up and down the call stack to track down the true source of the problem. This can be an efficient way to develop and debug code, in many cases eliminating the need for print statements or external debugging tools. You can also step through a program from the beginning by calling %run-dtheprogram.py. 10 / 34
  • 12. To force multiline input, hit Ctrl-Enterat the end of the first line instead of Enter Shift-Enterto execute! IPython QtConsole a version of IPython, using the new two-process ZeroMQ Kernel, running in a PyQt GUI a very lightweight widget that largely feels like a terminal, but provides a number of enhancements only possible in a GUI, such as inline figures, proper multiline editing with syntax highlighting, graphical calltips, and much more. #TostarttheQtConsole ipythonqtconsole #Toseeaquickintroductionofthemainfeatures %guiref See: Qt Console @ RTD 12 / 34
  • 13. IPython QtConsole MF %load The new %loadmagic takes any script, and pastes its contents as your next input, so you can edit it before executing. The script may be on your machine, but you can also specify an history range, or a url, and it will download the script from the web. This is particularly useful for playing with examples from documentation, such as matplotlib. In[6]:%loadhttp://matplotlib.org/plot_directive/mpl_example In[7]:frommpl_toolkits.mplot3dimportaxes3d ...:importmatplotlib.pyplotasplt ...: ...:fig=plt.figure() ...:ax=fig.add_subplot(111,projection='3d') ...:X,Y,Z=axes3d.get_test_data(0.05) ...:cset=ax.contour(X,Y,Z) ...:ax.clabel(cset,fontsize=9,inline=1) ...: ...:plt.show() 13 / 34
  • 14. MF %load... The %loadmagic can also load source code from objects in the user or global namespace by invoking the -noption. In[1]:importhello_world ...:%load-nhello_world.say_hello In[3]:defsay_hello(): ...: print("HelloWorld!") Inline Matplotlib One of the most exciting features of the QtConsole is embedded matplotlib figures. You can use any standard matplotlib GUI backend to draw the figures, and since there is now a two- process model, there is no longer a conflict between user input and the drawing eventloop. 14 / 34
  • 15. If you have a reference to a matplotlib figure object, you can always display that specific figure: In[1]:f=plt.figure() In[2]:plt.plot(np.rand(100)) Out[2]:[<matplotlib.lines.Line2Dat0x7fc6ac03dd90>] In[3]:display(f) #Plotisshownhere In[4]:plt.title('Atitle') Out[4]:<matplotlib.text.Textat0x7fc6ac023450> In[5]:display(f) #Updatedplotwithtitleisshownhere. Matplotlib: display() IPython provides a function display()for displaying rich representations of objects if they are available. The IPython display system provides a mechanism for specifying PNG or SVG (and more) representations of objects for GUI frontends. When you enable matplotlib integration via the %matplotlib magic, IPython registers convenient PNG and SVG renderers for matplotlib figures, so you can embed them in your document by calling display() on one or more of them. This is especially useful for saving your work. In[4]:fromIPython.displayimportdisplay In[5]:plt.plot(range(5))#plotsinthematplotlibwindow In[6]:display(plt.gcf())#embedsthecurrentfigureinthe In[7]:display(*getfigs())#embedsallactivefiguresinthe 15 / 34
  • 16. --matplotlibinline If you want to have all of your figures embedded in your session, instead of calling display(), you can specify -- matplotlibinlinewhen you start the console, and each time you make a plot, it will show up in your document, as if you had called display(fig)(). The inline backend can use either SVG or PNG figures (PNG being the default). To switch between them, set the InlineBackend.figure_format configurable in a config file, or via the %configmagic: In[10]:%configInlineBackend.figure_format='svg' Changing the inline figure format also affects calls to display() above, even if you are not using the inline backend for all figures. In[13]:[fig.close()forfigingetfigs()] By default, IPython closes all figures at the completion of each execution. It also means that the first matplotlib call in each cell will always create a new figure. However, it does prevent the list of active figures surviving from one input cell to the next, so if you want to continue working with a figure, you must hold on to a reference to it. In[11]:plt.plot(range(100)) <single-lineplot> In[12]:plt.plot([1,3,2]) <anothersingle-lineplot> #----- In[11]:fig=gcf() ....:fig.plot(rand(100)) <plot> In[12]:fig.title('RandomTitle') <redrawplotwithtitle> This behavior is controlled by the InlineBackend.close_figures configurable, and if you set it to False, via %config or config file, then IPython will not close figures, and tools like gcf(), gca(), getfigs() will behave the same as they do with other backends. You will, however, have to manually close figures: 16 / 34
  • 18. Jupyter Notebook The Jupyter Notebook is a web application for interactive data science and scientific computing. Using the Jupyter Notebook, you can author engaging documents that combine live-code with narrative text, equations, images, video, and visualizations. By encoding a complete and reproducible record of a computation, the documents can be shared with others on GitHub, Dropbox, and the Jupyter Notebook Viewer. #Install sudoapt-getinstallbuild-essentialpython-dev pipinstalljupyter #Start jupyternotebook #Previously pipinstall"ipython[notebook]" ipythonnotebook See: Jupyter@RTD 18 / 34
  • 19. Open source, interactive data science and scientific computing across over 40 programming languages. The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more. Language of Choice The Notebook has support for over 40 programming languages, including those popular in Data Science such as Python, R, Julia and Scala. Share Notebooks Notebooks can be shared with others using email, Dropbox, GitHub and the Jupyter Notebook Viewer. Interactive Widgets Code can produce rich output such as images, videos, LaTeX, and JavaScript. Interactive widgets can be used to manipulate and visualize data in realtime. Big-Data Integration Leverage big data tools, such as Apache Spark, from Python, R and Scala. Explore that same data with pandas, scikit-learn, ggplot2, dplyr, etc. See: Jupyter.ORG Website 19 / 34
  • 20. Project Jupyter The IPython Notebook (2011) Rich Web Client Text & Math Code Results Share, Reproduce. See: Fernando Perez, IPython & Project Jupyter 20 / 34
  • 21. Project Jupyter IPython Interactive Python shell at the terminal Kernel for this protocol in Python Tools for Interactive Parallel computing Jupyter Network protocol for interactive computing Clients for protocol Console Qt Console Notebook Notebook file format & tools (nbconvert...) Nbviewer What’s in a name? Inspired by the open languages of science: Julia, Python & R Not an acronym: all languages equal class citizens. Astronomy and Scientific Python: A long and fruitful collaboration Galileo's notebooks: The original, open science, data-and-narrative papers Authorea: “Science was Always meant to be Open” See: Fernando Perez, IPython & Project Jupyter 21 / 34
  • 22. Project Jupyter From IPython to Project Jupyter Not just about Python: Kernels in any language IPython : "Official" IJulia, IRKernel, IHaskell, IFSharp, Ruby, IScala, IErlang, .. Lots more! ~37 and counting Why is it called IPython, if it can do Julia, R, Haskell, Ruby, … ?” TL;DR Separation of the language-agnostic components Jupyter: protocol, format, multi-user server IPython: interactive Python console, Jupyter kernel Jupyter kernels = Languages which can be used from the notebook (37 and counting) A Simple and Generic Architecture   See: Fernando Perez, IPython & Project Jupyter 22 / 34
  • 23. Convention In this document, we use the terms Jupyter and IPython Notebooks interchangeably. It might refer to the previous version of the Notebook (IPython). 23 / 34
  • 24. The Notebook Notebook mode supports literate computing and reproducible sessions Allows to store chunks of python along side the results and additional comments (HTML, Latex, MarkDown) Can be exported in various file formats Notebook are the de-facto standard for sharing python sessions. The Notebook: “Literate Computing” Computational Narratives Computers deal with code and data. Humans deal with narratives that communicate. Literate Computing (not Literate Programming) Narratives anchored in a live computation, that communicate a story based on data and results. 24 / 34
  • 25. Seamless Notebook Sharing nbviewer Zero-install reading of notebooks Just share a URL nbviewer.ipython.org 25 / 34
  • 26. Jupyter Ecosystem Reproducible Research Paper, Notebooks and Virtual Machine Scientific Blogging Executable books MOOCs and University Courses Executable Papers ... Jose Unpingco Python for Signal Processing Springer hardcover book Chapters: IPython Notebooks Posted as a blog entry All available as a Github repo 26 / 34
  • 27. Notebook Workflows   Credit: Joshua Barrat (via F. Perez) 27 / 34
  • 28.  Notebook: Getting Started 28 / 34
  • 29. Review IPython Notebook IPython notebook is an HTML-based notebook environment for Python. It is based on the IPython shell, but provides a cell- based environment with great interactivity, where calculations can be organized and documented in a structured way. Although using a web browser as graphical interface, IPython notebooks are usually run locally, from the same computer that run the browser. IPython Notebook Web-based user interface to IPython, Interactive Python interpreter in the browser Literate computing, Open format combining executable code, text and multimedia Pretty graphs Version controlled science! To start a new IPython notebook session, run the following command: ipythonnotebook #or jupyternotebook from a directory where you want the notebooks to be stored. This will open a new browser window (or a new tab in an existing window) with an index page where existing notebooks are shown and from which new notebooks can be created. 29 / 34
  • 30. Up and Running An IPython notebook lets you write and execute Python code in your web browser. IPython notebooks make it very easy to tinker with code and execute it in bits and pieces; for this reason IPython notebooks are widely used in scientific computing. Once IPython is running, point your web browser at http://localhost:8888 to start using IPython notebooks. If everything worked correctly, you should see a screen showing all available IPython notebooks in the current directory. If you click through to a notebook file, it will be executed and displayed on a new page. See: CS231n: IPython Tutorial 30 / 34
  • 31. Up and Running An IPython notebook is made up of a number of cells. Each cell can contain Python code. You can execute a cell by clicking on it and pressing Shift-Enter. When you do so, the code in the cell will run, and the output of the cell will be displayed beneath the cell. See example. Global variables are shared between cells. See the notebook after executing the second cell. By convention, IPython notebooks are expected to be run from top to bottom. Failing to execute some cells or executing cells out of order can result in errors. See: CS231n: IPython Tutorial 31 / 34
  • 32. Collections and Links A gallery of interesting IPython Notebooks Notebooks for Learning Python Fundamentals | DLAB @ Berkeley Python Lectures | Rajath Kumar MP Intro Programming | Eric Matthes Python Crash Course | Eric Matthes IPython Minibook | Cyrille Rossant IPython & Project Jupyter | Fernando Perez 32 / 34
  • 33. References 1. IPython Documentation @ readthedocs.org 2. Jupyter Documentation @ readthedocs.org 3. Fernando Perez, IPython & Project Jupyter | A language-independent architecture for open computing and data science 4. Juan Luis Cano Rodriguez, IPython: How a notebook is changing science | Python as a real alternative to MATLAB, Mathematica and other commercial software 5. Olivier Hervieu: Introduction to scientific programming in python 6. CS231n: IPython Tutorial, http://cs231n.github.io/ipython-tutorial/ 7. J.R. Johansson: Introduction to scientific computing with Python 33 / 34
  • 34.  END Eueung Mulyana http://eueung.github.io/python/ipython-intro Hint: Navigate with Arrow Keys | Attribution-ShareAlike CC BY-SA 34 / 34