[PYTHON] Google Colaboratory setup summary

Colaboratory preferences

Use google drive folder Fixed values except workingDir

% cd is no longer available (or may not be available depending on the assigned environment)

# mount google drive
from google.colab import drive
drive.mount('/content/gdrive')

# add path
import sys
workingDir = 'path/to/folder'
sys.path.append(f'/content/gdrive/My Drive/{workingDir}')

# change working directory
import os
os.chdir(f'/content/gdrive/My Drive/{workingDir}')
%ls

Fixed version of tensorflow

# 2.x
%tensorflow_version 2.x
# 1.x
%tensorflow_version 1.x

apt-get, pip execution

!apt-get install -y tool
!pip install -r requirements.txt

use

Recommended Posts

Google Colaboratory setup summary
Google colaboratory
Sphinx setup summary
Is it Google Colaboratory?
Use music21 on Google Colaboratory
Try StyleGAN on Google Colaboratory
Study Python with Google Colaboratory
Personal Ubuntu & WSL2 setup summary
Try OpenCV with Google Colaboratory
Tool organization: Google Colaboratory (updated 2020.2.24)
Pandas 100 knocks on Google Colaboratory
How to use Google Colaboratory
■ [Google Colaboratory] Use morphological analysis (janome)
■ [Google Colaboratory] Use morphological analysis (MeCab)
Snippets (scraping) registered in Google Colaboratory
OpenCV feature detection with Google Colaboratory
100 language processing knock 2020 "for Google Colaboratory"
Run Keras on Google Colaboratory TPU
Use The Metabolic Disassembler on Google Colaboratory
[Beginner] Python web scraping using Google Colaboratory
Usual processing notes when using Google Colaboratory
How to search Google Drive with Google Colaboratory
Make a cascade classifier with google colaboratory
Use cartopy without bugs in Google Colaboratory
Manage deals with Trello + Google Colaboratory (Part 1)
First-principles calculations for free using Google Colaboratory
Using Java's Jupyter Kernel with Google Colaboratory
Use TPU and Keras with Google Colaboratory
Free Python runtime environment Google Colaboratory memo