|
| 1 | +{"text": "Write a Python function that checks if a string is a valid IPv4 address.", "category": "python", "max_tokens": 512} |
| 2 | +{"text": "Generate a valid JSON object representing a user profile with name, email, age, and a list of 3 hobbies.", "category": "json", "max_tokens": 256} |
| 3 | +{"text": "Write a Python function to find the longest common subsequence of two strings.", "category": "python", "max_tokens": 512} |
| 4 | +{"text": "Here is a buggy function:\ndef fib(n):\n if n <= 1:\n return 1\n return fib(n-1) + fib(n-2)\nWhat is wrong with it? Fix it so fib(0)=0, fib(1)=1.", "category": "debugging", "max_tokens": 512} |
| 5 | +{"text": "Write a Python class called BankAccount with deposit, withdraw, and balance methods. Withdrawals should fail if insufficient funds.", "category": "python", "max_tokens": 512} |
| 6 | +{"text": "Generate a JSON array of 5 objects, each with fields: id (integer), name (string), score (float between 0 and 1), tags (array of strings).", "category": "json", "max_tokens": 512} |
| 7 | +{"text": "Write a Python function that merges two sorted lists into one sorted list without using the built-in sort.", "category": "python", "max_tokens": 512} |
| 8 | +{"text": "Complete this Python code:\nimport re\ndef extract_emails(text):\n \"\"\"Return all email addresses found in text.\"\"\"", "category": "completion", "max_tokens": 256} |
| 9 | +{"text": "Write a SQL query that finds the second highest salary from an employees table.", "category": "sql", "max_tokens": 256} |
| 10 | +{"text": "Here is buggy code:\ndef binary_search(arr, target):\n low, high = 0, len(arr)\n while low < high:\n mid = (low + high) // 2\n if arr[mid] == target:\n return mid\n elif arr[mid] < target:\n low = mid\n else:\n high = mid\n return -1\nThis has an infinite loop bug. Find and fix it.", "category": "debugging", "max_tokens": 512} |
| 11 | +{"text": "Write a Python generator function that yields prime numbers indefinitely.", "category": "python", "max_tokens": 512} |
| 12 | +{"text": "Generate a JSON Schema that validates an object with required fields: name (string, min 1 char), age (integer, min 0, max 150), email (string, format email).", "category": "json", "max_tokens": 512} |
| 13 | +{"text": "Write a Python decorator that caches function results (memoization) using a dictionary.", "category": "python", "max_tokens": 512} |
| 14 | +{"text": "Complete this code:\nclass Stack:\n def __init__(self):\n self._items = []\n \n def push(self, item):", "category": "completion", "max_tokens": 256} |
| 15 | +{"text": "Write a Python function that converts a Roman numeral string to an integer.", "category": "python", "max_tokens": 512} |
| 16 | +{"text": "Here is buggy code:\ndef flatten(lst):\n result = []\n for item in lst:\n if isinstance(item, list):\n result.extend(item)\n else:\n result.append(item)\n return result\nThis doesn't handle deeply nested lists. Fix it to work recursively.", "category": "debugging", "max_tokens": 512} |
| 17 | +{"text": "Write a Python async function that fetches 3 URLs concurrently using asyncio and aiohttp.", "category": "python", "max_tokens": 512} |
| 18 | +{"text": "Generate valid YAML for a Kubernetes deployment with 3 replicas of an nginx container on port 80.", "category": "yaml", "max_tokens": 512} |
| 19 | +{"text": "Write a Python function that implements the Levenshtein edit distance between two strings.", "category": "python", "max_tokens": 512} |
| 20 | +{"text": "Complete this code:\ndef parse_csv_line(line: str) -> list[str]:\n \"\"\"Parse a CSV line handling quoted fields with commas inside.\"\"\"", "category": "completion", "max_tokens": 512} |
| 21 | +{"text": "Write a Python context manager class that measures and prints execution time of a code block.", "category": "python", "max_tokens": 256} |
| 22 | +{"text": "Generate a JSON Web Token (JWT) payload with fields: sub, iat (unix timestamp for now), exp (1 hour from now), role, permissions array.", "category": "json", "max_tokens": 256} |
| 23 | +{"text": "Write a Python function that takes a nested dictionary and flattens it with dot-notation keys. Example: {'a': {'b': 1}} -> {'a.b': 1}", "category": "python", "max_tokens": 512} |
| 24 | +{"text": "Here is code with a subtle bug:\ndef unique_chars(s):\n return len(s) == len(set(s))\nDoes this work for all Unicode strings? What about combining characters?", "category": "debugging", "max_tokens": 512} |
| 25 | +{"text": "Write a Python function that validates whether a string of parentheses, brackets, and braces is balanced.", "category": "python", "max_tokens": 256} |
| 26 | +{"text": "Generate a JSON object representing an API error response following RFC 7807 (Problem Details).", "category": "json", "max_tokens": 256} |
| 27 | +{"text": "Write a Python function that implements run-length encoding. 'AAABBBCCCC' -> '3A3B4C'", "category": "python", "max_tokens": 256} |
| 28 | +{"text": "Write a Python type-annotated function that takes a list of dicts and groups them by a specified key.", "category": "python", "max_tokens": 512} |
| 29 | +{"text": "Complete this code to implement a simple LRU cache:\nclass LRUCache:\n def __init__(self, capacity: int):", "category": "completion", "max_tokens": 512} |
| 30 | +{"text": "Write a regular expression that matches valid email addresses. Explain each part.", "category": "python", "max_tokens": 512} |
| 31 | +{"text": "Here is buggy Python:\ndef quicksort(arr):\n if len(arr) <= 1:\n return arr\n pivot = arr[0]\n left = [x for x in arr if x < pivot]\n right = [x for x in arr if x > pivot]\n return quicksort(left) + [pivot] + quicksort(right)\nWhat happens with duplicate elements? Fix it.", "category": "debugging", "max_tokens": 512} |
| 32 | +{"text": "Write a Python function that converts a Python dictionary to a valid GraphQL query string.", "category": "python", "max_tokens": 512} |
| 33 | +{"text": "Generate a JSON array where each element is a date string in ISO 8601 format for every Monday in March 2026.", "category": "json", "max_tokens": 256} |
| 34 | +{"text": "Write a Python function that reads a file and returns the 10 most frequent words with their counts.", "category": "python", "max_tokens": 512} |
| 35 | +{"text": "Complete this async generator:\nasync def read_chunks(stream, chunk_size=1024):\n \"\"\"Yield chunks from an async byte stream.\"\"\"", "category": "completion", "max_tokens": 256} |
| 36 | +{"text": "Write a Python dataclass for a 2D Point with distance_to, midpoint, and __add__ methods.", "category": "python", "max_tokens": 512} |
| 37 | +{"text": "Write a one-liner Python list comprehension that generates all Pythagorean triples where a,b,c < 100.", "category": "python", "max_tokens": 256} |
| 38 | +{"text": "Generate a minimal valid HTML5 document with a title, a heading, a paragraph, and a link.", "category": "html", "max_tokens": 256} |
| 39 | +{"text": "Write a Python function that converts a flat list of parent-child pairs into a tree structure.", "category": "python", "max_tokens": 512} |
| 40 | +{"text": "Here is buggy code:\ndef safe_divide(a, b):\n try:\n return a / b\n except:\n return 0\nWhat are the problems with this error handling? Rewrite it properly.", "category": "debugging", "max_tokens": 512} |
| 41 | +{"text": "Write a Python function that implements the Sieve of Eratosthenes up to n.", "category": "python", "max_tokens": 256} |
| 42 | +{"text": "Generate a JSON object with intentionally tricky values: empty string, null, false, 0, empty array, nested nulls.", "category": "json", "max_tokens": 256} |
| 43 | +{"text": "Write a Dockerfile for a Python 3.11 FastAPI app that listens on port 8000.", "category": "devops", "max_tokens": 256} |
| 44 | +{"text": "Write a Python function that takes markdown text and extracts all URLs from it.", "category": "python", "max_tokens": 256} |
| 45 | +{"text": "Complete this:\ndef retry(max_attempts=3, delay=1.0):\n \"\"\"Decorator that retries a function on exception.\"\"\"", "category": "completion", "max_tokens": 512} |
| 46 | +{"text": "Write a Python function that serializes a datetime object to ISO 8601 string and deserializes it back, handling timezone-aware and naive datetimes.", "category": "python", "max_tokens": 512} |
| 47 | +{"text": "What does this code print and why?\nx = [1, 2, 3]\ny = x\ny.append(4)\nprint(x)", "category": "debugging", "max_tokens": 256} |
| 48 | +{"text": "Write a Python function that implements consistent hashing for distributing keys across N nodes.", "category": "python", "max_tokens": 512} |
| 49 | +{"text": "Generate a JSON-LD object representing a Person with name, job title, and employer according to schema.org.", "category": "json", "max_tokens": 256} |
0 commit comments