Quick Docstrings in Colaboratory
This is what helped me e.g. Image( and then CTRL+Shift+Space bar do it with only one bracket.
This is what helped me e.g. Image( and then CTRL+Shift+Space bar do it with only one bracket.
I would recommand using GCP’s Secret Manager : You get useful features such as rights management (in IAM & Admin), you can update your passwords via Secret versions, etc.. really useful. Pre-requisits: Have a Google Cloud Platform project In the IAM & Admin, you should have the role : “Secret Manager Secret Accessor“ Create a … Read more
You can see the disk information using a command like !df -h. To see CPU specs, !cat /proc/cpuinfo. For memory, !cat /proc/meminfo. Here’s an example notebook: https://colab.research.google.com/notebook#fileId=1_x67fw9y5aBW72a8aGePFLlkPvKLpnBl Edit: Colab now offers a Pro version which offers double the amount of disk available in the free version.
It’s not possible to mount a subfolder, only top-level Drive. You can mount Drive in some out-of-the-way place and then symlink the folder you want someplace more central, e.g.: from google.colab import drive drive.mount(‘/gdrive’) !ln -s “/gdrive/My Drive/theFolder” “/content/theFolder”
Since Python 3.7 you can use a built-in breakpoint function. If this is not available, you can use import pdb pdb.set_trace() instead. If you want to execute the next line you can try n (next) instead of s (step).
Normally on my own machine, I put this the following css snippit in the ~/.jupyter/custom/custom.css file. pre { white-space: pre-wrap; } But, the above does not work for google colab: I tried creating a file /usr/local/share/jupyter/custom/custom.css, but this didn’t work. Instead, put this in the first cell of your notebook. from IPython.display import HTML, display … Read more
As pointed out in the other answer, Colab Notebooks are files on your Google Drive. Hence, sharing them or retrieving their contents can be done via the Google Drive API (from what I understand you can use the webContentLink to download it). However, your first question is: Where is the Google Colab API? For anyone … Read more
I suggest you not to upload them just in Colab, since when you’re restarting the runtime you will lose them (just need to re-upload them, but it can be an issue with slow connections). I suggest you to use the google.colab package to manage files and folders in Colab. Just upload everything you need to … Read more
While I tried your code, and it did not give me an error, I can say that usually the best practice to debug CUDA Runtime Errors: device-side assert like yours is to turn collab to CPU and recreate the error. It will give you a more useful traceback error. Most of the time CUDA Runtime … Read more