自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 paramiko.ssh_exception.SSHException: Server connection dropped

【代码】paramiko.ssh_exception.SSHException: Server connection dropped。

2023-06-27 13:49:23 270

原创 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 904 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 83

原创 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 1559

转载 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 130

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除