摘要: import time st="2021-03-05 00:00:00" et="2021-03-09 23:59:59" def tm_array(day1, day2): time_array1 = time.strptime(''.join(day1.split(' ')[0]), "%Y-% 阅读全文
posted @ 2021-03-11 16:33 sihte 阅读(477) 评论(0) 推荐(0) 编辑
摘要: self方法 1、调用__new__方法,用来申请内存空间 2、调用__init方法向内存空间传入参数,将self指向创建好的内存空间,填充数据 3、将结果赋给变量,变量值也指向创建好的内存空间 class Student(object): def __init__(self,x,y): self. 阅读全文
posted @ 2021-02-24 18:31 sihte 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 问题: 使用rz sz命令时,未跳出候选框 以及终端出现一段时间的卡死 解决方案: 1、mac下载安装lrzsz brew install lrzsz ln -s /usr/local/Cellar/lrzsz/0.12.20/bin/sz ln -s /usr/local/Cellar/lrzsz 阅读全文
posted @ 2021-02-24 16:00 sihte 阅读(2842) 评论(0) 推荐(0) 编辑
摘要: 1、获取MFA_KEY , 笨方法:先使用authentictor扫描MFA二维码,然后下载备份文件,获取该认证的secret码 2、创建xxx.exp格式脚本文件 #!/usr/bin/expect set kdauth [ exec oathtool --totp -b XXsecretXXX] 阅读全文
posted @ 2021-02-18 11:40 sihte 阅读(956) 评论(0) 推荐(0) 编辑
摘要: import datetime import arrow def getTime(flag, dayhourminute): ''' 获取几小时之前,几分钟前,几天前,几个月前,及几年前的具体时间 flag, 1:天;2:小时;3:分钟;4:月,5:年 :param flag: 1:天;2:小时;3 阅读全文
posted @ 2021-02-03 17:51 sihte 阅读(86) 评论(0) 推荐(0) 编辑
摘要: HHH 阅读全文
posted @ 2021-01-25 16:55 sihte 阅读(161) 评论(0) 推荐(0) 编辑
摘要: import pypinyin from pypinyin import Style operator = pypinyin.slug(''.join(infos.get('你好')), separator='') # nihao 阅读全文
posted @ 2021-01-25 16:48 sihte 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 1、选中包含空行的所有行 2、ctrl+G 组合键 3、定位-选择空置-确认 4、在行和列中选择删除单元格-删除行 阅读全文
posted @ 2020-09-23 10:27 sihte 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 查看/翻阅 shift+[ 以空格上翻 shift+] 以空格下翻 gg 到文章开头 GG 到文章结尾一行的结尾 G 到文章最后一行的开头 num + G 推动到多少行 编辑 dd 删除一行;num+dd 往下删除num行 yy 复制一行;num+yy 往下复制num行 p 粘贴 模式切换 i 进入 阅读全文
posted @ 2020-09-07 21:22 sihte 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 1、安装prometheus wget https://github.com/prometheus/prometheus/releases/download/v2.12.0/prometheus-2.12.0.linux-amd64.tar.gz tar xf prometheus-2.12.0.l 阅读全文
posted @ 2020-09-07 17:50 sihte 阅读(88) 评论(0) 推荐(0) 编辑