Skip to content

Instantly share code, notes, and snippets.

@namoshizun
Last active July 29, 2020 22:23
Show Gist options
  • Save namoshizun/a4b84274d3c5fd933960c297bdec52e7 to your computer and use it in GitHub Desktop.
Save namoshizun/a4b84274d3c5fd933960c297bdec52e7 to your computer and use it in GitHub Desktop.
# Install GPFlow
!git clone https://github.com/namoshizun/GPflow.git
!mv ./GPflow/gpflow ./
!rm -rf GPflow
!pip install multipledispatch
!pip install pytest
# Install Other libraries
!pip install edward
# Mount drive folder
!apt-get install -y -qq software-properties-common python-software-properties 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
auth.authenticate_user()
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
import getpass
!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
# Change env
%cd /content/drive/bo_cox
import sys
sys.path.append('/content/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment