data_source
large_stringclasses
1 value
prompt
listlengths
1
1
ability
large_stringclasses
1 value
reward_model
dict
extra_info
dict
acecode
[ { "role": "user", "content": "You are tasked with processing a given title and body text. Write a function `process_text(title: str, body: str) -> str` that takes in two strings, `title` and `body`, and returns a single string that concatenates the title and body separated by a space. Ensure that there are ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_text('Hello', 'World') == 'Hello World'\", \"assert process_text(' Leading Space', 'Body text') == 'Leading Space Body text'\", \"assert process_text('Title', ' Trailing Space ') == 'Title Trailing Space'\", \"assert process_text('SingleWord', 'An...
{ "split": "train", "index": 67100, "acecode_id": "bigcode_python_fns_10", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a dictionary representing a response from a Discord API. The function should extract specific information from the response and modify it based on optional keyword arguments. The response dictionary contains a status...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_discord_response({'status': 400, 'error': 'discord_disabled_regularchannel_not_exists'}, msg='Custom error message') == {'status': 400, 'error': 'Custom error message'}\", \"assert process_discord_response({'status': 404, 'error': 'not_found'}, chann...
{ "split": "train", "index": 67101, "acecode_id": "oss_27403", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given an array of integers, write a function `singleton_positions(arr)` that returns a list of indices of the elements that appear only once in the array. An element is considered a singleton if it does not repeat in the entire array, which may include negative integers, positi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert singleton_positions([10, 20, 10, 30, 40, 50, 20]) == [3, 4, 5]\", \"assert singleton_positions([1, 2, 3, 4, 5]) == [0, 1, 2, 3, 4]\", \"assert singleton_positions([]) == []\", \"assert singleton_positions([1, 1, 2, 3, 3, 4, 4]) == [2]\", \"assert singleton_p...
{ "split": "train", "index": 67102, "acecode_id": "evol_14839", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string represents the path of a music file. Your task is to implement a function that takes this list of music file paths and a file path for a local storage (output path) as inputs. The function should write each music path to the sp...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert write_music_file('output1.txt', ['song1.mp3', 'song2.mp3', 'song3.mp3']) is None\", \"assert write_music_file('output2.txt', ['track1.wav', 'track2.wav']) is None\", \"assert write_music_file('output3.txt', ['music.mp3']) is None\", \"assert write_music_file...
{ "split": "train", "index": 67103, "acecode_id": "bigcode_python_fns_37605", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers `numbers` which is sorted in non-decreasing order. However, the list might contain duplicates. Your task is to implement a function `find_minimum` that takes in the list of integers `numbers` and returns the smallest integer from the list. If th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_minimum([1, 3, 5]) == 1\", \"assert find_minimum([4, 5, 6, 7, 8]) == 4\", \"assert find_minimum([7, 8, 9, 10, 10, 10]) == 7\", \"assert find_minimum([1, 1, 1, 1, 1]) == 1\", \"assert find_minimum([0, 0, 0, 0]) == 0\", \"assert find_minimum([10, 20, 20, ...
{ "split": "train", "index": 67104, "acecode_id": "oss_31319", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Implement a function that takes two lists of integers: an existing list and a new list of integers. The function should append the new list to the existing list and then return a new list that contains the elements of the combined list shuffled in a random order. The two input ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert append_and_shuffle([2, 4, 6, 8, 10], [1, 3, 5, 7, 9]) != [2, 4, 6, 8, 10, 1, 3, 5, 7, 9]\", \"assert len(append_and_shuffle([], [1, 2, 3, 4, 5])) == 5\", \"assert sorted(append_and_shuffle([1, 2, 3], [4, 5])) == sorted([1, 2, 3, 4, 5])\", \"assert append_and...
{ "split": "train", "index": 67105, "acecode_id": "evol_2988", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that simulates a simple banking operation. The function should take the initial balance, a list of deposit amounts, and a list of withdrawal amounts, and return the final balance after performing all the deposits and withdrawal...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert bank_account_operations(1000, [200, 300], [100]) == 1400\", \"assert bank_account_operations(100, [], []) == 100\", \"assert bank_account_operations(0, [100], [50]) == 50\", \"assert bank_account_operations(1000, [500, 500], [300, 900]) == 800\", \"assert ba...
{ "split": "train", "index": 67106, "acecode_id": "oss_16177", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with analyzing a hypnogram, which is a list of integers representing the sleep stages experienced by an individual over a period of time. The sleep stages are defined as follows: 0 for wakefulness, 1 for N1, 2 for N2, 3 for N3, and 4 for REM sleep. Your goal is t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert analyze_hypnogram([0, 1, 2, 3, 4, 2, 1, 0, 1, 2]) == (3, 80.0)\", \"assert analyze_hypnogram([2, 2, 2, 2, 2]) == (5, 100.0)\", \"assert analyze_hypnogram([0, 0, 0, 0, 0]) == (0, 0.0)\", \"assert analyze_hypnogram([1, 1, 1, 1, 1]) == (0, 100.0)\", \"assert an...
{ "split": "train", "index": 67107, "acecode_id": "oss_25042", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Design and implement a hybrid sorting algorithm that takes a list of integers and sorts it in ascending order. The algorithm should be efficient for large, unordered lists of integer data types with frequent repetitions. Implement a single function `hybrid_sort(arr: List[int]) ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert hybrid_sort([3, 2, 1]) == [1, 2, 3]\", \"assert hybrid_sort([5, 5, 5, 5, 5]) == [5, 5, 5, 5, 5]\", \"assert hybrid_sort([1, 3, 2, 4, 3, 1]) == [1, 1, 2, 3, 3, 4]\", \"assert hybrid_sort([]) == []\", \"assert hybrid_sort([10]) == [10]\", \"assert hybrid_sort(...
{ "split": "train", "index": 67108, "acecode_id": "evol_20109", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a Python dictionary representing a color and its corresponding RGB values. The dictionary is incomplete, containing keys that are meant to represent the RGB values but currently have placeholder integer values. Your task is to complete the dictionary by replacing ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert complete_rgb_values({'Blue': {'2': 0, '5': 0, '8': 255}}) == {'Blue': {'2': [0, 0, 255], '5': [0, 0, 255], '8': [0, 0, 255]}}\", \"assert complete_rgb_values({'Blue': {'1': 0, '3': 0, '7': 255}}) == {'Blue': {'1': [0, 0, 255], '3': [0, 0, 255], '7': [0, 0, 2...
{ "split": "train", "index": 67109, "acecode_id": "oss_20704", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of spline objects represented by their coefficients and knots. Each spline has a degree `k`. Your task is to implement a function `extract_spline_info(splines: List[Tuple[List[float], List[float]]], k: int) -> Tuple[List[List[float]], List[float]]` that ext...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_spline_info([([1, 2, 3], [0, 1, 2]), ([4, 5, 6], [1, 2, 3])], 2) == ([[1, 2, 3], [4, 5, 6]], [0, 1, 2, 3])\", \"assert extract_spline_info([([1], [0])], 1) == ([[1]], [0])\", \"assert extract_spline_info([([2, 3], [0, 1]), ([3, 4], [1, 2])], 1) == ([...
{ "split": "train", "index": 67110, "acecode_id": "bigcode_python_fns_37795", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a string representation of a JSON object and returns a dictionary. The JSON string will be well-formed and will not contain any nested JSON objects or arrays. Implement the function `parse_json(json_string: str) -> dict` th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_json('{\\\"key\\\": \\\"value\\\", \\\"number\\\": 10, \\\"isTrue\\\": true}') == {'key': 'value', 'number': 10, 'isTrue': True}\", \"assert parse_json('{\\\"name\\\": \\\"Alice\\\", \\\"age\\\": 30, \\\"isStudent\\\": false}') == {'name': 'Alice', 'ag...
{ "split": "train", "index": 67111, "acecode_id": "bigcode_python_fns_28199", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `generate_unique_randoms(num: int, start: int, end: int) -> List[int]` that generates a list of `num` unique random integers within the specified range from `start` to `end`, inclusive. The function should return the list sorted in ascending order. If it's not ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_unique_randoms(0, 1, 10) == []\", \"assert generate_unique_randoms(2, 1, 3) == [1, 2]\", \"assert generate_unique_randoms(10, 1, 10) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\", \"assert generate_unique_randoms(5, 1, 5) == [1, 2, 3, 4, 5]\", \"assert gener...
{ "split": "train", "index": 67112, "acecode_id": "evol_26330", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given two lists of strings representing lines of text, write a function that finds the first line where the two lists differ. If the lists are identical, return 'No differences'. If the lists differ, return a formatted string indicating the line number of the difference and sho...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert first_difference(['line1', 'line2', 'line3'], ['line1', 'line2', 'line3']) == 'No differences'\", \"assert first_difference(['abc', 'def'], ['abc', 'def']) == 'No differences'\", \"assert first_difference([], []) == 'No differences'\", \"assert first_differe...
{ "split": "train", "index": 67113, "acecode_id": "bigcode_python_fns_23111", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that validates a list of integer values against a specified range. The function should take two parameters: a list of integers `values` and a tuple `range_tuple` that specifies the inclusive lower and upper bounds of the range. The functi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_values([1, 2, 3], (0, 3)) == []\", \"assert validate_values([1, 2, 3, 4], (0, 3)) == ['Index 3: Value 4 out of range (0 to 3)']\", \"assert validate_values([-1, 0, 1], (0, 1)) == ['Index 0: Value -1 out of range (0 to 1)']\", \"assert validate_value...
{ "split": "train", "index": 67114, "acecode_id": "oss_4031", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `factorial(n: int) -> int` that calculates the factorial of a given non-negative integer n. The factorial of a non-negative integer n is the product of all positive integers less than or equal to n. If n is 0, the factorial should return 1. If n is negative, re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert factorial(0) == 1\", \"assert factorial(1) == 1\", \"assert factorial(2) == 2\", \"assert factorial(3) == 6\", \"assert factorial(4) == 24\", \"assert factorial(5) == 120\", \"assert factorial(6) == 720\", \"assert factorial(7) == 5040\", \"assert factorial(...
{ "split": "train", "index": 67115, "acecode_id": "evol_29626", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of numerical inputs, implement a function that computes the product of their absolute values, after rounding down to the nearest integer. Any values exceeding 100 should be excluded from the computation. Write a function `compute_absolute_product(lst)` that takes a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compute_absolute_product([2, -3, 4]) == 24\", \"assert compute_absolute_product([1.5, 4.8, -2.2]) == 12\", \"assert compute_absolute_product([1, -5, 9, -3]) == 135\", \"assert compute_absolute_product([-100, 100, 100]) == 1000000\", \"assert compute_absolute...
{ "split": "train", "index": 67116, "acecode_id": "evol_26594", "num_tests": 11 }
acecode
[ { "role": "user", "content": "In physics, the distance traveled by an object can be calculated using the formula: distance = v * t + 0.5 * a * t², where v is the initial velocity, t is the time in seconds, and a is the acceleration. Your task is to implement a Python function named `calculate_distance` that...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_distance(0, 10, 0) == 0.0\", \"assert calculate_distance(10, 2, 0) == 20.0\", \"assert calculate_distance(5, 3, 0) == 15.0\", \"assert calculate_distance(1, 0, 0) == 0.0\", \"assert calculate_distance(0, 0, 0) == 0.0\", \"assert calculate_distance(...
{ "split": "train", "index": 67117, "acecode_id": "evol_28324", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given two lists of closed intervals, `firstList` and `secondList`, where `firstList[i] = [starti, endi]` and `secondList[j] = [startj, endj]`. Each list of intervals is pairwise disjoint and in sorted order. Implement a function `interval_intersection(firstList, secondL...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert interval_intersection([[1,3],[5,9]], []) == ([], 0)\", \"assert interval_intersection([], [[4,8],[10,12]]) == ([], 0)\", \"assert interval_intersection([[1,2],[3,4]], [[2,3],[4,5]]) == ([[2,2],[3,3],[4,4]], 3)\", \"assert interval_intersection([[1,5]], [[2,3...
{ "split": "train", "index": 67118, "acecode_id": "evol_22437", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are given a list of binary numbers represented as strings. Your task is to implement a function that converts each binary number in the list to its hexadecimal representation. The hex values should be returned in a list, with each hex value as a lowercase string prefixed wi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_binary_to_hex(['1010', '1101']) == ['0a', '0d']\", \"assert convert_binary_to_hex(['0001', '0010', '0011']) == ['01', '02', '03']\", \"assert convert_binary_to_hex(['10000000']) == ['80']\", \"assert convert_binary_to_hex(['1001', '1010', '1100', '11...
{ "split": "train", "index": 67119, "acecode_id": "oss_13556", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the expected values of a certain process. Your task is to implement a function to sort the list of expected values in non-decreasing order using a custom sorting algorithm. You cannot use any built-in sorting functions or libraries....
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert customSort([5, 2, 8, 1, 3]) == [1, 2, 3, 5, 8]\", \"assert customSort([3, 1, 4, 1, 5]) == [1, 1, 3, 4, 5]\", \"assert customSort([10, -1, 2, 0]) == [-1, 0, 2, 10]\", \"assert customSort([]) == []\", \"assert customSort([2]) == [2]\", \"assert customSort([1, ...
{ "split": "train", "index": 67120, "acecode_id": "oss_33983", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that concatenates a list of strings into a single string, with a specified delimiter between each element. Write a function called `join_with_delimiter` that takes two parameters: - `strings` (list of strings): A list of strings to be...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert join_with_delimiter(['Hello', 'World'], ', ') == 'Hello, World'\", \"assert join_with_delimiter(['one', 'two', 'three'], '-') == 'one-two-three'\", \"assert join_with_delimiter(['apple', 'banana', 'cherry'], ' and ') == 'apple and banana and cherry'\", \"ass...
{ "split": "train", "index": 67121, "acecode_id": "oss_2103", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple elevator control system in Python. The elevator system should be able to handle requests to move the elevator up or down, and should also be able to report the current floor it is on. You need to implement a function `elevator_control(t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert elevator_control(5, ['up', 'up', 'down']) == 1\", \"assert elevator_control(10, ['up', 'up', 'up', 'down', 'down']) == 1\", \"assert elevator_control(0, ['up']) == 0\", \"assert elevator_control(1, ['down', 'down']) == 0\", \"assert elevator_control(2, ['up'...
{ "split": "train", "index": 67122, "acecode_id": "oss_24963", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that takes a list of integers and returns a new list containing only the even integers from the original list. The function should maintain the order of the even integers as they appear in the input list. If the input list is empty...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_even_numbers([1, 2, 3, 4, 5, 6]) == [2, 4, 6]\", \"assert filter_even_numbers([10, 15, 20, 25]) == [10, 20]\", \"assert filter_even_numbers([1, 3, 5]) == []\", \"assert filter_even_numbers([]) == []\", \"assert filter_even_numbers([-2, -1, 0, 1, 2]) =...
{ "split": "train", "index": 67123, "acecode_id": "oss_17619", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, floats, and complex numbers, implement a function that calculates the trimmed mean of the elements in the list without sorting the list and while handling negative integers and complex numbers. The function should take in a trim percentage which indica...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert trimmed_mean([3, 1, 2, 4, 5], 0.2) == 3.0\", \"assert trimmed_mean([1, 2, 3, 4, 5], 1.0) == None\", \"assert trimmed_mean([2, 2.5, 3, 3.5, 4, 4.5], 0.33) == 3.25\", \"assert trimmed_mean([-1, -2, -3, -4, -5], 0.4) == -3.0\", \"assert trimmed_mean([1, 2, 3, 4...
{ "split": "train", "index": 67124, "acecode_id": "evol_12664", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You have been asked to implement a function that processes supplier details from a given dictionary. The function should take a dictionary called 'sup_details' as input and return a new dictionary with specific details extracted from the input. The input dictionary may contain ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_supplier_details({'supplier_gstin': '12ABCDE3456F7G8', 'ctin': '23XYZ4567H8I9J0', 'ISD': 'Other Details Amended'}) == {'Supplier GSTIN': '12ABCDE3456F7G8', 'Invoice Type': 'ISD Invoice', 'CTIN': '23XYZ4567H8I9J0', 'ISD Type': 'Other Details Amended'}...
{ "split": "train", "index": 67125, "acecode_id": "oss_4826", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a basic music player interface. Your function should take the following inputs: an action string that can either be 'play', 'stop', or 'volume', and an optional value for the volume (an integer between 0 and 100). The f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert music_player_interface('play') == 'Music is now playing'\", \"assert music_player_interface('stop') == 'Music has stopped'\", \"assert music_player_interface('volume', 50) == 'Volume set to 50'\", \"assert music_player_interface('volume', 0) == 'Volume set t...
{ "split": "train", "index": 67126, "acecode_id": "oss_5101", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with analyzing a grayscale image represented as a 2D list of integers, where each integer corresponds to a pixel value (0-255). Your goal is to implement a function that calculates the following metrics from the image: the percentage of pixels that are background...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert analyze_image([[255, 255], [255, 255]]) == {'background_percentage': 0.0, 'max_pixel': 255, 'min_pixel': 255, 'average_pixel': 255.0}\", \"assert analyze_image([[0, 0], [0, 0]]) == {'background_percentage': 100.0, 'max_pixel': 0, 'min_pixel': 0, 'average_pix...
{ "split": "train", "index": 67127, "acecode_id": "bigcode_python_fns_6693", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_prime(num: int) -> str` that determines whether a provided integer is classified as 'Prime' or 'Composite'. A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. A composite number is a natur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_prime(1) == 'Composite'\", \"assert is_prime(2) == 'Prime'\", \"assert is_prime(3) == 'Prime'\", \"assert is_prime(4) == 'Composite'\", \"assert is_prime(5) == 'Prime'\", \"assert is_prime(6) == 'Composite'\", \"assert is_prime(7) == 'Prime'\", \"assert i...
{ "split": "train", "index": 67128, "acecode_id": "evol_15370", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Develop a function that identifies the longest common subsequence shared among four string sequences. The function should be able to process special characters, numerical values, Unicode characters, and emojis within the string sequences. Additionally, the function should handl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longest_common_subsequence('abc', 'abc', 'abc', 'abc') == 3\", \"assert longest_common_subsequence('abc', 'ab', 'a', 'abc') == 1\", \"assert longest_common_subsequence('abc', 'def', 'ghi', 'jkl') == 0\", \"assert longest_common_subsequence('123', '12345', '1...
{ "split": "train", "index": 67129, "acecode_id": "evol_27568", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with creating a simple function that generates a greeting message based on a user’s name. The function should accept a single parameter, `name`, which is a string representing the user's name. The function should return a JSON-like dictionary containing the greet...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert greeting_message('Alice') == {'message': 'Hello, Alice! Welcome to our application!'}\", \"assert greeting_message('Bob') == {'message': 'Hello, Bob! Welcome to our application!'}\", \"assert greeting_message('') == {'message': 'Hello, Guest! Welcome to our ...
{ "split": "train", "index": 67130, "acecode_id": "oss_746", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with updating a configuration dictionary for a web application based on certain parameters. Write a Python function `update_config` that takes the following parameters: \n- `data`: a dictionary representing the JSON configuration data. \n- `aadTenant`: a string r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_config({}, '', '') == {'Authentication': {'JWTSigningCertificate': {'StoreLocation': 'CurrentUser', 'SubjectName': 'CN=LOCALHOST'}, 'AzureActiveDirectory': {}}}\", \"assert update_config({'Authentication': {}}, 'tenant', 'clientId') == {'Authenticatio...
{ "split": "train", "index": 67131, "acecode_id": "oss_34519", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that identifies the presence of specific offensive words in a given text. The function should accept a string of text and a boolean flag indicating whether to include duplicate occurrences of the profane words in the output. The function ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_profanity('This is a bad example.', False) == ['bad']\", \"assert get_profanity('This is a bad bad example.', True) == ['bad', 'bad']\", \"assert get_profanity('Nothing ugly here.', False) == ['ugly']\", \"assert get_profanity('Nothing ugly ugly here.', ...
{ "split": "train", "index": 67132, "acecode_id": "bigcode_python_fns_269", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `get_filtered_products` that takes two parameters: `page` (an integer) and `items_per_page` (an integer). The function should return a list of products from a predefined list where the product ID begins with the letter 'X', sorted in descending order by pur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_filtered_products(1, 2) == [{'product_id': 'X123', 'purchase_count': 10}, {'product_id': 'X456', 'purchase_count': 5}]\", \"assert get_filtered_products(1, 1) == [{'product_id': 'X123', 'purchase_count': 10}]\", \"assert get_filtered_products(1, 3) == [{...
{ "split": "train", "index": 67133, "acecode_id": "evol_5614", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an unsorted list of integers and a target integer, implement a function in Python that utilizes a Binary Search algorithm to find if the target integer exists in the list. If it does exist, return the index of where it is located. If it does not exist, return -1. The func...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert binary_search([4, 7, 3, 6, 9, 12, 5], 0, 6, 11) == -1\", \"assert binary_search([1, 3, 5, 7, 9], 0, 4, 5) == 2\", \"assert binary_search([10, 20, 30, 40, 50], 0, 4, 10) == 0\", \"assert binary_search([50, 40, 30, 20, 10], 0, 4, 25) == -1\", \"assert binary_s...
{ "split": "train", "index": 67134, "acecode_id": "evol_7021", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary called `saved_flag_values` where each key is a string representing a flag name, and each value is another dictionary representing the properties of that flag, including a key `_value` which indicates the current value of the flag. Your task is to impl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert restore_flag_values({'flag1': {'_value': 10}, 'flag2': {'_value': 20}}, {'flag1': {'_value': 5}, 'flag2': {'_value': 20}}) == {'flag1': {'_value': 10}, 'flag2': {'_value': 20}}\", \"assert restore_flag_values({'flag1': {'_value': 30}}, {'flag1': {'_value': 3...
{ "split": "train", "index": 67135, "acecode_id": "bigcode_python_fns_11341", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that checks if all the keys in a provided dictionary are either all in lower case or all in upper case. The function should return False for empty dictionaries and for any dictionary containing a mix of lower and upper case keys. Implement the function with the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_dict_case({}) == False\", \"assert check_dict_case({'a': 1}) == True\", \"assert check_dict_case({'A': 1}) == True\", \"assert check_dict_case({'a': 1, 'b': 2}) == True\", \"assert check_dict_case({'A': 1, 'B': 2}) == True\", \"assert check_dict_case({...
{ "split": "train", "index": 67136, "acecode_id": "evol_13331", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of N unique integers, implement a function 'complex_sort' that attempts to sort the list in ascending order by applying the following operations sequentially: 1. Reverse the order of any subset of the list one or more times. 2. Remove either one or two elements fro...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert complex_sort([1, 2, 3, 5, 4]) == [1, 2, 3, 4, 5]\", \"assert complex_sort([5, 4, 3, 1, 2]) == [5, 4, 3, 1, 2]\", \"assert complex_sort([10, 20, 30, 40, 50]) == [10, 20, 30, 40, 50]\", \"assert complex_sort([-3, -2, -1, 0, 1]) == [-3, -2, -1, 0, 1]\", \"asser...
{ "split": "train", "index": 67137, "acecode_id": "evol_32468", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string that represents a filename. Your task is to implement a function that determines the type of file based on its extension. The function should return 'vtk' if the filename ends with '.vtk', return 'vtp' if it ends with '.vtp', and return 'error' if the fil...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_file_type('data.vtk') == 'vtk'\", \"assert get_file_type('model.vtp') == 'vtp'\", \"assert get_file_type('image.png') == 'error'\", \"assert get_file_type('document.txt') == 'error'\", \"assert get_file_type('archive.vtk') == 'vtk'\", \"assert get_file_t...
{ "split": "train", "index": 67138, "acecode_id": "bigcode_python_fns_8436", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lists of integers, `hex_prisms` and `base_prisms`, and a list of integers `partition_indices`, your task is to implement a function that partitions the `hex_prisms` and `base_prisms` into sub-lists based on the `partition_indices`. The function should return a list of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert partition_models([1], [2], [0]) == [[1, 2]]\", \"assert partition_models([7, 8, 9], [10, 11, 12], [1, 1, 0]) == [[9, 12], [7, 10, 8, 11]]\", \"assert partition_models([1, 2], [3, 4], [2, 2]) == [[], [], [1, 3, 2, 4]]\", \"assert partition_models([100, 200], ...
{ "split": "train", "index": 67139, "acecode_id": "bigcode_python_fns_42837", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `create_admin_nova_client` that takes a string parameter `context` representing the context for creating a client. The function should return a string representing a client identifier for the nova admin. The client identifier is generated...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_admin_nova_client('test_context') == 'test_context_nova_admin_client_secure_password'\", \"assert create_admin_nova_client('admin') == 'admin_nova_admin_client_secure_password'\", \"assert create_admin_nova_client('user1') == 'user1_nova_admin_client_...
{ "split": "train", "index": 67140, "acecode_id": "bigcode_python_fns_22474", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a date represented as a string in the format 'YYYY-MM-DD', write a function `end_of_next_month(date_str: str) -> str` that returns the last date of the month following the month of the given date. The returned date should also be in the format 'YYYY-MM-DD'. For example, i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert end_of_next_month('2023-02-15') == '2023-03-31'\", \"assert end_of_next_month('2023-04-15') == '2023-05-31'\", \"assert end_of_next_month('2023-06-15') == '2023-07-31'\", \"assert end_of_next_month('2023-07-15') == '2023-08-31'\", \"assert end_of_next_month(...
{ "split": "train", "index": 67141, "acecode_id": "bigcode_python_fns_4335", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that simulates the activation of a virtual environment and the execution of a script. The function should take two parameters: `env_name` (a string representing the name of the virtual environment) and `script_name` (a string repre...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert execute_script_in_virtual_env('frozen-pie', 'valid_script.py') == 'Script executed successfully in frozen-pie'\", \"assert execute_script_in_virtual_env('frozen-pie', 'valid_script_2.py') == 'Script executed successfully in frozen-pie'\", \"assert execute_sc...
{ "split": "train", "index": 67142, "acecode_id": "oss_19058", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given two strings: 'line1' and 'line2'. Your task is to concatenate these two strings, ensuring that 'line1' is followed by a newline character, and 'line2' is appended immediately after without any additional newline. Implement a function that takes these two strings a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert concatenate_lines('Primera l\\u00ednea', 'Segunda l\\u00ednea') == 'Primera l\\u00ednea\\\\nSegunda l\\u00ednea'\", \"assert concatenate_lines('Hello', 'World') == 'Hello\\\\nWorld'\", \"assert concatenate_lines('First line', 'Second line') == 'First line\\\...
{ "split": "train", "index": 67143, "acecode_id": "oss_13364", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `string_compression(s: str) -> str` that takes a string `s` as input and compresses it by removing consecutive duplicate characters. The function should return a new string where each group of consecutive identical characters is replaced by the character fo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert string_compression('aabcccccaaa') == 'a2b1c5a3'\", \"assert string_compression('abc') == 'a1b1c1'\", \"assert string_compression('xxyyyzzzzz') == 'x2y3z5'\", \"assert string_compression('aaa') == 'a3'\", \"assert string_compression('a') == 'a1'\", \"assert s...
{ "split": "train", "index": 67144, "acecode_id": "evol_2136", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `validate_user_info(email: str, phone_number: str) -> Tuple[bool, bool]` that takes an email address and a phone number as input and returns a tuple containing two boolean values. The first boolean indicates whether the email is valid according to the standard ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_user_info('test@example.com', '(123) 456-7890') == (True, True)\", \"assert validate_user_info('invalid-email', '(123) 456-7890') == (False, True)\", \"assert validate_user_info('test@example.com', '123-456-7890') == (True, True)\", \"assert validat...
{ "split": "train", "index": 67145, "acecode_id": "evol_31796", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of chip IDs and a range of days. Your task is to determine if there are chips that have a valid feature set to train a model. A chip is considered valid if it is present in the given list and its corresponding feature value is not equal to 0 or 9. Implement...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert valid_chip_ids([0, 1, 2, 9], 1, 5) == [1, 2]\", \"assert valid_chip_ids([9, 0, 9, 0], 1, 5) == []\", \"assert valid_chip_ids([10, 9, 10, 11], 1, 5) == [10, 11]\", \"assert valid_chip_ids([], 1, 5) == []\", \"assert valid_chip_ids([0, 9], 1, 5) == []\", \"ass...
{ "split": "train", "index": 67146, "acecode_id": "bigcode_python_fns_19423", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Alice and Bob play a game starting with a number `n` on the chalkboard. Alice goes first. On each player's turn, they must choose a number `x` such that `0 < x < n` and `n % x == 0`. However, if `n` is a prime number, the chosen `x` must also be a prime number. The game continu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert divisorGame(2) == True\", \"assert divisorGame(3) == False\", \"assert divisorGame(4) == True\", \"assert divisorGame(5) == False\", \"assert divisorGame(6) == True\", \"assert divisorGame(7) == False\", \"assert divisorGame(8) == True\", \"assert divisorGam...
{ "split": "train", "index": 67147, "acecode_id": "evol_19264", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings and two specific strings: a start term and a search term. Your task is to determine if the search term appears in the list of strings after the last occurrence of the start term. Implement a function `search_after_term(strings: List[str], start_t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert search_after_term(['hello', 'world', 'start', 'test', 'hello'], 'start', 'hello') == True\", \"assert search_after_term(['start', 'test', 'end'], 'start', 'begin') == False\", \"assert search_after_term(['a', 'b', 'c', 'd', 'e', 'f'], 'c', 'f') == True\", \"...
{ "split": "train", "index": 67148, "acecode_id": "bigcode_python_fns_15748", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given a list of strings representing lines of text. Your task is to create a function that combines these lines into a single string, separated by newline characters. Implement a function called 'combine_lines' that takes a list of strings as input and returns a single ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert combine_lines([]) == ''\", \"assert combine_lines(['Hello', 'World']) == 'Hello\\\\nWorld'\", \"assert combine_lines(['Line 1', '', 'Line 3']) == 'Line 1\\\\n\\\\nLine 3'\", \"assert combine_lines(['First line', 'Second line', 'Third line']) == 'First line\\...
{ "split": "train", "index": 67149, "acecode_id": "bigcode_python_fns_33263", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Create a function `fibonacci_upto(n: int) -> List[int]` that returns a list of all Fibonacci numbers that are less than or equal to the given integer `n`. The function should terminate if the number of iterations exceeds 1000. If `n` is less than 0, return an empty list.\nPleas...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fibonacci_upto(100) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]\", \"assert fibonacci_upto(0) == [0]\", \"assert fibonacci_upto(-10) == []\", \"assert fibonacci_upto(10) == [0, 1, 1, 2, 3, 5, 8]\", \"assert fibonacci_upto(1) == [0, 1, 1]\", \"assert fibonac...
{ "split": "train", "index": 67150, "acecode_id": "evol_21491", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a configuration dictionary `cfg` that contains paths and parameters for loading a dataset. Your task is to implement a function `load_only_test(cfg)` that processes this configuration to create a test data loader. The function should return a dictionary containing...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert load_only_test({'DATA_DIR': 'data/', 'TEST': {'BATCH_SIZE': 10}, 'DATASET': {'NUM_THREADS': 4}}) == {'image_count': 100, 'batch_count': 10}\", \"assert load_only_test({'DATA_DIR': 'data/', 'TEST': {'BATCH_SIZE': 20}, 'DATASET': {'NUM_THREADS': 2}}) == {'imag...
{ "split": "train", "index": 67151, "acecode_id": "bigcode_python_fns_736", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given a list of integers `lst` of length at least 3. Your task is to write a function that finds the highest product that can be obtained by multiplying 3 distinct integers from the list. The integers can be positive, negative, or zero. Write a function `max_product_of_...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_product_of_three([1, 2, 3, 4]) == 24\", \"assert max_product_of_three([-10, -10, 1, 3, 2]) == 300\", \"assert max_product_of_three([-5, -3, -2, -1]) == -6\", \"assert max_product_of_three([5, 4, 3, 2, 1]) == 60\", \"assert max_product_of_three([1, -1, 2,...
{ "split": "train", "index": 67152, "acecode_id": "oss_18672", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `search_clubs` that takes a list of club names and a search term as input. The function should return a list of club names that contain the search term (case insensitive). If no clubs match the search term, return an empty list. The i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert search_clubs(['Soccer Club', 'Basketball Club', 'Chess Club'], 'club') == ['Soccer Club', 'Basketball Club', 'Chess Club']\", \"assert search_clubs(['Soccer Club', 'Basketball Club', 'Chess Club'], 'Soccer') == ['Soccer Club']\", \"assert search_clubs(['Socc...
{ "split": "train", "index": 67153, "acecode_id": "oss_26369", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `generate_passcode()` that generates a random alphanumeric passcode adhering to the following rules: 1. The length of the passcode must be at least twelve characters. 2. The passcode must contain at least one uppercase alphabetic character, one lowercase alphab...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert len(generate_passcode()) >= 12\", \"assert any(c.isupper() for c in generate_passcode())\", \"assert any(c.islower() for c in generate_passcode())\", \"assert any(c.isdigit() for c in generate_passcode())\", \"assert any(c in string.punctuation for c in gene...
{ "split": "train", "index": 67154, "acecode_id": "evol_12865", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that registers a handler for interrupt signals in a system. The function should take a single argument, `handler_function`, which is a callable function that will be invoked when an interrupt signal is received. Your function should proce...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert register_signal_handlers(lambda: print('Signal received')) is None\", \"assert register_signal_handlers(lambda: print('Handler invoked')) is None\", \"assert register_signal_handlers(lambda: None) is None\", \"assert register_signal_handlers(lambda: print('I...
{ "split": "train", "index": 67155, "acecode_id": "bigcode_python_fns_42828", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `count_digit_occurrences(n: int, d: int) -> int` that calculates the total occurrences of the digit `d` in all positive integers from `1` to `n`. The function should return the count of how many times the digit `d` appears in this ran...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_digit_occurrences(1, 1) == 1\", \"assert count_digit_occurrences(10, 1) == 2\", \"assert count_digit_occurrences(20, 1) == 12\", \"assert count_digit_occurrences(100, 1) == 21\", \"assert count_digit_occurrences(100, 2) == 20\", \"assert count_digit_oc...
{ "split": "train", "index": 67156, "acecode_id": "evol_28775", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Implement a function that takes a string as input and returns the string with its characters reversed. The function should handle empty strings and strings with special characters correctly. For example, given the input 'hello', the output should be 'olleh'.\nPlease reason step...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_string('hello') == 'olleh'\", \"assert reverse_string('') == ''\", \"assert reverse_string('a') == 'a'\", \"assert reverse_string('abcdef') == 'fedcba'\", \"assert reverse_string('12345') == '54321'\", \"assert reverse_string('!@#$%') == '%$#@!'\", \...
{ "split": "train", "index": 67157, "acecode_id": "evol_34990", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of file names representing C source files and a list of file names representing associated JSON AST files. Each C file has a `.c` extension and each AST file has a `_gcc_ast.json` suffix. Your task is to implement a function `find_valid_test_names(c_files: ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_valid_test_names(['test1.c', 'test2.c', 'test3.c'], ['test1_gcc_ast.json', 'test2_gcc_ast.json']) == {'test1', 'test2'}\", \"assert find_valid_test_names(['example.c', 'sample.c'], ['example_gcc_ast.json', 'sample_gcc_ast.json']) == {'example', 'sample'...
{ "split": "train", "index": 67158, "acecode_id": "bigcode_python_fns_45401", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers. Write a function `foo(nums_data)` that takes in a list of integers `nums_data` and returns a new list where each integer is increased by 2. Ensure that the function correctly processes all elements in the input list and returns the modified lis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert foo([1, 2, 3, 4]) == [3, 4, 5, 6]\", \"assert foo([0, 0, 0]) == [2, 2, 2]\", \"assert foo([-1, -2, -3]) == [1, 0, -1]\", \"assert foo([10, 20, 30]) == [12, 22, 32]\", \"assert foo([5]) == [7]\", \"assert foo([]) == []\", \"assert foo([100]) == [102]\", \"ass...
{ "split": "train", "index": 67159, "acecode_id": "evol_18442", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of points represented as tuples of (x, y) coordinates and a distance, write a function that computes a new point by moving a specified distance away from either the first or last point in the list. The function should take three parameters: a list of points, a floa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert offsetEndpoint([(0, 0), (1, 0)], 0.5, True) == (0.5, 0.0)\", \"assert offsetEndpoint([(0, 0), (1, 0)], 0.5, False) == (0.5, 0.0)\", \"assert offsetEndpoint([(0, 0), (0, 1)], 0.5, True) == (0.0, 0.5)\", \"assert offsetEndpoint([(0, 0), (0, 1)], 0.5, False) ==...
{ "split": "train", "index": 67160, "acecode_id": "bigcode_python_fns_30825", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a list of tasks, each represented as a string in the format 'project/task_name'. Your task is to create a function that replaces any slash '/' in the task names with the string '-_-' and returns a new list of modified task names. The function should take a list of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert replace_slashes(['']) == ['']\", \"assert replace_slashes(['/leading_slash']) == ['-_-leading_slash']\", \"assert replace_slashes(['normal_task']) == ['normal_task']\", \"assert replace_slashes(['simple_task']) == ['simple_task']\", \"assert replace_slashes(...
{ "split": "train", "index": 67161, "acecode_id": "bigcode_python_fns_46033", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a simple retry mechanism for executing a command on a system daemon. The function should take in three parameters: the current state of the daemon (represented as a string), the action to be performed on the daemon (also a ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert action_daemon('active', 'restart', 3) == 'Action executed successfully'\", \"assert action_daemon('inactive', 'start', 3) == 'Action executed successfully'\", \"assert action_daemon('active', 'stop', 3) == 'Action executed successfully'\", \"assert action_da...
{ "split": "train", "index": 67162, "acecode_id": "bigcode_python_fns_23149", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that validates web page layout data based on specific criteria. The function should take a dictionary as input which represents a web page layout and return a boolean value indicating whether the layout is valid or not. The input dictiona...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_layout({'name': 'My Layout', 'slug': 'my-layout', 'container': 'c', 'css': 'main-css'}) == True\", \"assert validate_layout({'name': 'My Layout', 'slug': 'my-layout', 'container': 'f', 'css': 'main-css'}) == True\", \"assert validate_layout({'name':...
{ "split": "train", "index": 67163, "acecode_id": "oss_23061", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that retrieves a value from a predefined dictionary given a specific key. If the key exists in the dictionary, return the corresponding value; otherwise, return None. The dictionary contains several predefined key-value pairs. Write a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_value('apple') == 'fruit'\", \"assert get_value('carrot') == 'vegetable'\", \"assert get_value('salmon') == 'fish'\", \"assert get_value('bread') == 'grain'\", \"assert get_value('cheese') == 'dairy'\", \"assert get_value('nonexistent') == None\", \"asse...
{ "split": "train", "index": 67164, "acecode_id": "bigcode_python_fns_20186", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that calculates the Euclidean distance between two points in a 2D plane. The function should take four parameters: x1, y1, x2, and y2, which represent the coordinates of the two points (x1, y1) and (x2, y2). The function should return...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_distance(1.0, 2.0, 4.0, 6.0) == 5.0\", \"assert calculate_distance(0.0, 0.0, 0.0, 0.0) == 0.0\", \"assert calculate_distance(-1.0, -1.0, 1.0, 1.0) == 2.83\", \"assert calculate_distance(5.5, 5.5, 10.5, 10.5) == 7.07\", \"assert calculate_distance(1...
{ "split": "train", "index": 67165, "acecode_id": "oss_32553", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string representing the output of a scientific program, write a function that extracts the total MP2 energy value in Hartrees. The energy value will be present in the string and will be preceded by the phrase 'Total MP2 energy' or 'MP2 energy'. If neither phrase is foun...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_mp2_energy('Total MP2 energy: -76.1234 Hartrees') == -76.1234\", \"assert extract_mp2_energy('Some other text MP2 energy: -75.5678 Hartrees') == -75.5678\", \"assert extract_mp2_energy('MP2 energy: -74.9100 Hartrees') == -74.9100\", \"assert extract_...
{ "split": "train", "index": 67166, "acecode_id": "bigcode_python_fns_16936", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `is_prime(n: int) -> bool` that determines if a given integer n is a prime number. A prime number is defined as a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. Your function should return True if n is a prime nu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_prime(1) == False\", \"assert is_prime(2) == True\", \"assert is_prime(3) == True\", \"assert is_prime(4) == False\", \"assert is_prime(5) == True\", \"assert is_prime(6) == False\", \"assert is_prime(7) == True\", \"assert is_prime(8) == False\", \"asser...
{ "split": "train", "index": 67167, "acecode_id": "evol_16006", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes in a dictionary containing user authentication data and returns an authentication token. The input dictionary has the following keys: 'accountType', 'Email', 'Passwd', 'service', and 'source'. The function should simulate the a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_auth_token({'accountType': 'GOOGLE', 'Email': 'user1@example.com', 'Passwd': 'correct_password', 'service': 'ah', 'source': 'my_app'}) == 'auth_token_123'\", \"assert get_auth_token({'accountType': 'GOOGLE', 'Email': 'user2@example.com', 'Passwd': 'wrong...
{ "split": "train", "index": 67168, "acecode_id": "bigcode_python_fns_36407", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an object, implement a function `analyze_dicts(obj, seen=None)` that analyzes the object to determine if it is a void dictionary. A void dictionary is defined as a dictionary that contains no keys. The function should return a tuple with three values: a boolean indicating...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert analyze_dicts({}) == (True, 1, 0)\", \"assert analyze_dicts({'key': 'value'}) == (False, 0, 1)\", \"assert analyze_dicts({'key1': {}, 'key2': {}}) == (False, 2, 2)\", \"assert analyze_dicts([]) == (False, 0, 0)\", \"assert analyze_dicts([{}, {}, {}]) == (Fal...
{ "split": "train", "index": 67169, "acecode_id": "evol_28190", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a simple command-line argument parser. The function should accept a boolean parameter `show_all_opts` to determine whether to display all available options. When `show_all_opts` is true, the parser should include options fo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_argument_parser(True).description == 'Argument parser for all options.'\", \"assert len(create_argument_parser(True).option_list) == 2\", \"assert 'config' in create_argument_parser(True).option_list\", \"assert 'verbosity' not in create_argument_pars...
{ "split": "train", "index": 67170, "acecode_id": "bigcode_python_fns_9449", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given a list of integers `lista`, write a function `get_unique_elements` that takes this list as input and returns a new list containing only the unique elements from the original list, preserving their original order. The input list may contain multiple occurrences of the same...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_unique_elements([1, 2, 3, 3, 4, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert get_unique_elements([1, 1, 1, 1]) == [1]\", \"assert get_unique_elements([]) == []\", \"assert get_unique_elements([5, 5, 5, 6, 7, 7, 8]) == [5, 6, 7, 8]\", \"assert get_unique_element...
{ "split": "train", "index": 67171, "acecode_id": "oss_3932", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string representing an address, write a function `create_parameters` that transforms the address by replacing all spaces with the '+' character. The function should then return a dictionary containing the transformed address under the key 'geocode' and a fixed API key u...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_parameters('123 Main St') == {'apikey': 'YOUR_API_KEY', 'geocode': '123+Main+St'}\", \"assert create_parameters('456 Elm St Apt 3') == {'apikey': 'YOUR_API_KEY', 'geocode': '456+Elm+St+Apt+3'}\", \"assert create_parameters('789 Oak Road') == {'apikey'...
{ "split": "train", "index": 67172, "acecode_id": "bigcode_python_fns_22922", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a URL and a list of endpoints. Your task is to construct a full URL for each endpoint by appending it to the base URL. Your function should return a dictionary containing the constructed URLs and a success message. If any endpoint is invalid (i.e., it contains for...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert construct_urls('https://example.com', ['products', 'collections']) == {'urls': ['https://example.com/products', 'https://example.com/collections'], 'message': 'Success'}\", \"assert construct_urls('https://test.com', ['store', 'cart']) == {'urls': ['https://...
{ "split": "train", "index": 67173, "acecode_id": "bigcode_python_fns_28602", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that counts the number of unique programming languages given a list of language names. The function should take a list of strings, where each string represents the name of a programming language. Your goal is to return the total numbe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_unique_languages(['Python', 'Java', 'C++']) == 3\", \"assert count_unique_languages(['Python', 'Python', 'Java']) == 2\", \"assert count_unique_languages([]) == 0\", \"assert count_unique_languages(['JavaScript', 'Java', 'C#', 'Python', 'JavaScript']) ...
{ "split": "train", "index": 67174, "acecode_id": "oss_30238", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given the definition of a binary tree node, write a function `isSameTree` that takes in two binary trees `p` and `q` as input and returns `True` if the two trees are structurally identical and the nodes have the same value at each position, and `False` otherwise. The binary tre...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert isSameTree(TreeNode(1, TreeNode(2), TreeNode(3)), TreeNode(1, TreeNode(2), TreeNode(3))) == True\", \"assert isSameTree(TreeNode(1, TreeNode(2)), TreeNode(1, None, TreeNode(2))) == False\", \"assert isSameTree(TreeNode(1, TreeNode(2), TreeNode(1)), TreeNode(...
{ "split": "train", "index": 67175, "acecode_id": "oss_37268", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of SSL certificate data, where each certificate is represented as a dictionary containing the following keys: 'sha1', 'issuer', 'subject', and 'validity'. Write a function that takes this list and returns a dictionary that groups the certificates by their i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert group_certificates_by_issuer([{'sha1': 'abc123', 'issuer': 'Issuer A', 'subject': 'Subject A', 'validity': '2023-01-01'}, {'sha1': 'def456', 'issuer': 'Issuer B', 'subject': 'Subject B', 'validity': '2023-06-01'}, {'sha1': 'ghi789', 'issuer': 'Issuer A', 'su...
{ "split": "train", "index": 67176, "acecode_id": "bigcode_python_fns_20889", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that generates a list of custom commands based on a given set of switch names. The commands will be used to initialize a simulated environment for a package manager. Write a function called `generate_commands` that takes a list of ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_commands(['switch1']) == ['(setup (switch switch1))', 'initialize environment --default-config']\", \"assert generate_commands(['switch1', 'switch2']) == ['(setup (switch switch1))', '(setup (switch switch2))', 'initialize environment --default-conf...
{ "split": "train", "index": 67177, "acecode_id": "oss_7118", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the behavior of a custom object. The function should do the following: 1. Define a class called `CustomType` that has an initializer that accepts a single integer value. 2. Add a method called `display` to the class that re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert use_custom_type() == 'Value: 42'\", \"assert CustomType(0).display() == 'Value: 0'\", \"assert CustomType(-1).display() == 'Value: -1'\", \"assert CustomType(100).display() == 'Value: 100'\", \"assert CustomType(999).display() == 'Value: 999'\", \"assert Cus...
{ "split": "train", "index": 67178, "acecode_id": "oss_6176", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that retrieves the details of a book based on its ID. You need to implement a function `get_book_details(book_id)` that takes an integer `book_id` as input. The function should return a formatted string containing the book's details if th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_book_details(1) == \\\"Book ID: 1\\\\nTitle: '1984'\\\\nAuthor: 'George Orwell'\\\\nGenre: 'Dystopian'\\\"\", \"assert get_book_details(2) == \\\"Book ID: 2\\\\nTitle: 'To Kill a Mockingbird'\\\\nAuthor: 'Harper Lee'\\\\nGenre: 'Fiction'\\\"\", \"assert ...
{ "split": "train", "index": 67179, "acecode_id": "oss_19918", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string `input_str` and a `pattern`, implement a function `find_string_anagrams(input_str: str, pattern: str) -> List[int]` that returns the starting indices of all occurrences of anagrams of the `pattern` within `input_str`. An anagram is a rearrangement of letters, usi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_string_anagrams('cbaebabacd', 'abc') == [0, 6]\", \"assert find_string_anagrams('abab', 'ab') == [0, 1, 2]\", \"assert find_string_anagrams('abcdefgh', 'xyz') == []\", \"assert find_string_anagrams('', 'abc') == []\", \"assert find_string_anagrams('abc'...
{ "split": "train", "index": 67180, "acecode_id": "oss_31868", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Implement a function `detect_and_remove_cycle(head: Optional[Node]) -> bool` that takes the head of a singly linked list as input and detects if there is a cycle in the list. If a cycle is found, the function should remove the cycle. The function should return `True` if a cycle...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert detect_and_remove_cycle(Node(1)) == False\", \"assert detect_and_remove_cycle(Node(1, Node(2))) == False\", \"assert detect_and_remove_cycle(Node(1, Node(2, Node(3)))) == False\", \"assert detect_and_remove_cycle(Node(1, Node(2, Node(3, Node(4))))) == False\...
{ "split": "train", "index": 67181, "acecode_id": "evol_32759", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Write a function `get_student_details` that takes in a student's name, college, grade level, and GPA as parameters. The function should return a formatted string containing the student's details in the following format: 'Name: {name}, College: {college}, Grade Level: {grade_lev...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_student_details('John Doe', 'Harvard University', 'Sophomore', 3.7) == 'Name: John Doe, College: Harvard University, Grade Level: Sophomore, GPA: 3.7'\", \"assert get_student_details('Alice Smith', 'Stanford University', 'Freshman', 3.9) == 'Name: Alice ...
{ "split": "train", "index": 67182, "acecode_id": "evol_1803", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that parses URL parameters from a given GET request URL. The function should take a string representing a URL, extract the query parameters, and return them as a dictionary where the keys are the parameter names and the values are lis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_url_params('http://example.com/page?name=John&age=30&name=Jane') == {'name': ['John', 'Jane'], 'age': ['30']}\", \"assert parse_url_params('http://example.com/page?single=value') == {'single': ['value']}\", \"assert parse_url_params('http://example.com...
{ "split": "train", "index": 67183, "acecode_id": "oss_36817", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings representing names of libraries. Your task is to implement a function `filter_libraries(libraries: List[str], validator: str) -> List[str]` that returns a list of libraries filtered according to the given validator. The validator can take the fol...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_libraries(['numpy', 'scipy', 'matplotlib'], 'all') == ['numpy', 'scipy', 'matplotlib']\", \"assert filter_libraries(['abc', 'de', 'fghij', 'klmnop'], 'even') == ['de', 'klmnop']\", \"assert filter_libraries(['abc', 'de', 'fghij', 'klmnop'], 'odd') == ...
{ "split": "train", "index": 67184, "acecode_id": "bigcode_python_fns_29852", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Write a function that analyzes a code snippet represented as a list of strings. The function should count the total number of lines, the number of lines containing code, the number of comment lines (lines that start with a '#' symbol), and the number of empty lines (lines that ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_lines_in_code(['# This is a comment', '# Another comment', ' ', '']) == {'total_lines': 4, 'code_lines': 0, 'comment_lines': 2, 'empty_lines': 2}\", \"assert count_lines_in_code(['']) == {'total_lines': 1, 'code_lines': 0, 'comment_lines': 0, 'empty_...
{ "split": "train", "index": 67185, "acecode_id": "evol_25899", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with parsing a database connection string and extracting its components. The connection string can have multiple formats, including those for MySQL, PostgreSQL, SQLite, and Access databases. Your function should take a connection string as input and return a dict...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_connection_string('mysql://user:pass@localhost:3306/mydb') == {'dbms': 'mysql', 'user': 'user', 'password': 'pass', 'hostname': 'localhost', 'port': 3306, 'database': 'mydb'}\", \"assert parse_connection_string('pgsql://admin:secret@192.168.1.1:5432/te...
{ "split": "train", "index": 67186, "acecode_id": "bigcode_python_fns_49450", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function `preserve_comments(code: str) -> str` that takes a string representation of Python code as input. The function should return the input string unchanged if it contains any comment lines. If there are no comment lines present in the code, it...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert preserve_comments('''# This is a comment\\nprint(\\\"Hello\\\")''') == '''# This is a comment\\nprint(\\\"Hello\\\")'''\", \"assert preserve_comments('print(5)') == ''\", \"assert preserve_comments('# This is a single line comment') == '# This is a single li...
{ "split": "train", "index": 67187, "acecode_id": "bigcode_python_fns_47901", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates reading bytes from a source and appending them to a buffer. The function should take a byte string as input and concatenate it to an existing buffer, which is initialized to an empty byte string. The function should ret...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert append_bytes_to_buffer(b'hello') == b'hello'\", \"assert append_bytes_to_buffer(b'') == b''\", \"assert append_bytes_to_buffer(b'world') == b'world'\", \"assert append_bytes_to_buffer(b'foo') == b'foo'\", \"assert append_bytes_to_buffer(b'bar') == b'bar'\", ...
{ "split": "train", "index": 67188, "acecode_id": "oss_20427", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `calculate_statistics(ages)` that takes a list of ages (as strings) and returns a tuple containing the mean, median, and mode of the ages. The mean should be a float, while the median and mode should be integers. Handle any exceptions by returning a string erro...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_statistics(['5', '5', '5', '5']) == (5.0, 5, [5])\", \"assert calculate_statistics(['15', '15', '15', '15', '30', '30']) == (20.0, 15, [15])\", \"assert calculate_statistics(['20', '21', '22', '22', '23']) == (21.6, 22, [22])\", \"assert calculate_...
{ "split": "train", "index": 67189, "acecode_id": "evol_783", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with processing a list of vehicle registrations to recategorize certain vehicles. Specifically, you need to identify vehicles that are classified as 'Heavy Duty Trucks' but have a weight ('PES_BUIT') of less than 3500 kg, and change their category to 'Light Comme...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reclassify_vehicles([{'TIPUS': 'CAMIONS', 'PES_BUIT': 3000, 'Category': 'Heavy Duty Trucks'}, {'TIPUS': 'CARS', 'PES_BUIT': 1500, 'Category': 'Passenger Vehicles'}]) == [{'TIPUS': 'CAMIONS', 'PES_BUIT': 3000, 'Category': 'Light Commercial Vehicles'}, {'TIPUS...
{ "split": "train", "index": 67190, "acecode_id": "bigcode_python_fns_27417", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a dataset of daily new COVID-19 cases for different countries, write a function `daily_cases_per_population(cases: List[int], population: int) -> List[float]` that computes the daily new cases per 100,000 population. The input will be a list of integers representing daily...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert daily_cases_per_population([100, 200, 300], 1000000) == [10.0, 20.0, 30.0]\", \"assert daily_cases_per_population([0, 0, 0], 500000) == [0.0, 0.0, 0.0]\", \"assert daily_cases_per_population([250, 250, 250], 500000) == [50.0, 50.0, 50.0]\", \"assert daily_ca...
{ "split": "train", "index": 67191, "acecode_id": "evol_3378", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_all_digits(string: str) -> bool` that takes a string as input and returns True if the string consists exclusively of numerical digits (0-9) and is non-empty. Otherwise, return False.\nPlease reason step by step, then write a self-contained Python soluti...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_all_digits('12345') == True\", \"assert is_all_digits('0') == True\", \"assert is_all_digits('9876543210') == True\", \"assert is_all_digits('abc') == False\", \"assert is_all_digits('12a34') == False\", \"assert is_all_digits(' ') == False\", \"assert is...
{ "split": "train", "index": 67192, "acecode_id": "evol_10634", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers and a target integer. Write a function that performs a binary search to find the index of the target integer in the list. If the target integer is found in the list, return its index. If it is not found, return -1. Note that the list does not ne...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert binary_search([4, 2, 5, 1, 3], 3) == 2\", \"assert binary_search([10, 20, 30, 40, 50], 20) == 1\", \"assert binary_search([5, 3, 6, 2, 8], 6) == 3\", \"assert binary_search([7, 8, 3, 5, 1], 1) == 0\", \"assert binary_search([], 1) == -1\", \"assert binary_se...
{ "split": "train", "index": 67193, "acecode_id": "bigcode_python_fns_1134", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of segments represented by their start and end times, along with their corresponding labels, create a function that returns a list of the segment centers and a list of the labels that fall within a specified time limit. The function should take the following parame...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert segment_centers_and_labels([0.0, 2.0, 4.0], [1.0, 3.0, 5.0], ['A', 'B', 'C'], (0.5, 4.5)) == ([0.5, 2.5, 4.5], ['A', 'B', 'C'])\", \"assert segment_centers_and_labels([0.0, 1.0], [1.0, 2.0], ['A', 'B'], (1.5, 2.5)) == ([1.5], ['B'])\", \"assert segment_cente...
{ "split": "train", "index": 67194, "acecode_id": "bigcode_python_fns_49930", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that computes distances between two points in a 2D space using different distance metrics. The distance metrics to be supported are Euclidean distance, Manhattan distance, Hamming distance, and L2 distance. Implement a function `calcu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_distance((0, 0), (3, 4), 'euclidean') == 5.0\", \"assert calculate_distance((1, 2), (4, 6), 'manhattan') == 7\", \"assert calculate_distance((1, 0), (0, 1), 'hamming') == 2\", \"assert calculate_distance((2, 2), (2, 2), 'l2') == 0.0\", \"assert cal...
{ "split": "train", "index": 67195, "acecode_id": "oss_10868", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with designing a data structure to represent a tourism-related event. The event should include various attributes such as contact information, email address, website, organizer name, speaker name, event type, accessibility information, number of participants, boo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_event('John Doe', 'john@example.com', 'http://example.com', 'Event Organizer', 'Keynote Speaker', 'Conference', 'Wheelchair accessible', '100', 'Book at example.com', 'General Public', 'Bring your own drinks') == {'contact': 'John Doe', 'email': 'john...
{ "split": "train", "index": 67196, "acecode_id": "oss_14661", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing image pixel values. Your task is to implement a function that applies a series of transformations to the pixel values to generate a new list of transformed pixel values. The transformations are as follows: first, apply a leaky ReLU ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_image_pixels([4, -3, 2, -1, 0]) == [4, 2, 0]\", \"assert transform_image_pixels([1, 2, 3, 4, 5]) == [1, 3, 5]\", \"assert transform_image_pixels([5, -5, 10, -10, 15]) == [5, 10, 15]\", \"assert transform_image_pixels([100, 200, 300]) == [100, 300]\...
{ "split": "train", "index": 67197, "acecode_id": "bigcode_python_fns_34517", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes a list of integers and returns a new list containing only the unique integers in the same order they first appeared in the input list. The input list may contain duplicates, and the output should not include any integer...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_integers([1, 2, 3, 1, 2, 4]) == [1, 2, 3, 4]\", \"assert unique_integers([5, 5, 5, 5]) == [5]\", \"assert unique_integers([]) == []\", \"assert unique_integers([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert unique_integers([1, 2, 2, 1, 3, 4]) == [1, ...
{ "split": "train", "index": 67198, "acecode_id": "oss_25023", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given the estimated hours needed to complete a project and the hours remaining until the next dawn, implement a function that determines if the project will be completed by the next dawn. The function should return 'Project will be completed by the next dawn.' if the estimated ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_project_complete(5, 8) == 'Project will be completed by the next dawn.'\", \"assert is_project_complete(10, 10) == 'Project will be completed by the next dawn.'\", \"assert is_project_complete(3, 2) == 'Project will not be completed by the next dawn.'\", ...
{ "split": "train", "index": 67199, "acecode_id": "evol_14378", "num_tests": 16 }