摘要: ssh username@目标机器ip -p 22 -o ProxyCommand='ssh -p 22 username@跳板机ip -W %h:%p' 1.1、基于用户名密码连接远程服务器 1 2 3 4 5 6 7 8 9 10 11 12 13 14 import paramiko # 创建 阅读全文
posted @ 2019-09-09 21:28 千年妖狐 阅读(621) 评论(0) 推荐(0) 编辑
摘要: def download_from_url(url, dst): response = requests.get(url, stream=True) file_size = int(response.headers['content-length']) if os.path.exists(dst): 阅读全文
posted @ 2019-08-15 17:31 千年妖狐 阅读(294) 评论(0) 推荐(0) 编辑
摘要: files = {'img': ('xxx.jpg', open('xxx.jpg', 'rb'), 'image/png', {'其他参数': "xxx"})}re = requests.post(url, data={"xxx": 1}, files=files) import re impor 阅读全文
posted @ 2019-08-15 16:56 千年妖狐 阅读(155) 评论(0) 推荐(0) 编辑
摘要: import pandas# 创建表格格式# ad = pandas.DataFrame({"a": range(1, 10), "b": range(10, 20)})ad = pandas.DataFrame({"name":['lala', 'bbb', 'ccc'], "成绩":[10, 2 阅读全文
posted @ 2019-08-15 16:33 千年妖狐 阅读(549) 评论(0) 推荐(0) 编辑
摘要: s = [] f = open('querylist.txt','r') #由于我使用的pycharm已经设置完了路径,因此我直接写了文件名 for lines in f: ls = lines.strip('\n').replace(' ','').replace('、','/').replace 阅读全文
posted @ 2019-08-15 16:21 千年妖狐 阅读(586) 评论(0) 推荐(0) 编辑
摘要: Top 作用:能够实时显示系统中各个进程的资源占用状况。类似于Windows的任务管理器。 命令参数: d: 指定每两次屏幕信息刷新之间的时间间隔 p: 通过指定监控进程ID来仅仅监控某个进程的状态 q:该选项将使top没有任何延迟的进行刷新。如果调用程序有超级用户权限,那么top将以尽可能高的优先 阅读全文
posted @ 2019-07-30 14:53 千年妖狐 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 3.1. 分析系统瓶颈 系统响应变慢,首先得定位大致的问题出在哪里,是IO瓶颈、CPU瓶颈、内存瓶颈还是程序导致的系统问题; 使用top工具能够比较全面的查看我们关注的点: $top top - 09:14:56 up 264 days, 20:56, 1 user, load average: 0 阅读全文
posted @ 2019-07-30 14:45 千年妖狐 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 较旧的写作邮差测试风格 较旧的Postman测试编写风格依赖于特殊tests对象的设置值。您可以为对象中的元素设置描述性键,然后说明它是真还是假。例如,tests["Body contains user_id"] = responsebody.has("user_id");将检查响应主体是否包含us 阅读全文
posted @ 2019-07-23 11:15 千年妖狐 阅读(498) 评论(0) 推荐(0) 编辑
摘要: npm install -g newman npm install -g newman-reporter-html newman run XXX.json -k -r html --reporter-html-export d:\test.html cmd /k "cd /d F:\qycache" 阅读全文
posted @ 2019-03-29 14:31 千年妖狐 阅读(1209) 评论(0) 推荐(0) 编辑
摘要: 函数: fanction print_welcome(){ echo welcome now time is `date` } print_welcome 函数调用 print _welcome 001 002 传入参数 . ./文件名 不在同一个文件的函数调用,先载入文件,再调用 数组: name 阅读全文
posted @ 2019-03-24 22:30 千年妖狐 阅读(124) 评论(0) 推荐(0) 编辑