随笔分类 -  代码 / 脚本片段

摘要:def parse_parameters(param_string): """解析参数字符串,格式: k1:v1,k2:v2 注意:1e-4 -> 1.0e-4 """ if not param_string or ':' not in param_string: return {} return 阅读全文
posted @ 2025-08-31 08:10 bregman 阅读(20) 评论(0) 推荐(0)
摘要:#!/usr/bin/env python # -*- encoding:utf-8 -*- import tempfile import sys import os import subprocess import logging import re __all__ = ["run", "quer 阅读全文
posted @ 2024-03-12 10:37 bregman 阅读(19) 评论(0) 推荐(0)
摘要:ps aux | grep test_streaming.py | sed -E 's/\s+/ /g; $d' | cut -d ' ' -f 2 | xargs -i kill -s 9 {} # linux ps ax | grep netron | sed -r 's/\s+/#/g;/gr 阅读全文
posted @ 2023-07-19 12:28 bregman 阅读(43) 评论(0) 推荐(0)
摘要:* logging 捕获异常 ```python try: main(CtrFgConf, p.local, p.debug, **Params) except Exception as e: logging.exception(f'{e}:当前TF版本不是paitf? 提交命令中加参数--nopa 阅读全文
posted @ 2021-07-30 14:30 bregman 阅读(70) 评论(0) 推荐(0)
摘要:电影页面编辑 阅读全文
posted @ 2019-11-30 22:17 bregman 阅读(142) 评论(3) 推荐(0)