0

Of course I could download de "raw" version of the file from Github, and upload it to my Colab notebook... but, is there any way to use a single Github file directly in Colab?

It would be usefull if I want to use just some libraries of a proyect, without cloning the entire repository.

E.g. I would like to do something like this in Colab:

from https://raw.githubusercontent.com/ASAROVA/complejos/main/complejos.py import *

# Now I could use any tool from my library "complejos.py"
print(complejo( 0,-4)+complejo( 3,4))
...
Ali Rojas
  • 499
  • 3
  • 11

1 Answers1

1

You can do this

!wget https://raw.githubusercontent.com/ASAROVA/complejos/main/complejos.py
from complejos import *
korakot
  • 32,074
  • 13
  • 108
  • 128