随笔分类 - 开发
摘要:Union[a,b] → a|b 用这个: https://ast-grep.github.io/catalog/python/recursive-rewrite-type.html vscode 有 ast-grep的配套拓展,但容易导致 语言服务器 反应缓慢,不如手动命令ast-grep sca
阅读全文
摘要:现有方案 addon 下载 教程 许可协议 UI 骨架链接bind 导出配置 Roroko ⬇️ ytb LGPL 可商用 最简洁 ❌仅一次性转换 .json有形变键映射;骨骼没有偏移量offset信息,在 人→非人 转换上较麻烦 ReNim ⬇️ ytb GPL 不可商用 基于节点树,最复杂 ✅编
阅读全文
摘要:不直观的教程/文档 https://developer.blender.org/docs/handbook/translating/translator_guide/?utm_source=blender-4.3.2#manage-ui-translations-add-on https://dev
阅读全文
摘要:smpl、smplx、coco等骨架(skeleton)系统 name size K_fullimg (312,3,3) net_outputs-decode_dict-betas (312,10) net_outputs-decode_dict-bodypose (312,63) net_outp
阅读全文
摘要:方法1: TypedDict+Unpack 强烈推荐,适用于自己编写的库内使用 外部库不推荐,因为要额外维护Kwargs参数类,且无法对应不同版本的外部库 https://docs.python.org/3/library/typing.html#typing.Unpack 副作用,二次继承Type
阅读全文
摘要:https://github.com/Danangjoyoo/python-worker 还挺好用的,一旦写了一些会阻塞异步函数的逻辑,就需要将其移到新线程/进程去执行。如果不用这个库,就需要重构代码。代码需求经常变动,这个库就不错。 import asyncio import time impor
阅读全文
摘要:原代码: import asyncio as aio async def Sleeper(s=1): t = f'Sleeper for {s} seconds' await aio.sleep(s) print(t) return t async def main(): tasks = [Slee
阅读全文
摘要:异步 多线程 多进程 比喻 一个在烧水、泡衣服与洗碗的人 很多洗碗的人 很多语言不通的洗碗的人 核心 很多需要等待的函数同时运行 很多计算任务同时运行 原理 await转让控制权,再次事件循环 共享内存 不共享,使用IPC跨进程消息沟通 限制 - 若 async 函数内有耗时操作 , 会阻塞事件循环
阅读全文
摘要:受zig语言启发,图灵完备的配置文件可能是个不错的选择,只要严格限制权限就行。 用importlib 目标: 禁止二次导入,去除import语句 提供模块白名单、黑名单 import ast from sys import meta_path from importlib.abc import Lo
阅读全文
摘要:在 ~/.bashrc 首行前添加: set -x export ORIGINAL_PATH="$PATH" function check_path_change() { if [[ "$PATH" != "$ORIGINAL_PATH" ]]; then echo "PATH has change
阅读全文
摘要:https://ilkinulas.github.io/development/unity/2016/04/30/cube-mesh-in-unity3d.html https://www.youtube.com/watch?v=bnmr_At2R0s 给定一个点,围绕点生成一个正方体。 规定顶点顺
阅读全文
摘要:git秉承“代码安全为主”,每一次commit都会硬性做备份。 之前我使用自己的脚本 #!/bin/bash #set -x usage() { echo "Usage: $0 [path] [lines]" echo " path: local git repository" echo " lin
阅读全文
摘要:语法 类class public class Puppy { private int age; private String name; public List[Puppy] puppys; // 构造函数,初始化实例 public Puppy(String name) { this.name =
阅读全文
摘要:推荐课程 底层向 GAMES 101/202... + openGL迷你渲染器tinyRender + 补充笔记 【双语】【TheCherno】游戏引擎 笔记 旋转是特殊的剪切 blender Lesson 3 变换矩阵 模拟 L3.blend.zip,记得去掉.zip后打开 ui_L3.py备份,
阅读全文
摘要:教程 9种dither算法与历史发展 最开始是如何生成bayer矩阵 wiki: bayer有序抖动 python生成任意规模bayer矩阵 知乎:dither启发的艺术效果,半调/柱形 taichi ndarray文档 CSDN dither算法 理解bayer矩阵 因为bayer矩阵要平铺,所以
阅读全文
摘要:博客:源码解读 TOS源码: https://github.com/cia-foundation/TempleOS 启动过程: https://minexew.github.io/2020/02/27/templeos-loader-part1.html 建设性看法:http://www.coder
阅读全文
摘要:53端口冲突 解决:adguard使用别的端口,如54 sudo lsof -i :53 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME dnsmasq 1664 lxc-dnsmasq 6u IPv4 16640 0t0 UDP DESKTOP
阅读全文
摘要:今天在写python脚本,发现 I=[[0,0],[0,0]] a=I.copy() a[0][0]=1 print(a,I) 结果: [[1, 0], [0, 0]] [[1, 0], [0, 0]] 因为copy()拷贝得还不够深 解决方法 import copy import copy a =
阅读全文
摘要:~/.cargo/config.toml [source.crates-io] registry = "https://github.com/rust-lang/crates.io-index" replace-with = 'fast' [source.tuna] registry = "http
阅读全文
摘要:使用tauri v2,跑前后端项目学习时,遇到这条报错: Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current
阅读全文

浙公网安备 33010602011771号