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 |
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 |
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.haskell.org/haskellwiki/Haskell%E5%85%A5%E9%96%80_5%E3%82%B9%E3%83%86%E3%83%83%E3%83%97-} | |
import Control.Parallel | |
main = a `par` b `par` c `pseq` print (a + b + c) | |
where | |
a = ack 3 10 | |
b = fac 10 | |
c = fib 6 | |
fac 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
-- 演算子Tと演算子Jの不可換性 | |
main = print ((t a (j x)), j (t a x)) | |
t a = (+a) --T(a) | |
j x = -x --J | |
a = 3 -- 今回T(3) | |
x = 1 --初期値3 |