08 2020 档案

摘要:https://www.cnblogs.com/kongk/p/8645202.html 阅读全文
posted @ 2020-08-28 17:00 峡谷恶霸 阅读(99) 评论(0) 推荐(0) 编辑
摘要:https://ipcmen.com/setfacl 阅读全文
posted @ 2020-08-28 10:27 峡谷恶霸 阅读(110) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/yanxiangtianji/article/details/55255318 /usr/bin/mpirun --allow-run-as-root --mca plm_rsh_no_tree_spawn 1 --mca btl_tcp_if_inclu 阅读全文
posted @ 2020-08-26 11:24 峡谷恶霸 阅读(392) 评论(0) 推荐(0) 编辑
摘要:(2) pid文件的作用:防止进程启动多个副本。只有获得pid文件(固定路径固定文件名)写入权限(F_WRLCK)的进程才能正常启动并把自身的PID写入该文件中。其它同一个程序的多余进程则自动退出。 https://www.cnblogs.com/mafeng/p/10316351.html 在li 阅读全文
posted @ 2020-08-26 10:11 峡谷恶霸 阅读(1660) 评论(0) 推荐(0) 编辑
摘要:所有都可以通过docker 实现 grafana有现成的模板可以用,不要傻乎乎的自己写模板 阅读全文
posted @ 2020-08-25 16:58 峡谷恶霸 阅读(216) 评论(0) 推荐(0) 编辑
摘要:http://docs.jinkan.org/docs/celery/getting-started/first-steps-with-celery.html#first-steps 阅读全文
posted @ 2020-08-25 10:29 峡谷恶霸 阅读(96) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/Q--T/p/7864795.html 阅读全文
posted @ 2020-08-24 16:48 峡谷恶霸 阅读(84) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/Zmnortal/article/details/102634638 要解决这个问题,其实十分简单,只要把递归函数的原型函数塞到另一个不递归的函数里面就行了 这是个面试题,递归的函数加装饰器的时候避免入坑,常见的是计算函数执行cost! 阅读全文
posted @ 2020-08-24 16:13 峡谷恶霸 阅读(163) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/a3f3700d33c0 DSL是把双刃剑,你在获得语言增强的同时,也会增加其它人的学习成本,协作的语言特性需要共识,莫不可随便因个人喜好制造语法,一句话,设计语言是个困难的事情,尽管你可以借鉴其它语言作为DSL内置在你当前语言里。 阅读全文
posted @ 2020-08-24 10:26 峡谷恶霸 阅读(176) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/kevingrace/p/9988354.html 所以说这里凭直觉看,TIME_WAIT并不可怕,CLOSE_WAIT才可怕,因为CLOSE_WAIT很多,表示说要么是你的应用程序写的有问题,没有合适的关闭socket;要么是说,你的服务器CPU处理 阅读全文
posted @ 2020-08-21 11:19 峡谷恶霸 阅读(130) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/u011479200/article/details/87455276 ps命令的方式获取信息: 执行目录, 环境变量, 完整的命令行 ps eww -p <process_pid> : 返回某个进程的执行时的环境变量和完整的命令行 阅读全文
posted @ 2020-08-21 10:04 峡谷恶霸 阅读(297) 评论(0) 推荐(0) 编辑
摘要:wireshark是非常流行的网络封包分析软件,功能十分强大。可以截取各种网络封包,显示网络封包的详细信息。使用wireshark的人必须了解网络协议,否则就看不懂wireshark了。为了安全考虑,wireshark只能查看封包,而不能修改封包的内容,或者发送封包。 wireshark能获取HTT 阅读全文
posted @ 2020-08-20 16:51 峡谷恶霸 阅读(224) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/yyhh/p/5140852.html Fiddler可以通过伪造CA证书来欺骗浏览器和服务器。Fiddler是个很会装逼的好东西,大概原理就是在浏览器面前Fiddler伪装成一个HTTPS服务器,而在真正的HTTPS服务器面前Fiddler又装成浏览 阅读全文
posted @ 2020-08-20 16:11 峡谷恶霸 阅读(101) 评论(0) 推荐(0) 编辑
摘要:https://www.zhihu.com/question/20296398 阅读全文
posted @ 2020-08-20 10:38 峡谷恶霸 阅读(129) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/bxzz/p/4184296.html https://www.laruence.com/2011/01/20/1844.html 阅读全文
posted @ 2020-08-19 17:14 峡谷恶霸 阅读(146) 评论(0) 推荐(0) 编辑
摘要:面试题: 6.服务器返回的状态码 (301,302,403,404,500 , 505) http://www.daqianduan.com/4280.html 301 Moved Permanently 客户请求的文档在其他地方,新的URL在Location头中给出,浏览器应该自动地访问新的URL 阅读全文
posted @ 2020-08-19 16:54 峡谷恶霸 阅读(226) 评论(0) 推荐(0) 编辑
摘要:301 意味着客户端可以对结果进行缓存, 搜索引擎或者浏览器都可以把跳转后的地址缓存下来,下一次不必发送这个请求。302 就是客户端必须请求原链接。 https://www.cnblogs.com/lanqiu5ge/p/9457074.html 阅读全文
posted @ 2020-08-19 16:49 峡谷恶霸 阅读(107) 评论(0) 推荐(0) 编辑
摘要:转: https://baijiahao.baidu.com/s?id=1654225744653405133&wfr=spider&for=pc https://www.cnblogs.com/an-wen/p/11180076.html https://baijiahao.baidu.com/s 阅读全文
posted @ 2020-08-19 15:43 峡谷恶霸 阅读(221) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/jibaicha/article/details/100147646 阅读全文
posted @ 2020-08-18 16:37 峡谷恶霸 阅读(213) 评论(0) 推荐(0) 编辑
摘要:Python time strptime() 函数根据指定的格式把一个时间字符串解析为时间元组。Python time strftime() 函数接收以时间元组,并返回以可读字符串表示的当地时间,格式由参数format决定。Python time mktime() 函数执行与gmtime(), lo 阅读全文
posted @ 2020-08-18 16:18 峡谷恶霸 阅读(128) 评论(0) 推荐(0) 编辑
摘要:客户端都是通过私钥登录的 无论公钥私钥在服务器或者客户端生成,服务器端都需要安装公钥,就是把公钥放到authokeys 文件里进行安装 若钥匙对在服务器生成的,则需要本地制定 私钥 ssh -i xxx.pem 登录 如果本地默认方式生成的钥匙对,则默认使用~/.ssh/id_rsa 这个私钥,给人 阅读全文
posted @ 2020-08-16 22:37 峡谷恶霸 阅读(812) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/moonbaby/p/12202208.html def show_1(**kargs): for item in kargs.items(): print(item)user_dict = {'k1':123,'k2':456} show_1(**u 阅读全文
posted @ 2020-08-16 12:04 峡谷恶霸 阅读(166) 评论(0) 推荐(0) 编辑
摘要:signals.py: 主要用于ctrl c 的信号处理 "CATCHBREAK = " -c, --catch Catch control-C and display results\n" " 判断需要CATCHBREAK 后调用signal 给 SIGINT 添加处理函数(捕捉SIGINT 并且 阅读全文
posted @ 2020-08-14 17:16 峡谷恶霸 阅读(375) 评论(0) 推荐(0) 编辑
摘要:class _WritelnDecorator(object): """Used to decorate file-like objects with a handy 'writeln' method""" def __init__(self,stream): self.stream = strea 阅读全文
posted @ 2020-08-12 11:04 峡谷恶霸 阅读(321) 评论(0) 推荐(0) 编辑
摘要:writeln() 方法与 write() 方法作用相同,外加可在每个表达式后写一个换行符。 阅读全文
posted @ 2020-08-12 10:31 峡谷恶霸 阅读(138) 评论(0) 推荐(0) 编辑
摘要:很多时候,数据读写不一定是文件,也可以在内存中读写。StringIO就是在内存中读写str。StringIO操作的只能是str,如果要操作二进制数据,就需要使用BytesIO。 BytesIO实现了在内存中读写bytes,我们创建一个BytesIO,然后写入一些bytes:StringIO和Byte 阅读全文
posted @ 2020-08-12 10:06 峡谷恶霸 阅读(86) 评论(0) 推荐(0) 编辑
摘要:pycharm 可以直接连接远程!!!! 使用pycharm tools start new session 阅读全文
posted @ 2020-08-11 18:10 峡谷恶霸 阅读(176) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/z_feng12489/article/details/89433878?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-8.nonecase 阅读全文
posted @ 2020-08-11 18:02 峡谷恶霸 阅读(283) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/7d1855cd916f def signal(sig, action): # real signature unknown; restored from __doc__ """ signal(sig, action) -> action Set 阅读全文
posted @ 2020-08-11 17:37 峡谷恶霸 阅读(186) 评论(0) 推荐(0) 编辑
摘要:__class__是***类***的一个***内置属性***,表示类的类型,返回<type ‘type’> ; 阅读全文
posted @ 2020-08-11 14:25 峡谷恶霸 阅读(154) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/kadycui/p/11838590.html https://blog.csdn.net/sinat_38068807/article/details/86519944 阅读全文
posted @ 2020-08-11 13:57 峡谷恶霸 阅读(191) 评论(0) 推荐(0) 编辑
摘要:def getTestCaseNames(self, testCaseClass): """Return a sorted sequence of method names found within testCaseClass """ # 判断是否是函数,可以判断是否有__call__. 被称为可调 阅读全文
posted @ 2020-08-11 11:16 峡谷恶霸 阅读(124) 评论(0) 推荐(0) 编辑
摘要:https://www.liaoxuefeng.com/wiki/897692888725344/923030542875328 阅读全文
posted @ 2020-08-11 09:57 峡谷恶霸 阅读(75) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/viviliao_/article/details/79647358 阅读全文
posted @ 2020-08-11 09:37 峡谷恶霸 阅读(401) 评论(0) 推荐(0) 编辑
摘要:python 可以直接导入zip 文件里的模块,需要把zip 文件地址添加到syspath 阅读全文
posted @ 2020-08-10 16:51 峡谷恶霸 阅读(659) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/31a79a6978c9 阅读全文
posted @ 2020-08-10 16:42 峡谷恶霸 阅读(356) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/dangkai/p/10758056.html D:\pycharm\alex-learn\unittest>python -m alex2__init__ called !__main__.py called D:\pycharm\alex-lear 阅读全文
posted @ 2020-08-10 16:29 峡谷恶霸 阅读(276) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/abed4e1c0db9 https://www.cnblogs.com/tianshu/p/10228270.html 阅读全文
posted @ 2020-08-10 16:13 峡谷恶霸 阅读(185) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/xueweihan/p/5118222.html https://www.jb51.net/article/174005.htm 导入一个叫 mod1 的模块时,解释器先在当前目录中搜索名为 mod1.py 的文件。如果没有找到的话,接着会到 sys. 阅读全文
posted @ 2020-08-10 16:04 峡谷恶霸 阅读(371) 评论(0) 推荐(0) 编辑
摘要:extend 接收一个list 扩展原list update 接收一个dict 扩展原dict Python 字典 pop() 方法删除字典给定键 key 及对应的值,返回值为被删除的值。key 值必须给出。 否则,返回 default 值。 描述 Python 字典 popitem() 方法返回并 阅读全文
posted @ 2020-08-10 15:43 峡谷恶霸 阅读(314) 评论(0) 推荐(0) 编辑
摘要:无论是python还是linux的getopt 都不处理解析重定向的命令行参数!!!!! 阅读全文
posted @ 2020-08-10 15:33 峡谷恶霸 阅读(82) 评论(0) 推荐(0) 编辑
摘要:$@ $* 不包括$0 “$@ ” 可遍历 阅读全文
posted @ 2020-08-10 15:30 峡谷恶霸 阅读(108) 评论(0) 推荐(0) 编辑
摘要:eval()函数和exec()函数的区别: eval()函数只能计算单个表达式的值,而exec()函数可以动态运行代码段。 eval()函数可以有返回值,而exec()函数返回值永远为None。 阅读全文
posted @ 2020-08-10 11:18 峡谷恶霸 阅读(117) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/amize/articles/13251738.html 阅读全文
posted @ 2020-08-10 10:43 峡谷恶霸 阅读(84) 评论(0) 推荐(0) 编辑
摘要:dir 可以获取模块的类,方法,变量等属性!!! class Loader(object): def __init__(self): self.cases = {} def load(self, path): print("path is %s " % path) module = importli 阅读全文
posted @ 2020-08-10 10:24 峡谷恶霸 阅读(205) 评论(0) 推荐(0) 编辑
摘要:Python 字典(Dictionary) update()方法 描述 Python 字典(Dictionary) update() 函数把字典dict2的键/值对更新到dict里。 语法 update()方法语法: dict.update(dict2) 参数 dict2 -- 添加到指定字典dic 阅读全文
posted @ 2020-08-07 11:19 峡谷恶霸 阅读(133) 评论(0) 推荐(0) 编辑
摘要:判断对象是否是类类型,看是否是type 的类型 >>> class B(object):... pass...>>> isinstance(B,type)True>>> class C:... pass...>>> isinstance(C,type)False>>> >>> isinstance( 阅读全文
posted @ 2020-08-07 10:55 峡谷恶霸 阅读(108) 评论(0) 推荐(0) 编辑
摘要:如果你想知道一个对象在内存中的位置,你可以调用id(对象)来查看 阅读全文
posted @ 2020-08-07 10:50 峡谷恶霸 阅读(162) 评论(0) 推荐(0) 编辑
摘要:class type(object): type 继承自object 阅读全文
posted @ 2020-08-07 10:26 峡谷恶霸 阅读(123) 评论(0) 推荐(0) 编辑
摘要:描述 isinstance() 函数来判断一个对象是否是一个已知的类型,类似 type()。 isinstance() 与 type() 区别: type() 不会认为子类是一种父类类型,不考虑继承关系。 isinstance() 会认为子类是一种父类类型,考虑继承关系。 如果要判断两个类型是否相同 阅读全文
posted @ 2020-08-07 10:13 峡谷恶霸 阅读(448) 评论(0) 推荐(0) 编辑
摘要:while : ; do ./fault_ganesha_kill_9 ; done 阅读全文
posted @ 2020-08-06 16:19 峡谷恶霸 阅读(75) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/nitibu/article/details/48161339 阅读全文
posted @ 2020-08-06 15:54 峡谷恶霸 阅读(114) 评论(0) 推荐(0) 编辑
摘要:写好TestCase 由TestLoader加载TestCase到TestSuite 然后由TextTestRunner来运行TestSuite,运行的结果保存在TextTestResult中。通过命令行或者unittest.main()执行时,main会调用TextTestRunner中的run( 阅读全文
posted @ 2020-08-06 14:19 峡谷恶霸 阅读(132) 评论(0) 推荐(0) 编辑
摘要:特别注意,类中的测试用例,每次都会被nose 初始化调用创建一个新的类对象,再去执行测试!!!! 阅读全文
posted @ 2020-08-05 15:26 峡谷恶霸 阅读(85) 评论(0) 推荐(0) 编辑
摘要:原文地址:https://github.com/kirang89/pycrumbs/blob/master/pycrumbs.md https://blog.csdn.net/Together_CZ/article/details/65934646 阅读全文
posted @ 2020-08-05 14:27 峡谷恶霸 阅读(114) 评论(0) 推荐(0) 编辑
摘要:类方式的用例,nose 会针对每个fuction 所在的class进行初始化!!! 阅读全文
posted @ 2020-08-05 12:32 峡谷恶霸 阅读(237) 评论(0) 推荐(0) 编辑
摘要:__new__() 是在新式类中新出现的方法,在 Python 中类实例化时,__new__()方法用在 __init__() 启动之前,决定是否要使用该 __init__() 方法,因为__new__() 可以调用其他类的构造方法或者直接返回别的对象来作为本类的实例。特性总结: __new__() 阅读全文
posted @ 2020-08-05 12:18 峡谷恶霸 阅读(118) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/nyist-xsk/p/8286941.html 阅读全文
posted @ 2020-08-05 12:10 峡谷恶霸 阅读(187) 评论(0) 推荐(0) 编辑
摘要:class testa(): def __init__(self): print("__init__ was called!") def setup(self): print("setup was called") def teardown(self): print("teardown was ca 阅读全文
posted @ 2020-08-05 11:21 峡谷恶霸 阅读(97) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/63f09d1221a8 https://blog.csdn.net/cassiepython/article/details/76653897 阅读全文
posted @ 2020-08-05 10:46 峡谷恶霸 阅读(78) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/mojiexiaolong/p/6828616.html 阅读全文
posted @ 2020-08-05 10:34 峡谷恶霸 阅读(79) 评论(0) 推荐(0) 编辑
摘要:if __name__ == '__main__': nose.runmodule() 阅读全文
posted @ 2020-08-04 17:33 峡谷恶霸 阅读(128) 评论(0) 推荐(0) 编辑
摘要:[root@esg-server-578 falut-test]# nosetests --help | grep fail -x, --stop Stop running tests after the first error or failure --pdb Drop into debugger 阅读全文
posted @ 2020-08-03 15:27 峡谷恶霸 阅读(141) 评论(0) 推荐(0) 编辑
摘要:https://www.zhihu.com/question/314112690 关键点就一个:要在虚拟环境里安装pyinstaller 如果你没有在虚拟环境中安装pyinstaller,你同样可以使用pyinstaller命令,但是调用的是你系统原本的那个python编译器,内含很多关联库,导致即 阅读全文
posted @ 2020-08-03 12:43 峡谷恶霸 阅读(150) 评论(0) 推荐(0) 编辑
摘要:1, sysctl命令的作用 在运行时配置内核参数2,用法举例: -w 用此选项来改变一个sysctl设置 例:sysctl -w net.ipv4.ip_forward=1 -p 载入sysctl配置文件 如-p后未指定路径,则载入 /etc/sysctl.conf 例: sysctl -p /e 阅读全文
posted @ 2020-08-03 11:18 峡谷恶霸 阅读(1434) 评论(0) 推荐(0) 编辑
摘要:#systemctl list-units -type=service -all //列出所有 service 类型的 unit 阅读全文
posted @ 2020-08-03 11:10 峡谷恶霸 阅读(416) 评论(0) 推荐(0) 编辑
摘要:系统io hangzhu的话会自动重启 /var/log/message 会归档 阅读全文
posted @ 2020-08-03 11:07 峡谷恶霸 阅读(796) 评论(0) 推荐(0) 编辑
摘要:Linux下查看系统上次启动时间命令:last reboot/ who -b /uptime 阅读全文
posted @ 2020-08-03 09:58 峡谷恶霸 阅读(1127) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/justlpf/article/details/80703763 阅读全文
posted @ 2020-08-01 11:10 峡谷恶霸 阅读(157) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/youngerchina/archive/2011/12/15/5624646.html https://www.cnblogs.com/chinacloud/archive/2011/02/16/1955910.html 阅读全文
posted @ 2020-08-01 11:03 峡谷恶霸 阅读(240) 评论(0) 推荐(0) 编辑
摘要:In-memory database(IMDB),即内存数据库 oracle存储的最小粒度是data block,处于data block之上的逻辑数据库空间是extent,位于extent上的segment。oracle为segment分配空间时以extend为单位,extent在磁盘上未必是连续 阅读全文
posted @ 2020-08-01 11:02 峡谷恶霸 阅读(686) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/weixin_40039738/article/details/81867577 POSIX表示可移植操作系统接口(Portable Operating System Interface of UNIX,缩写为 POSIX ),POSIX标准定义了操作系统 阅读全文
posted @ 2020-08-01 10:47 峡谷恶霸 阅读(157) 评论(0) 推荐(0) 编辑