Is it possible to import my own modules into a google-colaboratory notebook?

前端 未结 2 634
执笔经年
执笔经年 2020-12-05 12:02

I am using google colaboratory for teaching Data Science with python and in order to leave the notebooks only with the specific lesson for the students I would like to impor

2条回答
  •  醉话见心
    2020-12-05 12:51

    I have a dirty trick that does precisely this. With all my code in one package I can do

    !wget mysite/mypackage.py
    from mypackage import *
    

    Similarly if mypackage has dependencies, I can wget a zipfile and !unzip it

提交回复
热议问题