Running the assignments on Google Colab

One-time setup, about five minutes. Do this before Assignment 1's first recitation.

1. Sign in with your Brown account

Open colab.research.google.com and make sure you are signed in as your_name@brown.edu — not a personal Gmail. Course notebooks, datasets, and shared folders are released to Brown accounts, and work done under a personal account cannot reach them.

2. Put the course data in your Drive

  1. Open the shared a1_data folder from the link on Canvas.
  2. In your own Google Drive, create a folder named exactly cpsy1291 in "My Drive".
  3. Right-click the shared a1_data folder → Organize → Add shortcut, and place the shortcut inside your cpsy1291 folder. The notebooks look for /content/drive/MyDrive/cpsy1291/a1_data, and this is what makes that path exist.

3. Open a notebook and run it

  1. From Canvas, open the assignment notebook and choose File → Save a copy in Drive. Work in your copy.
  2. Run the first two cells. The first mounts your Drive: Colab will ask permission, so approve it with your Brown account. The second loads the data and prints what it found.
  3. If it says it cannot find the data, re-check step 2's folder names.
Two things that are normal, not broken: Part 2's first cell upgrades scikit-learn and takes an extra half-minute on a fresh runtime — no restart needed. And Part 4 fits t-SNE nineteen times across the notebook, about twenty minutes in total on a free runtime; do not interrupt those cells, and leave time for the final restart-and-run-all.

4. Before you submit

Runtime → Restart session and run all, wait for every cell to finish, then File → Download → Download .ipynb, keeping the exact filename. Submission details are at the bottom of each notebook.

Stuck?

Post on Ed in the assignment's category — setup questions are welcome there — or bring it to recitation (Tuesdays 6:30–7:50 PM) or office hours (Wednesdays 1 PM, Carney 429 — a quick email beforehand is appreciated).