gpt4 book ai didi

google-colaboratory - 从 URL 打开 Google Colab notebook

转载 作者:行者123 更新时间:2023-12-02 06:13:23 31 4
gpt4 key购买 nike

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

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

实际上,它不是要点,而是一些课件/作业复习软件。

如何使用 Google Colab 打开这样的 URL所以我可以例如运行 Python 代码?

我知道我可以为 Github 要点或存储库构建 colab URL,但是我可以为任何任意 URL 构建吗?

最佳答案

目前没有办法按照您的要求执行 – 构建一个 URL,使 Colab 自动将位于特定 URL 的 .py 文件的内容加载到新的 Colab 笔记本中。

与此最接近的是在 github 上托管一个 notebook,然后使用 Colab url 打开它:例如

  • http://github.com/username/repository/path/to/notebook.ipynb可以使用 http://colab.research.google.com/github/username/repository/path/to/notebook.ipynb 在 Colab 中打开
  • http://gist.github.com/username/hash/filename.ipynb可以使用 http://colab.research.google.com/gist/username/hash/filename.ipynb 在 Colab 中打开
  • 关于google-colaboratory - 从 URL 打开 Google Colab notebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52131683/

    31 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com