Warm tip: This article is reproduced from serverfault.com, please click

How does !npx degit work in Google Colab?

发布于 2020-11-28 18:37:50

I'm trying to read files from my Github repository in Google Colab. I found this answer that instructed me to use:

!npx degit Jainu-s/urldata/al -f

Which copies the files from my repository as local Colab files. It works perfectly, but I have no ideia what this code does exactly and I could not find any Colab documentation on it.

Can anyone explain to me how it works? What is its syntax, what does it do? And what are the options I could use with it?

Questioner
user3347814
Viewed
0
korakot 2020-11-29 07:46:51

You can read its documentation.

https://github.com/Rich-Harris/degit

Basically,

  • the program is degit
  • npx is to execute without install it
  • /al means you download that directory content
  • f is force download, because the directory is not empty

To read more

!npx degit --help