Closed yoniv1 closed 8 months ago
Is it possible to copy code in and out of the virtual machine environment?
Yes. For example:
scp test.txt wp5@136.156.154.152:/data/wp5/verhaegen_yoni/.
Is it possible to hide (large) code cell blocks?
This is something that needs to be done by the software that renders the final notebook on the webportal. Looks like we will use jupyter book. The best you can do right now is to add a tag as explained here: https://jupyterbook.org/en/stable/interactive/hiding.html#hide-code-cell-content But you won't see any difference on the notebook displayed on GitHub. As far as I know, the EQC requirements for tagging are still under discussion.
How do you save an executed jupyter notebook into a file to upload on github like you do?
Run the notebook. Then click on save. At that point, the notebook is stored on the VM. You can Download it using jupyter lab (there's a download button), or you can use scp/rsync as shown above. The file uploaded on GitHub is just a .ipynb
file.
Let me know if everything is more clear now.
Is it possible to copy code in and out of the virtual machine environment?
Yes. For example:
scp test.txt wp5@136.156.154.152:/data/wp5/verhaegen_yoni/.
Is it possible to hide (large) code cell blocks?
This is something that needs to be done by the software that renders the final notebook on the webportal. Looks like we will use jupyter book. The best you can do right now is to add a tag as explained here: https://jupyterbook.org/en/stable/interactive/hiding.html#hide-code-cell-content But you won't see any difference on the notebook displayed on GitHub. As far as I know, the EQC requirements for tagging are still under discussion.
How do you save an executed jupyter notebook into a file to upload on github like you do?
Run the notebook. Then click on save. At that point, the notebook is stored on the VM. You can Download it using jupyter lab (there's a download button), or you can use scp/rsync as shown above. The file uploaded on GitHub is just a
.ipynb
file.Let me know if everything is more clear now.
Thanks for the answer Mattia!
It’s still not 100% clear how to copy external code into a notebook cell in the VM. For example, I coded some notebooks on my personal computer and I want to copy some code to a cell block in a notebook file on the VM. For some reason, it won’t work. It only works for copying code from cell to cell within the notebook that is already on the VM, but external code (from notebook files on my computer) does not seem to get pasted by just doing copy-paste. So far, I have always rewritten the external code manually in the VM notebook file or reuploaded the external notebooks with changed code into the VM. Not that it is a big issue, this is a workaround that works but it would just be more logical if I can just copy-paste code into the notebook cells on the VM like you do for example from Word to Excel.
Ah sorry, I misunderstood your question. No idea, ctrl+C/ctrl+V works fine for me.
Could you try a different browser?
Thanks Mattia, it indeed works in another browser. Issue can be closed!
Describe the solution you'd like
I have some general questions related to the usage of the Virtual Machine for C3S notebooks.
Is it possible to copy code in and out of the virtual machine environment?
Is it possible to hide (large) code cell blocks?
How do you save an executed jupyter notebook into a file to upload on github like you do?
Thanks!