You are on page 1of 6

Introduction to Google Colaboraty(Colab)

• Colab is a free notebook environment developed by


Google.
• It runs entirely in the cloud.
• It lets you and your team members edit documents, the
way you work with Google Docs.
• Colab supports many popular machine learning libraries
which can be easily loaded in your notebook.
• It provides GPU to its users totally free.
• It has eased the learning and development of machine
learning applications.
1
Features of Colab
• Write and execute code in Python
• Document your code that supports mathematical
equations
• Create/Upload/Share notebooks
• Import/Save notebooks from/to Google Drive
• Import/Publish notebooks from GitHub
• Import external datasets e.g. from Kaggle
• Integrate PyTorch, TensorFlow, Keras, OpenCV
• Free Cloud service with free GPU
• Notebooks created by Colab, will be saved in your
Googledrive. 2
To create and execute a Notebook
• Login to your Google drive account
• Open the following URL in your browser − 
https://colab.research.google.com
• Create, Execute and share a Notebook in Colab using the fo
llowing tutorial
• https://www.tutorialspoint.com/google_colab/index.htm
• Googledrive.

3
Basic Data Structures in Python – a review
• Basic data structures in Python – lists, tuple, dictionaries
and sets
• Lists – mutable, mixed data types, indexed data structures
• Ex: [1, 2, 3] [‘one’, ‘two’, ‘three’] [‘apples’, 50, True] [‘mouse’, [1,2,3]]
• Accessing a list : - Elements are accessed using the index operator [ ] . Index starts from 0
• Slicing a list: - A range of elements in a list can be accessed using the slicing operator :
and two indexes from where the portion of the list has to be sliced
• Ex: my_list = ['p','r','o','g','r','a','m','i','z’]
• print(my_list[2:5]) Output is ['o', 'g', 'r’]
• Methods used with a list : listname.append(), listname.extend(), listname.insert(),
listname.remove(), listname.pop(), listname.clear()
Refer Colab Notebook, LAB 1 (Python Basics).ipynb

4
Basic Data Structures in Python – a review
• Iterating over a list is using a for loop
• Ex: for k in range(2,10,2):
print (k)
• Output : ???
• Refer Colab Notebook, LAB 1 (Python Basics).ipynb

5
Basic Data Structures in Python – a review
• Tuples – an indexed linear data structure, mixed data
types but immutable – once defined cannot be altered.
• Example : num = (10,20,30) student = (‘John’, 48, ‘Computer Science’, 3.42)
• Refer Colab notebook LAB 1 (Python Basics).ipynb

You might also like