kk Blog —— 通用基础


date [-d @int|str] [+%s|"+%F %T"]
netstat -ltunp
sar -n DEV 1

python

python dict 是指针

1
2
3
4
5
6
7
8
9
[root@localhost tmp]# cat a.py
a = b = {}
a[1] = 2
print a
print b

[root@localhost tmp]# python a.py
{1: 2}
{1: 2}

utf8

1
#coding:utf-8

时间戳、int互转

1
2
t = time.mktime(time.strptime("2020-01-01 00:00:00", "%Y-%m-%d %H:%M:%S"))
ts = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(t))

language, python

« Linux时间子系统之八:动态时钟框架(CONFIG_NO_HZ、tickless) iptables »