messages listlengths 3 6 |
|---|
[
{
"role": "user",
"content": "Show me custom exception class."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Custom exception shown. Caught and printed."
}
] |
[
{
"role": "user",
"content": "Show me assert example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Assert shown. Used to enforce preconditions."
}
] |
[
{
"role": "user",
"content": "Show me logging example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Logging shown. Different levels display appropriately."
}
] |
[
{
"role": "user",
"content": "Show me threading example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Threading shown. 5 threads ran concurrently."
}
] |
[
{
"role": "user",
"content": "Show me multiprocessing example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Multiprocessing shown. Parallel computation with 4 workers."
}
] |
[
{
"role": "user",
"content": "Show me subprocess example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Subprocess shown. Captured stdout from echo."
}
] |
[
{
"role": "user",
"content": "Show me os.walk example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "os.walk shown. Iterates over directory tree."
}
] |
[
{
"role": "user",
"content": "Show me pathlib example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Pathlib shown. Object-oriented file paths."
}
] |
[
{
"role": "user",
"content": "Show me glob example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Glob shown. Found Python files in workspace."
}
] |
[
{
"role": "user",
"content": "Show me shutil copy example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Shutil copy shown. File copied to new location."
}
] |
[
{
"role": "user",
"content": "Show me shutil move example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Shutil move shown. File moved to subdirectory."
}
] |
[
{
"role": "user",
"content": "Show me shutil rmtree example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Shutil rmtree shown. Directory tree removed."
}
] |
[
{
"role": "user",
"content": "Show me tempfile example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Tempfile shown. Created a temp file with content."
}
] |
[
{
"role": "user",
"content": "Show me zipfile example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Zipfile shown. Created a zip with one file inside."
}
] |
[
{
"role": "user",
"content": "Show me csv reader example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "CSV reader shown. Parsed first row."
}
] |
[
{
"role": "user",
"content": "Show me csv writer example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "CSV writer shown. Wrote a sample CSV."
}
] |
[
{
"role": "user",
"content": "Show me json load example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "JSON load shown. Parsed a JSON string."
}
] |
[
{
"role": "user",
"content": "Show me json dump example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "JSON dump shown. Pretty-printed dict."
}
] |
[
{
"role": "user",
"content": "Show me sqlite3 example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "SQLite shown. Created table and queried data."
}
] |
[
{
"role": "user",
"content": "Show me http.client example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "HTTP shown. Got 200 from GitHub."
}
] |
[
{
"role": "user",
"content": "Show me base64 encode example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Base64 shown. Encoded and decoded hello."
}
] |
[
{
"role": "user",
"content": "Show me hash example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Hash shown. SHA256 of hello."
}
] |
[
{
"role": "user",
"content": "Show me uuid example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "UUID shown. Generated a unique ID."
}
] |
[
{
"role": "user",
"content": "Show me secrets example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Secrets shown. Generated secure random tokens."
}
] |
[
{
"role": "user",
"content": "Show me hmac example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "HMAC shown. Computed a message authentication code."
}
] |
[
{
"role": "user",
"content": "Show me argparse subcommands example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Argparse subcommands shown. Parsed get command."
}
] |
[
{
"role": "user",
"content": "Show me configparser example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Configparser shown. Created an INI config."
}
] |
[
{
"role": "user",
"content": "Show me tomllib example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Tomllib shown. Parsed TOML string."
}
] |
[
{
"role": "user",
"content": "Show me calendar module example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Calendar shown. September 2024 calendar."
}
] |
[
{
"role": "user",
"content": "Show me statistics module example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Statistics shown. Mean=5, Median=5, Stdev=2.74."
}
] |
[
{
"role": "user",
"content": "Show me random module example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Random shown. Various random operations."
}
] |
[
{
"role": "user",
"content": "Show me math module example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Math shown. Common math functions."
}
] |
[
{
"role": "user",
"content": "Show me fractions example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Fractions shown. 1/3 + 2/3 = 1."
}
] |
[
{
"role": "user",
"content": "Show me decimal example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Decimal shown. 0.1 + 0.2 = 0.3 exactly."
}
] |
[
{
"role": "user",
"content": "Show me regex match example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Regex match shown. Captured user and host."
}
] |
[
{
"role": "user",
"content": "Show me re.findall example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Regex findall shown. Extracted 3 emails."
}
] |
[
{
"role": "user",
"content": "Show me re.sub example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Regex sub shown. Replaced numbers with X."
}
] |
[
{
"role": "user",
"content": "Add an image to a Word document."
},
{
"role": "assistant",
"content": "I will use python-docx to add the image."
},
{
"role": "assistant",
"content": "Image added to the document."
}
] |
[
{
"role": "user",
"content": "Add a table to a Word document."
},
{
"role": "assistant",
"content": "I will create the table."
},
{
"role": "assistant",
"content": "Table added with 3 rows and 3 columns."
}
] |
[
{
"role": "user",
"content": "Add another slide to an existing presentation."
},
{
"role": "assistant",
"content": "I will use python-pptx."
},
{
"role": "assistant",
"content": "New slide added to the presentation."
}
] |
[
{
"role": "user",
"content": "Add a formula to an Excel cell."
},
{
"role": "assistant",
"content": "I will use openpyxl to set a formula."
},
{
"role": "assistant",
"content": "Formulas added. SUM and AVERAGE ready for calculation."
}
] |
[
{
"role": "user",
"content": "Apply styling to an Excel cell."
},
{
"role": "assistant",
"content": "I will add bold and color to the header row."
},
{
"role": "assistant",
"content": "Header row styled with bold white text on blue background."
}
] |
[
{
"role": "user",
"content": "Connect to PostgreSQL and list tables."
},
{
"role": "assistant",
"content": "I will use psycopg2."
},
{
"role": "assistant",
"content": "Connected to PostgreSQL. Listed 8 tables."
}
] |
[
{
"role": "user",
"content": "Connect to MySQL and list databases."
},
{
"role": "assistant",
"content": "I will use mysql-connector-python."
},
{
"role": "assistant",
"content": "Connected to MySQL. Listed 5 databases."
}
] |
[
{
"role": "user",
"content": "Connect to MongoDB and list collections."
},
{
"role": "assistant",
"content": "I will use pymongo."
},
{
"role": "assistant",
"content": "Connected to MongoDB. Listed 6 collections."
}
] |
[
{
"role": "user",
"content": "Create a Flask app with a route."
},
{
"role": "assistant",
"content": "I will create the Flask app."
},
{
"role": "assistant",
"content": "Flask app running on port 5000. /api/users returns JSON."
}
] |
[
{
"role": "user",
"content": "Create a FastAPI app with a route."
},
{
"role": "assistant",
"content": "I will create the FastAPI app."
},
{
"role": "assistant",
"content": "FastAPI app running. /api/users returns JSON."
}
] |
[
{
"role": "user",
"content": "Create a Django view."
},
{
"role": "assistant",
"content": "I will create the view."
},
{
"role": "assistant",
"content": "Django view created. Returns JSON response."
}
] |
[
{
"role": "user",
"content": "Convert CSV to JSON."
},
{
"role": "assistant",
"content": "I will use csv and json."
},
{
"role": "assistant",
"content": "CSV converted to JSON."
}
] |
[
{
"role": "user",
"content": "Convert JSON to CSV."
},
{
"role": "assistant",
"content": "I will use pandas."
},
{
"role": "assistant",
"content": "JSON converted to CSV."
}
] |
[
{
"role": "user",
"content": "Convert XML to JSON."
},
{
"role": "assistant",
"content": "I will use xmltodict."
},
{
"role": "assistant",
"content": "XML converted to JSON."
}
] |
[
{
"role": "user",
"content": "Convert HTML to markdown."
},
{
"role": "assistant",
"content": "I will use html2text."
},
{
"role": "assistant",
"content": "HTML converted to Markdown."
}
] |
[
{
"role": "user",
"content": "Convert a markdown file to PDF."
},
{
"role": "assistant",
"content": "I will use weasyprint with markdown."
},
{
"role": "assistant",
"content": "Markdown converted to PDF."
}
] |
[
{
"role": "user",
"content": "Concatenate two DataFrames."
},
{
"role": "assistant",
"content": "I will use pd.concat."
},
{
"role": "assistant",
"content": "DataFrames concatenated."
}
] |
[
{
"role": "user",
"content": "Merge two DataFrames on a key."
},
{
"role": "assistant",
"content": "I will use pd.merge."
},
{
"role": "assistant",
"content": "DataFrames merged on id."
}
] |
[
{
"role": "user",
"content": "Group by and aggregate."
},
{
"role": "assistant",
"content": "I will use groupby."
},
{
"role": "assistant",
"content": "Grouped by department with mean salary. A=60, B=70."
}
] |
[
{
"role": "user",
"content": "Apply a function to a column."
},
{
"role": "assistant",
"content": "I will use apply."
},
{
"role": "assistant",
"content": "Function applied. Names are now uppercase."
}
] |
[
{
"role": "user",
"content": "Create a pivot table."
},
{
"role": "assistant",
"content": "I will use pivot_table."
},
{
"role": "assistant",
"content": "Pivot table created. Cross-tabulation of rows and columns."
}
] |
[
{
"role": "user",
"content": "Create a numpy array example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Numpy array shown. Vectorized operations work."
}
] |
[
{
"role": "user",
"content": "Create a 3x3 zero matrix."
},
{
"role": "assistant",
"content": "I will use np.zeros."
},
{
"role": "assistant",
"content": "3x3 zero matrix created."
}
] |
[
{
"role": "user",
"content": "Create a linspace example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Linspace shown. 5 points from 0 to 10."
}
] |
[
{
"role": "user",
"content": "Create a simple line plot."
},
{
"role": "assistant",
"content": "I will use matplotlib."
},
{
"role": "assistant",
"content": "Line plot saved to plot.png."
}
] |
[
{
"role": "user",
"content": "Create a histogram."
},
{
"role": "assistant",
"content": "I will use hist."
},
{
"role": "assistant",
"content": "Histogram saved. Shows normal distribution."
}
] |
[
{
"role": "user",
"content": "Create a scatter plot."
},
{
"role": "assistant",
"content": "I will use scatter."
},
{
"role": "assistant",
"content": "Scatter plot saved."
}
] |
[
{
"role": "user",
"content": "Show me requests.get example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Requests shown. Got 200 from GitHub API."
}
] |
[
{
"role": "user",
"content": "Show me requests.post example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "POST shown. Got 200 from httpbin."
}
] |
[
{
"role": "user",
"content": "Show me requests.Session example."
},
{
"role": "assistant",
"content": "I will demonstrate."
},
{
"role": "assistant",
"content": "Session shown. Headers persist across requests."
}
] |
[
{
"role": "user",
"content": "Review the main.py file for code quality issues."
},
{
"role": "assistant",
"content": "I will read the file and analyze it."
},
{
"role": "assistant",
"content": "Found 5 issues: 2 unused imports, 2 missing docstrings, 1 line too long."
}
] |
[
{
"role": "user",
"content": "Refactor the legacy code to use modern Python patterns."
},
{
"role": "assistant",
"content": "I will read the file and refactor it."
},
{
"role": "assistant",
"content": "Refactored to use dataclasses, type hints, and modern syntax."
}
] |
[
{
"role": "user",
"content": "Add input validation to the create_user endpoint."
},
{
"role": "assistant",
"content": "I will add Pydantic validators."
},
{
"role": "assistant",
"content": "Validation added. Endpoint now rejects invalid input."
}
] |
[
{
"role": "user",
"content": "Fix a typo in the documentation."
},
{
"role": "assistant",
"content": "I will find and fix the typo."
},
{
"role": "assistant",
"content": "Typo fixed. 'recieve' is now 'receive'."
}
] |
[
{
"role": "user",
"content": "Add comments to explain a complex function."
},
{
"role": "assistant",
"content": "I will add explanatory comments."
},
{
"role": "assistant",
"content": "Comments added. Function is now well-documented."
}
] |
[
{
"role": "user",
"content": "Optimize the slow query function."
},
{
"role": "assistant",
"content": "I will profile and optimize."
},
{
"role": "assistant",
"content": "Performance improved 5x with caching."
}
] |
[
{
"role": "user",
"content": "Add a new feature to export data as Excel."
},
{
"role": "assistant",
"content": "I will add the export feature."
},
{
"role": "assistant",
"content": "Excel export feature added."
}
] |
[
{
"role": "user",
"content": "Write a helper function for date formatting."
},
{
"role": "assistant",
"content": "I will create the helper."
},
{
"role": "assistant",
"content": "Helper function created and tested."
}
] |
[
{
"role": "user",
"content": "Fix the bug in the calculation function."
},
{
"role": "assistant",
"content": "I will investigate and fix."
},
{
"role": "assistant",
"content": "Bug fixed. Function now returns correct results."
}
] |
[
{
"role": "user",
"content": "Upgrade the package to the latest version."
},
{
"role": "assistant",
"content": "I will upgrade."
},
{
"role": "assistant",
"content": "Package upgraded to latest version."
}
] |
[
{
"role": "user",
"content": "Add logging to the application."
},
{
"role": "assistant",
"content": "I will configure logging."
},
{
"role": "assistant",
"content": "Logging is now active with file output."
}
] |
[
{
"role": "user",
"content": "Set up a daily cron job."
},
{
"role": "assistant",
"content": "I will add the cron entry."
},
{
"role": "assistant",
"content": "Daily cron job added at midnight."
}
] |
[
{
"role": "user",
"content": "Set up monitoring for the service."
},
{
"role": "assistant",
"content": "I will configure monitoring."
},
{
"role": "assistant",
"content": "Monitoring configured for the service."
}
] |
[
{
"role": "user",
"content": "Import a CSV file into the database."
},
{
"role": "assistant",
"content": "I will use pandas to import."
},
{
"role": "assistant",
"content": "Data imported. 1000 rows in the database."
}
] |
[
{
"role": "user",
"content": "Export database results as JSON."
},
{
"role": "assistant",
"content": "I will query and export."
},
{
"role": "assistant",
"content": "Results exported to output.json."
}
] |
[
{
"role": "user",
"content": "Validate the data against a schema."
},
{
"role": "assistant",
"content": "I will use jsonschema."
},
{
"role": "assistant",
"content": "Validation passed. Data is valid."
}
] |
[
{
"role": "user",
"content": "Clean the data by removing duplicates."
},
{
"role": "assistant",
"content": "I will clean and save."
},
{
"role": "assistant",
"content": "Data cleaned. Saved to clean.csv."
}
] |
[
{
"role": "user",
"content": "Transform the data format."
},
{
"role": "assistant",
"content": "I will transform and save."
},
{
"role": "assistant",
"content": "Data transformed to new format."
}
] |
[
{
"role": "user",
"content": "Aggregate sales by region."
},
{
"role": "assistant",
"content": "I will group and sum."
},
{
"role": "assistant",
"content": "Aggregated data saved."
}
] |
[
{
"role": "user",
"content": "Normalize the data values to 0-1 range."
},
{
"role": "assistant",
"content": "I will normalize."
},
{
"role": "assistant",
"content": "Data normalized and saved."
}
] |
[
{
"role": "user",
"content": "Join two tables on a common key."
},
{
"role": "assistant",
"content": "I will perform the join."
},
{
"role": "assistant",
"content": "Tables joined successfully."
}
] |
[
{
"role": "user",
"content": "Filter rows by a condition."
},
{
"role": "assistant",
"content": "I will filter."
},
{
"role": "assistant",
"content": "Filtered data saved."
}
] |
[
{
"role": "user",
"content": "Compute basic statistics."
},
{
"role": "assistant",
"content": "I will compute statistics."
},
{
"role": "assistant",
"content": "Statistics computed and shown."
}
] |
[
{
"role": "user",
"content": "Create a chart from the data."
},
{
"role": "assistant",
"content": "I will plot the data."
},
{
"role": "assistant",
"content": "Chart created and saved."
}
] |
[
{
"role": "user",
"content": "Take a random sample of the data."
},
{
"role": "assistant",
"content": "I will sample."
},
{
"role": "assistant",
"content": "Sample of 100 rows saved."
}
] |
[
{
"role": "user",
"content": "Create a pivot table view."
},
{
"role": "assistant",
"content": "I will pivot."
},
{
"role": "assistant",
"content": "Pivot table created."
}
] |
[
{
"role": "user",
"content": "Find all files modified in the last 7 days."
},
{
"role": "assistant",
"content": "I will search by mtime."
},
{
"role": "assistant",
"content": "Found 12 files modified in the last 7 days."
}
] |
[
{
"role": "user",
"content": "Count files by type in the project."
},
{
"role": "assistant",
"content": "I will count by extension."
},
{
"role": "assistant",
"content": "File count by type: py 145, json 23, md 18."
}
] |
[
{
"role": "user",
"content": "Check disk space available."
},
{
"role": "assistant",
"content": "I will check disk space."
},
{
"role": "assistant",
"content": "Disk space: 70GB free out of 200GB."
}
] |
[
{
"role": "user",
"content": "Create a backup of the project."
},
{
"role": "assistant",
"content": "I will create a tar archive."
},
{
"role": "assistant",
"content": "Backup archive created. 45MB."
}
] |
[
{
"role": "user",
"content": "Restore from a backup."
},
{
"role": "assistant",
"content": "I will extract the backup."
},
{
"role": "assistant",
"content": "Backup restored successfully."
}
] |
[
{
"role": "user",
"content": "Sync files between directories."
},
{
"role": "assistant",
"content": "I will use rsync."
},
{
"role": "assistant",
"content": "Files synced successfully."
}
] |
[
{
"role": "user",
"content": "Clean up old log files."
},
{
"role": "assistant",
"content": "I will remove old logs."
},
{
"role": "assistant",
"content": "Old logs removed. Space saved."
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.