Google Colab, Getting Started, Cloud Based Runtime, Connecting to Google Drive, Loading Files

Iden W.
Clarusway
Published in
5 min readJan 2, 2021

--

Photo by William Daigneault on Unsplash

Google Colab is a web page ide which works like google docs but you can write and run your codes.

By using Colab you get free access to GPUs. You don’t need any configuration to use Colaboratory. In addition to these you have the ability to share it with your colleagues like other google tools.

With its easy use it makes your work easier. Students and professionals may benefit from colab.

You just click on the New button on the left when you are in Google Drive as shown below.

And then you pass through the menu:

More — — (Scroll down) and click + Connect more apps as shown below.

And then you pass Colaboratory into the search bar and click enter. Now you can install it.

Once you install it, it will appear in the scroll down menu as shown below:

If it doesn’t work, just google it and follow the instructions.

If you’re familiar with the popular Jupyter project, you can think of Colab as a Jupyter notebook stored in Google Drive. A notebook document is composed of cells, each of which can contain code, text, images, and more.

Colab connects your notebook to a cloud-based runtime, meaning you can execute Python code without any required setup on your own machine. For that just go to the connect button on the right and connect to the hosted runtime.

Once you connect, you can see the info on the right pane of your notebook.

Additional code cells are executed using that same runtime, resulting in a rich, interactive coding experience in which you can use any of the functionality that Python offers.

To execute the code in the above cell, select it with a click and then either press the play button to the left of the code or use the keyboard shortcut “Shift-Enter”. To edit the code, just click the cell and start editing.

Cell outputs are not limited to simple text, however. They can contain any number of dynamic, rich outputs. For example, we can search Colab’s built-in library of code snippets and insert code to create an interactive data visualization.

With Colab you can harness the full power of popular Python libraries to analyze and visualize data. The code cell above uses your dataset for seaborn to visualize it. To edit the code, just click the cell and start editing.

You can import your own data into Colab notebooks from your Google Drive account, including from spreadsheets,

Click on the folder button on the left:

Click the Google Drive Folder icon and run the cell which appears, click the link, login to your account and copy the script, come back and paste the script in the code line and enter. Now you accepted Colap to reach your Google Drive.

Once you authenticate Colab to reach your drive the Google Drive icon will change as seen below and you will see the Drive and My Drive shortcuts. Now you can easily reach your files, folders, and colab notebooks you have created before.

You can also reach Github and many other sources.

Colab notebooks allow you to combine executable code and rich text in a single document, along with images, HTML, LaTeX, and more. When you create your own Colab notebooks, they are stored in your Google Drive account. “Colab Notebooks” folder is automatically created in your google drive. You can easily share your Colab notebooks with co-workers or friends, allowing them to comment on your notebooks or even edit them. Text cells are formatted using Markdown, a plain text document format that’s rendered on the page. Markdown format is simple and powerful, allowing you to add headings, paragraphs, lists, and even mathematical formulae.

Colab notebooks can be shared like a Google Docs, and for this purpose, it’s useful to use.

Text cells to provide a narrative around the code you’ve executed.

If you would like to share your notebooks with others, you can do so via Google Drive sharing or even by exporting your notebook to GitHub.

The notebook is stored in the standard Jupyter Notebook format, and so the notebooks you create can be viewed and executed in Jupyter Notebook, JupyterLab, and other compatible frameworks.

The convenience of sharing notebooks means that you can find and explore many interesting notebooks around the web.

Conclusion

Google Colab is a Jupyter Notebook which you can code easily. When you connect to the hosted runtime, you don’t consume your computer resources. You also don’t need an IDE on your computer. Text cells make editing much easier to add additional info and comments into your notebook. You can easily share your notebooks. Your friends or colleagues can contribute to your notebooks.

Consequently, Google Colab is easy to use and benefits from Google Drive options.

To learn more about Google Colab, you may click the link below.

https://idenw.medium.com/google-colab-2-dark-mode-runtime-share-github-69498e9057e2

--

--