Simple tutorial on how to add Open in Colab button to python notebooks in github gists
Save Gist and get the shareable link for your gist.
Save Gist and get the shareable link for your gist.
Press the copy button to get the following link: https://gist.github.com/matteorapa/18dc0ef10d9a96952e96da534bf96e85
Reshape Gist URL for colab.
The following is the markup code to include for the button in your notebook. The link within the button needs to reference to your gist.
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/gist/username/hash/filename.ipynb)
To replace the bold parts with your own gist reference, use the following steps to build your link.
- The original URL: https://gist.github.com/matteorapa/18dc0ef10d9a96952e96da534bf96e85
- Trim URL till username (include the hash): matteorapa/18dc0ef10d9a96952e96da534bf96e85
- Add filename cuda.ipynb: matteorapa/18dc0ef10d9a96952e96da534bf96e85/cuda.ipynb
The final colab link should be: https://colab.research.google.com/gist/matteorapa/18dc0ef10d9a96952e96da534bf96e85/cuda.ipynb
The following is the Gist with the notebook with the Open in Colab button. This allows linking of your code directly into Colab for quick sandbox.