摘要: 1:UTC时间转北京时间utc时间格式:2023-03-10T07:52:12Zfrom datetime import datetime, timedeltautc="2023-03-10T07:52:12Z" datetime.strptime(utc, "%Y-%m-%dT%S:%M:%SZ" 阅读全文
posted @ 2023-03-10 16:21 你看起来真的很好吃 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 实现原理:重写WatchedFileHandler实现 自带的RotatingFileHandler模块只适用于单进程多进程中会导致日志丢失 logger配置 仅将file_path改为日志存储的目录地址 自定义日志类 1 # -*-coding:utf-8-*- 2 import datetime 阅读全文
posted @ 2023-03-02 21:08 你看起来真的很好吃 阅读(257) 评论(0) 推荐(0) 编辑
摘要: import cv2 import face_recognition import numpy as np from PIL import ImageFont, ImageDraw, Image class FaceRecognition(object): # 已知姓名的人脸编码 known_fac 阅读全文
posted @ 2022-10-31 15:08 你看起来真的很好吃 阅读(292) 评论(0) 推荐(0) 编辑
摘要: from urllib import quote _file_name = quote("测试".encode("utf-8")) data = models.AdaptationPChannel.export_active_project(start_date) response = HttpRe 阅读全文
posted @ 2022-10-14 19:58 你看起来真的很好吃 阅读(57) 评论(0) 推荐(0) 编辑
摘要: @admin.register(BuildFunction) class BuildFunctionAdmin(SimpleHistoryAdmin, ImportExportModelAdmin): form = BuildFunctionForm list_display = ('id', 'c 阅读全文
posted @ 2022-10-11 15:46 你看起来真的很好吃 阅读(39) 评论(0) 推荐(0) 编辑
摘要: /* 使用弹性盒子布局 */ display: flex; /* 设置子元素在父元素排列方向 */ flex-direction: row; /* 子元素沿主轴对齐方式 */ /* justify-content: space-around; */ /* 定义子元素是否换行,默认不换行,如果装不开会 阅读全文
posted @ 2022-09-01 19:48 你看起来真的很好吃 阅读(14) 评论(0) 推荐(0) 编辑
摘要: keepalived实现浮动IP 1: 由于ECS不能支持多播,keepalived需要通过单播实现arrp通信浮动IP实现连接公网 1:申请havip 目前处于公测(免费),审核通过时间大概2天2:申请EIP3:havip绑定ECS资源和EIP 官方实现高可用文档: https://help.al 阅读全文
posted @ 2022-08-04 02:12 你看起来真的很好吃 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1:关闭防火墙 关闭防火墙:systemctl stop firewalld 禁用防火墙:systemctl disable firewalld 2:禁用SELinux,不禁用会影响邮件发送 notify_master 查看SELinux状态:getenforce 禁用SELinux:修改/etc/ 阅读全文
posted @ 2022-07-28 20:04 你看起来真的很好吃 阅读(1092) 评论(0) 推荐(0) 编辑
摘要: # -*-coding:utf-8-*- import requests import re from bs4 import BeautifulSoup import json headers = { "Accept": "*/*", "Accept-Encoding": "gzip, deflat 阅读全文
posted @ 2022-06-11 21:56 你看起来真的很好吃 阅读(30) 评论(0) 推荐(0) 编辑
摘要: # -*-coding:utf-8-*-import requestsimport mathimport jsonif __name__ == "__main__": count = "100" page_count = math.ceil(26148/100) with open("b.txt", 阅读全文
posted @ 2022-06-08 17:23 你看起来真的很好吃 阅读(64) 评论(0) 推荐(0) 编辑