2019年2月11日
摘要: http://ryanstutorials.net/ awk: split($1, arr, “\t”) awk '{BEGIN{FS="\x01"} {print $2}' sed: sed -n '42p' file sed -n '1,2p' file sed -n '1,2p' file s 阅读全文
posted @ 2019-02-11 21:14 冰山上的博客 阅读(268) 评论(0) 推荐(0) 编辑
摘要: https://docs.python.org/2/library/re.html re.match(pattern, string, flags=0) 尝试从字符串的起始位置匹配一个模式 re.search(pattern, string, flags=0) 扫描整个字符串并返回第一个成功的匹配 阅读全文
posted @ 2019-02-11 21:11 冰山上的博客 阅读(342) 评论(0) 推荐(0) 编辑
摘要: bash host #查看IP对应机器名 hostname #查看本机名 hostname –i #查看本机IP mssh --host-list '10.4.20.87,10.4.20.88,10.4.20.92,10.4.20.93' --host-timeout 200 'cd .servic 阅读全文
posted @ 2019-02-11 21:04 冰山上的博客 阅读(230) 评论(0) 推荐(0) 编辑
摘要: import numpy as np for k,v in stat.iteritems(): print k v.sort() #v = v[len(v)*3/100:len(v)*97/100] data = np.array(v) hist,bins=np.histogram(data,bin 阅读全文
posted @ 2019-02-11 21:02 冰山上的博客 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 批量ssh登录机器 #site_search_hosts 10.4.16.205,10.4.20.87,10.4.20.88,10.4.20.89,10.4.20.90,10.4.20.92,10.4.20.93,10.4.21.51,10.4.21.52,10.4.21.53,10.4.21.54 阅读全文
posted @ 2019-02-11 21:00 冰山上的博客 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 完整: http://docs.jinkan.org/docs/flask/installation.html#installation virtualenv 你很可能想在开发中用上 virtualenv,如果你有生产环境的 shell 权限,你同样会乐于在生产环境中使用它。 virtualenv 阅读全文
posted @ 2019-02-11 20:51 冰山上的博客 阅读(406) 评论(0) 推荐(0) 编辑
摘要: time and date (error correction in graph (Datetime obj->string):dt_obj.strftime(format)) import time, datetime 1. datetime obj 1) datetime datetime.da 阅读全文
posted @ 2019-02-11 20:35 冰山上的博客 阅读(963) 评论(0) 推荐(0) 编辑