Dataset Viewer
Auto-converted to Parquet Duplicate
messages
listlengths
3
3
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a Python module that models a small event scheduling system using dataclasses and advanced type hints. Define an immuta...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python class called LRUCache that stores a limited number of key-value pairs using the Least Recently Used policy. The...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python script that scrapes all product cards from https://books.toscrape.com/, following pagination across every catal...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python function `extract_valid_contacts(text)` that uses regular expressions to scan a block of text and return a list...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a function `remove_duplicates(head)` that takes the head of a singly linked list sorted in non-decreasing order and remo...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python script that asks the user to enter a system command, runs it safely using the subprocess module without invokin...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a Python class RateLimiter that enforces throttling using a sliding time window. The class should be initialized wit...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a Flask webhook handler for a payment provider. Create a POST /webhook endpoint that reads the raw request body, ver...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Build a reusable preprocessing pipeline for a tabular machine learning dataset. Given a pandas DataFrame `df` and the name of ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that asks the user to enter five test scores as numbers. Store the scores in a list, then calculate and...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that simulates a simple batch processing pipeline for customer orders. The program should take a list o...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python script that accepts a list of file paths and converts each one to an absolute, normalized path, removing redund...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that asks the user to enter 5 test scores as numbers. The program should calculate and display the mean...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that implements a Caesar cipher toolkit. Create two functions: one to encrypt a message by shifting alp...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python function `normalize_tracking_url(url: str) -> str` that parses a URL, removes common tracking query parameters ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a small plugin-based notification system using abstract base classes. Define an abstract base class `NotificationCha...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that starts a simple TCP server on localhost port 5000. The server should wait for one client connectio...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a function `top_k_error_sequences(logs, k)` that analyzes a list of application log records and returns the `k` most com...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a small event-driven notification system in Python. Implement an EventBus class that lets users subscribe callback func...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a small Python program that demonstrates both the singleton and registry patterns. Implement a Logger class as a single...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a function `analyze_access_logs(records)` that processes a list of access log tuples in the form `(user_id, resource, ac...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python function `parse_log_entries(text: str) -> list[dict]` that uses regular expressions to parse a multi-line appli...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that reads a binary file named input.bin and creates a new binary file named output.bin. The program sh...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement an advanced plugin architecture in Python for a text-processing pipeline. Create a PluginManager that supports dynam...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a simple BloomFilter class in Python for checking possible membership of strings. The class should be initialized wi...
[ { "role": "system", "content": "You are an expert Python programming assistant. You write clear, correct, well-documented code that follows the user's instructions." }, { "role": "user", "content": "Create a class that manages a simple machine learning experiment tracker for an AI platform. The ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a configuration loader for a payment service. Create a custom exception hierarchy rooted at ConfigError with these s...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python script that sends an email with both plain-text and HTML content using smtplib. Read SMTP host, port, username,...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a small Python module that defines a function `merge_unique_sorted(a, b)` which takes two sorted lists of integers and r...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that converts a list of user records between JSON and CSV serialization formats. Implement two function...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python function fetch_all_users(base_url, token) that acts as a robust REST API client for a paginated endpoint at GET...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a Python script for a small to-do list manager that lets the user enter several tasks with priority numbers, sorts the ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that asks the user for a directory path, checks whether the directory exists, and then lists all files ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a typed configuration registry using dataclasses. Define an immutable dataclass AppConfig with fields: name (str), r...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python class called LRUCache that stores a fixed number of key-value pairs using the Least Recently Used (LRU) rule. T...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Given a pandas DataFrame named df containing sales data with columns 'date', 'region', 'product', 'units_sold', and 'unit_pric...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a Python function serialize_record(record: dict, format_name: str) -> bytes and deserialize_record(data: bytes, form...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python script that sends a plain-text email to one or more recipients using smtplib. The script should define a reusab...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that creates a ZIP archive from a source directory. The program should define a function create_zip_arc...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a lazy round-robin merge generator for multiple input iterables. Write a function `round_robin(*iterables)` that yie...
[ { "role": "system", "content": "You are an expert Python programming assistant. You write clear, correct, well-documented code that follows the user's instructions." }, { "role": "user", "content": "Can you create a function in Python for a finance-sector fraud detection system that analyzes a l...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that calculates the total travel distance along a route defined by a list of GPS coordinates. Implement...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a small Python module with a function called is_even(number) that returns True if an integer is even and False otherwis...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a batch processing pipeline that reads a list of job dictionaries, validates required fields (id, payload, retries),...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python script that defines a simple Protocol Buffers message type at runtime with fields `id` (int32) and `name` (stri...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a function `min_pal_partition(s: str) -> int` that returns the minimum number of cuts needed to split a string into subs...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python function analyze_orders(orders) that processes a list of order records using list comprehensions and list opera...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python script that reads a JSON file named input.json containing a list of sales records. Each record has the fields: ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a Python CLI tool using argparse that reads a text file and counts lines, words, and characters. The program should acc...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a Python function `convert_ndjson_to_grouped_msgpack(input_path, output_path)` that reads a newline-delimited JSON (...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a Python program that defines a singly linked list and implements a method to append integers to the end of the list. T...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement an advanced configuration-merging utility using dataclasses and type hints. Define a frozen dataclass AppConfig with...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python function `render_invoice(template, data)` that renders a text invoice from a template string using named placeh...
[ { "role": "system", "content": "You are an expert Python programming assistant. You write clear, correct, well-documented code that follows the user's instructions." }, { "role": "user", "content": "Develop a module that analyzes CI/CD pipeline run logs from CSV files using Python and Pandas to ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a Python script that generates a synthetic monthly sales dataset for three product categories over 24 months, computes ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a class MaxQueueStackProcessor that processes a sequence of commands using both a stack and a queue, each supporting...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a small configuration model for a web service using advanced property and descriptor patterns. Implement a reusable des...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that asks the user to enter a sentence, then uses regular expressions to find and print all email addre...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a simple text editor using the Command pattern. Create command classes for inserting text and deleting the last N ch...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python script that sends a multipart email with both plain-text and HTML bodies using smtplib and email.message.EmailM...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a plugin manager for a data processing app using both the singleton and registry patterns. Create a singleton class ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python module that defines a function normalize_username(name: str) -> str and a set of pytest unit tests. The functio...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Implement a reusable memoization decorator using functools that caches function results with a bounded LRU cache and preserves...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Given a pandas DataFrame df with columns: order_id, customer_id, order_date, region, product, quantity, unit_price, and status...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a Python script that preprocesses a machine learning dataset using pandas and scikit-learn. The script should build a s...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Create a small Python program that simulates web framework routing patterns. Define a Router class that lets you register URL ...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that manages a small product catalog. Given a list of products where each product is represented as a t...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Given a list of positive integers nums and an integer target, write a function count_target_expressions(nums, target) that ret...
[ { "role": "system", "content": "You are a helpful assistant that writes clean, well-structured Python code to solve the user's request." }, { "role": "user", "content": "Write a Python program that manages a task queue using a min-heap. First read an integer n, then read n commands. Each command...
End of preview. Expand in Data Studio

Simulated Qwen Data

Fine-Tune your model with this data

Deploy Qwen for Fine Tuning or Inferece:

Deploy

Train your own Diffusion Models & Run Inference

Diffusion

Downloads last month
30