Skip to content

Instantly share code, notes, and snippets.

View bckim92's full-sized avatar
🎯
Focusing

Byeongchang Kim bckim92

🎯
Focusing
View GitHub Profile
import sys
import os.path as osp
def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)
sample_path = 'foo/bar'
add_path(sample_path)
# ver1
config = tf.ConfigProto( gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.5), device_count = {'GPU': 1})
sess = tf.Session(config=config)
# ver2
config = tf.ConfigProto(log_device_placement=True, device_count={'GPU': 1})
config.gpu_options.per_process_gpu_memory_fraction=0.3 # don't hog all vRAM
config.operation_timeout_in_ms=15000 # terminate on long hangs
sess = tf.Session(config=config)
python -m SimpleHTTPServer
#!/usr/bin/env python
import subprocess
import sys
import os.path
argv = sys.argv[1:]
if not argv:
sys.stderr.write('Argument required\n')
vim
:make
:copen
http://nbviewer.jupyter.org/github/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/deepdream/deepdream.ipynb
%load_ext autoreload
%autoreload 2
(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
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
aspell --lang=en --mode=tex check filename.tex