jupyter notebook taking only capital letter as input IN [ ], not taking in[ ] - jupyter-notebook

jupyter notebook taking only capital letters as input IN[], but not as in[]
I have tried youtube searching but nothing worked

just check for any extra font sytle added in system , reset the system (pc) font

Related

How to un-delete cells in Jupyter Lab?

Can it be done?
"Undo" only seems to work for blocks/lines of code within a cell
Cheers
Option 1
Edit > Undo Cell Operation (or using the shortcut Z in the command mode - to access the command mode press ESC)
or
Edit > Undo (or using the shortcut CTRL+Z)
Option 2
Alternatively, if one didn't restart the kernel, one can export the IPython history by running
%history -g # If one wants to give a name to the file add "-f NAME"
Or access the content of all cells (including deleted ones) with _ih such as
_ih[-10:]
Option 3
If one already restarted the kernel, File > Revert Notebook to Checkpoint
Checkpoints will be stored in .ipynb_checkpoints so one can look inside the files and see if the deleted cell is there.

Is there a way to use Jupyter Notebooks without modes?

I am using jupyter-lab, and was wondering if there is a plugin that allows me to work without switching between command and edit modes?
I'm constantly cutting, pasting, and undoing cells because I accidentally switch into Command mode when I mean to be typing the characters 'x', 'y', or 'z' in Edit mode.
Some context: the concept of modes is integral to Jupyter notebooks. You are either in Command mode (Esc) or Edit mode (Enter), but I would like to use Jupyter Notebooks with a single set of shortcuts, as if I was editing a single document. #nomodes.
Aside from the default shortcuts, there is actually very little that's mode-specific in JupyterLab. Most commands that are run in command mode can be run without first exiting edit mode.
We can get pretty close to modeless editing in Jupyter by using a shortcut that's independent of the current mode. There are instructions on how to customize the keyboard shortcuts here.
As an example, the default shortcut for the cut-cell command is x. This could be replaced with the shortcut Accel Ctrl X. That can be used in either mode without interfering with editing. Just add the following into the User Preferences panel:
{"shortcuts": [
{
"command": "notebook:cut-cell",
"disabled": true,
"keys": ["X"],
"selector": ".jp-Notebook:focus"
},
{
"command": "notebook:cut-cell",
"keys": ["Accel Ctrl X"],
"selector": "body"},
}
]}
Each default command mode shortcut should be modified as follows:
Prefix a universal modifier to the shortcut (e.g. Accel Ctrl).
Accel is just the Jupyter term for the Super/Command/Windows key on your keyboard.
Maintain the same shortcut keys for edit mode. The key insight is to use a "selector": "body". That selector can target both modes.
As with any default shortcut override, make sure to mark the original as "disabled: true".
Alternatively you could duplicate the same shortcut twice:
one for edit mode with "selector": ".jp-Notebook.jp-mod-editMode".
one for command mode with "selector": ".jp-Notebook:focus".
The default shortcuts for notebook:run-cell are set up this way actually.
But I have not run into trouble with using "body" as the selector.
Just a note: this is a fairly tedious and error-prone exercise. There are dozens of default shortcuts that need to be modified.

Show code line numbers in JupyterLab

In Jupyter notebook, cntrl+ m L toggles code line numbers in current cell but how to bring the code line numbers in JupyterLab?
Referred a similar issue opened in github
https://github.com/jupyterlab/jupyterlab/issues/2395 - Shift+L toggles line number visibility.
you can turn this on by default by going into Settings --> Advanced Settings Editor:
As you can see from the screenshot, you can edit other features as well and easily set them back to default by deleting your 'User Overrides'
Go to Settings > Advanced configuration and add:
{
"codeCellConfig": {
"lineNumbers": true
}
}
You can go to View -> Show Line Numbers:
which will display line numbers in the notebook:
Late reply, but it'll still help others!
For Windows users, just hit Shift + L
In your Jupyter Lab, click the chain, View -> Line numbers. This solution is from this GitHub issue.
I'm new at this so don't flame me. But Frank said from View -> Show Line Numbers. I did this from main JupyterLab window. I'm using version 3.5.0.

why zsh adds "%" at the end of my output

i'm using zsh on my mac (oh-my-zsh) and i don't understand why at the end of my output there is always this character: "%"
If i don't put export TERM="xterm-256color" in my ~/.zshrc i haven't that character:
Usually a bold % (or # for root) with reversed colors is used to signify a "partial" line in the output. That is a line, which is not terminated with a newline character.
As it seems to depend on the value of TERM I suspect an incompatibility between that value and the settings of terminal emulator. Contrary to the warning shown in your second screenshot, you actually should not set TERM in your ~/.zshrc (or anywhere inside the shell session). TERM should always be set by the terminal emulator itself. Its value (in conjunction with the terminfo terminal capability data base) tells the shell and other programs, which features a terminal emulator supports and how to use them. If the value is changed in the shell, the terminal emulator will not know about it. This may lead to programs sending control codes the terminal emulator does not understand correctly or at all.
In order to change the value of TERM you should change it in the terminal emulator settings. According to the iTerm 2 FAQ the settings is to be found at Preferences->Profiles->Terminal->Report Terminal Type.
I personally placed export PROMPT_EOL_MARK='' inside my ~/.zprofile and hide the character.

How to prevent zsh prompt from collapsing

I have written my own zsh (actually, I'm using zsh with oh-my-zsh, if it's relevant to the subject) prompt, its code follows:
PROMPT="%{$fg[green]%n%}#%{%m%}:%{$fg[yellow]%~%} %{$fg[red]%#$reset_color%} "
Everything is fine except the only issue: when I use autocompletion (press Tab), prompt collapses to first few symbols.
Here's the screenshot, collapsed prompt is in the left Terminal window, and the normal prompt is in the right window.
http://i.imgur.com/a1iWHdA.png
I'm not sure whether I got it exactly as you wanted but try this for a start:
local gr=${1:-'green'}
local bl=${2:-'blue'}
local re=${3:-'red'}
local wh=${4:-'white'}
local cy=${5:-'cyan'}
local ye=${6:-'yellow'}
export PROMPT="%F{$gr}%n%f#%m:%F{$ye}%~%f %F{$re}%#%f "
I'm not sure exactly what you did wrong, but it appears that those curly braces were messing with your prompt. By approach to prompt customization uses %F{$ID} where ID is one of the identifiers I defined for starting colouring and %f for stopping colouring. You can make text bold using %B (remove bold using %b).

Resources