2021年11月9日

Expect+Crontab 定时重启山石防火墙

摘要: expect 安装expect yum install expect expect说明 shell脚本 存储位置/usr/etc/script/test.sh #!/usr/bin/expect -f spawn ssh [YOUR_USER_NAME]@[YOUR_DEVICE_IP] expec 阅读全文

posted @ 2021-11-09 12:29 BionExit 阅读(216) 评论(0) 推荐(0) 编辑

2021年9月26日

MacOS系统使用Homebrew官方地址报错

摘要: MacOS系统使用Homebrew官方地址时,报错: ds@Macintosh ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" curl: (35) 阅读全文

posted @ 2021-09-26 12:12 BionExit 阅读(40) 评论(0) 推荐(0) 编辑

2021年9月6日

privoxy代理服务器配置

摘要: [root@MiWiFi-R1CM-srv ~]# yum install privoxy [root@MiWiFi-R1CM-srv privoxy]# cd /etc/privoxy/ [root@MiWiFi-R1CM-srv privoxy]# touch pac.action [root@ 阅读全文

posted @ 2021-09-06 11:12 BionExit 阅读(1043) 评论(0) 推荐(0) 编辑

2021年8月20日

Nginx 反向代理 502 permission denied 解决

摘要: 环境 centos 7.6 nginx version: nginx/1.20.1 nginx 代理 8989 流量到 IP:8081 现象 在完成Nginx反向代理配置后,/var/log/nginx/error.log报错 2021/08/20 16:23:52 [crit] 11490#114 阅读全文

posted @ 2021-08-20 16:59 BionExit 阅读(679) 评论(1) 推荐(0) 编辑

2021年5月16日

Deccoration Concepts

摘要: Living room 阅读全文

posted @ 2021-05-16 21:03 BionExit 阅读(23) 评论(0) 推荐(0) 编辑

2021年5月15日

Python Logger类,保存本地文件并在console打印

摘要: import logging import time import os class Logger: def __init__(self, logger_name): # 创建一个logger self.logger = logging.getLogger(logger_name) self.log 阅读全文

posted @ 2021-05-15 20:44 BionExit 阅读(472) 评论(0) 推荐(0) 编辑

Python 通过Request上传(form-data Multipart)\下载文件

摘要: 下载文件 import os import requests base_dir = os.path.abspath(os.path.dirname(__file__)) file_path = os.path.join(base_dir, 'FileDownload', time.strftime( 阅读全文

posted @ 2021-05-15 20:20 BionExit 阅读(816) 评论(0) 推荐(0) 编辑

2021年5月10日

正则表达式

摘要: (?<=成交金额:)(\d+)(,\d+)*\.*(\d)*(?=\元) 352,000 [1-9]\d*.\d*|0.\d*[1-9]\d* 352,000 [\u4e00-\u9fa5]*$ 元 [\u4e00-\u9fa5]{2,} 中标金额 天津市第二人民医院医疗设备项目(项目编号:TGPC 阅读全文

posted @ 2021-05-10 11:08 BionExit 阅读(21) 评论(0) 推荐(0) 编辑

2021年5月7日

解决 no module name _sqllite3 手动卸载python并更新

摘要: yum install sqlite-devel rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps whereis python |xargs rm -frv whereis python cd /home/source wget htt 阅读全文

posted @ 2021-05-07 02:34 BionExit 阅读(57) 评论(0) 推荐(0) 编辑

2021年5月5日

python通过递归清除字典中value为特定值的key

摘要: 输入dict person = {'a': {'age': 43, 'addr': ''}, 'b': {'age': 0, 'addr': 'China', 'd': {'age': 43, 'addr': ''}}, 'c': {'age': 0, 'addr': None}} 代码 _filt 阅读全文

posted @ 2021-05-05 01:20 BionExit 阅读(378) 评论(0) 推荐(0) 编辑

导航