voila notebook.ipynb
, no change to your Notebook required!voila
demo¶voila --template=reveal my_notebook.ipynb
Make slide shows with Voilà! Note that this presentation uses reveal.js 😉
You can build your own Voilà template using Jinja
Voila with normal kernels:
Pre-heated kernels: move the resource intensive tasks to the startup time
What's new?!
JupyterLite is a JupyterLab distribution that runs entirely in the web browser, backed by in-browser language kernels.
Voici
:¶Available on PYPI
, soon to be on conda-forge.
Voici
CLI : voici my-notebook.ipynb
Support the same arguments and options of Voila
: templates, themes,...
Voici
vs Voila
:¶Voila
uses real kernels running on the server.Voici
uses WASM based kernel running on the browser.Voila
direct access.Voici
file access through service worker, network access can be blocked by CORS.Voila
code cells can be hidden completely.Voici
users have access to the code source of the notebook.import this
import pandas as pd
df = pd.read_csv('iris.csv')
df
import ipywidgets as widgets
slider = widgets.FloatSlider(description='$x$')
text = widgets.FloatText(disabled=True, description='$x^2$')
def compute(*ignore):
text.value = str(slider.value ** 2)
slider.observe(compute, 'value')
slider.value = 4
widgets.VBox([slider, text])
from ipyleaflet import Map, basemaps, basemap_to_tiles
m = Map(center=(50.67, -1.28), zoom=10, basemap=basemaps.OpenStreetMap.Mapnik)
m.add(basemap_to_tiles(basemaps.Strava.Water))
from ipydatagrid import DataGrid
from datagrid import renderers
from requests import get
import json
# Load online resource
request = get('https://raw.githubusercontent.com/bloomberg/ipydatagrid/main/examples/cars.json')
data = json.loads(request.content)
df = pd.DataFrame(data["data"])
df = df[sorted(df.columns)]
datagrid = DataGrid(df, base_row_size=32, base_column_size=150, renderers=renderers)
datagrid
%matplotlib widget
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
plt.plot(np.sin(np.linspace(0, 20, 100)));
import altair as alt
import numpy as np
import pandas as pd
x = np.arange(100)
source = pd.DataFrame({
'x': x,
'f(x)': np.sin(x / 5)
})
alt.Chart(source).mark_line().encode(
x='x',
y='f(x)'
)
Using https://github.com/jupyterlite/jupyterlite-sphinx, it will soon be possible!!