11 2019 档案
摘要:处理multipart/form-data 的java serverlet请求接口通过python实现 记住不要在头加:"Content-Type":"multipart/form-data"不然会报错 import requestsdt={"file":{},"message": "duotou"
阅读全文
摘要:import threading lock = threading.Lock()def th_001(req): lock.acquire() print(req,time.asctime()) lock.release()def test(): pool=[] for i in range(100
阅读全文
摘要:import argparse,osdata_func=["upload","download"]req_func=["getfunc","postfunc"]def func1(): print("this func1")def func2(): print("this is func2")par
阅读全文
摘要:https://blog.csdn.net/julia922/article/details/89031947
阅读全文
摘要:https://blog.csdn.net/julia922/article/details/90258534
阅读全文
摘要:class Test1(object): def __init__(self,ids): self.ids=idsclass Par(Test1): def __init__(self,ids,user): super().__init__(ids) #Test1.__init__(self,ids
阅读全文
摘要:Response message: Received: Close frame with status code 1009 and close reason 'No async message support and buffer too small. Buffer size: [8,192], M
阅读全文
摘要:https://jmeter-plugins.org/wiki/PluginsManager/ 以websocket 插件为例 先安装plugin manger 第二步:打开jmetre options manager 勾选并apply会自动重启jmeter 检验插件安装:add -->smaple
阅读全文
摘要:import psutildef cpu_information(): #scputimes(user=26.9, nice=0.1, system=50.27, idle=8551.89, iowait=1.97, irq=0.0, softirq=1.86, steal=0.0, guest=0
阅读全文
摘要:网卡流量 1、iftop命令 iftop可以用来监控网卡的实时流量(可以指定网段)、反向解析IP、显示端口信息、TCP/IP连接等官网:http://www.ex-parrot.com/~pdw/iftop/ 安装iftop: [root@Super ~]# yum install flex bya
阅读全文
摘要:# coding=utf-8import unittestfrom inspect import isfunctiondef usage(): """also unittest.__dict__""" print(unittest.__all__)def stdout_writeText(): su
阅读全文
摘要:解决方案一直接改unittest源代码: 把排序240行逻辑注释掉,237行获取成员方法按照dict方法替换原有的dir() 方法 验证效果: 比较猥琐的解决方案2 获取成员变量class.__dict__.keys() filter过滤符合要求成员,由于3.x成员dict属性是支持有序的 # co
阅读全文
摘要:def read_json(path): """return dict""" with open(path,'r+')as f: return json.load(f) def write_json(path,data): with open(path,"w+")as f: json.dump(da
阅读全文
摘要:import pysftp import paramiko import os import unittest import json import warnings warnings.filterwarnings("ignore") class SftpUtils(object): """ cmd
阅读全文
摘要:own dev # coding=utf-8 import paramiko import os import logging import json import unittest from stat import S_ISDIR,S_ISREG logging.basicConfig(level
阅读全文
摘要:离线安装 paramiko python37 pip download -d ./dependency -r requirements.txt pip install --no-index --ignore-installed --find-links=./ -r requirements.txt
阅读全文
摘要:# coding=utf-8 import logging import time import os import logging.handlers import re def logger(schedule_name, console_print=True, logging_level=None
阅读全文
摘要:1.如何同时替换json多个指定key的value import json from jsonpath_ng import parse def join_paths(regx_path,new_value,dict_replace): """ eg: join_paths(regx_path='$.
阅读全文
摘要:redis的 rdb 和 aof 持久化的区别 url: http://ptc.35.com/?p=275 aof,rdb是两种 redis持久化的机制。用于crash后,redis的恢复。 rdb的特性如下: Code: fork一个进程,遍历hash table,利用copy on write,
阅读全文
摘要:1.linux 安装redis : Linux 下安装 下载地址:http://redis.io/download,下载最新稳定版本。 本教程使用的最新文档版本为 2.8.17,下载并安装: $ wget http://download.redis.io/releases/redis-2.8.17.
阅读全文