首页/ AI 技能 / @skilllib/skill-2117939930272414492
Skill站外收录 @skilllib/skill-2117939930272414492

python-repl

提供交互式 Python 编程环境,内置数据分析、对象调试和性能分析等常用功能,自动完成常见库导入与配置,支持快速执行代码片段并获取结构化结果。

0.0 (0) 26 次安装 原作者 编程导航
收录于 2026-01-22

Skills.MD

# Python REPL Skill Enhances Python REPL workflows with bundled utility functions for data analysis, debugging, and performance profiling. ## Overview This skill bundles Python REPL helpers, common imports, and execution patterns for efficient Python development in gptme. ## Bundled Scripts ### Helper Functions (python_helpers.py) This skill includes bundled utility functions for common Python tasks: - Data inspection (inspect_df, describe_object) - Quick plotting (quick_plot) - Performance profiling (time_function) - Common imports setup (setup_common_imports) ## Usage Patterns ### Data Analysis When working with data, automatically import common libraries and set up display options: ```python import numpy as np import pandas as pd pd.set_option('display.max_rows', 100) ``` ### Debugging Use bundled helpers for debugging: ```python from python_helpers import inspect_df, describe_object inspect_df(df) # Quick dataframe overview describe_object(obj) # Object introspection ``` ## Dependencies Required packages are listed in `requirements.txt`: - ipython: Interactive Python shell - numpy: Numerical computing - pandas: Data manipulation ## Best Practices 1. **Use helpers**: Leverage bundled helper functions instead of reimplementing 2. **Import once**: Common imports are handled by pre-execute hook 3. **Profile performance**: Use time_function for performance-sensitive code ## Examples ### Quick Data Analysis ```python # Helpers auto-import pandas, numpy df = pd.read_csv('data.csv') inspect_df(df) # Show overview ``` ### Performance Profiling ```python from python_helpers import time_function @time_function def slow_operation(): # Your code here pass ``` ## Related - Tool: ipython

评论 0

还没有评论,来抢沙发。