In Jupyter Notebook the shortcut for run cell/select below is Shift+Return. The issue I have is that it selects the below cell in Command mode and not Edit mode, therefore requiring an extra step each time to go into Edit Mode.
Question: How can I change that, and is that a possibility?
Here are some images to make it a bit more clear in case I wasn't. Nevermind apparently need more Reputation before I can embed pictures, Sorry for the inconvenience.
Before Run cell/Select Below (Shift+Return)
After Run cell/Select Below
What I want
Thanks in advance for you help!
I imagine you're looking for the 'Run cell and insert new cell below'
You need Alt+Enter for that
https://kapeli.com/cheat_sheets/iPython_Notebook.docset/Contents/Resources/Documents/index
If it is inconvenient to use, you can try changing the shortcuts.
Follow:
https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Custom%20Keyboard%20Shortcuts.html
Related
I've lost a day's work in Jupyter Notebook because it didn't autosave. As I was working, I would click on File > Save and Checkpoint to be safe. I closed the notebook when I finished working and when I tried reopening it, I see that essentially all my work is gone and it says Last Checkpoint: a day ago (autosaved) next to the filename. I now realize that I had been working for a long time on the notebook with an orange box with some kind of error message. I'm sorry that I can't remember the specific message right now, but I think it was something involving POS or POST or POSIT ...?. I saw Trusted next to the error message, so I must've thought things were OK.
I tried opening the filename-checkpoint.ipynb file within the .ipynb_checkpoints folder but it's blank. I looked up a possible solution on Recovering from a Jupyter Disaster, but it requires SQL, which I don't know. Is there any hope for recovering my work? I realize that this is probably a rookie mistake, but I'm pretty new at this.
Thanks
PS: I'm running Python3 on MacOS
Hope you've already found how to recover lost work from Jupyter notebook work. If not, try the following:
Go to Anaconda Navigator (the green circle!)
Launch a Jupyter Lab
In Jupyter Lab, open a Terminal window
Launch iPython in the terminal by typing ipython and hitting enter
Hit Up arrow
All your code are stored in history and each cell compilation that you would've done in the past shows up there.
Copy+Paste it back to a new Jupyter notebook and you are ready to go again!
If you want to copy/paste.
After running terminal and ipython, page_up yo code you want. Click right button on a mouse, then Watch the elements code. Now you can select code, copy and paste it.
If you don't have Anaconda Navigator you can do access the same data the manual way:
open a new ipython terminal
type %history -g -f history.txt
This will output the entire history of edits which are saved in history.sqlite in your IPython profile folder. You can scroll down to the bottom to find your most recent edits.
You can also just explore the history.sqlite directly, which is located in your IPython profile. The profile should be inside .ipython in your user directory (windows and linux).
Thanks to Christian Long's answer on another question for providing this info.
I am in heavy debugging mode where I have to restart the kernel fairly frequently, and am making heavy use of lots of cells in Spyder. When I am about 10 cells in and this happens, it would be really nice to be able to just run all cells above the current cell, sort of like you have in Jupyter.
I know I can manually go through and run cells 1-9 with Shift-Enter, or I can select all the code manually and hit F9. Is there a shortcut?
(Spyder maintainer here) There's no shortcut and no way to run all cells above or below the current one.
However, I think this is a very valid concern, so please open an issue in our issue tracker so we don't forget to implement it in a future release.
I usually just create a syntax error where I want to stop execution and then press F5.
EDIT:
It just occurred to me that this isn't quite right. A syntax error will prevent execution from starting. What I actually do is provoke a NameError:
NameError: name 'stop' is not defined
The code was designed by someone. While testing I'm getting error in the code
IntnumbOfchild = Run("ELCOMPN", STRdIM, strTest1st)
Can you tell me if its related to tm1? When do we use RUN command? I cannot find the macro of this name in the project
Run is not a procedure of the standard libraries in VBA.
Thus, select the word "Run" it with the mouse cursor, and press F2:
Take a look where the VBEditor brings you.
Try to debug there.
I am using Sublime 3 but I am a newbie. I was trying to define some preferences, like the font size. However, I messed up things and I am not being able to restore.
Currently, I have this two windows "dashboard":
How can I restore it to the default one-window view?
I tried to look for things over the preference menu, but checking/unchecking all the available options did not help me to solve this problem.
It looks like you added an extra column. Try going to View, then setting Layout to Single or use the keyboard shortcut: Shift+Alt+1.
If you used File/Split View, setting single column mode won't work. In this case I found you can just click on another tab and the split will go away. Not at all intuitive.
Hello and thank you in advance,
I am wondering if there is a way to change the layout of my keyboard (software-wise).
The problem is that, on my laptop's keyboard, the Page Up and Page Down keys are combined with the Home and End keys respectively (i.e. to use Home, I have to use the command fn+PgUp/Home).
Is there a way for me to switch what my keyboard receives in Windows 8? If I press the PgUp/Home key I would like the Home command to be entered, and if I entered fn+PgUp/Home I would like the PgUp command to be entered.
I have tried googling for this using several different keywords, but haven't been able to find anything.
Any help is appreciated,
Zach
This is a duplicate question.
You can find an answer here:
https://superuser.com/questions/694465/remapping-a-keyboard-key-in-windows-8-1
Keep in mind this does require registry edits which can be dangerous and can lead to critical failures if not done correctly. Always create a restore point before making any registry edits.