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 scipy | |
import pylab | |
def f(x): | |
return x**3 | |
x = pylab.arange(0,10,.01) | |
y = scipy.derivative(f,x,n=2) |
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 division | |
import pylab | |
h_max,k_max,l_max = 4,4,4 | |
L = pylab.zeros((h_max,k_max,l_max)) | |
M = [] | |
for h in range(h_max): |
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
#encoding:utf-8 | |
from __future__ import division | |
import pylab | |
l = pylab.loadtxt("data") | |
l = l.T | |
l_ = pylab.np.polyfit(l[1],l[0],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
from __future__ import division | |
import pylab | |
import scipy | |
def p(x, l_): | |
sum = 0 | |
for i in range(len(l_)): | |
sum += l_[i]*x**(len(l_)-i-1) | |
return sum |
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
NeoBundle 'Shougo/vimfiler' | |
nnoremap <silent> fv :VimFiler<cr> | |
let g:vimfiler_as_default_explorer=1 | |
let g:vimfiler_execute_file_list={} | |
let g:vimfiler_execute_file_list["_"]="vim" | |
let g:vimfiler_edit_action="vsplit" | |
let g:vimfiler_directory_display_top=1 | |
let g:vimfiler_safe_mode_by_default=0 | |
let g:vimfiler_enable_auto_cd=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 | |
x = raw_input() | |
print unicode(x, sys.stdin.encoding) |
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
#coding:utf-8 | |
# 数字をもらったら漢数字にする | |
import string | |
def toKnaji(n): | |
L1 = [u"",u"一",u"二",u"三",u"四",u"五",u"六",u"七",u"八",u"九"] | |
L1_ = [u"",u"",u"二",u"三",u"四",u"五",u"六",u"七",u"八",u"九"] |
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
#coding:utf-8 | |
# 数字をもらったら漢数字にする | |
import string | |
def toKnaji(n): | |
L1 = [u"",u"一",u"二",u"三",u"四",u"五",u"六",u"七",u"八",u"九"] | |
L1_ = [u"",u"",u"二",u"三",u"四",u"五",u"六",u"七",u"八",u"九"] |
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 pylab | |
import sys | |
#arg = sys.argv[1] | |
arg = "c" | |
l = pylab.loadtxt("arg"+".csv",delimiter=",",skiprows=1) | |
l = l.T | |
pylab.plot(l[0],l[1]) | |
pylab.show() |
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 pylab | |
pH = pylab.linspace(0,14,100) | |
pK1 = 1.23 | |
pK2 = 4.19 | |
H = 10 ** -pH | |
K1 = 10 ** -pK1 | |
K2 = 10 ** -pK2 |