Created
September 27, 2018 01:44
-
-
Save dominhhai/b7994742020b713fd78e132cf19f63b8 to your computer and use it in GitHub Desktop.
Google Colab Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect with Google Drive | |
!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 drive | |
drive.mount('/content/drive') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TensorBoard open link | |
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
!unzip ngrok-stable-linux-amd64.zip | |
import os | |
LOG_DIR = 'logs' | |
if not os.path.exists(LOG_DIR): | |
os.makedirs(LOG_DIR) | |
get_ipython().system_raw( | |
'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &' | |
.format(LOG_DIR)) | |
get_ipython().system_raw('./ngrok http 6006 &') | |
!curl -s http://localhost:4040/api/tunnels | python3 -c \ | |
"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment