-
Notifications
You must be signed in to change notification settings - Fork 2
Как использовать Google Colab
Alica032 edited this page Apr 4, 2018
·
5 revisions
- зайти на сайт https://colab.research.google.com/
- выбрать File->New Python notebook
- выбрать Runtime->Change runtime type->GPU
- открываете свой https://drive.google.com
- в строке на странице colab вставляете код и запускаете. Выполняете все инструкции, которые будут прописаны.
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /devnull
!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 My_Drive
!google-drive-ocamlfuse My_Drive
!ls My_Drive/
!echo "This newly created file will appear in your Drive file list." > My_Drive/created.txt
- готово