How to show number of indents with little arrows in Jupyter Notebook? - python

I remember that I saw some code from the web that has little arrows in front of each line to identify its number of indents, which turned out to be very helpful when the code is long. But I can't find that web page anymore so I wonder if anyone knows how to add that kind of indicator in Jupyter Notebook? Thanks!

Related

my jupyter notebook is pasting unncessary program lines inbetween

when I try to write any code jupyter notebook automatically paste any irrelevant / sometimes relevant program between the program, but I want to stop this shit, because it is irritating me. suggestions are different things. but this issue has arrived in my notebook for the past few days.you can see in this link exactly what happening in this link
how can I get rid of it? please help me out. The error lines are in green color whereas normal program looks like thisSee this line in grey color is suggested by notebook
I am just confused. I don't know how it started. I didn't get any solution on it anywhere
looks like https://discourse.jupyter.org/t/jupyter-notebooks-annoying-grey-text-auto-show/16886/5, This is most likely a browser issue, what browser are you using? any extentions that could cause this? maybe try switching browsers?

How to control result size when using jupyter on vsc and how to search for words in result

I'm currently using Jupytor Notebook on VSC. I found it very uncomfortable when very long result come out because I have to scroll down a long way to go the the next cell, like shown in the picture.
So I was wondering if there is a way to make the result like the original Jupyter Notebook, where they have a separate scroll for the result as shown below.
As an additional question, anyone know how to search for certain words in the result on VSC? ctrl+f only searches for words in the coding cells and not the result.
A work around for the scroll wheel if you don’t want to collapse the code is to add a print statement to the beginning and end of the code block as mentioned in Collapse Output in VS Code Jupyter Into Scrollable Window. I have not been at my computer to test this and this post is from a year ago, so I’m not sure if this solution is still working. EDIT: This solution is no longer working keep an eye on the linked issue for the resolution.
This was also brought up as an issue on GitHub and it was closed saying they have no plans to work on it currently.
#118117
As for the searching in outputs, this is an open issue currently on GitHub: #94239
Scrollable output regions would be handled in VS Code core. This function has not been decided on GitHub at present
For your additional question, I think the filter feature in the search widget might be what you're looking for - you can include outputs with that.

Figure is not properly displayed whiile using %matplotlib notebook in Jupyter Notebook

As you can see on the image posted below, for some reason the notebook doesn't want to properly display a figure while using the interactive matplotlib interface - the %matplotlib notebook and it only prints the top left corner of the wanted plot. I've browsed the Internet, mostly this forum but I haven't found solution either, so I've got no other choice than to make a post about it.
If I switch it back to classic %matplotlib inline, I've got no issues and the figure is displayed correctly. I'd really appreciate any help you can offer, it drives me crazy because I need to properly display these interactive plots, in order to learn from other notebooks which use them. So I'm not searching for any other alternatives to using interactive figures, but I'd preferably want this particular issue to be resolved.
Thank you.
This was rather a quick solution to my suprise. I was even thinking of pulling this question off the site, since I resolved this quite promptly, but then again you never know, someone might end up with the very same problem as I encountered before.
So anyway, changing the browser does the trick. At least in my case changing from Chrome to Firefox solved this issue of mine.

Cell stacking on each other in Jupyter dashboard view

I'm new to the Jupyter notebook. When I am moving to the dashboard grid layout, all off my cells are stack upon each other without any option of moving them. In addition, I can't go back to regular notebook view without reentering the notebook.
I've tried to play with the settings without success. Then I switched all my code to just 2 simple headings and it is still happening. Couldn't find any answers on the web.
Anyone has an idea how to solve it?

In Jupyter notebook, can the "enable scrolling" window auto-scroll down to keep up pace with the output?

I often write functions that print a lot, say every 100th go-around a long loop, which in the Terminal run fine, because my screen auto-scrolls down with the output; but on Jupyter, the output quickly moves downward, and I have to scroll down myself to keep up with it. This happens whether I'm in the "enable scrolling" or "disable scrolling" for the output.
So, my Q is: Is there a way to have Jupyter auto-scroll down with the output? I suppose this would make more sense inside of a scroll window (i.e. "enable scrolling".) Auto-scrolled output would give a more Terminal-like experience, which I am much more familiar and comfortable with. (And, to be honest, I also miss my The-Matrix-like aesthetic of streaming output.)
If it matters, I use Jupyter Lab primarily, but I believe the same is true on Jupyter Notebook.
Thanks so much, all!
nbextensions has an auto-scroll extension to do just that, though its incompatible with jupyter lab at the moment.
https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/autoscroll/README.html

Categories