Mastering the features of Google Colaboratory !!!

Mastering the features of Google Colaboratory !!!Tanu PrabhuBlockedUnblockFollowFollowingJun 17Source: codementor.

ioGoogle Colaboratory is a research tool for data science and machine learning.

It’s a jupyter notebook environment that requires no setup to use.

It is by far one of the most top tools especially for data scientists because you don’t have to manually install all the packages and libraries, just import them directly by calling them.

Whereas in normal IDE you have to manually install the libraries.

And moreover notebooks are meant for code and explanation, it often should look like a blog post.

I have been using Google colab from past two months and it has been the best tool for me.

In this blog, I would be giving you guys some tips and tricks about mastering the Google Colab.

Stay tuned read all the points, these were the features which even I was struggling to implement at the first place, now I mastered it.

Let’s see the top best features of Google Colab notebook.

1) Running the cell:To “Run the Cell” (a cell is a place where you enter either your code or text to be executed), you can either press “Ctrl+Enter” or “Shift+Enter”.

I personally use “Shift+Enter” because when you press “Shift+Enter” it runs that particular cell and automatically creates a new cell, which is a handy feature to get things done quickly.

Using “Ctrl+Enter”Using “Shift+Enter”2) Uploading filesThis can be a really painful task if you follow the steps of some random online tutorials.

But I have an easy solution which is a one-step process, you do not need to write extra codes, or perform some extra tasks, whereas you just have to upload manually to the Colab.

Here is the way to do it.

The below-shown image clearly indicates that you have to right-click on an arrow mark which looks like “>” at the left-hand side of the cells.

When you click that you will find a tab with three options, you just have to select “Files”.

Then you can easily upload your file with the help of the “Upload” option.

There is one thing that you be aware, you should upload the file outside the “Samples” folder.

There you go your job is done.

Click on the Files tab to upload.

This is how it looks when you upload your file to the colab.

After uploading your file to the Colab.

3) Tutorials in ColabDid you know Google Colab is not only used to type code but also a good place to learn the concepts about Machine Learning, Pandas, Neural Networks.

It’s true that you can find a bunch of tutorials in Colab that you can enhance your skills.

To find these tutorials just click the > on your left-hand side and click on “Table of Contents” -> “More Resources” you can find a bunch of tutorials out there.

You can find many tutorials in Colab.

4) Uploading Images in your notebook.

Sometimes you need to upload images to your notebook, just in order to make things clear.

Adding images can be sometimes hard when you follow tutorials online.

One easy way that I found out was obviously you have to use a free image hosting site in order to render your image in the notebook.

To do this use “TinyPic”, which is the best website to upload your images, which gives you a bunch of links to choose after hosting your images such as HTML, Url and many more.

You can also upload “Videos” to this website.

Choose one of the above links that fit your needs.

Once you upload the image to TinyPic, then you just have to copy the link according to your requirement and then paste in the “Text” section.

There you go your job is done.

Paste the link in the Text section5) Using Tab to complete the code.

This is one of the best feature in the Colab called “Tab Completion”.

Tab Completion is very useful especially when you are not sure about the methods of a function.

It displays you all the listed methods, and then you can choose the method that you need.

In order to do this, you have to just press the “Tab” key on your keyboard and there you go you have a complete list of all the equivalent methods to choose.

Press the Tab key to use this option.

6) Directly Saving to GitHubGoogle Colab gives you an option to save your project to your GitHub repository which is a handy option.

This option helps one tedious task of uploading your project to your GitHub manually, rather this can save your project automatically to your repository.

To do this just click on the “File” tab on top of the screen and then click on the option of “Save a copy in GitHub”.

Click on the File Tab to upload to your GitHub7) Saving your project as PDFThis was one of the painful tasks for me unless my professor taught me how to do this.

Because sometimes you might have to send the PDF document of your notebook for more readability.

Because this IPYNB file is not readable unless you have a parser.

So in order save to PDF document you just have to click “Ctrl-P” and then click save as “PDF”.

There you go your job is done.

I know that it’s a simple process, but sometimes these simple process can be a pain in the ass if you don’t know to do it.

Press Ctrl-P or Print option.

8) Importing the libraries without installing.

Google Colab gives you a unique feature that not even the best IDE provides such as “Importing the libraries without installations”, you don’t have to manually install any libraries prior importing them, all you have to do is just tell for example import pandas as pd, per se and then your job is done, gone are those days where you have to type pip install pandas in your command prompt, which is disgusting.

This is indeed one of the best features of Google Colab.

The above are the prominent features or tips of using Google Colab, everything is available in Google Colab you just use your brain in order to implement them.

Also, I hope that reading this blog has given you a better understanding as to how to use Google Colab like a pro.

Thank you guys for spending your time reading my blog, stay tuned for more updates.

Let me know what is your opinion about this post in the comment section below.

Also if you have any doubts regarding the post, the comment section is all yours.

Have a nice day.

.

. More details

Leave a Reply