Chatopera

聊天机器人平台,让聊天机器人上线!

原创 delete specific lines in a set of files in a folder

import os myinst = ['foo','bar'] print copyright def wipe_lines(folder): for (dirpath, dirnames, filenames) in os.walk(&#...

2014-08-10 17:28:28 767 0

原创 python regexp

Simplest case - import re regexp = re.compile('hello') count = 0 file = open('j.txt','r') for line in file.readlin...

2014-08-09 17:24:14 1326 0

原创 mirror site by wget or lftp

wget

2014-08-08 15:43:21 824 0

原创 check out your most used linux commands

$ cut -f1 -d" " .bash_history | sort | uniq -c | sort -nr | head -100

2014-08-08 09:57:27 831 0

提示
确定要删除当前文章?
取消 删除