07 2022 档案

golang 基本技巧 interface 增加元素
摘要:1.golang interface增加元素 s := "first" rest := []interface{}{"second", 3} all := append([]interface{}{s}, rest...) fmt.Println(all) 阅读全文

posted @ 2022-07-24 17:19 星河赵 阅读(710) 评论(0) 推荐(0) 编辑

Linux服务器配置普通用户具有root权限(免密)
摘要:由于业务需求,需要对Linux服务器配置普通用户具有root权限(免密) 具体做法如下:(以demo用户为例) 1、先授权(可写权限)chmod u+w /etc/sudoers 2、修改 /etc/sudoers 文件,找到下面一行,在 %wheel 下面添加一行:vim /etc/sudoers 阅读全文

posted @ 2022-07-21 10:06 星河赵 阅读(1168) 评论(0) 推荐(0) 编辑

Python zipfile 压缩文件
摘要:zipfile 压缩普通文件文件 zip_file = zipfile.ZipFile("/tmp/2.zip", 'a', zipfile.ZIP_DEFLATED, False) zip_file.write("/tmp/6be69f6eb16c4aa1a8c861018f1a91fe.jpeg 阅读全文

posted @ 2022-07-06 16:00 星河赵 阅读(1102) 评论(0) 推荐(0) 编辑

Python 图片bytes PIL CV2 的相互转换
摘要:1. PIL 与 cv2 相互转化 import cv2 from PIL import Image import numpy as np # PIL 转 cv2 img= Image.open("test.jpg") img = cv2.cvtColor(np.asarray(img), cv2. 阅读全文

posted @ 2022-07-06 10:50 星河赵 阅读(1216) 评论(0) 推荐(0) 编辑

python flask socketio uwsgi和nginx supervisor配置方式
摘要:uwsgi # copy it to folder: /app/test/ [uwsgi] socket = 0.0.0.0:23489 processes = 1 threads = 1 master = true pythonpath = /app/test/test module = web_ 阅读全文

posted @ 2022-07-03 20:33 星河赵 阅读(261) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示