Skip to content

Instantly share code, notes, and snippets.

@Yeaseen
Created February 5, 2019 18:05
Show Gist options
  • Save Yeaseen/dde9b149c49d1f3a6aab0e48e6b63a83 to your computer and use it in GitHub Desktop.
Save Yeaseen/dde9b149c49d1f3a6aab0e48e6b63a83 to your computer and use it in GitHub Desktop.
!apt-get install -y -qq software-properties-common module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
from google.colab import auth
from oauth2client.client import GoogleCredentials
import getpass
auth.authenticate_user()
creds = GoogleCredentials.get_application_default()
!google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} < /dev/null 2>&1 | grep URL
vcode = getpass.getpass()
!echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret}
!mkdir -p drive
!google-drive-ocamlfuse drive
import sys
sys.path.append('/drive/Yeaseen/test.csv')
print ('Files in Drive:')
!ls drive/
!pip install pandas numpy
#existiong code in this segment
print('OK BOY')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment