Live data from Hacker News

JupyterLab 4.0

blog.jupyter.org

101–110 of 199 posts

Re: JupyterLab 4.0

#101

Earlier quoted context omitted.

It looks like there’s a %store command in Jupyter. I haven’t tried it out, but is this what you are looking for? https://stackoverflow.com/questions/34342155/how-to-pickle-o... (I just got it by googling “pickle an object in jupyter,” so sorry if this is something obvious that you’ve already seen and doesn’t quite solve your problem).

Yeah it got my hopes up when I found it. But when I was testing it, I didn't find the data actually made it into the .ipynb. It turns out that's actually a global storage in your home directory and doesn't go into the notebook at all. So different notebooks each overwrite the value if they use the same variable name.

Oh wow, that’s a really awful design. Sorry.

Re: JupyterLab 4.0

#102
post #79

Earlier quoted context omitted.

The Jupyter Notebook interface/server just opens singular notebooks (i.e. one notebook per browser tab). Jupyter Lab is an IDE where you can open notebooks, files, terminals, etc all in one interface. Additionally, you can easily adjust the layout of open files (want notebooks side by side? Click one notebook's tab and drag it to one side of the screen. Want a terminal on the bottom of the screen? Open a terminal and…

when I install `pip install jupyter && jupyter notebook`, I can still create Py notebook,s text files or shell terminals. I still dont quite get that is diff btw jupyter nb vs jupyterlab. My understanding is notebook for single user locally, while jupyterlab is multi-user running on server, something like that

Lab is essentially for power users who need tabs of notebooks and multiple .py files open at a time in a single window. If you ever only work on a _single_ notebook at a time then it is overkill.

Re: JupyterLab 4.0

#103
post #82
post #44

Earlier quoted context omitted.

For a while I viewed Jupyter as a toy that is neither here nor there (sitting between the chairs of development and explanation, briefing or visualization and not doing either job great). But about 2 years ago when I changed jobs into a "Jupyter heavy" environment I was forced to learn it and have grown to really like it. I primarily use Jupyter for prototyping: trying ideas, plotting results and sharing notebooks fo…

Are there some usecases where conventional IDE isn't up to the job as the notebooks? I can imagine this to be so for data analysis where pre-loading heavy datasets saves time. Anything else?

The notebook environment is excellent for data analysis and exploration. It matches my workflow of manhandling data as I reach for understanding.

Once I figure things out of course, either I'm done with the notebook and can copy a few plots out for inclusion in a powerpoint, or I'm done with the notebook and extract a pile of functions into a utility script or package.

Either way, it has served its purpose for rapid prototyping and one-off analysis.

Re: JupyterLab 4.0

#104
post #16

Earlier quoted context omitted.

> There aren't good boundaries between Jupyter's own Python environment, and that of your notebooks— if you have a dependency which conflicts with one of Jupyter's dependencies, then good luck. It's cumbersome, and I'm not totally sure it's the correct way, but I remember getting around this by creating a virtualenv for my projects and then using that virtualenv's python as Jupyter's "kernel".

I just do a venv inside the venv so I can target several Python versions. I also use Jupiter for C#, Clojure, and Julia. I wish the Clojure integration was as good as the others I listed. I’m to the point now where if anything other than venv/pip is required I won’t use it. Unfortunately there are many things that insist on conda.

Conda is a fucking nightmare. Luckily you can usually just use pip to get the same packages.

Re: JupyterLab 4.0

#105
post #16

I keep experimenting with Jupyter in the context of telemetry/fault analysis and then hitting a wall with it where: - I get an analysis that I like, but there isn't a good way to share it with others, so I end up just taking screenshots. - There isn't a good way to take the same analysis and plug new data into it, other than to copy-paste the entire notebook. - The process to "promote" fragments of a notebook into be…

> There aren't good boundaries between Jupyter's own Python environment, and that of your notebooks— if you have a dependency which conflicts with one of Jupyter's dependencies, then good luck. It's cumbersome, and I'm not totally sure it's the correct way, but I remember getting around this by creating a virtualenv for my projects and then using that virtualenv's python as Jupyter's "kernel".

Yeah this is the right way. But I don't think it's obvious from the getting started docs.

I bet a lot of people end up installing jupyter into each virtual environment instead.

This sort of works, as (I think) most people are only working on one or two notebooks at a time, and aren't using notebooks that relate to more than one virtual environment.

Re: JupyterLab 4.0

#106
post #80

Earlier quoted context omitted.

I'm curious about your setup as I might have to do something similar soon due to my machine's performance constraints. I understand you can connect to a Jupyter server remotely, but how do you sync your code? Do you have your Git repo cloned on the remote host and just run Git commands over SSH? Or does VS Code have some kind of integration for remote file systems with version control?

Check out the remote SSH ( https://code.visualstudio.com/docs/remote/ssh ) extension. It makes everything really painless. I'm currently developing a website that resides in a docker container in a digitalocean server, and editing the code in VSCode feels literally no different at all to running it locally. If you have the SSH keys set up it's completely painless. The other nice thing about VSCode is that you can ext…

This is great, thanks. Commenting to bookmark for future reference.

Re: JupyterLab 4.0

#107
What’s the current best-practice workflow for using with git? I see jupytext discussed in the comments but this saves the .py exported file. Is there a good clean method for storing tbe .ipynb files into git? It maybe is easier without the cell outputs?

Re: JupyterLab 4.0

#108
post #44

I keep experimenting with Jupyter in the context of telemetry/fault analysis and then hitting a wall with it where: - I get an analysis that I like, but there isn't a good way to share it with others, so I end up just taking screenshots. - There isn't a good way to take the same analysis and plug new data into it, other than to copy-paste the entire notebook. - The process to "promote" fragments of a notebook into be…

For a while I viewed Jupyter as a toy that is neither here nor there (sitting between the chairs of development and explanation, briefing or visualization and not doing either job great). But about 2 years ago when I changed jobs into a "Jupyter heavy" environment I was forced to learn it and have grown to really like it. I primarily use Jupyter for prototyping: trying ideas, plotting results and sharing notebooks fo…

You can comfortably edit the whole thing as Markdown in VSCode (in vim mode, if you'd prefer) - and still have executable cells and nice pdf/html rendering. https://quarto.org/docs/tools/vscode.html

EDIT: actually, you can do it directly in neovim - https://quarto.org/docs/tools/neovim.html

Re: JupyterLab 4.0

#109

I keep experimenting with Jupyter in the context of telemetry/fault analysis and then hitting a wall with it where: - I get an analysis that I like, but there isn't a good way to share it with others, so I end up just taking screenshots. - There isn't a good way to take the same analysis and plug new data into it, other than to copy-paste the entire notebook. - The process to "promote" fragments of a notebook into be…

To promote functions to a module use nbdev; execnb or papermill to parameterise your notebook; and nbconda to have environments for your notebooks.

Re: JupyterLab 4.0

#110
post #44

Earlier quoted context omitted.

For a while I viewed Jupyter as a toy that is neither here nor there (sitting between the chairs of development and explanation, briefing or visualization and not doing either job great). But about 2 years ago when I changed jobs into a "Jupyter heavy" environment I was forced to learn it and have grown to really like it. I primarily use Jupyter for prototyping: trying ideas, plotting results and sharing notebooks fo…

You can comfortably edit the whole thing as Markdown in VSCode (in vim mode, if you'd prefer) - and still have executable cells and nice pdf/html rendering. https://quarto.org/docs/tools/vscode.html EDIT: actually, you can do it directly in neovim - https://quarto.org/docs/tools/neovim.html

[deleted]
Post reply on HN