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 math | |
from decorator_demo import logf, timeit, log | |
def my_log(filename, p, rc): | |
print 'para:'+str(p)+"\n" | |
print 'return:'+str(rc)+"\n" | |
with open("./"+filename+".log",'w') as ofile: |
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 traceback | |
def log(f): | |
log_data = {} | |
log_data["name"] = f.func_name | |
def new_f(*args, **kwargs): | |
log_data["args"] = 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
## please run the following codes in ipython notebook or ipython shell | |
In [1]: fib = lambda n: 1 if n < 2 else fib(n-1) + fib(n-2) | |
In [2]: %tiem fib(35) | |
ERROR: Line magic function `%tiem` not found. | |
In [3]: %time fib(35) | |
CPU times: user 3.06 s, sys: 26.7 ms, total: 3.09 s |
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
pacman -Syu git bash-completion htop | |
ln -s /usr/lib/libncursesw.so{,.5} | |
# PYENV | |
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash | |
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
termcapinfo xterm 'hs:ts=\E]0;:fs=\007:ds=\E]0;bash\007' | |
caption always "%{= bk} %{= wk} %-Lw%{by}%n+%f %t%{wk}%{wk}%+Lw %=%{kw}%{= R}%{-}" | |
shelltitle '$ |bash' | |
defhstatus "\005t" | |
hardstatus on | |
vbell off |
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
/* | |
Name: Base16 Default Dark | |
Author: Chris Kempson (http://chriskempson.com) | |
CodeMirror template adapted for IPython Notebook by Nikhil Sonnad (https://github.com/nsonnad/base16-ipython-notebook) | |
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) | |
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) | |
*/ |
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
/* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* Written (W) 2013 Soumyajit De | |
*/ | |
#include <shogun/lib/common.h> |
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
### MATPLOTLIBRC FORMAT | |
# This is a sample matplotlib configuration file - you can find a copy | |
# of it on your system in | |
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it | |
# there, please note that it will be overridden in your next install. | |
# If you want to keep a permanent local copy that will not be | |
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux | |
# like systems) and C:\Documents and Settings\yourname\.matplotlib | |
# (win32 systems). |
NewerOlder