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 time | |
__doc__ = """This script greps from /proc/interrupts and print the top interrupts of CPU cores and sources. | |
Super useful for 64+ cores machine, whose /proc/interrupts is totally unreadable. | |
""" | |
def get_interrupts_dict(): | |
cpu_count = 0 | |
result = {} | |
with open('/proc/interrupts') as f: |
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
#include <chrono> | |
int64_t timeInMicroseconds() { | |
auto now = std::chrono::system_clock::now(); | |
auto duration = now.time_since_epoch(); | |
return std::chrono::duration_cast<std::chrono::microseconds>(duration).count(); | |
} | |
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
#!/usr/bin/python | |
# -*- encoding: utf-8 -*- | |
''' | |
LaoRenren 人人网模拟登录类 v0.1 2012/1/22 除夕夜 | |
以LaoWeb.py封闭的人人网模拟登录、发状态、传照片等类。 | |
支持保存状态,避免验证码 | |
那些GPL就不废话了,转载修改请注明原作者。 | |
laohyx@163.com | |
By Laohyx. |
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
#!/usr/bin/python | |
# coding=utf-8 | |
import urllib2,cookielib,urllib,re,time | |
''' | |
LaoWeb HTTP封装类 v0.2 2012/1/22 除夕夜 | |
Http操作模拟类,支持正则等简易功能。 | |
那些GPL就不废话了,转载修改请注明原作者。 | |
laohyx@163.com |