FredMaster
FredMaster

Reputation: 1459

Git folder to google colab

I want to download a folder from github (not the entire repo!) into google colab.

How can I do this using a google colab cell execution?

For files I achieve this doing the following:

if 'google.colab' in str(get_ipython()):
  !wget https://raw.githubusercontent.com/fredzett/rmqa/master/utils.py -P local_modules -nc

I found the following link. Problem: this gives me the entire folder structure from my repo all the way down to the folder in my repo. I really just want the folder.

So e.g. I have a folder "datasets" in my github repo and it should show up as a folder "datasets" in google colab.

Is this possible?

Thanks!

Upvotes: 2

Views: 765

Answers (1)

korakot
korakot

Reputation: 40828

Try this

!npx degit fredzett/rmqa/data data

Upvotes: 2

Related Questions