07 2020 档案

摘要:def teardown(self): """ 我是teardown :return: """ if sys.exc_info()[0]: with nose.allure.step(u'失败行为'): self.logger.info("Exception message" ) self.logg 阅读全文
posted @ 2020-07-31 18:12 峡谷恶霸 阅读(296) 评论(0) 推荐(0) 编辑
摘要:linux 查看分区是ext3还是ext4 df -hT 阅读全文
posted @ 2020-07-31 17:26 峡谷恶霸 阅读(355) 评论(0) 推荐(0) 编辑
摘要:系统在执行定时任务时,是不会加载任何环境变量的,所以当脚本需要环境变量时,可以通过在脚本中添加 source /etc/profile 命令来使配置生效。 阅读全文
posted @ 2020-07-31 17:19 峡谷恶霸 阅读(486) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/Alight/p/4802414.html 阅读全文
posted @ 2020-07-29 14:50 峡谷恶霸 阅读(118) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/xiaqunfeng123/article/details/54315390/ 运行指定的命令,如果在指定时间后仍在运行,则杀死该进程。用来控制程序运行的时间。 阅读全文
posted @ 2020-07-29 09:49 峡谷恶霸 阅读(599) 评论(0) 推荐(0) 编辑
摘要:-l:指定信号的名称列表。 TERM 15 终止 KILL 9 强制终止 CONT 18 继续(与STOP相反, fg/bg命令) STOP 19 暂停(同 Ctrl + Z) 阅读全文
posted @ 2020-07-28 17:17 峡谷恶霸 阅读(278) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/guoqianqian5812/article/details/79484357 阅读全文
posted @ 2020-07-28 09:54 峡谷恶霸 阅读(352) 评论(0) 推荐(0) 编辑
摘要:https://www.runoob.com/markdown/md-block.html 阅读全文
posted @ 2020-07-27 16:05 峡谷恶霸 阅读(234) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/qq_38161409/article/details/81062932 SQL语句中TIMESTAMP类型提供一种类型,你可以使用它自动地用当前的日期和时间标记INSERT或UPDATE的操作,它有两个属性,一个是 1.CURRENT_TIMESTAMP 阅读全文
posted @ 2020-07-27 14:39 峡谷恶霸 阅读(593) 评论(0) 推荐(0) 编辑
摘要:列出ansible所支持的模块 ansible-doc -l 查看模块的详细帮助信息,比如查看fetch模块的帮助 ansible-doc -s fetch 调用模块,比如调用ping模块 ansible all -m ping 调用模块的同时传入模块所需要的参数,以fetch模块为例 ansibl 阅读全文
posted @ 2020-07-24 16:06 峡谷恶霸 阅读(89) 评论(0) 推荐(0) 编辑
摘要:mdstest是软件的元数据操作基准测试工具,用来模拟对文件或者目录的open、stat、close操作,然后报告性能 阅读全文
posted @ 2020-07-22 16:53 峡谷恶霸 阅读(137) 评论(0) 推荐(0) 编辑
摘要:https://ior.readthedocs.io/en/latest/userDoc/tutorial.html 阅读全文
posted @ 2020-07-22 16:11 峡谷恶霸 阅读(157) 评论(0) 推荐(0) 编辑
摘要:# ansible clients -m shell -a 'mkdir /mnt/fs{1,2,3,4,5,6,7,8}' 阅读全文
posted @ 2020-07-22 14:11 峡谷恶霸 阅读(142) 评论(0) 推荐(0) 编辑
摘要:nfsstat -m 很有用 [root@alex-performance-powerful-machine-essdpl2 ~]# nfsstat -m/tmp/12 from 172.16.0.55:/essdpl2 Flags: rw,relatime,vers=4.1,rsize=10485 阅读全文
posted @ 2020-07-21 14:04 峡谷恶霸 阅读(537) 评论(0) 推荐(0) 编辑
摘要:所有的迭代器都是可迭代的 迭代器模式 实现一个自定义的迭代器模式需要两个类,分别为实现了__iter__方法的类和通过__iter__返回的迭代器实例类(实现了__iter__和__next__方法)。下面例子简单实现了上述功能。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 阅读全文
posted @ 2020-07-21 10:35 峡谷恶霸 阅读(165) 评论(0) 推荐(0) 编辑
摘要:range 返回的是list 函数内部global声明 修改全局变量 合并两个字典:update方法 dic1.update(dic2) GIL 是python的全局解释器锁,同一进程中假如有多个线程运行,一个线程在运行python程序的时候会霸占python解释器(加了一把锁即GIL),使该进程内 阅读全文
posted @ 2020-07-20 16:54 峡谷恶霸 阅读(175) 评论(0) 推荐(0) 编辑
摘要:sum(range(1,101)) >>>def add(x, y) : # 两数相加 ... return x + y ... >>> reduce(add, [1,2,3,4,5]) # 计算列表和:1+2+3+4+5 15 >>> reduce(lambda x, y: x+y, [1,2,3 阅读全文
posted @ 2020-07-16 16:25 峡谷恶霸 阅读(762) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/xuchunlin/p/6676304.html zip 利用在创建字典 for k,v in zip(a,b): new[k]-v print new 阅读全文
posted @ 2020-07-16 15:42 峡谷恶霸 阅读(110) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/moxiliushui/article/details/82432783 、 阅读全文
posted @ 2020-07-16 15:29 峡谷恶霸 阅读(92) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/moxiliushui/article/details/82432783 阅读全文
posted @ 2020-07-16 15:26 峡谷恶霸 阅读(74) 评论(0) 推荐(0) 编辑
摘要:.质数定义为在大于1的自然数中,除了1和它自身外,不能整除其他自然数的数叫做质数;否则称为合数。 2.1,读音yī,数目,阿拉伯数字符号,是最小的正整数,是介于0和2之间的整数,最小的正奇数,是一个有理数,是一位数,也是单数,1是Heegner数。 3.1既不是质数(素数)也不是合数。通过单位表现出 阅读全文
posted @ 2020-07-16 15:17 峡谷恶霸 阅读(994) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/kobe_back/article/details/107017384 阅读全文
posted @ 2020-07-13 16:48 峡谷恶霸 阅读(92) 评论(0) 推荐(0) 编辑
摘要:https://www.runoob.com/python/python-func-super.html 阅读全文
posted @ 2020-07-13 15:57 峡谷恶霸 阅读(96) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/shenxiaolin/p/9307496.html 1、继承自object的新式类才有__new__ 阅读全文
posted @ 2020-07-13 15:52 峡谷恶霸 阅读(127) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/shenxiaolin/p/9307496.html 阅读全文
posted @ 2020-07-13 15:25 峡谷恶霸 阅读(115) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/huchong/p/8244279.html 转载 阅读全文
posted @ 2020-07-13 15:21 峡谷恶霸 阅读(65) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/yuanrenxue/p/10696430.html 经典:https://blog.csdn.net/qq_32799165/article/details/103674892 究其原因,原来是这个函数的默认值只在函数被加载时调用一次,之后若不传值则 阅读全文
posted @ 2020-07-13 10:59 峡谷恶霸 阅读(690) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/1208xu/p/12045127.html 阅读全文
posted @ 2020-07-01 15:32 峡谷恶霸 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-07-01 14:53 峡谷恶霸 阅读(454) 评论(0) 推荐(0) 编辑
摘要:https://www.py.cn/jishu/jichu/13590.html 阅读全文
posted @ 2020-07-01 14:43 峡谷恶霸 阅读(113) 评论(0) 推荐(0) 编辑
摘要:python2 迭代器里面是定义next方法 python3迭代器里是定义__next__ 方法 阅读全文
posted @ 2020-07-01 11:15 峡谷恶霸 阅读(397) 评论(0) 推荐(0) 编辑