Skip to content

Instantly share code, notes, and snippets.

@greed2411
Last active May 30, 2018 08:25
Show Gist options
  • Save greed2411/2149db8544a917d0bfd203a46fa7630b to your computer and use it in GitHub Desktop.
Save greed2411/2149db8544a917d0bfd203a46fa7630b to your computer and use it in GitHub Desktop.
colab extras
import zipfile
zip_ref = zipfile.ZipFile(path_to_zip_file, 'r')
zip_ref.extractall(directory_to_extract_to)
zip_ref.close()
from google.colab import files
uploaded = files.upload() # for uploading
files.download('baseline-model.pth') # for downloading
# P.S as of 22/5/18 uploading and downloading works fine only with Chrome. Not firefox.
!apt-get install p7zip-full
!7z x train.tsv.7z
!7z x test.tsv.7z
# the ! is for indicating bash command from jupyter notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment