import a github into jupyter notebook directly?

后端 未结 2 805
挽巷
挽巷 2021-02-11 06:44

Hey Im creating a jupyter notebook, would like to install:

https://github.com/voice32/stock_market_indicators/blob/master/indicators.py which is a python program

相关标签:
2条回答
  • 2021-02-11 06:56

    I got here searching for the same solution. Here is how I handled it through a Jupyter Terminal. I am using a Chromebook with Amazon SageMaker to host my Jupyter environment.

    In the terminal, I used basic git commands (please excuse my mess)

    I had a sqlite database file that was 300mb so I added it to my .gitignore file. I then uploaded the 300mb database directly to the same directory as my git clone using the upload function in Jupyter.

    I found a cool Chrome Extension, Keep Awake, that allows your computer to sleep but maintain internet if that helps anyone. Now that git has been initiated and my 300mb sqlite database is on my AWS cloud computer I can code on my Chromebook anywhere and push/pull commits.

    Hope this helps!

    0 讨论(0)
  • 2021-02-11 07:01

    You can clone the repository from your jupyter notebook using bash. Run in your cell:

    %%bash
    git clone https://github.com/voice32/stock_market_indicators
    

    This will clone the stock_market_indicators repository to your directory.

    You will now be able to access the functions in your indicators.py file. You can import it by running in jupyter:

    %load stock_market_indicators/indicators.py
    
    0 讨论(0)
提交回复
热议问题