This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(http://www.alexeyshmalko.com/2014/youcompleteme-ultimate-autocomplete-plugin-for-vim/ 따라서 완전히 그대로 해도 될 것 같긴 하지만) | |
1. ~/.vim/plugins.vim 에 | |
Plug 'Valloric/YouCompleteMe' | |
라인 추가 | |
2. vim +PlugInstall | |
3. cd ~/.vim/plugged/YouCompleteMe | |
./install.sh --clang-completer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apply proximal gradient for the variables with l1 lasso loss | |
# Non-negative weights constraint | |
if L1_LOSS_WEIGHT > 0: | |
for var in tf.get_collection(utils.LASSO_KEY): | |
th_t = tf.fill(tf.shape(var), tf.convert_to_tensor(L1_LOSS_WEIGHT) * lr) | |
zero_t = tf.zeros(tf.shape(var)) | |
var_temp = var - th_t * tf.sign(var) | |
assign_op = var.assign(tf.select(tf.less(tf.abs(var), th_t), zero_t, var_temp)) | |
l1_op_list.append(assign_op) | |
print('\tL1 loss added: %s(strength: %f)' % (var.name, L1_LOSS_WEIGHT)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from PIL import Image | |
import os | |
# image_root = '/nas/dataset/ILSVRC2012/train/' | |
image_root = '/data/common_datasets/ILSVRC2012/train/' | |
cmyk_img_subpaths = ["n01739381/n01739381_1309.JPEG" | |
,"n02077923/n02077923_14822.JPEG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import argparse | |
import re | |
import numpy as np | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--root_dir", help="The uppermost directory to clean up") | |
parser.add_argument("--ckpt_type", help="Ckpt type(tensorflow, caffe)") | |
args = parser.parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import sys | |
import os | |
import re | |
argv = sys.argv[1:] | |
if not argv: | |
sys.stderr.write('Usage: python check_dataset_valid.py [IMAGE_ROOT] [OUTPUT_FNAME]\n') | |
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
CAFFE_ROOT = '../../' | |
sys.path.insert(0, CAFFE_ROOT + 'python/') | |
import caffe | |
import numpy as np | |
if len(sys.argv) != 3: | |
print "Usage: python protomean_to_npy.py proto.mean out.npy" | |
sys.exit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/usr/env python | |
# Usage: python pdf_even_page.py | |
import os | |
import PyPDF2 | |
import re | |
def make_even_page(in_fpath, out_fpath): | |
reader = PyPDF2.PdfFileReader(in_fpath) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import tensorflow as tf | |
import numpy as np | |
if len(sys.argv) == 2: | |
ckpt_fpath = sys.argv[1] | |
else: | |
print('Usage: python count_ckpt_param.py path-to-ckpt') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PREFIX="$HOME/.local/" | |
install_tree() { | |
# The project page of linux "tree" command is located at http://mama.indstate.edu/users/ice/tree | |
TMP_TREE_DIR="/tmp/$USER/tree"; mkdir -p $TMP_TREE_DIR | |
wget -nc -O $TMP_TREE_DIR/tree.tgz "http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz" | |
tar -xvzf $TMP_TREE_DIR/tree.tgz -C $TMP_TREE_DIR --strip-components 1 |
OlderNewer