Skip to content

Instantly share code, notes, and snippets.

Working from home

Jaemin Cho j-min

Working from home
View GitHub Profile
j-min /
Created Sep 24, 2019 — forked from arundasan91/
Caffe Installation Tutorial for beginners


Freshly brewed !

With the availability of huge amount of data for research and powerfull machines to run your code on, Machine Learning and Neural Networks is gaining their foot again and impacting us more than ever in our everyday lives. With huge players like Google opensourcing part of their Machine Learning systems like the TensorFlow software library for numerical computation, there are many options for someone interested in starting off with Machine Learning/Neural Nets to choose from. Caffe, a deep learning framework developed by the Berkeley Vision and Learning Center (BVLC) and its contributors, comes to the play with a fresh cup of coffee.

Installation Instructions (Ubuntu 14 Trusty)

The following section is divided in to two parts. Caffe's documentation suggest

j-min /
Created Jul 1, 2019
Youtube Video Download & Trim
import pafy
if __name__ == '__main__':
video_url = ''
video =
print(video.title, video.duration)
best = video.getbest()
j-min /
Last active Sep 15, 2019
Korean express train ticket reservation example
# pip install korail2
from korail2 import Korail, NoResultsError, KorailError
from time import sleep
import os
# Login
EMAIL = '' # email
PW = '' # password
j-min /
Last active Nov 10, 2017
tmux 2.6 install script (linux)
cd $HOME
# Dependencies
sudo apt install libevent-dev ncurses-dev -y
# Download tmux
tar -xvzf tmux-$TMUX_VERSION.tar.gz
j-min /
Created Jun 25, 2017
learning rate decay in pytorch
def exp_lr_scheduler(optimizer, epoch, init_lr=0.001, lr_decay_epoch=7):
"""Decay learning rate by a factor of 0.1 every lr_decay_epoch epochs."""
lr = init_lr * (0.1**(epoch // lr_decay_epoch))
if epoch % lr_decay_epoch == 0:
print('LR is set to {}'.format(lr))
for param_group in optimizer.param_groups:
j-min /
Created Jun 25, 2017
matplotlib configuration
import matplotlib
# font configuration
matplotlib.rc('font', family='NanumGothic', size=22)
from IPython.display import clear_output, Image, display, HTML
import numpy as np
def strip_consts(graph_def, max_const_size=32):
"""Strip large constant values from graph_def."""
strip_def = tf.GraphDef()
for n0 in graph_def.node:
n = strip_def.node.add()
if n.op == 'Const':
j-min / backprop.ipynb
Created Mar 1, 2017
Simple backprop implementation in TensorFlow without its optimizer API
View backprop.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View .zshrc
export TERM=xterm-256color
export LANG=en_US.UTF-8
# added by Anaconda3 4.1.1 installer
export PATH=$HOME/anaconda3/bin:$PATH
import math
def convertSize(size):
Return filesize (in Bytes) in human-readable format
if (size == 0):
return '0B'
units = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
i = int(math.floor(math.log(size,1024)))