Skip to content

Instantly share code, notes, and snippets.

View jongwook's full-sized avatar

Jong Wook Kim jongwook

View GitHub Profile
/**
* 위상정렬 구현
* @tparam T 노드의 ID 가 될 타입
*/
class TopologicalSort[T] {
class CycleFoundException extends RuntimeException("At least one cycle found in the graph")
/** edge 목록에서 incoming edges가 없는 vertex 를 찾는다. */
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jongwook
jongwook / truncate.py
Last active April 20, 2018 00:07
Truncating the last 7 bits of the weights in a saved Keras model
import argparse
import h5py
import numpy as np
parser = argparse.ArgumentParser()
parser.add_argument('input')
parser.add_argument('output')
args = parser.parse_args()
with h5py.File(args.output, 'w') as out:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.