Accessing Python Through Google Colab:

Google Colab is an incredible online browser-based platform that allows us to train our models on machines for free! Sounds too good to be true, but thanks to Google, we can now work with large datasets, build complex models, and even share our work seamlessly with others. That’s the power of Google Colab.

Colab is a free Jupyter notebook environment that runs entirely in the cloud. Most importantly, it does not require a setup and the notebooks that you create can be simultaneously edited by your team members – just the way you edit documents in Google Docs. Colab supports many popular machine learning libraries which can be easily loaded in your notebook.

Why should we use Google Colab/Collaboratory???

If you want to create a machine learning model but say you don’t have a computer that can take the workload, Google Colab is the platform for you. Even if you have a GPU or a good computer creating a local environment with anaconda and installing packages and resolving installation issues are a hassle.

Collaboratory is a free Jupyter notebook environment provided by Google where you can use free GPUs and TPUs which can solve all these issues.

 If your Computer/Laptop is very slow to Execute or install Python, we have another way to work on Python using Google Colab (Virtual access without any installation)

Getting Started:

  1. To start working with Colab you first need to log in to your google account, then go to this link https://colab.research.google.com
  2.  Go to this URL and click on New notebook

EXAMPLES: Contain a number of Jupyter notebooks of various examples.
RECENT: Jupyter notebook you have recently worked with.
GOOGLE DRIVE: Jupyter notebook in your google drive.
GITHUB: You can add Jupyter notebook from your GitHub but you first need to connect Colab with GitHub.
UPLOAD: Upload from your local directory.

 3. Click on new notebook, it will create a Jupyter notebook the name starts with Untitled.ipynb and save it to your google drive in a folder named Colab Notebooks. All commands of Jupyter notebooks will work here.

4.  You can rename the notebook name; I have renamed it to Practicing python  

5. Change Runtime Environment:


Click the Runtime dropdown menu. Select “Change runtime type”. Select GPU from “Runtime type” dropdown menu and save

6. Let’s Start Python programming

In the code block, two texts are assigned to variables A and B And the output Is printed below the Code block.

To execute the above to lines of code, press Alt + Enter or Ctrl + Enter

  • Alt-Enter runs the current cell and inserts a new one below.
  • Ctrl-Enter run the current cell and enters command mode.

0 0 votes
Article Rating
1 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments