Skip to content

Instantly share code, notes, and snippets.

View s-hiiragi's full-sized avatar

s_hiiragi s-hiiragi

View GitHub Profile
@s-hiiragi
s-hiiragi / count_line.py
Created August 18, 2012 03:53
count line
import glob
if __name__ == '__main__':
paths = glob.glob('./*/data/*.csv')
cnt = 0
for path in paths:
with open(path, 'r') as f:
cnt += reduce(lambda x,y: x+1, f, 0)
print cnt
@s-hiiragi
s-hiiragi / sample_destructive_methods.hsp
Created November 3, 2011 10:22
Destructive Named Methods Sample
;sample_destructive_methods
;
;名前に「!」が付いているメソッドは破壊的メソッド
#module destm a, b
#modfunc 更新! int x, int y
a = x
b = y
return
#modfunc 表示