Skip to content

Instantly share code, notes, and snippets.

for f in *.HEIC
do sips -s format jpeg "${f}" -Z 1000 --out "${f%.*}.jpeg"
done
@fuatbeser
fuatbeser / tensorboard_example.py
Created August 19, 2018 10:58
Tensorboard example in Google Colab.
from __future__ import print_function
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
from keras.callbacks import TensorBoard
batch_size = 128
@fuatbeser
fuatbeser / tensorboard_in_colab.py
Created August 19, 2018 10:53
Run Tensorboard in Google Colab
# You can change the directory name
LOG_DIR = 'tb_logs'
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
import os
if not os.path.exists(LOG_DIR):
os.makedirs(LOG_DIR)
@fuatbeser
fuatbeser / colab2drive.py
Created August 18, 2018 12:49
Send large files from Google Colab to Google Drive.
# Which file to send?
file_name = "REPO.tar"
from googleapiclient.http import MediaFileUpload
from googleapiclient.discovery import build
auth.authenticate_user()
drive_service = build('drive', 'v3')
def save_file_to_drive(name, path):