Skip to content

Instantly share code, notes, and snippets.

View tekeburak's full-sized avatar
🎯
Focusing

Burak Teke tekeburak

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 21 16:36:29 2018
@author: burak
"""
print("Hello Colab!")
@tekeburak
tekeburak / install_DF_wrapper.md
Last active February 22, 2018 00:00
Install a Drive FUSE wrapper
# Install a Drive FUSE wrapper.
# https://github.com/astrada/google-drive-ocamlfuse
!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
@tekeburak
tekeburak / gen_auth_token.md
Created February 22, 2018 00:07
Generate auth tokens for Colab
# Generate auth tokens for Colab
from google.colab import auth
auth.authenticate_user()
@tekeburak
tekeburak / gen_cred_for_DF.md
Created February 22, 2018 00:09
Generate creds for the Drive FUSE library
# Generate creds for the Drive FUSE library.
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}
@tekeburak
tekeburak / create_my_drive.md
Created February 22, 2018 00:12
Create a directory and mount Google Drive using that directory.
# Create a directory and mount Google Drive using that directory.
!mkdir -p my_drive
!google-drive-ocamlfuse my_drive
@tekeburak
tekeburak / create_tut_kaggle.md
Created February 22, 2018 00:18
Create a folder to use the competition
# Create a folder to use the competition
!mkdir -p my_drive/tut_kaggle
# See the files in tut_kaggle folder
!ls ~/my_drive/tut_kaggle/
# Run the colab_test.py
!python3 ~/my_drive/tut_kaggle/colab_test.py
@tekeburak
tekeburak / upload_files.md
Created February 22, 2018 00:34
Upload the competition files
# Upload files
from google.colab import files
uploaded = files.upload()
# Check GPU
import tensorflow as tf
tf.test.gpu_device_name()