SlideShare a Scribd company logo
1 of 35
Download to read offline
notebooks
José Enrique Ruiz
Instituto de Astrofísica de Andalucía - CSIC
MPIK Heidelberg
on steroids
@bultako
The exploratory research workflow
Interactive exploration vs. Coding framework
A read–eval–print loop (REPL), also termed an interactive top-level or language shell, is a simple,
interactive environment that takes single user inputs (i.e., single expressions), evaluates them, and
returns the result to the user.
IPython 0.01
https://gist.github.com/fperez/1579699 2001 2011
The read-eval-print loop
The IPython Kernel is the responsible for executing the user input.
The terminal IPython is the REPL core, dealing with user
inputs and outputs issued from their execution.
Frontends, like the notebook or the Qt console, can communicate with the IPython
Kernel using JSON messages sent over ZeroMQ sockets. The ZeroMQ library
provides the low-level transport layer over which these messages are sent.
The core execution machinery for the kernel is shared with terminal IPython.
IPython internals
The Notebook frontend, stores code and output, together with markdown notes, in an
editable document called a notebook. When you save it, this is sent from your browser to
the notebook server, which saves it on disk as a JSON file with a .ipynb extension.
local Tornado
web server
IPython notebook internals
m
ulti-language
support
add narrative save share reproduce
Web execution server
Frontends clients
HTML Document Format
HTTP Transfer Protocol
Interactive Computing Messaging Protocol
Execution kernel
Frontends clients
JSON Document Format
/JSON
18/12/2011
The web analogy
2014/2015
The interactive exploratory environment in the browser
The project ecosystem
• JupyterLab is (not only) another user interface for notebooks.
• JupyterLab is the evolution of the JupyterNotebook user interface into a flexible unified platform.
2011
2018
FileBrowser Terminal TexEditor Widgets Extensions
• JupyterLab is a major internal refactoring of the frontend:
- Clean Model-View separation -> multiple views / high interactivity.
- Modern JavaScript -> TypeScript, npm/yarm webpack packaging, react, phosphor.js
- Fully extensible by third parties -> everything is an extension + differentiated private/public APIs.
- Higher performance - especially with big tabular datasets !
• There are no changes in the notebooks, messaging protocol or the kernels.
-The interactive messaging protocol and JSON notebooks format is kept.
-GitHub and any other existing front-ends will continue working with JupyterLab notebooks.
• User functionalities are focused towards an IDE-like / integrated exploratory research desktop.
-Open windows to the local desktop and data formats.
-Higher interactivity between any kind of element involved in the exploratory process.
JupyterNotebook and JupyterLab
https://jupyter-notebook.readthedocs.io
https://jupyterlab.readthedocs.io
JupyterLab Live Demo
Line magics act on one line %
https://ipython.readthedocs.io/en/stable/interactive/magics.html
IPython magics
Cell magics act on the entire cell %%
You may also access the shell with !
!shell command
%matplotlib notebook for interactive plots
use ?? to print the code and ? to print the docstring
Interactive widgets
ipywidgets
https://ipywidgets.readthedocs.io
Build small interactive GUIs that can communicate with the kernel and with other widgets.
Mostly used for enhanced visualization purposes.
ipywidgets is required by many extensions.
JupyterNotebook Extensions
https://jupyter-contrib-nbextensions.readthedocs.io
%watermark
https://github.com/rasbt/watermark
JupyterNotebook Extensions
%sql
https://github.com/catherinedevlin/ipython-sql
JupyterNotebook Extensions
qgrid
https://github.com/quantopian/qgrid
JupyterNotebook Extensions
JupyterNotebook Extensions
https://ipyvolume.readthedocs.io
Ipyvolume
Astronomical data cube: Radio observations Medical data cube: scan of a male head
JupyterNotebook Extensions
Ipyvolume
Exploring 100+ million
rows by volume
rendering a 3d
histogram
https://ipyvolume.readthedocs.io
Glue-Jupyter uses ipyvolume for 3D rendering.
https://github.com/glue-viz/glue-jupyter
JupyterLab Extensions
Use the extension manager
1. Go to Advance Settings 2. Enable Extension Manager 3. Discover /install extensions
https://jupyterlab.readthedocs.io/en/stable/user/extensions.html
JupyterLab Workspaces
https://jupyterlab.readthedocs.io/en/stable/user/urls.html
JupyterLab sessions reside in workspaces, which contain the state
of JupyterLab : the files that are currently open, the layout of
the application areas and tabs, etc. When the page is refreshed or
JupyterLab is re-started the workspace is restored.
Import/Export Workspaces with CLI
Import/Export with URL params API
Workspaces are stored in the web server.
JupyterLab work in progress GoogleDrive extension for Real Time Collaboration
Multi-user environments
A multi-user version of the notebook designed for companies, classrooms and research labs.
https://jupyter.org/hub
• Sharing resources and computing environment.
• Users are not burdened with installation and maintenance tasks.
• Customizable and scalable, suitable for small and large large-scale infrastructures.
• Deployed anywhere i.e. commercial cloud providers, virtual machines, or even your own laptop hardware.
• Authentication is pluggable, supporting a number of authentication protocols (such as OAuth and GitHub).
• Users can get their work done in their own workspaces.
https://zero-to-jupyterhub.readthedocs.io
On kubernetes
Based on jupyter-drive extension to share notebooks on Google Drive https://github.com/jupyter/jupyter-drive
https://tljh.jupyter.org
On Ubuntu
a collaborative environment is not fully achieved since there is no easy sharing of notebooks
Multi-language support
There exist Jupyter kernels for nearly any scripting language.
There exist extensions implemented as IPython magic commands to build polyglot notebooks.
These allow variable exchange across the different languages running in the same kernel.
We may see these magics commands as pipes dispatching the syntax and variables to new subprocesses.
This could also be done in pure Python and is possible due to the nature of Python as a glue language.
https://github.com/mgaitan/fortran_magic
https://rpy2.readthedocs.io
https://pypi.org/project/cffi_magic
https://blog.jupyter.org/i-python-you-r-we-julia-baf064ca1fb6
https://github.com/ebellm/ipython-idlmagic
https://pypi.org/project/idlmagic
may be options to
exchange vars
any
language
Multi-language support
SoS Script of Scripts uses multiple kernels in one notebook.
https://vatlab.github.io/sos-docs/doc/user_guide/multi_kernel_notebook.html
Scalability
https://nb.lsst.io
LSST Science Platform Aspect
ESRI Environmental Systems Research Institute
https://jupyter-enterprise-gateway.readthedocs.io
CERN - SWAN Service for Web-based Analysis
https://swan.web.cern.ch
https://github.com/jupyter-incubator/sparkmagic
https://github.com/jupyter-attic/kernel_gateway_bundlers
single notebooks deployed
as dockerized http
microservices
access to distributed computation
SCIENCE PORTALS
https://github.com/jupyterhub/dockerspawner
dockerized notebook servers
for
each user
Modularity
The easy solution
The very complex solution
The sophisticated solution
https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Importing%20Notebooks.html
https://github.com/jupyter-incubator/contentmanagement
Transform the “very long notebook” into a short one using other
notebooks as modules, which enables re-use and avoids duplication
a
b
Automation
Papermill: parametrized notebooks https://github.com/nteract/papermill
https://medium.com/netflix-techblog/notebook-innovation-591ee3221233
https://medium.com/netflix-techblog/scheduling-notebooks-348e6c14cfd6
1. Declare some cells as a parameters cells.
3. Run papermill with Python API. 3. Run papermill with CLI.
2. Declare parameters values in YAML file.
Automation
Composing workflows based on the orchestration of several notebooks and their linked outputs.
https://nteract-scrapbook.readthedocs.io
• Low Branching Factor: Keep notebooks fairly linear. Not many conditionals or potential execution paths.
• Library Functions in Libraries: If you do end up with complex functions which you might reuse or
refactor independently, these are good candidates for a coding library rather than in a notebook.
• Short and Simple is Better: A notebook which generates lots of useful outputs and visuals with a few
simple cells is better than a ten page manual.
Some guidelines to make happy automated notebooks
:)
• Prototype automated tasks
• Reports building
• Testing and logging
• Benchmarking
SHORT LINEAR NOTEBOOKS WITH SMALL CODE CELLS
Papermill + Scrapbook: workflows with parametrized notebooks
nteract
Junoipnb-quicklook / nbviewer app
Voila
Frontends / Viewers
https://nteract.io https://github.com/QuantStack/voila
https://juno.sh
https://github.com/tuxu/nbviewer-app
https://github.com/tuxu/ipynb-quicklook
Desktop app shipping node.js, R and Python as
kernels. It can also access your locally defined
kernels. Fires up notebook files from the desktop.
DataExplorer feature for enhanced visualization.
Renders read-only notebooks with interactive widgets.
Execution of arbitrary code is disabled by default.
The code cells are stripped by default producing a
kind of documented interactive GUI from a notebook,
that communicates with a dedicated kernel
iOS app for mobile platforms acting as a Jupyter
frontend. It needs to connect to a remote notebook
server (i.e. PC, AWS node, Azure notebooks, etc.)Quicklook read-only viewers for MacOS X
Publish in GitHub
Publish in HTML
Publish an executable book
Publication
Please, make a small effort and transform exploratory into explanatory notebooks.
Leading open code repository rendering notebooks very well indexed by search engines.
Open collaborative community driven and linked to services (i.e. Collab, Binder, Zenodo)
VisibilityReproducibility
https://nbsphinx.readthedocs.io
nbsphinx is a Sphinx extension that provides a source parser for *.ipynb files.
https://www.nbinteract.com
python package to generate interactive widgets in HTML pages by using Binder.
https://github.com/jakevdp/PythonDataScienceHandbook
https://github.com/jakevdp/WhirlwindTourOfPython
Add Python kernels of different conda environments
Make a Binder
Reproducibility
https://mybinder.org
LOCALLY
W
eb service
https://alpha.iodide.ioBuilt-in browser Python is compiled to run on WebAssembly.Built-in
Define your environment
•requirements.txt
•environment.yml
•Dockerfile
Share on Google Colaboratory
http://colab.research.google.com
Interactivity leads to complex/hidden state in non-linear notebooks
Reproducibility
https://github.com/jupytercalpoly/reactivepy
https://github.com/stitchfix/nodebook
Jupytext
Versioning
https://github.com/mwouts/jupytext
• small changes change metadata
• especially if output is in the notebook
https://github.com/kynan/nbstripoutstrip the output cells
A paired notebook is an .ipynb notebook that is synchronized with a text representation —  say a Python script. When the
notebook is saved, Jupytext updates both files. The script has a clear diff history, focused on the input cells only
git diff is #*!@ish
Publishing reproducible papers
https://zenodo.org/record/2381863
Building versioned executable tutorials
•The web browser as the working desktop environment
•Capture exploratory and data analysis tasks into log-like notebooks
•Multi format display for rich explanatory notebooks - code, data, plots, equations, videos, etc..
•Shareable, re-usable and executable documentation / recipes
•Complementary executable format of published books
•First-class citizens in GitHub - easily discovered >3M notebooks
•Used as executable tutorials reduce the learning curve
•Multi-language support even possible in the same notebook
•Highly extensible and customizable in functionalities
•Local execution or multi-user server-side deploy
•Scalable and parameterisable
2019
A working methodology
•The web browser as the working desktop environment
•Capture exploratory and data analysis tasks into log-like notebooks
•Multi format display for rich explanatory notebooks - code, data, plots, equations, videos, etc..
•Shareable, re-usable and executable documentation / recipes
•Complementary executable format of published books
•First-class citizens in GitHub - easily discovered >3M notebooks
•Used as executable tutorials reduce the learning curve
•Multi-language support even possible in the same notebook
•Highly extensible and customizable in functionalities
•Local execution or multi-user server-side deploy
•Scalable and parameterisable
complex state allowed due to
non-linear execution of cells
painful exploration
of versioning and
code-review
hard to test
hard to re-use into
other formats i.e.
copy/paste content
hard to make modular
poorly factored code
productivity flaws as
code linting, type
checking or tab
completion
frontend/environment
dependencies
2019
A working methodology

More Related Content

What's hot

open source nn frameworks on cellphones
open source nn frameworks on cellphonesopen source nn frameworks on cellphones
open source nn frameworks on cellphonesKoan-Sin Tan
 
C# Parallel programming
C# Parallel programmingC# Parallel programming
C# Parallel programmingUmeshwaran V
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserKoan-Sin Tan
 
Parallel Programming in .NET
Parallel Programming in .NETParallel Programming in .NET
Parallel Programming in .NETSANKARSAN BOSE
 
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?Koan-Sin Tan
 
Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Boris Adryan
 
Redis: Lua scripts - a primer and use cases
Redis: Lua scripts - a primer and use casesRedis: Lua scripts - a primer and use cases
Redis: Lua scripts - a primer and use casesRedis Labs
 
11 Unit1 Chapter 1 Getting Started With Python
11   Unit1 Chapter 1 Getting Started With Python11   Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With PythonPraveen M Jigajinni
 
Running TFLite on Your Mobile Devices, 2020
Running TFLite on Your Mobile Devices, 2020Running TFLite on Your Mobile Devices, 2020
Running TFLite on Your Mobile Devices, 2020Koan-Sin Tan
 
Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Rr
 
A Peek into Google's Edge TPU
A Peek into Google's Edge TPUA Peek into Google's Edge TPU
A Peek into Google's Edge TPUKoan-Sin Tan
 
Exploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsExploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsKoan-Sin Tan
 

What's hot (16)

open source nn frameworks on cellphones
open source nn frameworks on cellphonesopen source nn frameworks on cellphones
open source nn frameworks on cellphones
 
C# Parallel programming
C# Parallel programmingC# Parallel programming
C# Parallel programming
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk User
 
Parallel Programming in .NET
Parallel Programming in .NETParallel Programming in .NET
Parallel Programming in .NET
 
Caffe2 on Android
Caffe2 on AndroidCaffe2 on Android
Caffe2 on Android
 
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
Why You Cannot Use Neural Engine to Run Your NN Models on A11 Devices?
 
Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015
 
Redis: Lua scripts - a primer and use cases
Redis: Lua scripts - a primer and use casesRedis: Lua scripts - a primer and use cases
Redis: Lua scripts - a primer and use cases
 
Bioinformatica p1-perl-introduction
Bioinformatica p1-perl-introductionBioinformatica p1-perl-introduction
Bioinformatica p1-perl-introduction
 
Linux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platformLinux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platform
 
Linux Systems: Getting started with setting up an Embedded platform
Linux Systems: Getting started with setting up an Embedded platformLinux Systems: Getting started with setting up an Embedded platform
Linux Systems: Getting started with setting up an Embedded platform
 
11 Unit1 Chapter 1 Getting Started With Python
11   Unit1 Chapter 1 Getting Started With Python11   Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With Python
 
Running TFLite on Your Mobile Devices, 2020
Running TFLite on Your Mobile Devices, 2020Running TFLite on Your Mobile Devices, 2020
Running TFLite on Your Mobile Devices, 2020
 
Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)
 
A Peek into Google's Edge TPU
A Peek into Google's Edge TPUA Peek into Google's Edge TPU
A Peek into Google's Edge TPU
 
Exploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source ToolsExploring Your Apple M1 devices with Open Source Tools
Exploring Your Apple M1 devices with Open Source Tools
 

Similar to Jupyter notebooks on steroids

Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 
webinar_jupyter_notebooks.pptx
webinar_jupyter_notebooks.pptxwebinar_jupyter_notebooks.pptx
webinar_jupyter_notebooks.pptxSagarGupta614508
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Using Elyra for COVID-19 Analytics
Using Elyra for COVID-19 AnalyticsUsing Elyra for COVID-19 Analytics
Using Elyra for COVID-19 AnalyticsLuciano Resende
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
A Jupyter kernel for Scala and Apache Spark.pdf
A Jupyter kernel for Scala and Apache Spark.pdfA Jupyter kernel for Scala and Apache Spark.pdf
A Jupyter kernel for Scala and Apache Spark.pdfLuciano Resende
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET DeveloperSarah Dutkiewicz
 
An Enterprise Analytics Platform with Jupyter Notebooks and Apache Spark
An Enterprise Analytics Platform with Jupyter Notebooks and Apache SparkAn Enterprise Analytics Platform with Jupyter Notebooks and Apache Spark
An Enterprise Analytics Platform with Jupyter Notebooks and Apache SparkLuciano Resende
 
SciPipe - A light-weight workflow library inspired by flow-based programming
SciPipe - A light-weight workflow library inspired by flow-based programmingSciPipe - A light-weight workflow library inspired by flow-based programming
SciPipe - A light-weight workflow library inspired by flow-based programmingSamuel Lampa
 
OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Foundation
 
The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017
The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017
The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017Luciano Resende
 
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.Luciano Resende
 
USING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNED
USING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNEDUSING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNED
USING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNEDijseajournal
 
DevOps for Data Scientists - Stefano Tucci
DevOps for Data Scientists - Stefano TucciDevOps for Data Scientists - Stefano Tucci
DevOps for Data Scientists - Stefano TucciStefano Tucci
 
Ellip Studio - A workspace for developing Cloud-ready Earth Observation Appl...
Ellip Studio -  A workspace for developing Cloud-ready Earth Observation Appl...Ellip Studio -  A workspace for developing Cloud-ready Earth Observation Appl...
Ellip Studio - A workspace for developing Cloud-ready Earth Observation Appl...terradue
 
1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptxFEG
 
Season 7 Episode 1 - Tools for Data Scientists
Season 7 Episode 1 - Tools for Data ScientistsSeason 7 Episode 1 - Tools for Data Scientists
Season 7 Episode 1 - Tools for Data Scientistsaspyker
 
Collaborative data science and how to build a data science toolchain around n...
Collaborative data science and how to build a data science toolchain around n...Collaborative data science and how to build a data science toolchain around n...
Collaborative data science and how to build a data science toolchain around n...Moon Soo Lee
 

Similar to Jupyter notebooks on steroids (20)

Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 
webinar_jupyter_notebooks.pptx
webinar_jupyter_notebooks.pptxwebinar_jupyter_notebooks.pptx
webinar_jupyter_notebooks.pptx
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Using Elyra for COVID-19 Analytics
Using Elyra for COVID-19 AnalyticsUsing Elyra for COVID-19 Analytics
Using Elyra for COVID-19 Analytics
 
What is python
What is pythonWhat is python
What is python
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
A Jupyter kernel for Scala and Apache Spark.pdf
A Jupyter kernel for Scala and Apache Spark.pdfA Jupyter kernel for Scala and Apache Spark.pdf
A Jupyter kernel for Scala and Apache Spark.pdf
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET Developer
 
An Enterprise Analytics Platform with Jupyter Notebooks and Apache Spark
An Enterprise Analytics Platform with Jupyter Notebooks and Apache SparkAn Enterprise Analytics Platform with Jupyter Notebooks and Apache Spark
An Enterprise Analytics Platform with Jupyter Notebooks and Apache Spark
 
SciPipe - A light-weight workflow library inspired by flow-based programming
SciPipe - A light-weight workflow library inspired by flow-based programmingSciPipe - A light-weight workflow library inspired by flow-based programming
SciPipe - A light-weight workflow library inspired by flow-based programming
 
OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11OpenSAF Symposium_Python Bindings_9.21.11
OpenSAF Symposium_Python Bindings_9.21.11
 
The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017
The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017
The Analytic Platform behind IBM’s Watson Data Platform - Big Data Spain 2017
 
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
 
Top 10 python ide
Top 10 python ideTop 10 python ide
Top 10 python ide
 
USING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNED
USING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNEDUSING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNED
USING JUPYTERHUB IN THE CLASSROOM: SETUP AND LESSONS LEARNED
 
DevOps for Data Scientists - Stefano Tucci
DevOps for Data Scientists - Stefano TucciDevOps for Data Scientists - Stefano Tucci
DevOps for Data Scientists - Stefano Tucci
 
Ellip Studio - A workspace for developing Cloud-ready Earth Observation Appl...
Ellip Studio -  A workspace for developing Cloud-ready Earth Observation Appl...Ellip Studio -  A workspace for developing Cloud-ready Earth Observation Appl...
Ellip Studio - A workspace for developing Cloud-ready Earth Observation Appl...
 
1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx
 
Season 7 Episode 1 - Tools for Data Scientists
Season 7 Episode 1 - Tools for Data ScientistsSeason 7 Episode 1 - Tools for Data Scientists
Season 7 Episode 1 - Tools for Data Scientists
 
Collaborative data science and how to build a data science toolchain around n...
Collaborative data science and how to build a data science toolchain around n...Collaborative data science and how to build a data science toolchain around n...
Collaborative data science and how to build a data science toolchain around n...
 

More from Jose Enrique Ruiz

IPython Notebooks - Hacia los papers ejecutables
IPython Notebooks - Hacia los papers ejecutablesIPython Notebooks - Hacia los papers ejecutables
IPython Notebooks - Hacia los papers ejecutablesJose Enrique Ruiz
 
Implementing a VO archive for datacubes of galaxies
Implementing a VO archive for datacubes of galaxiesImplementing a VO archive for datacubes of galaxies
Implementing a VO archive for datacubes of galaxiesJose Enrique Ruiz
 
Open Science and Executable Papers
Open Science and Executable PapersOpen Science and Executable Papers
Open Science and Executable PapersJose Enrique Ruiz
 
Digital Science: Towards the executable paper
Digital Science: Towards the executable paperDigital Science: Towards the executable paper
Digital Science: Towards the executable paperJose Enrique Ruiz
 
Digital Science: Reproducibility and Visibility in Astronomy
Digital Science: Reproducibility and Visibility in AstronomyDigital Science: Reproducibility and Visibility in Astronomy
Digital Science: Reproducibility and Visibility in AstronomyJose Enrique Ruiz
 
Workflows to access and massage VOData
Workflows to access and massage VODataWorkflows to access and massage VOData
Workflows to access and massage VODataJose Enrique Ruiz
 
Curation and Characterization of Web Services
Curation and Characterization of Web ServicesCuration and Characterization of Web Services
Curation and Characterization of Web ServicesJose Enrique Ruiz
 
Wf4Ever: Workflow Preservation
Wf4Ever: Workflow PreservationWf4Ever: Workflow Preservation
Wf4Ever: Workflow PreservationJose Enrique Ruiz
 
Workflows in the Virtual Observatory
Workflows in the Virtual ObservatoryWorkflows in the Virtual Observatory
Workflows in the Virtual ObservatoryJose Enrique Ruiz
 
Use of CharDM in an archive of velocity cubes
Use of CharDM in an archive of velocity cubesUse of CharDM in an archive of velocity cubes
Use of CharDM in an archive of velocity cubesJose Enrique Ruiz
 
VO web-services-based astronomy workflows
VO web-services-based astronomy workflowsVO web-services-based astronomy workflows
VO web-services-based astronomy workflowsJose Enrique Ruiz
 
Web services based workflows to deal with 3D data
Web services based workflows to deal with 3D dataWeb services based workflows to deal with 3D data
Web services based workflows to deal with 3D dataJose Enrique Ruiz
 
Curating and Preserving Collaborative Digital Experiments
Curating and Preserving Collaborative Digital ExperimentsCurating and Preserving Collaborative Digital Experiments
Curating and Preserving Collaborative Digital ExperimentsJose Enrique Ruiz
 
Collaborative Digital Experiments
Collaborative Digital ExperimentsCollaborative Digital Experiments
Collaborative Digital ExperimentsJose Enrique Ruiz
 
El Observatorio Virtual - eCA
El Observatorio Virtual - eCAEl Observatorio Virtual - eCA
El Observatorio Virtual - eCAJose Enrique Ruiz
 

More from Jose Enrique Ruiz (20)

IPython Notebooks - Hacia los papers ejecutables
IPython Notebooks - Hacia los papers ejecutablesIPython Notebooks - Hacia los papers ejecutables
IPython Notebooks - Hacia los papers ejecutables
 
Velocity cubes of galaxies
Velocity cubes of galaxiesVelocity cubes of galaxies
Velocity cubes of galaxies
 
Implementing a VO archive for datacubes of galaxies
Implementing a VO archive for datacubes of galaxiesImplementing a VO archive for datacubes of galaxies
Implementing a VO archive for datacubes of galaxies
 
Open Science and Executable Papers
Open Science and Executable PapersOpen Science and Executable Papers
Open Science and Executable Papers
 
Digital Science: Towards the executable paper
Digital Science: Towards the executable paperDigital Science: Towards the executable paper
Digital Science: Towards the executable paper
 
Digital Science: Reproducibility and Visibility in Astronomy
Digital Science: Reproducibility and Visibility in AstronomyDigital Science: Reproducibility and Visibility in Astronomy
Digital Science: Reproducibility and Visibility in Astronomy
 
Workflows to access and massage VOData
Workflows to access and massage VODataWorkflows to access and massage VOData
Workflows to access and massage VOData
 
Research Objects in Wf4Ever
Research Objects in Wf4EverResearch Objects in Wf4Ever
Research Objects in Wf4Ever
 
Curation and Characterization of Web Services
Curation and Characterization of Web ServicesCuration and Characterization of Web Services
Curation and Characterization of Web Services
 
Digital Science
Digital ScienceDigital Science
Digital Science
 
Wf4Ever: Workflow Preservation
Wf4Ever: Workflow PreservationWf4Ever: Workflow Preservation
Wf4Ever: Workflow Preservation
 
Workflows in the Virtual Observatory
Workflows in the Virtual ObservatoryWorkflows in the Virtual Observatory
Workflows in the Virtual Observatory
 
Use of CharDM in an archive of velocity cubes
Use of CharDM in an archive of velocity cubesUse of CharDM in an archive of velocity cubes
Use of CharDM in an archive of velocity cubes
 
Workflow Preservation
Workflow PreservationWorkflow Preservation
Workflow Preservation
 
VO web-services-based astronomy workflows
VO web-services-based astronomy workflowsVO web-services-based astronomy workflows
VO web-services-based astronomy workflows
 
Web services based workflows to deal with 3D data
Web services based workflows to deal with 3D dataWeb services based workflows to deal with 3D data
Web services based workflows to deal with 3D data
 
Curating and Preserving Collaborative Digital Experiments
Curating and Preserving Collaborative Digital ExperimentsCurating and Preserving Collaborative Digital Experiments
Curating and Preserving Collaborative Digital Experiments
 
Collaborative Digital Experiments
Collaborative Digital ExperimentsCollaborative Digital Experiments
Collaborative Digital Experiments
 
SVO Activities - SEA 2008
SVO Activities - SEA 2008SVO Activities - SEA 2008
SVO Activities - SEA 2008
 
El Observatorio Virtual - eCA
El Observatorio Virtual - eCAEl Observatorio Virtual - eCA
El Observatorio Virtual - eCA
 

Recently uploaded

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Jupyter notebooks on steroids

  • 1. notebooks José Enrique Ruiz Instituto de Astrofísica de Andalucía - CSIC MPIK Heidelberg on steroids @bultako
  • 2. The exploratory research workflow Interactive exploration vs. Coding framework
  • 3. A read–eval–print loop (REPL), also termed an interactive top-level or language shell, is a simple, interactive environment that takes single user inputs (i.e., single expressions), evaluates them, and returns the result to the user. IPython 0.01 https://gist.github.com/fperez/1579699 2001 2011 The read-eval-print loop
  • 4. The IPython Kernel is the responsible for executing the user input. The terminal IPython is the REPL core, dealing with user inputs and outputs issued from their execution. Frontends, like the notebook or the Qt console, can communicate with the IPython Kernel using JSON messages sent over ZeroMQ sockets. The ZeroMQ library provides the low-level transport layer over which these messages are sent. The core execution machinery for the kernel is shared with terminal IPython. IPython internals
  • 5. The Notebook frontend, stores code and output, together with markdown notes, in an editable document called a notebook. When you save it, this is sent from your browser to the notebook server, which saves it on disk as a JSON file with a .ipynb extension. local Tornado web server IPython notebook internals m ulti-language support add narrative save share reproduce
  • 6. Web execution server Frontends clients HTML Document Format HTTP Transfer Protocol Interactive Computing Messaging Protocol Execution kernel Frontends clients JSON Document Format /JSON 18/12/2011 The web analogy
  • 7. 2014/2015 The interactive exploratory environment in the browser The project ecosystem
  • 8. • JupyterLab is (not only) another user interface for notebooks. • JupyterLab is the evolution of the JupyterNotebook user interface into a flexible unified platform. 2011 2018 FileBrowser Terminal TexEditor Widgets Extensions • JupyterLab is a major internal refactoring of the frontend: - Clean Model-View separation -> multiple views / high interactivity. - Modern JavaScript -> TypeScript, npm/yarm webpack packaging, react, phosphor.js - Fully extensible by third parties -> everything is an extension + differentiated private/public APIs. - Higher performance - especially with big tabular datasets ! • There are no changes in the notebooks, messaging protocol or the kernels. -The interactive messaging protocol and JSON notebooks format is kept. -GitHub and any other existing front-ends will continue working with JupyterLab notebooks. • User functionalities are focused towards an IDE-like / integrated exploratory research desktop. -Open windows to the local desktop and data formats. -Higher interactivity between any kind of element involved in the exploratory process. JupyterNotebook and JupyterLab https://jupyter-notebook.readthedocs.io https://jupyterlab.readthedocs.io
  • 10. Line magics act on one line % https://ipython.readthedocs.io/en/stable/interactive/magics.html IPython magics Cell magics act on the entire cell %% You may also access the shell with ! !shell command %matplotlib notebook for interactive plots use ?? to print the code and ? to print the docstring
  • 11. Interactive widgets ipywidgets https://ipywidgets.readthedocs.io Build small interactive GUIs that can communicate with the kernel and with other widgets. Mostly used for enhanced visualization purposes. ipywidgets is required by many extensions.
  • 16. JupyterNotebook Extensions https://ipyvolume.readthedocs.io Ipyvolume Astronomical data cube: Radio observations Medical data cube: scan of a male head
  • 17. JupyterNotebook Extensions Ipyvolume Exploring 100+ million rows by volume rendering a 3d histogram https://ipyvolume.readthedocs.io Glue-Jupyter uses ipyvolume for 3D rendering. https://github.com/glue-viz/glue-jupyter
  • 18. JupyterLab Extensions Use the extension manager 1. Go to Advance Settings 2. Enable Extension Manager 3. Discover /install extensions https://jupyterlab.readthedocs.io/en/stable/user/extensions.html
  • 19. JupyterLab Workspaces https://jupyterlab.readthedocs.io/en/stable/user/urls.html JupyterLab sessions reside in workspaces, which contain the state of JupyterLab : the files that are currently open, the layout of the application areas and tabs, etc. When the page is refreshed or JupyterLab is re-started the workspace is restored. Import/Export Workspaces with CLI Import/Export with URL params API Workspaces are stored in the web server.
  • 20. JupyterLab work in progress GoogleDrive extension for Real Time Collaboration Multi-user environments A multi-user version of the notebook designed for companies, classrooms and research labs. https://jupyter.org/hub • Sharing resources and computing environment. • Users are not burdened with installation and maintenance tasks. • Customizable and scalable, suitable for small and large large-scale infrastructures. • Deployed anywhere i.e. commercial cloud providers, virtual machines, or even your own laptop hardware. • Authentication is pluggable, supporting a number of authentication protocols (such as OAuth and GitHub). • Users can get their work done in their own workspaces. https://zero-to-jupyterhub.readthedocs.io On kubernetes Based on jupyter-drive extension to share notebooks on Google Drive https://github.com/jupyter/jupyter-drive https://tljh.jupyter.org On Ubuntu a collaborative environment is not fully achieved since there is no easy sharing of notebooks
  • 21. Multi-language support There exist Jupyter kernels for nearly any scripting language. There exist extensions implemented as IPython magic commands to build polyglot notebooks. These allow variable exchange across the different languages running in the same kernel. We may see these magics commands as pipes dispatching the syntax and variables to new subprocesses. This could also be done in pure Python and is possible due to the nature of Python as a glue language. https://github.com/mgaitan/fortran_magic https://rpy2.readthedocs.io https://pypi.org/project/cffi_magic https://blog.jupyter.org/i-python-you-r-we-julia-baf064ca1fb6 https://github.com/ebellm/ipython-idlmagic https://pypi.org/project/idlmagic may be options to exchange vars any language
  • 22. Multi-language support SoS Script of Scripts uses multiple kernels in one notebook. https://vatlab.github.io/sos-docs/doc/user_guide/multi_kernel_notebook.html
  • 23. Scalability https://nb.lsst.io LSST Science Platform Aspect ESRI Environmental Systems Research Institute https://jupyter-enterprise-gateway.readthedocs.io CERN - SWAN Service for Web-based Analysis https://swan.web.cern.ch https://github.com/jupyter-incubator/sparkmagic https://github.com/jupyter-attic/kernel_gateway_bundlers single notebooks deployed as dockerized http microservices access to distributed computation SCIENCE PORTALS https://github.com/jupyterhub/dockerspawner dockerized notebook servers for each user
  • 24. Modularity The easy solution The very complex solution The sophisticated solution https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Importing%20Notebooks.html https://github.com/jupyter-incubator/contentmanagement Transform the “very long notebook” into a short one using other notebooks as modules, which enables re-use and avoids duplication a b
  • 25. Automation Papermill: parametrized notebooks https://github.com/nteract/papermill https://medium.com/netflix-techblog/notebook-innovation-591ee3221233 https://medium.com/netflix-techblog/scheduling-notebooks-348e6c14cfd6 1. Declare some cells as a parameters cells. 3. Run papermill with Python API. 3. Run papermill with CLI. 2. Declare parameters values in YAML file.
  • 26. Automation Composing workflows based on the orchestration of several notebooks and their linked outputs. https://nteract-scrapbook.readthedocs.io • Low Branching Factor: Keep notebooks fairly linear. Not many conditionals or potential execution paths. • Library Functions in Libraries: If you do end up with complex functions which you might reuse or refactor independently, these are good candidates for a coding library rather than in a notebook. • Short and Simple is Better: A notebook which generates lots of useful outputs and visuals with a few simple cells is better than a ten page manual. Some guidelines to make happy automated notebooks :) • Prototype automated tasks • Reports building • Testing and logging • Benchmarking SHORT LINEAR NOTEBOOKS WITH SMALL CODE CELLS Papermill + Scrapbook: workflows with parametrized notebooks
  • 27. nteract Junoipnb-quicklook / nbviewer app Voila Frontends / Viewers https://nteract.io https://github.com/QuantStack/voila https://juno.sh https://github.com/tuxu/nbviewer-app https://github.com/tuxu/ipynb-quicklook Desktop app shipping node.js, R and Python as kernels. It can also access your locally defined kernels. Fires up notebook files from the desktop. DataExplorer feature for enhanced visualization. Renders read-only notebooks with interactive widgets. Execution of arbitrary code is disabled by default. The code cells are stripped by default producing a kind of documented interactive GUI from a notebook, that communicates with a dedicated kernel iOS app for mobile platforms acting as a Jupyter frontend. It needs to connect to a remote notebook server (i.e. PC, AWS node, Azure notebooks, etc.)Quicklook read-only viewers for MacOS X
  • 28. Publish in GitHub Publish in HTML Publish an executable book Publication Please, make a small effort and transform exploratory into explanatory notebooks. Leading open code repository rendering notebooks very well indexed by search engines. Open collaborative community driven and linked to services (i.e. Collab, Binder, Zenodo) VisibilityReproducibility https://nbsphinx.readthedocs.io nbsphinx is a Sphinx extension that provides a source parser for *.ipynb files. https://www.nbinteract.com python package to generate interactive widgets in HTML pages by using Binder. https://github.com/jakevdp/PythonDataScienceHandbook https://github.com/jakevdp/WhirlwindTourOfPython
  • 29. Add Python kernels of different conda environments Make a Binder Reproducibility https://mybinder.org LOCALLY W eb service https://alpha.iodide.ioBuilt-in browser Python is compiled to run on WebAssembly.Built-in Define your environment •requirements.txt •environment.yml •Dockerfile Share on Google Colaboratory http://colab.research.google.com
  • 30. Interactivity leads to complex/hidden state in non-linear notebooks Reproducibility https://github.com/jupytercalpoly/reactivepy https://github.com/stitchfix/nodebook
  • 31. Jupytext Versioning https://github.com/mwouts/jupytext • small changes change metadata • especially if output is in the notebook https://github.com/kynan/nbstripoutstrip the output cells A paired notebook is an .ipynb notebook that is synchronized with a text representation —  say a Python script. When the notebook is saved, Jupytext updates both files. The script has a clear diff history, focused on the input cells only git diff is #*!@ish
  • 34. •The web browser as the working desktop environment •Capture exploratory and data analysis tasks into log-like notebooks •Multi format display for rich explanatory notebooks - code, data, plots, equations, videos, etc.. •Shareable, re-usable and executable documentation / recipes •Complementary executable format of published books •First-class citizens in GitHub - easily discovered >3M notebooks •Used as executable tutorials reduce the learning curve •Multi-language support even possible in the same notebook •Highly extensible and customizable in functionalities •Local execution or multi-user server-side deploy •Scalable and parameterisable 2019 A working methodology
  • 35. •The web browser as the working desktop environment •Capture exploratory and data analysis tasks into log-like notebooks •Multi format display for rich explanatory notebooks - code, data, plots, equations, videos, etc.. •Shareable, re-usable and executable documentation / recipes •Complementary executable format of published books •First-class citizens in GitHub - easily discovered >3M notebooks •Used as executable tutorials reduce the learning curve •Multi-language support even possible in the same notebook •Highly extensible and customizable in functionalities •Local execution or multi-user server-side deploy •Scalable and parameterisable complex state allowed due to non-linear execution of cells painful exploration of versioning and code-review hard to test hard to re-use into other formats i.e. copy/paste content hard to make modular poorly factored code productivity flaws as code linting, type checking or tab completion frontend/environment dependencies 2019 A working methodology