- 博客(5)
- 收藏
- 关注
原创 paramiko.ssh_exception.SSHException: Server connection dropped
【代码】paramiko.ssh_exception.SSHException: Server connection dropped。
2023-06-27 13:49:23 380
原创 prometheus的简单使用
counter = Counter.build("demo", "/demo 请求次数").create().register(collectorRegistry);启动prometheus 命令:nohup ./prometheus --web.enable-lifecycle --config.file=prometheus.yml &log.info("/demo 请求次数:{}", counter.get());log.error("alert异常:{}", e.getMessage());
2023-05-09 17:16:34 1011 1
原创 python 装饰器的简单使用
# -*- coding: utf-8 -*-import revalue = re.compile(r'^(-?[0-9]\d*)(\.\d+|\d*)$') # 匹配规则(int or float)def logger(f): '''参数日志装饰器''' def inner(*args, **kwargs): print(f'params --> args: {args}, kwargs: {kwargs}') return f(*ar
2021-10-26 10:40:51 118
原创 python re正则匹配数字类型int or float
import revalue = re.compile(r'^(-?[0-9]\d*)(\.\d+|\d*)$') # 匹配规则(int or float)print(value.match(str('11'))) # 匹配成功返回 <re.Match object; span=(0, 2), match='11'> 失败返回None
2021-10-26 09:59:21 1622
转载 virtualenv创建虚拟环境失败 UnicodeDecodeError ‘ascii‘
引用:https://www.cnblogs.com/walk1314/p/7251126.html我的mac下python2.7路径:/Library/Python/2.7/site-packages/下新增文件:sitecustomize.py内容:# encoding=utf8import sysreload(sys)sys.setdefaultencoding('utf8')virtualenv env_name创建虚拟环境成功之前编码没有问题,好好的不知道怎么就犯病了,
2021-09-27 18:26:30 167
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人