Jupyter Notebook with Google Colab


Jupyter notebook is an open-source web application which allows us to create and share codes and documents. It provides an environment, where we can document our code, run it, look at the outcome, visualize data and see the results without leaving the environment. This makes it a handy tool for performing end to end data science workflows – data cleaning, statistical modeling, building and training machine learning models, visualizing data, and many, many other uses.

Jupyter Notebooks are mostly prefered in prototyping phase. This is because in Jupyter notebook our code is written in indepedent cells, and we can execute each cell individually. This allows us to test a specific block of code in a project without having to execute the code from the start of the script. Now, I come to the main highlight of this post, Colab. Colaboratory is a hosted Jupyter notebook environment that is free to use and requires no setup. Following are the mostly useful features of Colab:

1. Pre-installed Tensorflow
When you create a new notebook on colab.research.google.com, TensorFlow is already pre-installed and optimized for the hardware being used. Just import tensorflow as tf, and start coding. 

2.Hardware acceleration with GPU.  
We need high end GPU's to accelerate machine learning algorithms. But sometimes we can't afford the GPU's. With Colab we can use GPU's provided by google at free of cost. Only we need to switch our notebook to run with GPU by going to Runtime > Change runtime type, and then selecting GPU. 

3. Easy dependency installation:
Setup your libraries and data dependencies in code cells Creating a cell with !pip install or !apt-get works as you’d expect. It also makes it easy for others to reproduce your setup. To get in your training data, you can follow these tutorials for popular data sources: BigQuery, Drive, Sheets, or Google Cloud Storage. You also have access to the shell with !, so !wget, !pwd, etc. might also help. 

4. Use with github:
If you have a nice .ipynb on Github, it’s easy to create a one-click link for your readers to start playing with it. Just add your Github path to colab.research.google.com/github/. e.g. https://colab.research.google.com/github/tanajikamble13/Numpy-Pandas-complete-tutorial/blob/master/NumpyTutorial.ipynb will load notebook stored on my Github repo. We can also easily save a copy of our Colab notebook to Github by using File > Save a copy to Github.

5. Share and edit collaboratively
Colab notebooks are just like Google Docs and Sheets. They are stored in Google Drive and can be shared, edited, and commented on collaboratively. Just click the Share button in the top right of any notebook that you’ve created. 

Now, if you are interested to start with Colab then go through tutorial on Google Colab Free GPU Tutorial . Thanks, I hope you enjoy using Colab!

No comments:

Post a Comment

Rendering 3D maps on the web using opesource javascript library Cesium

This is a simple 3D viewer using the Cesium javascript library. The example code can be found here . Click on question-mark symbol on upp...