Live data from Hacker News

JupyterLite: a JupyterLab distribution that runs in the browser

github.com

31–40 of 58 posts

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#31
post #5

Starboard.gg is similar but also allows JavaScript, CSS, or HTML cells to execute in the same notebook. Python has access to the DOM and can share variables with JavaScript.

I love the idea of Starboard. But seems like the development has stalled?

Yes. Last commit was 5 months ago [1]. Seems like a great idea though.

What I don't like it is that they invented yet another markdown syntax for code cells - it is the opening bracket # %[python] with no closing bracket.

There already is a popular markdown code cell syntax of [2]

```python

```

[1] https://github.com/gzuidhof/starboard-notebook

[2] https://github.github.com/gfm/#fenced-code-blocks

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#32

Earlier quoted context omitted.

On my machine parents test is; python command line 247µs local jupyter lab 274µs jupyter lite 4ms (about 16 times slower than the other two) Honestly considering how jupyter lite is working, I still feel this is pretty good.

I’m shocked the local instance is so tight with the interpreter. I assumed jupyter injected itself all over the place to allow halting loops and what have you. I do not care about the performance of jupyer lite - that it runs at all is a miracle. That it is acceptable performance for doing demos/teaching from a browser is simply magic.

In Jupyter you choose Run Cell or Debug Cell. Debug Cell just uses sys.settrace like pdb does. Run Cell is straight python. Also, the example they gave pretty much calls into C straight away.

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#33
post #2

JupyterLite is such an incredible piece of software. It came out of the Pyodide project, which first got Python compiled to WebAssembly working in the browser. It really is astonishing that they've managed to get the full data science Python stack - a lot of it based around custom C extensions (numpy, Pandas etc) running entirely in the browser.

Such a compact resource usage in WebAssembly.

I am seeing about 50-60MB resource usage which is fantastic considering that includes pandas, numpy, sklearn and some other non standard modules.

By comparison when I tried to package a hello world pandas project with PyInstaller the single file exe for Windows came out to 500MB.

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#35
post #17
post #2

JupyterLite is such an incredible piece of software. It came out of the Pyodide project, which first got Python compiled to WebAssembly working in the browser. It really is astonishing that they've managed to get the full data science Python stack - a lot of it based around custom C extensions (numpy, Pandas etc) running entirely in the browser.

it's neat, but it's kinda slow (25x slower than native when I tested it) In a JupyterLyte notebook: import numpy as np a = np.random.randn(128,128) b = np.random.randn(128,128) %timeit a @ b 1.5 ms ± 3.3 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each) On my command line: $ python3 -m timeit --setup 'import numpy as np; a = np.random.randn(128,128); b = np.random.randn(128,128)' 'a @ b' 5000 loops, best of…

What happened if you increase the size of the matrices? I think we might be measuring the overhead

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#36
post #2

JupyterLite is such an incredible piece of software. It came out of the Pyodide project, which first got Python compiled to WebAssembly working in the browser. It really is astonishing that they've managed to get the full data science Python stack - a lot of it based around custom C extensions (numpy, Pandas etc) running entirely in the browser.

Shameless self promotion: I made a constrained particle simulator and an numerical integrator visualizer with pyodide. (They are both for class assignments.)

https://scleox.github.io/constrained-particle-system-simulat...

https://scleox.github.io/integrator-visualizer/index.html

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#38
post #4
post #2

JupyterLite is such an incredible piece of software. It came out of the Pyodide project, which first got Python compiled to WebAssembly working in the browser. It really is astonishing that they've managed to get the full data science Python stack - a lot of it based around custom C extensions (numpy, Pandas etc) running entirely in the browser.

It really is. I guess this'll be quite useful for people on chromebooks and iPads as well.

I didn’t believe it when I first read it but I can indeed run arbitrary code on my iPhone with Jupyterlite. This is great! So finally I can analyse data using the iPad on a plane, hopefully… if I find a way to reliably start Jupyterlite from the iPad‘s local storage, load my data from there, and have a persistent python environment.

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#39
post #29

JupyterLite is great! I use it heavily with my middle school math students — wonderful to have NumPy, matplotlib, and friends available without needing to set up accounts. I created a package called jupy5 that provides Turtle graphics and a p5.js-inspired sketchbook for JupyterLite as well.

jupy5 sounds pretty awesome!
Post reply on HN