Today’s New Year’s, and I’m stoked to see the Sherlock special later tonight at 6. I’m starting the year with formally teaching myself C++, which is something I wish I had picked up while learning C. I also recently started using Colaboratory, which is a really neat way to collaborate on iPython notebooks. The set-up is a few years old, and requires some updating, so I’ll just tell you what I did to get things working.
The first step is to check out the colaboratory repo. It has most of the instructions on there, but a few steps are missing given the date of the last update.
Second, if you have a directory on your computer where you save development related frameworks and repos (mine’s in ~/Documents/Developer/Git), go there and clone the colaboratory repo (
git clone --recursive https://github.com/jupyter/colaboratory) there.
Next, if you have virtualenv and virtualenvwrapper installed (I don’t like anaconda, check out the Python guide for a good walkthrough), create an environment for colaboratory using
mkvirtualenv colab. I recommend using a clean virtual environment in case you already have the latest version of iPython, because you will need an older version to be able to run colaboratory.
Once you are in the Colaboratory directory, go to the requirements.txt file and indicate that the version of iPython you want is 2.4.1 (write
ipython[notebook]==2.4.1). Once you’ve done this, run
pip install -r requirements.txt.
Finally, as they tell you in the README, run python -m colaboratory, which will start the iPython kernel in your browser and allow you to connect your Google Drive to colaboratory. Once you’ve authenticated with Google Drive, you should be able to create and share ipynb files and collaborate with others on iPython work.
That’s it, have fun collaborating with iPython this New Year!