I'm looking for a way to put a jupyter notebook cell in VSCode in interactive mode so that it runs the cell when its contents change without having to run it explicitly.
If there's no existing solution, is it somehow possible to automate executing the cell periodically or does the VSCode jupyter lab integration offer some scripting hooks?
Alternatively, is there a possibility to explicitly execute a cell without loosing the cell focus and its current cursor position? CTRL+Enter directly doesn't work; the tabulator key needs to be pressed four times additionally to get back to the cell.
When I write code in vscode jupyter notebook I get random parts of my code highlighted and I would like to turn that off:
How can I turn that off? I tried playing around in vscode setting highlight section, but only one of those is in the notebook category which is to draw a line around the cell that is being executed.
I have a cell (cell 39), I wish to move up to the top of cell 40.
I know I could grab and drag to the place. However, I see that in official document, you could move it with the vertical bar on the left. However, I does not have one, and could not find the setting to make it display.
Demonstration in Visual Code.
Jupyter Notebook in chrome version has a similar botton for this function
Jupyter Notebook web version.
According to https://github.com/microsoft/vscode-jupyter/issues/6812 you can use alt(option)+arrow up/down to move the selected cell.
Or, use Command Palette with Notebook: Move
I'm making slides with jupyter notebook. For one slide I made a nice little interactive plot with ipython widgets. However the interactive plot is a cell's output not input. Is there a way to capture that cell's output an use it as a slide?
How do I enable vertical scrolling in a code block in a jupyter notebook?
I've done it accidentally before, but now I can't reproduce it. What I found was set autoscroll = true in the file itself using a text editor...
However, I did that... and it already has a setting, "scrolled": true. In the notebook, it has only horizontal scrolling, so I guess that is what the "scrolled" setting modified.
In order to enable vertical scrolling in an output cell of the notebook, you just need to click to the left of the cell content (in the margin, you will see the area becomes slighty shaded when you are over it).
If you double click, the content of output cell will be hidden.
If you would like to hide the content of an input cell, see also Scroll windows for code in iPython (Jupyter) Notebooks?.
As suggested by #Mandy, to turn on horizontal scrolling in Jupyter code window just go to Cell>Current/All Outputs>Toggle Scrolling
You can try Cell -> Current Outputs -> Toggle Scrolling in the Jupyter UI to enable the scrolling for the output of one cell.
Run this code at the end of yours:
from IPython.display import display, HTML
js = "<script>$('.output_scroll').removeClass('output_scroll')</script>"
display(HTML(js))