Copy paste to PARI/GP - pari-gp

I have a text in my notebook and I'd like to copy it to PARI/GP. The text is a little bit long, but I'm not sure if I'm not getting it just because of that. I've tried CTRL C + CTRL V and Copy-Paste and none of them worked. Any suggestions?
Thanks in advance.

I am using gp with Ubuntu 16.04 LTS and to perform paste of one or more lines into the gp session shift ctrl v works. To copy from a gp session I highlight text and copy using shift ctrl c.

Related

SublimeREPL : shortcut to pass R code with Sublime Text

I'm looking for a shortcut in Sublime Text 3 for R syntax that have the same "behaviour" as ctrl + r in the R app:
Pass line if nothing is selected
Pass only selection when something is selected
Go to next line / end of selection juste after passing a line / selection
Any idea ? Is there something similar to NppToR for Notepad++ ?
This can be done using 'SendCode' package of Sublime Text. You can install it through Package Control. Just make sure that the R console is open before you use the shortcut (for me it's ctrl + r)!.

zsh + Hyper.js + Windows 10 = blue font?

I've got a problem where my Hyper terminal emulator keeps changing my zsh shell text to blue. This doesn't happen on WSL.
WSL:
Hyper.js:
Changing hyper.js 'cyan' to #FFFFFF obviously makes it white but I don't want to fix it that way. For some reason, zsh let's Hyper know that it needs to render cyan/blue.
This happens after I reinstall hyper.js and clear the roaming/local appfolders:
Cleared:
I've been staring at this issue for way too long, tried everything I can and know. I have no idea where to look now, since it doesn't happen in WSL (Bash/Ubuntu for Windows).
Is there any way I can debug zsh or Hyper to tell me why it's turning blue/cyan?
Thanks!
I had the same Issue, you need to reset your CMD colors before using Hyper, check this issue for more information.
Solution:
Go to this link download Console_Defaults_win10.reg, execute it and then open Hyper.
Enjoy.

Is there some function to clear all viewer iterms in RStudio?

Is there some function to clear all viewer iterms in RStudio? so I donot need to clear manually.
Not an R function but a Mozilla hotkey:
CTRL + Shift + W
It will prompt you to save scripts, though.

Using R in Sublime Text 3: Shortcut

I've installed R in Sublime Text 3 on my Windows 8.1 64bit as described here:
http://www.kevjohnson.org/using-r-in-sublime-text-3/
However, I don't know how to push code to the R console.
This same problem is described here, but the suggested solutions don't work for me (Using the menu items/Changing the syntax):
Not able to run selected lines in REPL R in sublime text
I don't even understand what kind of shortcut Ctrl+Shift+,,l is supposed to be. Pressing Control and Shift down and then entering two commas and an l?
I hope someone can help me answer my very first question on Stackoverflow.
I hadn't heard of Repl until this post. I just checked it out. It turns out the double character means "release". So "Ctr - shift - comma", release, and then press "L". Let me know it that helps you run a line in the console.

How to recover deleted Jupyter notebook cell?

I use Jupyter notebook. I accidentally deleted a cell, and I can't go step back.
How can I recover the notebook cell?
If you go to "Edit", there's an option for "Undo Delete Cells".
In MacOS
If you are familiar with shortcuts, you can do cmd + shift + p and then type in undo to recover as well. No need to moving your mouse around.
In Windows
First, switch to command mode by pressing ESC, then you can press Z to recover the deleted cells. (Thanks to #nik7 who proposed this answer)
First, switch to command mode by pressing ESC, then you can press Z to recover the deleted cells. It works even in Jupyter Lab which doesn't have "Undo Delete Cells" option under "Edit" tab.
If the notebook kernel is still running and you executed the cell, you can find the content of all cells, including the deleted ones in _ih. For example, the last five cells:
_ih[-5:]
If you need to undo something deleted inside a cell, press:CTRL/CMD + Z
If you need to recover an entire deleted cell hit:
ESC + Z.
Especially this second tip might be useful if you delete a lot of cells by mistake.
if you've already restarted your kernel then %history or _ih[:n] would be empty. You can hope for a recent checkpoint to revert to. You can do this with File > Revert to Checkpoint.
If you want to be sure what's in the checkpoint before you revert - in your working directory (the one your notebook lives in) you'll have a hidden folder that stores your checkpoints. cd .ipynb_checkpoints will get you there. You can look inside the file and see if your lost code is there.
This has just saved me. Found this in an answer here
First, do "ESC" hot key, then you can press Z to recover the deleted cells.
Jupyter Lab work well.

Resources