This file contains hidden or 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 pandas as pd | |
| import sys | |
| if __name__ == "__main__": | |
| print sys.argv[0] | |
| print sys.argv[1] | |
| # print sys.argv[2] | |
| if not len(sys.argv)==2: | |
| print "usage: python t2s.py" | |
| sys.exit() |
This file contains hidden or 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 datetime | |
| import codecs | |
| if __name__ == "__main__": | |
| result = [] | |
| l4 = [] | |
| f = codecs.open("3638347916812769_retweets_id_text_time.txt",encoding="utf-8") | |
| rootId = "3638347916812769_retweets" | |
| l = f.readlines() |
This file contains hidden or 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
| cat graph2009.txt |awk -F '[\t,]' '{for(i=2;i<=NF;i++)printf "%d,%d\n",$1,$i}' > g2009.txt |
This file contains hidden or 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
| # 查看flash大小 | |
| dmesg |grep spi | |
| # 查看ram大小 | |
| cat /proc/meminfo |
This file contains hidden or 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
| ^(?!#)\S |
This file contains hidden or 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
| 0,0.154809919797,107 | |
| 1,0.228287956083,315 | |
| 2,0.19198364525,0 | |
| 3,0.315938338416,280 | |
| 4,0.35699725512,328 | |
| 5,0.72111832494,315 | |
| 6,0.282519582448,95 | |
| 7,0.311267913269,322 | |
| 8,0.515471921796,201 | |
| 9,0.263237627761,185 |
This file contains hidden or 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
| 0,0.35576102242,189 | |
| 1,0.559566798778,88 | |
| 2,0.794561501505,0 | |
| 3,0.595558671342,323 | |
| 4,0.417838973942,0 | |
| 5,0.972616881912,156 | |
| 6,0.566599989337,0 | |
| 7,0.696754701701,213 | |
| 8,0.484723354854,0 | |
| 9,0.537928726461,231 |
This file contains hidden or 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
| (1000, 0, -1) | |
| (835, 0.051563364643194, 1000) | |
| (361, 0.0702508457330101, 835) | |
| (1060, 0.08227877018317253, 835) | |
| (416, 0.0837444471268659, 835) | |
| (107, 0.0841415403067276, 1060) | |
| (957, 0.0842458583415494, 107) | |
| (1367, 0.08685428882957202, 361) | |
| (439, 0.08865879497714191, 107) | |
| (515, 0.08938792757419567, 439) |
This file contains hidden or 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
| cat 12306.txt|gawk -F '----' '{print $2}'|sort|uniq -c|sort -r|head |
This file contains hidden or 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 socket import * | |
| cs = socket(AF_INET, SOCK_DGRAM) | |
| cs.bind(("10.22.13.19",54545)) # http://is.gd/73aRUm for detail | |
| cs.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) | |
| cs.sendto('This is a test', ('255.255.255.255', 54545)) | |
| # tcpdump http://is.gd/gw2OBN |