ZhangZhihui's Blog  

2022年1月7日

摘要: import pandas as pd df = pd.DataFrame([[2001, 'D', 2], [2004, 'T', 3], [2003, 'T', 5], [2001, 'T', 4], [2004, 'D', 7]], columns=['year', 'type', 'cnt' 阅读全文
posted @ 2022-01-07 22:14 ZhangZhihuiAAA 阅读(19) 评论(0) 推荐(0)
 
摘要: print(df_year_month) print(' ') print(df_year_month.index) print(df_year_month.index.tolist()) print(' ') print(df_year_month.index.levels[0]) print(d 阅读全文
posted @ 2022-01-07 22:12 ZhangZhihuiAAA 阅读(27) 评论(0) 推荐(0)

2021年12月9日

摘要: 阅读全文
posted @ 2021-12-09 22:16 ZhangZhihuiAAA 阅读(32) 评论(0) 推荐(0)

2021年2月10日

摘要: Remove log redirection: ZUBT:/home/scnzzh $> crontab -l #00 09 * * * ~/zzh.py >> ~/zzh_`date +\%Y\%m\%d_\%H\%M\%S`.log 2>&1 #00 10 * * * ~/zzh.py >> ~ 阅读全文
posted @ 2021-02-10 09:00 ZhangZhihuiAAA 阅读(129) 评论(0) 推荐(0)

2021年2月1日

摘要: I have an HA k8s cluster which has 3 control-plane nodes. When 2 of the 3 control-plane nodes are shut down, the cluster stops working. When shut down 阅读全文
posted @ 2021-02-01 09:40 ZhangZhihuiAAA 阅读(1503) 评论(0) 推荐(0)

2021年1月14日

摘要: 1. Remove a PPA from Software Sources via GUI 2. Remove a PPA using APT in terminal: zzh@ZZHPC:~$ sudo add-apt-repository --remove "deb [arch=amd64] h 阅读全文
posted @ 2021-01-14 11:42 ZhangZhihuiAAA 阅读(183) 评论(0) 推荐(0)

2020年12月31日

摘要: Enable forwarding from Docker containers to the outside world By default, traffic from containers connected to the default bridge network is not forwa 阅读全文
posted @ 2020-12-31 08:53 ZhangZhihuiAAA 阅读(201) 评论(0) 推荐(0)

2020年12月25日

摘要: The problem is with slashes: your variable contains them and the final command will be something like sed "s/string/path/to/something/g", containing w 阅读全文
posted @ 2020-12-25 12:32 ZhangZhihuiAAA 阅读(1142) 评论(0) 推荐(0)

2020年12月24日

摘要: The shebang must be the first line, because it is interpreted by the kernel, which looks at the two bytes at the start of an executable file. If these 阅读全文
posted @ 2020-12-24 11:54 ZhangZhihuiAAA 阅读(87) 评论(0) 推荐(0)

2020年12月1日

摘要: scnzzh@ZUBT:~$ ansible -i zzh-inventory all --list-hosts | grep WARNING | wc -l [WARNING]: * Failed to parse /home/scnzzh/zzh-inventory with yaml plug 阅读全文
posted @ 2020-12-01 16:57 ZhangZhihuiAAA 阅读(282) 评论(0) 推荐(0)