jupyter lab -> default location for "new console for notebook" - jupyter

I wonder if there is a way to specify where a code console for a notebook is opend in jupyter lab.
Per default, it opens in the bottom, - and I did not find a way how to change this default behaviour:
click on New Console for Notebook open it always below
and I then drag it to the right (tab) of the notebook everytime.
Would be great to find a way how to change this.

Related

Jupyter kernel does not show in VS Code

I have added a new kernel to my jupyter notebook. It works totally fine using Jupyter in the browser. However if I try to open my notebook in VSCode (and change the kernel) it doesn't show up --> the drop-down menu doesn't show my kernel.
Is there anything I can do to resolve this issue.
Thanks in advance!

Does VS code have variable explorer object like we have it in spyder?

I will post the picture of what exactly I am asking variable explorer in spyder
So do we have this feature in VS code?
I tried a lot to find it on google but was unhappy to not find it.
Open your .py script in vscode
Right click anywhere on the script > Run current File in interactive Window
In the toolbar of the interactive window click on the variable icon
You can now consult the values of variables created by your script
spyder is probably running a REPL (Jupyter is doing that also). From that python process they show the local and global variables, just like a debugger would do on a breakpoint.
If you use Python Interactive you have similar functionality with the Variables Explorer and Data Viewer or use Jupyter notebooks
You can now find all variables in a Jupyter Notebook in VS Code in the Output panel under Jupyter: Variables

How to replicate the following Spyder behavior in VSCode?

I'm new to coding Python in VSCode. Previously I used Spyder but decided to move to VSCode as the project management seems better in it (I could easily switch to other files/folders by clicking on the path, just like in PyCharm). But I really need this one workflow which I still have not managed to do it in VSCode.
write some codes like Selenium.
Click run (F5)
The selenium browser opens up.
I could use the Ipython terminal to access the code interactively (find the element in the browser etc) and send new command.
I would like to have this workflow in VSCode. Im also quite overwhelmed by the difference in these 2 IDEs, for example, in VSCode, you have integrated terminal, a debugging console and an output tab, while im used to have only one-for-all Ipython tab.
Ok, I figured out what I need. Basically I just need to right click on the python file that I want to run on the side bar. Then I have to select 'run current file in interactive window'. The only difference is on the Ipython console, I have to use shift+Enter to send my input instead of just clicking enter. But its not a big deal.

VS Code: jupyter notebook run line by line

Recently VSCode got an update and after that my jupyter notebook interface has changed which created a lot of problems for me. Now I don't know how to run cell code line by line, etc.
Is there any other way to do so or how can I get back to an older version of the notebook?
Open the command palette (Ctrl+Shift+P on Windows, Cmd+Shift+P on Mac)
Type 'Preferences: Open Settings (JSON)' and select the first option to open your user settings.json file
Add the following line to your user settings.json file:
"jupyter.experiments.optOutFrom": ["NativeNotebookEditor"],
If the following entry is present in your user settings.json file, delete it:
"workbench.editorAssociations": [
{
"viewType": "jupyter-notebook",
"filenamePattern": "*.ipynb"
}
]
Reload Visual Studio Code for the new settings to take effect. You should be opted back into the old Jupyter notebook interface.
If you want to run a python script line by line using Jupyter interpreter this is the option you need to tick in VS code settings.
In v1.60 (see https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_60.md#jupyter):
VS Code now supports the Run By Line feature in Jupyter notebooks.
This is a simple debug mode that lets you execute the code of a cell
line by line. To try it out, just make sure that you have ipykernel v6+ installed as your selected kernel, then select the Run By Line
button.
Previously:
In vscode 1.59 (see https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_59.md#jupyter-run-by-line)
Jupyter "Run By Line"
We've been working on supporting the "Run By Line" feature in Jupyter
notebooks. This feature is essentially a simplified debug mode that
lets you step through your cell's code line by line without any
complex debug UI. This is still experimental, but you can try it out
by setting "jupyter.experimental.debugging": true, installing
version 6 of ipykernel in your selected kernel, then clicking the "Run
By Line" button in the cell toolbar.
"jupyter.experimental.debugging": true

Are there any good ssh consoles for Eclipse?

I'm looking for a good ssh console plugin for Eclipse, and can't find much at all. Would anyone have some good leads on one?
If you don't like the ssh.shells or ssh.terminals subsystems in Eclipse RSE, try using the Terminal View instead.
Open up Window -> Show View -> Other (or press Shift+Alt+Q then Q)
Type Terminal in the search box
Select the Terminal view listed under the Terminal folder
You'll see a window that looks similar to RSE's ssh.terminals subsystem... but with some extra buttons on the top right.
How to use it:
To fix the scrolling issue (ie: for programs like top), click the Scroll Lock button at the right.
For extra Terminal window tabs, click the down arrow on the New Terminal Connection button
To change the current terminal window's settings, use the Settings button.
If you really like the annoying command input box at the bottom, you can toggle it on and off with the appropriate button.
Change the Background Color:
For some reason, the default setting is to use a terribly hard to see white background. To change this:
Go to Window -> Preferences
Type Terminal in the search box at the top left, or select Terminal on the left.
Check the box that says Invert terminal colors
You can also configure a larger terminal buffer or connection timeouts here
Click Apply
Now the terminal should have a black background! If you want a local terminal, you can enable ssh on your local machine, and connect to localhost.
In Eclipse 3.4.1, there is the Remote Systems Explorer perspective that allows you to create and connect to SSH terminals (here)
There are plugins that exist that allow you up open WinSCP or Putty from within Eclipse.
I would advise maybe doing a search for "putty eclipse plugin" or similar
You can also try the Terminal plug-in for Eclipse
This plug-in provides a fully-working, command-line terminal to
Eclipse 3.7 or later (yes, even 4.2!) It works on Linux and MacOS
only.
More info at: http://alexruiz.developerblogs.com/?p=2428