Apidocjs
教程
@apiIgnore 跳过在写的部份(未完成)
@apiSuccess 返回 Response 参数解释
嵌套 json 解释
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25def crop_image(): """ @api {post} /crop_image Request to crop image for a pdf @apiName CropImagePost @apiGroup Cropper @apiVersion 0.1.0 @apiSuccess {String} code Status code. @apiSuccess {Object[]} data Tasks' result list. @apiSuccess {Number} data.code Status code of the Task. @apiSuccess {String} data.coordinates Coordinate group of the Task. @apiSuccessExample {json} Success Response json: { "code": 2000, "data": [ { "code": 2000, "coordinates": "1,166.6,539.87,16.5022,9.1575;1,166.6,539.87,16.5022,9.1575", } ], } """ pass
Pyside ---- Qt official python api
环境配置错误
- 参考:PySide6开发环境 - 代码先锋网
设置环境变量
QT_QPA_PLATFORM_PLUGIN_PATH- 值:
D:\soft\miniconda3\envs\py38\Lib\site-packages\PySide6\plugins\platforms
- 值:
设置 QObject 属性
动态属性
setter & getter
- obj.setProperty("propName", "value")
- obj.property("propName")
遍历
- obj.dynamicPropertyNames()
| |
subprocess ---- python shell tool
subprocess.run
参数
check=True
- 自动跳出 subprocess.CalledProcessError 异常
| |
Awk
Cheat Sheet
指定分隔符
1awk -F "," '{print Awk}' ./filename.txt多个 field 输出,使用 ","
1 2 3 4 5 6 7# 输入 #figure-extract cuda12.2-1-move-app-v1 a74c57ab7c82 3 days ago 7.16GB #table-extract cuda12.2-1-move-app 358de070777c 3 days ago 16.4GB awk '{print $1,":",$2}' # 输出 # figure-extract:cuda12.2-1-move-app-v1 # table-extract:cuda12.2-1-move-app
分隔符: -F ","
设置变量: -v
- -v FS="\t"
与 unexpand 连用
- unexpand 把空格转化成 tab(\t)字符
if 语句
| |
Curl
教程
curl 发送 POST 请求
POST 请求
参考
参数
-X, –request
- 可选值: POST, GET, …
-F, –form
- 背后机制:设置 Content-Type:multipart/format
- 格式: -F 'key=value'
- 用途: 发送请求字段
-d, –data
- 背后机制:设置 Content-Type=application/x-www-form-urlencoded
- 格式:
- -d 'key=value' -d 'key01=value01' –> 一次制定一个字段
- -d 'key01=value01&key02=value02' –> 多个字段
-H, –header