【发布时间】:2021-06-06 08:19:51
【问题描述】:
所以我想使用 colab 来处理我拥有的一些文件,但它存储在 github 上。我宁愿不下载文件或将其放入谷歌驱动器(低存储空间)。如何让 colab 访问我的 repo 中的文件夹,以便循环访问里面的文件或其他东西,并替换它们?
我的新代码在 colab 中会是什么样子? P.S 这是我直接在我的硬盘上工作时使用的代码。
import os
for a in os.listdir(folder):
if a.endswith('.txt'):
print('1')
【问题讨论】:
-
你可以克隆 repo 吗?类似
git clone <repo url>。
标签: python-3.x github google-colaboratory