Python LogFile Context Manager Generator
Generates a Python class `LogFile` inheriting from `ContextDecorator` that logs execution details (Start time, Run duration, Error info) to a file in a specific pipe-delimited format.
Browse reusable Agent Skills, each with a clear purpose and practical guidance.
Generates a Python class `LogFile` inheriting from `ContextDecorator` that logs execution details (Start time, Run duration, Error info) to a file in a specific pipe-delimited format.
使用pymodbus库通过RS485读取Modbus保持寄存器,将两个寄存器转换为大端浮点数,并按指定格式存入SQLite数据库的脚本模板。
使用Python Tkinter库创建一个可调整大小的简单计算器窗口。包含两个数字输入框、加减法选择、等号按钮和结果显示。要求布局紧凑(除结果外单行显示),输入框前有文字标签,结果字体大且为红色,代码需包含中文注释。
生成Python Tkinter代码,创建一个包含2个单选项的弹出窗口。窗口需初始化在屏幕居中,大小为屏幕尺寸的五分之一,点击确定按钮后返回选中的值。
编写基于Python Tkinter的秒表程序,要求使用Label控件显示时间,确保窗口不卡顿(非阻塞),并支持条件触发停止。
Converts Python PEG grammar definitions into a Rust-like Ungrammar format, applying specific constraints for conciseness, expression placement, and pattern detail.
在Python 2环境中编写json.dumps处理字典数据的代码,实现默认UTF-8编码失败时回退到GBK编码,其他异常输出格式错误的逻辑。
将包含特定分隔符('==')的字符串列表转换为包含指定键('name', 'version')的字典列表。
根据用户指定的属性和方法,设计并实现一个Python员工类,包含工资计算、个税计算(3500起征点,3%税率)和信息显示功能。
使用Python将字典参数按键名排序,格式化为“key=value”并用“&”连接,最后将结果字符串转为小写,常用于API签名生成。