Google Colab-2 Dark Mode, Runtime, Share, GitHub

Iden W.
Iden W.
Jan 18 · 5 min read
Image for post
Image for post
Photo by Joshua Sortino on Unsplash

If you haven’t covered the issues in the “Google Colab-1 Getting Started” story please follow the link below.

If you have already covered the issues in the first story we may go on with the other features of Google Colab. In this story we will cover how to:

  • Switch to the dark mode
  • Read a CSV file
  • Where to find the shortcut for stack overflow
  • Restart kernel
  • Commit to GitHub and share
  • Share your notebook.

Anyone who likes the dark mode can click the Tools tab, and then settings as seen below.

Image for post
Image for post
Screenshot by the author.

From settings, you may click on the Theme from the Site menu and then select the dark feature as seen below. Don’t forget to save after your choice. After you save you will switch to the dark mode.

Image for post
Image for post
Screenshot by the author.

While working in your Google Drive, reading a CSV file is so easy. You may define or specify a folder in your Google Drive for your notebooks or data files. Or you may upload them in the automatically-created “drive/MyDrive/Colab Notebooks” folder.

You just go through the folders Drive-MyDrive-Colab Notebooks and find your file inside the folder. Right-click on the file-name you want to read. After right-click, you will see the menu as seen below. Left-click the Copy path option.

Image for post
Image for post
Screenshot by the author.

As you have the path, you may paste it just between the quotes in your code-line. When you run the cell, you will have your “df” to work on.

df=pd.read_csv(‘/content/drive/MyDrive/Colab Notebooks/22-Deep Learning/fake_reg.csv’)

Image for post
Image for post
Screenshot by the author.

If you have any issues with your code, you may just click on the “SEARCH STACK OVERFLOW” button which appears just below your output cell.

Image for post
Image for post
Screenshot by the author.

You will be directed to the Google website for your further research. You may go through the web for a solution and then come back to your Google Colab tab on your browser.

Image for post
Image for post

If you have any issues with the kernel you may restart and run all the codes, or you may choose any option from the menu as you do in your Jupyter notebooks. Just select the “Runtime” tab and go through the option you want.

Image for post
Image for post
Screenshot by the author.

When you are done with your notebook you may either save it to your Google Drive or upload it to your Github repositories. Please find the short introductive video below.

Video by Author

Once you commit to your GitHub repository, you may open your file from your GitHub account with the shortcut link above the file. When you open your file with the Google Colab link you will see the GitHub icon on the upper left corner of your file, next to the file name.

Image for post
Image for post
Image for post
Image for post
Screenshots by the author.

If you want to share your GitHub file, you can click the share button on the upper right corner and you get the view as seen below. you get a warning. “Warning: Shared links will not contain your edits or outputs. To include your edits, select File→Save a copy in Drive and generate a link from the resulting copy.

So if you want to share your notebook as it is, you may copy the link and share it. But if you want to share your file, and you want your colleagues to see the updates and changes, you may save it to your drive from the link on the upper left of your notebook (Copy to Drive) and share a link from your Google Drive.

Image for post
Image for post
Screenshot by the author.

How to share the Google Colab Notebook?

When you want to share your notebook (while working in the Google Drive folder) you may click the Share button.

Image for post
Image for post
Screenshot by the author.

You may share your notebook via passing e-mail addresses of your colleagues to the line shown below, and click “Done”.

Image for post
Image for post
Screenshot by the author.

Or you may click anywhere on the Get link pane, and then click on the small triangle icon near the Restricted option, and change your choice to “Anyone with the link” as seen below.

Image for post
Image for post
Screenshot by the author.

And then click on the small triangle icon near the Viewer option. You have three sharing options. The viewer option is for just showing your file who has the link. Commenter option is for anyone with the link that may not change your file but may comment on your file. The Editor option lets anyone with the link viewing, committing, and editing to your files.

Image for post
Image for post
Screenshot by the author.

Once you set the options you may copy the link and share it with anyone you want.

Image for post
Image for post
Screenshot by the author.

Conclusion

So far we covered how to:

  • Switch to the dark mode
  • Read a CSV file
  • Where to find the shortcut for stack overflow
  • Restart kernel
  • Commit to GitHub and share
  • Share your notebook.

Google Colab gives us easy use features, especially on sharing issues. It creates a live Notebook where anyone with the link sees the updates, and it is possible to communicate with your colleagues by the notebook using comments. you may assign a person using the comments. and they may check the comment card when they finish or may add additional comments on the issue. so follow me for learning how to do that and for the new issues.

Clarusway

We aim to set the new frontier in IT training with its…

Iden W.

Written by

Iden W.

Data Scientist

Clarusway

Clarusway

We aim to set the new frontier in IT training with its comprehensive and innovative approach in teaching while transforming individuals into IT professionals from the ground up.

Iden W.

Written by

Iden W.

Data Scientist

Clarusway

Clarusway

We aim to set the new frontier in IT training with its comprehensive and innovative approach in teaching while transforming individuals into IT professionals from the ground up.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store