11 2019 档案

摘要:处理multipart/form-data 的java serverlet请求接口通过python实现 记住不要在头加:"Content-Type":"multipart/form-data"不然会报错 import requestsdt={"file":{},"message": "duotou" 阅读全文
posted @ 2019-11-29 14:21 不带R的墨菲特 阅读(2544) 评论(0) 推荐(1) 编辑
摘要: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 阅读全文
posted @ 2019-11-22 16:13 不带R的墨菲特 阅读(119) 评论(0) 推荐(0) 编辑
摘要:import argparse,osdata_func=["upload","download"]req_func=["getfunc","postfunc"]def func1(): print("this func1")def func2(): print("this is func2")par 阅读全文
posted @ 2019-11-22 16:09 不带R的墨菲特 阅读(241) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/julia922/article/details/89031947 阅读全文
posted @ 2019-11-22 16:03 不带R的墨菲特 阅读(159) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/julia922/article/details/90258534 阅读全文
posted @ 2019-11-22 16:01 不带R的墨菲特 阅读(372) 评论(0) 推荐(0) 编辑
摘要:class Test1(object): def __init__(self,ids): self.ids=idsclass Par(Test1): def __init__(self,ids,user): super().__init__(ids) #Test1.__init__(self,ids 阅读全文
posted @ 2019-11-21 17:22 不带R的墨菲特 阅读(543) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-11-21 16:48 不带R的墨菲特 阅读(2507) 评论(2) 推荐(0) 编辑
摘要:https://jmeter-plugins.org/wiki/PluginsManager/ 以websocket 插件为例 先安装plugin manger 第二步:打开jmetre options manager 勾选并apply会自动重启jmeter 检验插件安装:add -->smaple 阅读全文
posted @ 2019-11-21 15:37 不带R的墨菲特 阅读(429) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-11-19 17:06 不带R的墨菲特 阅读(393) 评论(0) 推荐(0) 编辑
摘要:网卡流量 1、iftop命令 iftop可以用来监控网卡的实时流量(可以指定网段)、反向解析IP、显示端口信息、TCP/IP连接等官网:http://www.ex-parrot.com/~pdw/iftop/ 安装iftop: [root@Super ~]# yum install flex bya 阅读全文
posted @ 2019-11-19 15:53 不带R的墨菲特 阅读(2264) 评论(2) 推荐(0) 编辑
摘要:# coding=utf-8import unittestfrom inspect import isfunctiondef usage(): """also unittest.__dict__""" print(unittest.__all__)def stdout_writeText(): su 阅读全文
posted @ 2019-11-18 15:41 不带R的墨菲特 阅读(510) 评论(0) 推荐(0) 编辑
摘要:解决方案一直接改unittest源代码: 把排序240行逻辑注释掉,237行获取成员方法按照dict方法替换原有的dir() 方法 验证效果: 比较猥琐的解决方案2 获取成员变量class.__dict__.keys() filter过滤符合要求成员,由于3.x成员dict属性是支持有序的 # co 阅读全文
posted @ 2019-11-18 15:17 不带R的墨菲特 阅读(355) 评论(2) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-11-15 14:45 不带R的墨菲特 阅读(156) 评论(0) 推荐(0) 编辑
摘要:import pysftp import paramiko import os import unittest import json import warnings warnings.filterwarnings("ignore") class SftpUtils(object): """ cmd 阅读全文
posted @ 2019-11-11 18:21 不带R的墨菲特 阅读(617) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-11-11 18:19 不带R的墨菲特 阅读(247) 评论(0) 推荐(0) 编辑
摘要:离线安装 paramiko python37 pip download -d ./dependency -r requirements.txt pip install --no-index --ignore-installed --find-links=./ -r requirements.txt 阅读全文
posted @ 2019-11-11 10:44 不带R的墨菲特 阅读(908) 评论(0) 推荐(0) 编辑
摘要:# coding=utf-8 import logging import time import os import logging.handlers import re def logger(schedule_name, console_print=True, logging_level=None 阅读全文
posted @ 2019-11-08 22:46 不带R的墨菲特 阅读(195) 评论(0) 推荐(0) 编辑
摘要: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='$. 阅读全文
posted @ 2019-11-06 19:45 不带R的墨菲特 阅读(1952) 评论(0) 推荐(0) 编辑
摘要:redis的 rdb 和 aof 持久化的区别 url: http://ptc.35.com/?p=275 aof,rdb是两种 redis持久化的机制。用于crash后,redis的恢复。 rdb的特性如下: Code: fork一个进程,遍历hash table,利用copy on write, 阅读全文
posted @ 2019-11-06 12:37 不带R的墨菲特 阅读(252) 评论(0) 推荐(0) 编辑
摘要:1.linux 安装redis : Linux 下安装 下载地址:http://redis.io/download,下载最新稳定版本。 本教程使用的最新文档版本为 2.8.17,下载并安装: $ wget http://download.redis.io/releases/redis-2.8.17. 阅读全文
posted @ 2019-11-06 12:29 不带R的墨菲特 阅读(1634) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示