Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 2.85 KB

File metadata and controls

82 lines (59 loc) · 2.85 KB

Google Colab Instructions

Google Colab is a free notebook tool that runs in your web browser. It is a good option when you want to save a copy of your work in Google Drive.

When to Use Colab

Use Colab when:

  1. You want your notebook work saved in Google Drive.
  2. Binder is slow or unavailable.
  3. Your instructor asks you to submit a completed notebook file.
  4. You are already comfortable signing in with a Google account.

Binder is usually the easiest starting option. Colab is often better when saving work matters.

Option 1: Open a Notebook from GitHub

  1. Go to the course repository on GitHub.
  2. Open the notebooks/ folder.
  3. Click the notebook you want to use.
  4. Copy the GitHub page URL from your browser.
  5. Open Google Colab.
  6. Select File.
  7. Select Open notebook.
  8. Select the GitHub tab.
  9. Paste the GitHub URL.
  10. Select the notebook and open it.

This option is useful because it starts from the official course notebook.

Option 2: Upload a Notebook File

  1. Download the notebook file from the course repository or learning system.
  2. Open Google Colab.
  3. Select File.
  4. Select Upload notebook.
  5. Choose the .ipynb notebook file from your computer.
  6. Wait for the notebook to open.

This option is useful if your instructor gives you a notebook file directly.

How to Run Cells

  1. Start at the top of the notebook.
  2. Read the instructions before running code.
  3. Click the play button beside the first code cell.
  4. Wait for the output to appear below the cell.
  5. Continue one cell at a time.
  6. Complete each TODO or practice step when you reach it.

Run cells in order. Later cells may depend on variables or code from earlier cells.

How to Upload Data Files

Some notebooks may use files from the course data/ folder.

  1. In Colab, look for the folder icon on the left side of the page.
  2. Click the folder icon to open the file panel.
  3. Click the upload button.
  4. Choose the needed data file from your computer.
  5. Wait until the file appears in the file panel.
  6. Run the notebook cell that uses the file.

Uploaded files may disappear when the Colab runtime resets. If that happens, upload the file again.

How to Save Your Work

  1. Select File.
  2. Select Save a copy in Drive.
  3. Rename the copy if your instructor gives a required file name.
  4. Continue working in your saved copy.
  5. Before submitting, check that your latest changes are saved.

Saving a copy helps protect your work if the browser closes or the runtime resets.

Colab Tips

  1. If Colab asks for permission to run the notebook, choose the option to continue.
  2. If the runtime resets, run the notebook again from the top.
  3. If a variable is missing, rerun earlier cells in order.
  4. If a data file is missing, upload the file again.
  5. Save your work before closing the browser tab.