Jupyter
lastmod 2024-11-06created 2016-11-1218 edits
Open source, interactive data science and scientific computing across over 40 programming languages.
Categories
- Xeus (C++)
- JupyterLab
- ipywidgets (Jupyter Widgets)
- JupyterHub
- Executable Book - Electronic publishing platform built on the Jupyter ecosystem
- JupyterFlow - ML tool for data scientists
- Satyrn - Modern Jupyter client for macOS
How to use
Basically the process is as follows:
Run a specific notebook:
Using custom IP or port:
No browser:
Help:
IPython
Jupyter Notebook Data Science Stack
Show Image
from IPython.display import Image
from IPython.core.display import HTML
Image(url= "http://my_site.com/my_picture.jpg")
Python exporter
import nbformat
from nbconvert import PythonExporter
exporter = PythonExporter()
(source, meta) = exporter.from_filename('something.ipynb')
with open('something_out.py','w') as outfile:
outfile.writelines(source.encode('utf-8'))
Magics
Widgets
Interact
from __future__ import print_function
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
@interact(x=True, y=1.0)
def g(x, y):
return (x, y)
Dynamic update
%matplotlib inline
import time
import pylab as pl
from IPython import display
for i in range(10):
pl.plot(pl.randn(100))
display.clear_output(wait=True)
display.display(pl.gcf())
time.sleep(1.0)
Troubleshooting
Cannot assign requested address
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.4/dist-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/notebook/notebookapp.py", line 1296, in initialize
self.init_webapp()
File "/usr/local/lib/python3.4/dist-packages/notebook/notebookapp.py", line 1120, in init_webapp
self.http_server.listen(port, self.ip)
File "/usr/local/lib/python3.4/dist-packages/tornado/tcpserver.py", line 142, in listen
sockets = bind_sockets(port, address=address)
File "/usr/local/lib/python3.4/dist-packages/tornado/netutil.py", line 197, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address
When running jupyter with docker, a Cannot assign requested address problem occurred. It seems to be a port issue, and it was solved with the command below.
See also
- Python
- JupyterLab
- Gitpod - Open-source remote development platform.
Favorite site
- jupyter web site
- Python - Installing the Ipython notebook
- How to install and run a Jupyter server
- Quickie: Mix up OpenCV and Jupyter (iPython Notebook)
Pages that link here
- Apache Zeppelin
- Coder
- ContinuousIntegration:ImplementationGuide
- Deep Image Prior
- Executable Book
- Gitpod
- IntelliJ IDEA
- JupyterFlow
- JupyterHub
- JupyterLab
- Kubeflow Notebooks
- Kubeflow:Architecture
- Kubeflow:Install
- Machine learning
- MachineLearning:Course:Python
- Matplotlib
- MLOps
- Numba
- Online source code playgrounds
- Python:Libraries
- Satyrn
- SciPy
- Server