Skip to content

Instantly share code, notes, and snippets.

@tiaplagata
Last active December 15, 2020 13:31
Show Gist options
  • Save tiaplagata/50c4cb3ef08caf8b8c0addfeed4fe468 to your computer and use it in GitHub Desktop.
Save tiaplagata/50c4cb3ef08caf8b8c0addfeed4fe468 to your computer and use it in GitHub Desktop.
Code to set up data in Google Colab
from google.colab import drive
import os
# Mount Google Drive
drive.mount('/gdrive', force_remount=True)
# Location of Zip File
drive_path = '/gdrive/MyDrive/Data/pneumonia_data.zip'
local_path = '/content'
# Copy the zip file and move it up one level (AKA out of the drive folder)
!cp '{drive_path}' .
# Navigate to the copied file and unzip it quietly
os.chdir(local_path)
!unzip -q 'pneumonia_data.zip'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment