Skip to content

Instantly share code, notes, and snippets.

@HariSan1
Last active February 18, 2020 16:19
Show Gist options
  • Save HariSan1/2a4d4e145a8ddc0ff849384feb527c7e to your computer and use it in GitHub Desktop.
Save HariSan1/2a4d4e145a8ddc0ff849384feb527c7e to your computer and use it in GitHub Desktop.
mount files from Google Drive and copy files for ludwig Titanic survivor prediction example
#Do the following ONLY IF YOU ARE IN GOOGLE COLAB AND are importing the required files from Google One Drive
#Un-comment the lines below
from google.colab import drive
drive.mount('/content/drive')
!ls "/content/drive/My Drive"
#I copied the following from my Google One Drive to the colab /content/ default drive, ensure that your path is correct as needed
#read my article on how to create model definition file here:
#download the titanic dataset from Kaggle here: https://www.kaggle.com/c/titanic/
#below lines are for copying from Google One Drive to Google colab. Skip if this is not your setup
!cp "/content/drive/My Drive/Colab Notebooks/Titanic/model_definition.yaml" "/content/model_definition.yaml"
!cp "/content/drive/My Drive/Colab Notebooks/Titanic/test.csv" "/content/test.csv"
!cp "/content/drive/My Drive/Colab Notebooks/Titanic/train.csv" "/content/train.csv"
#check that the 3 files were copied. Ignore the sample_data item, that's from another story :)
!ls
@Benambridge
Copy link

Thanks so much for this - Great tutorial! Just one typo to fix:

!cp "/content/drive/My Drive/Colab Notebooks/Titanic/test.csv" "/content/train.csv"

@HariSan1
Copy link
Author

@Benambridge - Thank you, typo corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment