Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
5
24
source
stringclasses
3 values
question
stringlengths
118
2.08k
test_cases
listlengths
5
25
inferences
listlengths
16
16
context_messages
listlengths
1
1
evol_34140
evol
Given two integers, `low` and `high`, find all the Stepping Numbers within the range [low, high], inclusive. A Stepping Number is defined as an integer where the absolute difference between any two adjacent digits is exactly `1`. For each identified Stepping Number, compute the sum of its individual digits. Your task i...
[ "assert steppingNumbers(0, 21) == {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 1, 12: 3, 21: 3}", "assert steppingNumbers(10, 50) == {10: 1, 12: 3, 21: 3, 23: 5, 32: 5, 34: 7, 43: 7, 45: 9}", "assert steppingNumbers(0, 0) == {0: 0}", "assert steppingNumbers(0, 9) == {0: 0, 1: 1, 2: 2, 3: 3...
[ { "completion": "\nfrom collections import deque\n\ndef steppingNumbers(low, high):\n # Initialize a dictionary to store Stepping Numbers and their digit sums\n stepping_numbers = {}\n \n # Use a deque for breadth-first search\n queue = deque()\n for i in range(10):\n queue.append(i)\n ...
[ { "content": "Given two integers, `low` and `high`, find all the Stepping Numbers within the range [low, high], inclusive. A Stepping Number is defined as an integer where the absolute difference between any two adjacent digits is exactly `1`. For each identified Stepping Number, compute the sum of its individu...
oss_26511
oss
You are tasked with creating a Python function that simulates basic operations on a manifold. Specifically, you need to implement a function that takes a point and a distance, and returns a set of points that are within that distance from the original point on a one-dimensional manifold. The manifold is represented as ...
[ "assert points_within_distance(0.0, 1.0) == {0.0, -1.0, 1.0}", "assert points_within_distance(2.5, 0.5) == {2.5, 2.0, 3.0}", "assert points_within_distance(-1.0, 2.0) == {-1.0, -3.0, 1.0}", "assert points_within_distance(1.0, 0.0) == {1.0}", "assert points_within_distance(5.0, -1.0) == set()", "assert poi...
[ { "completion": "\ndef points_within_distance(point: float, distance: float) -> set:\n # If the distance is negative, return an empty set as no points can be within a negative distance\n if distance < 0:\n return set()\n \n # Calculate the range of points within the specified distance\n # ...
[ { "content": "You are tasked with creating a Python function that simulates basic operations on a manifold. Specifically, you need to implement a function that takes a point and a distance, and returns a set of points that are within that distance from the original point on a one-dimensional manifold. The manif...
evol_23363
evol
Implement a function `json_to_xml(json_string: str) -> str` that converts a given JSON string into its XML representation. The input JSON string will be well-formed. The function should return the XML string. In case of invalid JSON, the function should raise a `ValueError` with an appropriate error message. For exampl...
[ "assert json_to_xml('{\"example\": {\"a\": \"1\", \"b\": \"2\"}}') == '<root><example><a>1</a><b>2</b></example></root>'", "assert json_to_xml('{\"key\": \"value\"}') == '<root><key>value</key></root>'", "assert json_to_xml('{\"nested\": {\"level1\": {\"level2\": \"value\"}}}') == '<root><nested><level1><level2...
[ { "completion": "\nimport json\nfrom xml.etree.ElementTree import Element, SubElement, tostring\n\ndef json_to_xml(json_string: str) -> str:\n try:\n data = json.loads(json_string)\n except json.JSONDecodeError:\n raise ValueError('Invalid JSON input')\n\n def convert_to_xml(element_name:...
[ { "content": "Implement a function `json_to_xml(json_string: str) -> str` that converts a given JSON string into its XML representation. The input JSON string will be well-formed. The function should return the XML string. In case of invalid JSON, the function should raise a `ValueError` with an appropriate err...
evol_9755
evol
Given a string `input_str` and a list of characters `custom_list`, write a function `encrypt_string` that encrypts the input string by substituting each unique character in the string with a character from the custom list. The substitution should preserve the frequency of characters in the input string. If the custom l...
[ "assert encrypt_string('abc', ['x', 'y', 'z']) == 'xyz'", "assert encrypt_string('aaa', ['p', 'q']) == 'ppp'", "assert encrypt_string('openai', ['o', 'p', 'e', 'n', 'a', 'i']) == 'openai'", "assert encrypt_string('data', ['x', 'y', 'z', 'w']) == 'xyzy'", "assert encrypt_string('aaaaaa', ['a', 'b', 'c']) == ...
[ { "completion": "\ndef encrypt_string(input_str, custom_list):\n # Check if the custom list contains enough unique characters to map to each unique character in the input string\n if len(custom_list) < len(set(input_str)):\n raise Exception(\"Custom list must contain at least as many unique charact...
[ { "content": "Given a string `input_str` and a list of characters `custom_list`, write a function `encrypt_string` that encrypts the input string by substituting each unique character in the string with a character from the custom list. The substitution should preserve the frequency of characters in the input s...
evol_1064
evol
Write a function `fibonacci(n: int) -> List[int]` that returns a list of Fibonacci numbers less than the given number `n`. The Fibonacci sequence is defined as follows: the first two numbers are 0 and 1, and each subsequent number is the sum of the two preceding ones. If `n` is less than or equal to 0, return an empty ...
[ "assert fibonacci(0) == []", "assert fibonacci(5) == [0, 1, 1, 2, 3]", "assert fibonacci(6) == [0, 1, 1, 2, 3, 5]", "assert fibonacci(7) == [0, 1, 1, 2, 3, 5]", "assert fibonacci(8) == [0, 1, 1, 2, 3, 5]", "assert fibonacci(10) == [0, 1, 1, 2, 3, 5, 8]", "assert fibonacci(11) == [0, 1, 1, 2, 3, 5, 8]", ...
[ { "completion": "\nfrom typing import *\nfrom collections import *\n\ndef fibonacci(n: int) -> List[int]:\n # Check if the input number is less than or equal to 0\n if n <= 0:\n return []\n \n # Initialize the list with the first two Fibonacci numbers\n result = [0, 1]\n \n # Generat...
[ { "content": "Write a function `fibonacci(n: int) -> List[int]` that returns a list of Fibonacci numbers less than the given number `n`. The Fibonacci sequence is defined as follows: the first two numbers are 0 and 1, and each subsequent number is the sum of the two preceding ones. If `n` is less than or equal ...
evol_26901
evol
Implement a function `json_to_xml(json_obj: dict) -> str` that converts a given JSON object (in the form of a Python dictionary) into an XML string. The XML should reflect the structure of the JSON, with nested elements for dictionaries and repeated elements for lists. The function should return the XML string without ...
[ "assert json_to_xml({'person': {'name': 'John', 'age': 30}}) == '<person><name>John</name><age>30</age></person>'", "assert json_to_xml({'book': {'title': '1984', 'author': 'George Orwell'}}) == '<book><title>1984</title><author>George Orwell</author></book>'", "assert json_to_xml({'nested': {'level1': {'level2...
[ { "completion": "\nfrom xml.etree.ElementTree import Element, tostring\n\ndef json_to_xml(json_obj: dict) -> str:\n # Helper function to convert a single key-value pair to an XML element\n def to_xml_element(key, value):\n if isinstance(value, dict):\n # Create a parent element and recur...
[ { "content": "Implement a function `json_to_xml(json_obj: dict) -> str` that converts a given JSON object (in the form of a Python dictionary) into an XML string. The XML should reflect the structure of the JSON, with nested elements for dictionaries and repeated elements for lists. The function should return t...
evol_9367
evol
Write a Python function that takes a list of strings and a new specified string as input. The function should shuffle the list and replace the middle item with the new specified string. The function should return the modified list. If the list has an even number of items, replace the item at index len(list) // 2 - 1. T...
[ "assert shuffle_replace(['apple', 'banana', 'cherry'], 'orange') != ['apple', 'banana', 'cherry']", "assert 'orange' in shuffle_replace(['apple', 'banana', 'cherry'], 'orange')", "assert shuffle_replace(['dog', 'cat', 'mouse'], 'rabbit') != ['dog', 'cat', 'mouse']", "assert 'rabbit' in shuffle_replace(['dog',...
[ { "completion": "\nfrom typing import List\nimport random\n\ndef shuffle_replace(fruits: List[str], new_item: str) -> List[str]:\n # Shuffle the list of fruits\n random.shuffle(fruits)\n # Replace the middle item with the new specified string\n fruits[len(fruits) // 2] = new_item\n return fruits\...
[ { "content": "Write a Python function that takes a list of strings and a new specified string as input. The function should shuffle the list and replace the middle item with the new specified string. The function should return the modified list. If the list has an even number of items, replace the item at index...
bigcode_python_fns_9557
bigcode_python_fns
Given two binary inputs, create a function `xor_output(input1: int, input2: int) -> Tuple[int, int]` that returns the outputs of an XOR neural network. The output should be a tuple of two integers: the first output represents the XOR result of the inputs, and the second output is the negation of the first output. The i...
[ "assert xor_output(0, 0) == (0, 1)", "assert xor_output(0, 1) == (1, 0)", "assert xor_output(1, 0) == (1, 0)", "assert xor_output(1, 1) == (0, 1)", "assert xor_output(0, 0) == (0, 1)", "assert xor_output(1, 0) == (1, 0)", "assert xor_output(0, 1) == (1, 0)", "assert xor_output(1, 1) == (0, 1)", "ass...
[ { "completion": "\nfrom typing import Tuple\n\n# Define a function to calculate XOR and its negation\ndef xor_output(input1: int, input2: int) -> Tuple[int, int]:\n # Calculate the XOR of the two inputs\n xor_result = input1 ^ input2\n # Calculate the negation of the XOR result\n neg_xor_result = 1 ...
[ { "content": "Given two binary inputs, create a function `xor_output(input1: int, input2: int) -> Tuple[int, int]` that returns the outputs of an XOR neural network. The output should be a tuple of two integers: the first output represents the XOR result of the inputs, and the second output is the negation of t...
bigcode_python_fns_49474
bigcode_python_fns
You are tasked with creating a function that simulates a simple JSON response handler. Implement a function called `handle_json_response` that takes an argument `response` which can be either a valid JSON string or an invalid string. The function should return the parsed JSON object if the input is a valid JSON string,...
[ "assert handle_json_response('{\"key\": \"value\"}') == {'key': 'value'}", "assert handle_json_response('{\"name\": \"Alice\", \"age\": 30}') == {'name': 'Alice', 'age': 30}", "assert handle_json_response('Not a JSON') == None", "assert handle_json_response('{invalid_json}') == None", "assert handle_json_re...
[ { "completion": "\ndef handle_json_response(response):\n # Check if the response is a valid JSON string\n try:\n # Attempt to parse the JSON string\n return eval(response)\n except (SyntaxError, NameError):\n # Return None if parsing fails\n return None\n\n# Test cases to ve...
[ { "content": "You are tasked with creating a function that simulates a simple JSON response handler. Implement a function called `handle_json_response` that takes an argument `response` which can be either a valid JSON string or an invalid string. The function should return the parsed JSON object if the input i...
bigcode_python_fns_276
bigcode_python_fns
You are given a list of channel names and their corresponding frequencies. Your task is to create a function that checks whether the channels are ordered correctly based on their frequencies. The channels are considered ordered if they alternate between frequencies in the order they are presented. Implement the functio...
[ "assert check_channels_ordered(['S1_D1 760', 'S2_D1 760', 'S3_D1 760', 'S1_D1 850', 'S2_D1 850', 'S3_D1 850'], [760, 850]) == False", "assert check_channels_ordered(['S1_D1 850', 'S2_D1 850', 'S3_D1 850', 'S1_D1 760', 'S2_D1 760', 'S3_D1 760'], [850, 760]) == False", "assert check_channels_ordered(['S1_D1 760',...
[ { "completion": "\nfrom typing import List\n\ndef check_channels_ordered(ch_names: List[str], freqs: List[int]) -> bool:\n \"\"\"\n Check if the channel names are ordered correctly based on their frequencies.\n\n :param ch_names: List of channel names with their associated frequencies.\n :param freq...
[ { "content": "You are given a list of channel names and their corresponding frequencies. Your task is to create a function that checks whether the channels are ordered correctly based on their frequencies. The channels are considered ordered if they alternate between frequencies in the order they are presented....
oss_26987
oss
You are tasked with implementing a function `manage_key_value_store` that takes a list of operations on a key-value store and returns the result of these operations. The operations can be one of the following: 'add(key, value)', 'update(key, value)', 'get(key)', 'delete(key)', or 'get_all_keys()'. The function should r...
[ "assert manage_key_value_store(['add(name, Alice)', 'add(age, 25)', 'get(name)']) == ['Alice']", "assert manage_key_value_store(['add(name, Alice)', 'get(city)']) == [None]", "assert manage_key_value_store(['add(name, Alice)', 'delete(name)', 'get(name)']) == [None]", "assert manage_key_value_store(['add(name...
[ { "completion": "\ndef manage_key_value_store(operations):\n # Dictionary to store key-value pairs\n kv_store = {}\n \n # List to store results of get and get_all_keys operations\n results = []\n \n # Iterate over each operation in the list\n for op in operations:\n # Split the op...
[ { "content": "You are tasked with implementing a function `manage_key_value_store` that takes a list of operations on a key-value store and returns the result of these operations. The operations can be one of the following: 'add(key, value)', 'update(key, value)', 'get(key)', 'delete(key)', or 'get_all_keys()'....
oss_10886
oss
You are tasked with implementing a function to perform a soft parameter update for a neural network. Given a target network `targ_net` and a source network `net`, you need to update the parameters of the target network using a weighted average based on a given tau value. The formula for the update is: `new_param = (1 -...
[ "assert soft_copy([[0.0], [1.0]], [[2.0], [3.0]], 0.5) == [[1.0], [2.0]]", "assert soft_copy([[1.0]], [[2.0]], 0.0) == [[1.0]]", "assert soft_copy([[5.0], [5.0]], [[10.0], [10.0]], 1.0) == [[10.0], [10.0]]", "assert soft_copy([[0.0]], [[1.0]], 0.5) == [[0.5]]", "assert soft_copy([[2.0]], [[4.0]], 0.25) == [...
[ { "completion": "\ndef soft_copy(targ_net, net, tau):\n # Iterate over the parameters of the target and source networks\n for i in range(len(targ_net)):\n # Perform the soft parameter update using the given formula\n targ_net[i] = [(1 - tau) * targ_net[i][0] + tau * net[i][0]]\n # Return ...
[ { "content": "You are tasked with implementing a function to perform a soft parameter update for a neural network. Given a target network `targ_net` and a source network `net`, you need to update the parameters of the target network using a weighted average based on a given tau value. The formula for the update...
End of preview. Expand in Data Studio

TipCoder Training Data

Final SFT and RL training data for TipCoder: Reinforcement Learning Boosted Test-time Instruction Proposer for Code Generation, Findings of EMNLP 2026.

Code | RL proposer

Contents

Configuration File Records Bytes Serialization
sft sft/train.json 2,126 5,402,331 JSON array
rl rl/train.json 6,410 113,146,964 JSON Lines

These are the final files identified in the SFT and RL training job arguments. Only their published paths have changed. All source bytes, record ordering and fields are preserved; no samples have been removed or rewritten for release. The RL file retains its original .json suffix despite containing JSON Lines.

Fields

SFT: id, source, prompt, output, pass_rate. Each record pairs a proposer input with its supervised target. The stored pass-rate field is retained as training-data metadata, not a benchmark result for this release.

RL: id, source, question, test_cases, inferences, context_messages. Records include problem statements, executable tests, reference code-generation samples with their metadata, and conversational problem inputs. These support the execution-reward workflow described in the code repository.

Download and Read

hf download Minkow/TipCoder-Data --repo-type dataset --local-dir data/TipCoder

The two configurations can be loaded separately:

from datasets import load_dataset

sft = load_dataset("Minkow/TipCoder-Data", "sft", split="train")
rl = load_dataset("Minkow/TipCoder-Data", "rl", split="train")

For direct access without schema conversion:

import json
from pathlib import Path

root = Path("data/TipCoder")
sft = json.loads((root / "sft/train.json").read_text())
with (root / "rl/train.json").open() as stream:
    rl = [json.loads(line) for line in stream if line.strip()]

Source and License

The data derives from TIGER-Lab/AceCode-87K and the TipCoder data-construction pipeline. The release uses MIT, following AceCode, and retains the upstream copyright notice in LICENSE. Please credit both TipCoder and AceCoder when using the data.

Limitations

The files contain model-generated text and code, including illustrative local paths and test fixtures. Generated content may be incorrect. Do not execute code or tests outside an isolated environment without credentials or sensitive mounts. This dataset release does not include a new training or evaluation run.

Citation

@inproceedings{chen-etal-2026-tipcoder,
  title = "{T}ip{C}oder: Reinforcement Learning Boosted Test-time Instruction Proposer for Code Generation",
  author = "Chen, Minyu and Wu, Sihao and Wu, Ling-I and Qin, Song and Li, Jingyang and Ning, Lei and Xue, Jianxin and Li, Guoqiang",
  booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2026",
  year = "2026",
  pages = "10363--10377",
  url = "https://aclanthology.org/2026.findings-emnlp.495/"
}
Downloads last month
33