Skip to content

Instantly share code, notes, and snippets.

View bgshin's full-sized avatar

Bonggun Shin bgshin

View GitHub Profile
@bgshin
bgshin / korail.py
Created January 22, 2014 03:01 — forked from devxoul/korail.py
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
from datetime import datetime
session = requests.session()
class Train(object):
# -*- coding: utf-8 -*-
from datetime import datetime
import urllib2
def kb_balance(account, password, resident, username):
"""
국민은행 계좌 잔액 빠른조회. 빠른조회 서비스에 등록이 되어있어야 사용 가능.
빠른조회 서비스: https://obank.kbstar.com/quics?page=C018920
@bgshin
bgshin / np_to_tfrecords.py
Created June 4, 2017 16:38 — forked from swyoon/np_to_tfrecords.py
From numpy ndarray to tfrecords
import numpy as np
import tensorflow as tf
__author__ = "Sangwoong Yoon"
def np_to_tfrecords(X, Y, file_path_prefix, verbose=True):
"""
Converts a Numpy array (or two Numpy arrays) into a tfrecord file.
For supervised learning, feed training inputs to X and training labels to Y.
For unsupervised learning, only feed training inputs to X, and feed None to Y.
@bgshin
bgshin / np_to_tfrecords.py
Created June 4, 2017 16:38 — forked from swyoon/np_to_tfrecords.py
From numpy ndarray to tfrecords
import numpy as np
import tensorflow as tf
__author__ = "Sangwoong Yoon"
def np_to_tfrecords(X, Y, file_path_prefix, verbose=True):
"""
Converts a Numpy array (or two Numpy arrays) into a tfrecord file.
For supervised learning, feed training inputs to X and training labels to Y.
For unsupervised learning, only feed training inputs to X, and feed None to Y.
@bgshin
bgshin / index_matrix.py
Created January 16, 2018 04:20 — forked from iwyoo/index_matrix.py
Gathering values using sparse binary form indices
import numpy as np
import tensorflow as tf
val = np.array(
[[[1,2,3], [4,5,6]],
[[1,2,3], [4,5,6]]])
pos = np.array(
[[[1,0,0,1,1], [0,1,1,0,1]],
[[0,1,0,1,1], [1,1,1,0,0]]])
@bgshin
bgshin / pytorch_setup.sh
Created November 21, 2018 23:47 — forked from kylemcdonald/pytorch_setup.sh
Install CUDA 9.2, cuDNN 7.2.1, Anaconda and PyTorch on Ubuntu 16.04.
# tested on AWS p2.xlarge August 29, 2018
# install CUDA
sudo apt-get update && sudo apt-get install wget -y --no-install-recommends
CUDA_URL="https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.148-1_amd64"
wget -c ${CUDA_URL} -O cuda.deb
sudo dpkg --install cuda.deb
sudo apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub
sudo apt-get update
sudo apt-get install -y cuda
@bgshin
bgshin / GitCommitEmoji.md
Created February 18, 2019 18:02 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji