Educational tool for displaying code from Jupyter (under development) and Google Colab environments in almost real time.
- Fork this repository
- (Optional) Add a
credentials.py
with aget_credentials()
functions that returns your Google Colab username and password. Thecredentials.py
is already being ignored by.gitignore
. As a suggestion, use keyring for storing your password:
"""
# Template of credentials.py file
Firstly, install keyring:
$ pip install keyring
Next, store your password in your system using:
>>> import keyring
>>> keyring.set_password("system", "[email protected]", "password")
Make sure to replace username with your colab email address. Finally, the password can be accessed using:
>>> keyring.get_password("system", "username")
"""
my_username = "[email protected]"
def get_credentials():
pwd = keyring.get_password("system", my_username)
return my_username, pwd
- Run the
colab.py
file:
$ python colab.py
-
You will be asked to open the ipynb file that you would like to live share. Is case the 'credentials.py' file is not present, you will also be asked to login manually on google colab. Check the source code for further info.
-
The live code will be pushed to the output folder in this repository every 10 seconds with the name pattern: YEAR-MONTH-DAY.py