Must Read:
Google Collaboratory or Google Colab is a cloud-based and free tool for research purposes. Google colab is made with the jupyter environment and supports almost all libraries needed in the Artificial Intelligence (AI) development environment.
Basically, google colab is the same as Jupyter Notebook and it can be said that google colab is jupyter notebook which is run online and free. Here are some of the advantages of using google colab.
1. Free Access
The use of google colab is intended for researchers who are developing research and require high computer specifications. Just keep in mind that google colab requires an internet connection.
2. Good Specifications
When we first installed Google Colab, a computer cloud access would be given with specifications (2019):
• GPU Nvidia K80s, T4s, P4s and P100s.
• 13 GB RAM
• 130 GB disk
3. Zero Configuration
In using google colab we don't need any configuration, but when we want to add a new library, we need to install the library package.
4. Easy Sharing
We can integrate with our own google drive and then save the scrypt into the github project. Or share a link with other people.
Using Colab
Install colab
Enter google drive then in the upper left corner click New> More> Connect more apps. Then in the search column type "colab" after it appears click connect.
Create a project folder
After successful installation, create a new folder on the drive then enter that folder. Then right select> More> Collaboratory.
Colab display
Then a colab display will appear, change the project name by clicking on the project name above. Then we can also adjust the appearance or theme as we want. Select tools> settings> Site. Then set the theme and save.
Run scrypt
Next create a simple python scrypt then run it. How to run Scrypt on Google Colab by selecting run ▶Or you can also use Ctrl + Enter. If you want to add notes use + Text and if you want to add lines of code use + Code.
Install the library
If we get an error running scrypt and it's using a certain library, then make sure that the library is installed. To add a new library on google colab, use the command "pip install (nama_package)". Then import the libraries that have been installed.
Upload files
We can upload the dataset file we have into google colab, how to select on the folder icon on the left sidebar, then enter the "content / sample_data" folder then on sample_data right click> upload. When the upload is complete, and refresh.
Mounting google drive
Another way to read files is to integrate our google drive into google colab. For the first step we need to upload the file to Google Drive. Then run the scrypt mounting drive, then in the output select the URL link> allow> copy the code> insert it into the output scrypt.
Read files
To be able to read files we can use the csv library or use pandas. But keep in mind we need the folder path where the files are stored.
Save it on github
To save Scrypt into Github, the first step is to create a repository on Github, if it's on Google Colab, select File> Save a Copy in Github> OK.