Skip to content

Instantly share code, notes, and snippets.

View seominjoon's full-sized avatar

Minjoon Seo seominjoon

View GitHub Profile
@seominjoon
seominjoon / crawl.py
Last active February 19, 2018 03:54
네이버 구찌 검색
import urllib.request
import time
import os
# 네이버 구찌 검색 url
url_base = 'https://search.naver.com/search.naver?date_from=&date_option=0&date_to=&dup_remove=1&nso=&post_blogurl=&post_blogurl_without=&query=%EA%B5%AC%EC%B0%8C&sm=tab_pge&srchby=all&st=sim&where=post&start='
folder_dir = '구찌'
os.makedirs(folder_dir)
@seominjoon
seominjoon / tf_test.py
Created May 4, 2017 16:54
tensorflow CPU speed test
import tensorflow as tf
import numpy as np
import time
from tensorflow.contrib.rnn import BasicLSTMCell
N = 1
L = 500
d = 10
k = 1
@seominjoon
seominjoon / tensorflow-ec2.sh
Last active January 20, 2017 22:00
tensorflow-ec2
# On ubuntu 14.04
sudo apt-get update
sudo apt-get install -y linux-image-extra-`uname -r` linux-headers-`uname -r` linux-image-`uname -r`
mkdir tmp
cd tmp
# CUDA
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb
@seominjoon
seominjoon / python-ubuntu-prereq
Last active October 1, 2018 11:55
Prereq for installing python on Ubuntu 16.04
sudo apt-get install zlib1g-dev libsqlite3-dev libssl-dev tk-dev libbz2-dev
@seominjoon
seominjoon / imgcat
Created June 27, 2016 17:20
imgcat: show image on terminal
#!/bin/bash
# Put this in bin folder and then:
# chmod +x imgcat
# From: https://raw.githubusercontent.com/gnachman/iTerm2/master/tests/imgcat
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST.
function print_osc() {
brew install swig
brew install cmake
brew install boost boost-python sdl2
1. Install brew
2. Install iterm
3. Install fish shell, mosh (brew install fish, mobile-shell)
4. Displays: scaled, change font size
5. Keyboard: repeat -> short and fast, F1, F2 as function keys
6. Install PyCharm, OneNote, Slack, KakaoTalk, GitHub Desktop,
7. brew install python3
8. Install pip: https://pip.pypa.io/en/stable/installing/
9. pip3 install jupyter
10. pip3 install matplotlib
@seominjoon
seominjoon / config.fish
Last active June 9, 2016 23:21
Fish config file, to be put under ~/.config/fish/
alias python python3
alias pip pip3
set vs2 [email protected]
set vs3 [email protected]
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
export CUDA_HOME="/usr/local/cuda"
export PATH="$HOME/torch/install/bin/th:$PATH"
export JAVA_HOME="$HOME/jdk/jdk1.8.0_74"
export PATH="$JAVA_HOME/bin:$PATH"
alias python=python3.5
alias pip=pip3.5
git config credential.helper 'cache --timeout=3600'
@seominjoon
seominjoon / bif2json.py
Last active February 23, 2016 22:41
Convert .bif file to .json file
#!/usr/bin/env python
"""
--------------------------------------------------------------------------------
This code is modified version of:
https://github.com/eBay/bayesian-belief-networks/blob/master/bayesian/examples/bif/bif_parser.py.
NOTE: regex pattern of this parser is sensitive to spaces (will be fixed soon).
The output json file can be iterated with the following pseudo-code (d is the loaded json):
variables = d['variables']