从URL打开Goog​​le Colab笔记本

Mes*_*ssa 1 google-colaboratory

例如,我在某个URL下有一个Python文件

https://gist.githubusercontent.com/messa/d19ad7fd4dc0f95df9caf984caef127c/raw/4d0daebdcfcf16ea3b7914ee6186bd98dbfb3c20/demo.py

实际上,它不是要点,而是一些课件/家庭作业评论软件.

如何使用Google Colab打开此类网址,以便我可以运行Python代码?

我知道我可以为Github gists或存储库构建colab URL,但是我可以为任意URL做这个吗?

jak*_*vdp 9

目前无法满足您的要求 - 构建一个URL,使得Colab能够自动将特定URL上的.py文件内容加载到新的Colab笔记本中.

最接近这一点的是在github上托管笔记本,然后使用Colab网址打开它:例如

  • http://github.com/username/repository/path/to/notebook.ipynb 可以在Colab中打开使用 http://colab.research.google.com/github/username/repository/path/to/notebook.ipynb
  • http://gist.github.com/username/hash/filename.ipynb 可以在Colab中打开使用 http://colab.research.google.com/gist/username/hash/filename.ipynb