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 creating a function that simulates loading an image from a given path. The function should take two parameters: 'path', a string representing the file path of the image, and 'grayscale', a boolean indicating whether the image should be loaded in grayscale mo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert load_image('image1.jpg', True) == 'Loading image from image1.jpg as grayscale.'\", \"assert load_image('image1.jpg', False) == 'Loading image from image1.jpg as color.'\", \"assert load_image('path/to/image2.png', True) == 'Loading image from path/to/image2....
{ "split": "train", "index": 2600, "acecode_id": "bigcode_python_fns_14480", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that manages user subscriptions for various event types in a real-time event system. Your function should handle the following functionalities: 1. Add a new subscription for a specific event type. 2. Remove an existing subscription fo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert event_subscription_manager([('add', 'new_message', 'user123'), ('add', 'new_message', 'user456'), ('add', 'user_login', 'user123'), ('authenticate', 'new_message', 'user123')]) == [True]\", \"assert event_subscription_manager([('add', 'new_message', 'user123...
{ "split": "train", "index": 2601, "acecode_id": "oss_20067", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of 3D coordinates representing points on a side of a shape and an angle theta in degrees, implement a function called `transform_side` that uses the Euler-Rodrigues formula to rotate these coordinates around the x-axis by the specified angle. The function should re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_side([(0, 0, 0), (1, 1, 1)], 0) == [(0, 0, 0), (1, 1, 1)]\", \"assert transform_side([(2, 2, 2), (3, 3, 3)], 180) == [(2, -2, -2), (3, -3, -3)]\", \"assert transform_side([(0, 0, 0)], 90) == [(0, 0, 0)]\", \"assert transform_side([(1, 1, 1)], 360) ...
{ "split": "train", "index": 2602, "acecode_id": "bigcode_python_fns_39039", "num_tests": 5 }
acecode
[ { "role": "user", "content": "Implement a function that takes a string as input and returns a new string where the first letter of each word is capitalized. Words are defined as sequences of characters separated by spaces. Punctuation marks and non-alphanumeric characters should not affect the capitalizatio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert capitalize_first_letters('hello world! this is a test.') == 'Hello World! This Is A Test.'\", \"assert capitalize_first_letters('make this sentence better.') == 'Make This Sentence Better.'\", \"assert capitalize_first_letters('a quick brown fox jumps over t...
{ "split": "train", "index": 2603, "acecode_id": "evol_23805", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are given a data structure that holds tracing information for various items identified by a domain and an item_id. Each trace has a unique context id and a run_id. Your task is to implement a function `websocket_trace_contexts(data_traces: Dict[Tuple[str, Optional[int]], Di...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert websocket_trace_contexts({('domain1', 1): {'trace1': Trace('context1', 'run1'), 'trace2': Trace('context2', 'run2')}}, {'domain': 'domain1', 'item_id': 1}) == {'context1': {'run_id': 'run1', 'domain': 'domain1', 'item_id': 1}, 'context2': {'run_id': 'run2', ...
{ "split": "train", "index": 2604, "acecode_id": "bigcode_python_fns_36035", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string containing a series of parentheses, brackets, and curly braces, write a function `isValidParentheses` that determines if the string is valid. A string is considered valid if all types of brackets are properly nested and closed. The function should return `true` i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert isValidParentheses('{[()()]}') == True\", \"assert isValidParentheses('{[(])}') == False\", \"assert isValidParentheses('()') == True\", \"assert isValidParentheses('([])') == True\", \"assert isValidParentheses('({})') == True\", \"assert isValidParentheses...
{ "split": "train", "index": 2605, "acecode_id": "oss_4159", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that identifies the type of CPU architecture based on a given string input. The function should take a string `cpu_name` which represents the CPU name and return a corresponding CPU type as follows: if `cpu_name` is 'aarch64', return 'arm6...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_cpu_type('aarch64') == 'arm64'\", \"assert get_cpu_type('x86_64') == 'x64'\", \"assert get_cpu_type('i686') == 'x86'\", \"assert get_cpu_type('arm') == 'arm'\", \"assert get_cpu_type('x86') == 'x86'\", \"assert get_cpu_type('ppc64') == 'ppc64'\", \"asser...
{ "split": "train", "index": 2606, "acecode_id": "bigcode_python_fns_37773", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with parsing a log file consisting of trace events. Each line of the log file may contain an event that includes a disable flag, an event name, and a list of arguments. Your goal is to implement a function that takes a list of strings (each representing a line fr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_events(['enabled event1 arg1, arg2', 'enabled event2 arg3, arg4']) == {0: ('event1', 'arg1', 'arg2'), 1: ('event2', 'arg3', 'arg4')}\", \"assert parse_events(['enabled event1 arg1', 'disabled event2 arg2, arg3']) == {0: ('event1', 'arg1'), 1: ('event2'...
{ "split": "train", "index": 2607, "acecode_id": "bigcode_python_fns_10763", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Devise a function that rearranges an array of strictly positive integers based on each integer's binary representation length, following an ascending order. If multiple integers have the same binary length, use their decimal numerical values as a tiebreaker. Your function shoul...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sort_by_binary_len([1, 31, 15, 2, 7]) == [1, 2, 7, 15, 31]\", \"assert sort_by_binary_len([14, 58, 39, 41, 61]) == [14, 39, 41, 58, 61]\", \"assert sort_by_binary_len([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert sort_by_binary_len([8, 2, 4, 1, 3]) == [1, ...
{ "split": "train", "index": 2608, "acecode_id": "evol_5895", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes two quaternions, represented by four real numbers (a, b, c, d) for each quaternion, and returns their product as a new quaternion. The input will consist of two tuples, each containing four elements corresponding to the components of the quaterni...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert Quaternion(1, 2, 3, 4) * Quaternion(5, 6, 7, 8) == (1*5 - 2*6 - 3*7 - 4*8, 1*6 + 2*5 + 3*8 - 4*7, 1*7 - 2*8 + 3*5 + 4*6, 1*8 + 2*7 - 3*6 + 4*5)\", \"assert Quaternion(0, 0, 0, 0) * Quaternion(1, 1, 1, 1) == (0, 0, 0, 0)\", \"assert Quaternion(1, 0, 0, 0) * Q...
{ "split": "train", "index": 2609, "acecode_id": "evol_16717", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function `length` that returns the number of items in the list. The input list can be represented as a tuple where the first element is a value and the second element is another tuple representing the tail of the list. If the input list is ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert length(()) == 0\", \"assert length((1, ())) == 1\", \"assert length((1, (2, ()))) == 2\", \"assert length((1, (2, (3, ())))) == 3\", \"assert length((1, (2, (3, (4, ()))))) == 4\", \"assert length((1, (2, (3, (4, (5, ())))))) == 5\", \"assert length((1, (2, ...
{ "split": "train", "index": 2610, "acecode_id": "bigcode_python_fns_23768", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a string cipher, write a function `find_robbers_message(cipher)` that decrypts the message using a Caesar cipher with a shift of 2. The function should return the decrypted message, preserving any non-alphabetic characters in their original positions. Only alphabetic char...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_robbers_message('Hello, World!') == 'Fcjjm, Umpjb!'\", \"assert find_robbers_message('A') == 'Y'\", \"assert find_robbers_message('Z') == 'X'\", \"assert find_robbers_message('abcXYZ!') == 'yzaVWX!'\", \"assert find_robbers_message('1234!@#$') == '1234!...
{ "split": "train", "index": 2611, "acecode_id": "evol_12933", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Given a mapping of nodes to their children in a directed graph, write a function `root_nodes(g)` that returns a set of all root nodes in the graph. A root node is defined as a node that has no other nodes pointing to it as a child. Isolated nodes (nodes that do not appear as a ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sorted(root_nodes({'a': 'c', 'b': 'ce', 'c': 'abde', 'd': 'c', 'e': ['c', 'z'], 'f': {}})) == ['f']\", \"assert sorted(root_nodes({'x': [], 'y': [], 'z': []})) == ['x', 'y', 'z']\", \"assert sorted(root_nodes({'p': ['q', 'r'], 'q': ['s'], 'r': []})) == ['p']...
{ "split": "train", "index": 2612, "acecode_id": "bigcode_python_fns_16484", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that performs a specific transformation on a given input. The function takes a parameter `node` and performs the following transformations based on the type of the input:\n1. If the input `node` is a string, return the input string re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform('hello') == 'olleh'\", \"assert transform('Python') == 'nohtyP'\", \"assert transform(['a', 'b', 'c']) == ['c', 'b', 'a']\", \"assert transform([1, 2, 3, 4]) == [4, 3, 2, 1]\", \"assert transform({'a': 1, 'b': 2}) == {1: 'a', 2: 'b'}\", \"assert tr...
{ "split": "train", "index": 2613, "acecode_id": "oss_11801", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks if a given string is a valid palindrome. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward, ignoring spaces, punctuation, and capitalization. Write a function ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_palindrome('A man, a plan, a canal, Panama') == True\", \"assert is_palindrome('racecar') == True\", \"assert is_palindrome('No lemon, no melon') == True\", \"assert is_palindrome('Hello World') == False\", \"assert is_palindrome('Was it a car or a cat I ...
{ "split": "train", "index": 2614, "acecode_id": "oss_12181", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of module names and returns a new list containing only the module names that are valid and can be successfully imported. If a module cannot be imported, it should be excluded from the resulting list. Your func...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_importable_modules(['math', 'random', 'nonexistent_module', 'os']) == ['math', 'random', 'os']\", \"assert filter_importable_modules(['json', 'sys', 'os', 'invalid_module']) == ['json', 'sys', 'os']\", \"assert filter_importable_modules(['time', 'coll...
{ "split": "train", "index": 2615, "acecode_id": "oss_30710", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Write a function `unique_words(s1: str, s2: str) -> Tuple[List[str], List[str]]` that takes two sentences as input and returns a tuple containing two lists. The first list should include words that are present in the first sentence but not in the second, and the second list sho...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_words('Hello world', 'world') == (['hello'], [])\", \"assert unique_words('Python programming is fun', 'Fun programming with Python') == (['is'], ['with'])\", \"assert unique_words('A quick brown fox', 'A quick brown dog') == (['fox'], ['dog'])\", \"a...
{ "split": "train", "index": 2616, "acecode_id": "evol_30565", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are given a string `os_ubuntu20` representing the name of an operating system, and a string `subiquity_cmdline_template` that serves as a command line template for the installer. Your task is to create a function `generate_os_definition(os_ubuntu20: str, subiquity_cmdline_t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_os_definition('Ubuntu 20', 'default template') == ('Ubuntu 20', [{'repo_name': 'ubuntu-repo', 'repo_url': 'http://example.com/os', 'kernel_path': '/kernel', 'initrd_path': '/initrd', 'iso_url': 'http://example.com/os.iso', 'version': 'ubuntu20', 'de...
{ "split": "train", "index": 2617, "acecode_id": "bigcode_python_fns_43214", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with simulating a servo motor controller. The servo motor can rotate from 0 to 180 degrees. Your task is to implement a function called `set_servo_angle` that takes an integer `degree` as input and sets the angle of the servo motor to the specified degree if it's...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert set_servo_angle(90) == (90, None)\", \"assert set_servo_angle(0) == (0, None)\", \"assert set_servo_angle(180) == (180, None)\", \"assert set_servo_angle(200) == (90, 'Invalid angle! Angle should be between 0 and 180 degrees')\", \"assert set_servo_angle(-10...
{ "split": "train", "index": 2618, "acecode_id": "oss_29748", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a date in the format 'YYYY-MM-DD', write a function that determines if the given date is the first Monday of September in any year. If it is, return the string 'Happy Labor Day!'. If it is not, return None. The input date will be a valid date string. Your function should ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_labor_day('2023-09-04') == 'Happy Labor Day!'\", \"assert check_labor_day('2023-09-03') == None\", \"assert check_labor_day('2022-09-05') == 'Happy Labor Day!'\", \"assert check_labor_day('2022-09-01') == None\", \"assert check_labor_day('2021-09-06') ...
{ "split": "train", "index": 2619, "acecode_id": "bigcode_python_fns_43838", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that classifies a set of data points based on a k-nearest neighbors (KNN) algorithm. The function should be named `knn_predict` and should take two arguments: `X_train`, a 2D list of training data points (where each point is a list of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert knn_predict([[1, 2], [2, 3], [3, 4]], [0, 1, 1], [[2, 2], [3, 3]]) == [1, 1]\", \"assert knn_predict([[1, 1], [2, 2], [3, 3]], [0, 0, 1], [[1, 2]]) == [0]\", \"assert knn_predict([[0, 0], [1, 1], [2, 2]], [1, 0, 1], [[0, 0], [1, 0], [2, 0]]) == [1, 1, 1]\", ...
{ "split": "train", "index": 2620, "acecode_id": "oss_21129", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given a list of strings representing package names that are installed in the current environment. Your task is to implement a function `remove_package(packages: List[str], package_to_remove: str) -> List[str]` that removes all instances of a specific package from the li...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_package(['setuptools', 'numpy', 'setuptools', 'pandas'], 'setuptools') == ['numpy', 'pandas']\", \"assert remove_package(['setuptools', 'numpy', 'pandas'], 'scipy') == ['setuptools', 'numpy', 'pandas']\", \"assert remove_package(['setuptools', 'setupt...
{ "split": "train", "index": 2621, "acecode_id": "bigcode_python_fns_42832", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that simulates the re-instrumentation of a software module. The function `instrument_module(module)` should accept a string representing the name of a module and return a string indicating that the module has been successfully re-instrumen...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert instrument_module('math') == 'Module math has been successfully re-instrumented.'\", \"assert instrument_module('os') == 'Module os has been successfully re-instrumented.'\", \"assert instrument_module('sys') == 'Module sys has been successfully re-instrumen...
{ "split": "train", "index": 2622, "acecode_id": "bigcode_python_fns_37896", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `string_split(string: str, n: int) -> List[str]` that takes a string and an integer n, and returns a list of the first n words from the string. If n is greater than the number of words, return all the words. The words are separated by spaces. If the input strin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert string_split('Hello World', 2) == ['Hello', 'World']\", \"assert string_split('Hello World', 1) == ['Hello']\", \"assert string_split('Hello World', 0) == []\", \"assert string_split('Python is great', 3) == ['Python', 'is', 'great']\", \"assert string_split...
{ "split": "train", "index": 2623, "acecode_id": "evol_12182", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a 64-bit integer representing a score4 board, where each 16 bits represent a layer of the board, implement a function that rotates the board 90 degrees clockwise. Each layer consists of 4 rows and 4 columns, and the layers are arranged as follows: the least significant 16...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert rotateBoard90(0x0000000000000000) == 0x0000000000000000\", \"assert rotateBoard90(0x00000000FFFFFFFF) == 0xFFFFFFFF00000000\", \"assert rotateBoard90(0xFFFFFFFFFFFFFFFF) == 0xFFFFFFFFFFFFFFFF\", \"assert rotateBoard90(0x0000FFFF0000FFFF) == 0xFFFF0000FFFF000...
{ "split": "train", "index": 2624, "acecode_id": "bigcode_python_fns_40959", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are given two sets of model predictions represented as tuples. Each tuple contains a dictionary of mean values and a nested dictionary of covariance values. Your task is to implement a function that merges these two sets of predictions by appending the mean values and the c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_predictions(({ 'metric1': [1.0, 2.0], 'metric2': [3.0] }, { 'metric1': { 'metric1': [0.1], 'metric2': [0.2] } }), ({ 'metric1': [4.0], 'metric2': [5.0] }, { 'metric1': { 'metric1': [0.3], 'metric2': [0.4] } })) == ({ 'metric1': [1.0, 2.0, 4.0], 'metric...
{ "split": "train", "index": 2625, "acecode_id": "bigcode_python_fns_48231", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with managing configurations for hardware pins in a microcontroller environment. You need to implement a function `manage_pin_configuration` that takes a list of tuples as input. Each tuple contains a pin name (a string) and a configuration value (an integer). Th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_pin_configuration([('TFT_LED_PIN', 14), ('TFT_MOSI_PIN', 23)]) == {'TFT_LED_PIN': 14, 'TFT_MOSI_PIN': 23}\", \"assert manage_pin_configuration([('BUTTON_A_PIN', 32), ('BUTTON_B_PIN', 33), ('BUTTON_A_PIN', 20)]) == {'BUTTON_A_PIN': 20, 'BUTTON_B_PIN': ...
{ "split": "train", "index": 2626, "acecode_id": "oss_26774", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `array_compare` that takes in two lists of integers, `list1` and `list2`, and returns a list containing the elements that are present in both lists (the intersection) followed by the elements that are unique to each list (the symmetric difference). The result s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert array_compare([1, 1, 2, 3], [2, 2, 3, 4]) == [2, 3, 1, 4]\", \"assert array_compare([], []) == []\", \"assert array_compare([1, 2, 3], [1, 2, 3]) == [1, 2, 3]\", \"assert array_compare([1, 2, 3], []) == [1, 2, 3]\", \"assert array_compare([], [4, 5, 6]) == [...
{ "split": "train", "index": 2627, "acecode_id": "evol_12202", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks if a specific server is in a list of servers where a bot is currently present. The function `is_bot_in_server` takes two parameters: a list of server IDs the bot is currently in and a server ID to check. It should return `...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_bot_in_server([1, 2, 3, 4, 5], 3) == True\", \"assert is_bot_in_server([1, 2, 3, 4, 5], 6) == False\", \"assert is_bot_in_server([], 1) == False\", \"assert is_bot_in_server([7, 8, 9], 9) == True\", \"assert is_bot_in_server([10, 20, 30], 10) == True\", \...
{ "split": "train", "index": 2628, "acecode_id": "oss_15947", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the scores of a series of games. Your task is to calculate the average score of the games using the following formula: Average Score = (Sum of all scores) / (Count of distinct scores). Implement a function `calculate_average_score(s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_average_score([-1, -1, -2, -3, -4]) == -2.75\", \"assert calculate_average_score([10, 10, 20, 30]) == 23.33\", \"assert calculate_average_score([1, 2, 3, 4, 5]) == 3.0\", \"assert calculate_average_score([0, 0, 0, 0]) == 0.0\", \"assert calculate_a...
{ "split": "train", "index": 2629, "acecode_id": "oss_31561", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function that checks if a given string is arranged in lexicographically descending order. The function should return True if the string is in descending order and False otherwise. A string is considered to be in descending order if each character is greater than or ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_descending('zyxwvutsrqponmlkjihgfedcba') == True\", \"assert check_descending('fedcba') == True\", \"assert check_descending('cba') == True\", \"assert check_descending('baaaaa') == True\", \"assert check_descending('aaaaa') == True\", \"assert check_d...
{ "split": "train", "index": 2630, "acecode_id": "evol_9168", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a tuple containing two lists: 'starts_min' and 'starts_max', which represent the minimum and maximum starting values for a set of parameters. You also receive an integer 'params_req', the number of parameters required, a dictionary 'global_conf' with keys 'min_par...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_param_starts(([], []), 3, {'min_param_val': 1, 'max_param_val': 10}, 2, [], []) == ([1, 1, 1, 1, 1, 1], [10, 10, 10, 10, 10, 10])\", \"assert add_param_starts(([0], [10]), 1, {'min_param_val': 0, 'max_param_val': 9}, 1, [], []) == ([0], [10])\", \"assert...
{ "split": "train", "index": 2631, "acecode_id": "bigcode_python_fns_11017", "num_tests": 5 }
acecode
[ { "role": "user", "content": "Given a string template with placeholders and a list of values, implement a function `prepare_statement(template: str, values: List[str]) -> str` that replaces the placeholders in the template with the corresponding values from the list. The placeholders are denoted by `{}` and...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prepare_statement('Hello, {}. Welcome to {}!', ['Alice', 'Wonderland']) == 'Hello, Alice. Welcome to Wonderland!'\", \"assert prepare_statement('User: {} has logged in.', ['Bob']) == 'User: Bob has logged in.'\", \"assert prepare_statement('Today is {} and t...
{ "split": "train", "index": 2632, "acecode_id": "bigcode_python_fns_45444", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `is_fibonacci(n: int) -> bool` that determines if a given integer n is a Fibonacci number. A Fibonacci number is a number that is part of the Fibonacci sequence, which starts with 0 and 1, and each subsequent number is the sum of the two preceding ones. The fun...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_fibonacci(0) == True\", \"assert is_fibonacci(1) == True\", \"assert is_fibonacci(2) == True\", \"assert is_fibonacci(3) == True\", \"assert is_fibonacci(5) == True\", \"assert is_fibonacci(8) == True\", \"assert is_fibonacci(13) == True\", \"assert is_fi...
{ "split": "train", "index": 2633, "acecode_id": "evol_29704", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `find_smallest_largest_prime(arr: List[int]) -> Tuple[Optional[int], Optional[int]]` that takes a list of integers `arr` and returns a tuple containing the smallest and largest prime numbers found in the list. If there are no prime numbers in the list, retu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_smallest_largest_prime([10, 15, 20, 25]) == (None, None)\", \"assert find_smallest_largest_prime([2, 3, 5, 7, 11]) == (2, 11)\", \"assert find_smallest_largest_prime([4, 6, 8, 9]) == (None, None)\", \"assert find_smallest_largest_prime([1, 4, 6, 8, 9, 1...
{ "split": "train", "index": 2634, "acecode_id": "evol_31174", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given an undirected weighted graph represented by an edge list where `edges[i] = [a, b]` signifies an undirected edge connecting nodes `a` and `b` with a certain probability of successful traversal denoted by `succProb[i]`. Your task is to implement a function `maxProba...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert abs(maxProbability(3, [[0,1],[1,2],[0,2]], [0.5,0.5,0.2], 0, 2) - 0.25000) < 1e-5\", \"assert abs(maxProbability(3, [[0,1],[1,2],[0,2]], [0.5,0.5,0.3], 0, 2) - 0.30000) < 1e-5\", \"assert abs(maxProbability(3, [[0,1]], [0.5], 0, 2) - 0.00000) < 1e-5\", \"ass...
{ "split": "train", "index": 2635, "acecode_id": "evol_13205", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Write a Python function `update_status` that updates a specific record's status in a database table. The function should accept the parameters: `table` (str), `key` (str), `value` (int), and `status` (str). The function must handle the following errors: 1) If the database conne...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_status('contacts', 'contact_id', 99, 'active') == None\", \"assert update_status('non_existing_table', 'contact_id', 42, 'inactive') == None\", \"assert update_status('contacts', 'wrong_key', 42, 'inactive') == None\", \"assert update_status('contacts...
{ "split": "train", "index": 2636, "acecode_id": "evol_2045", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given an array of integers, implement a function that removes duplicates and returns a new array containing the unique values in ascending order. You should not use any built-in functions or additional data structures. Write a function called `remove_duplicates` that takes an a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates([5,5,5,10,10,15]) == [5, 10, 15]\", \"assert remove_duplicates([3, 1, 2, 2, 3]) == [1, 2, 3]\", \"assert remove_duplicates([7, 8, 9, 7, 8]) == [7, 8, 9]\", \"assert remove_duplicates([1, 2, 2, 3, 3, 3]) == [1, 2, 3]\", \"assert remove_dupli...
{ "split": "train", "index": 2637, "acecode_id": "evol_6129", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with validating a set of experimental data recorded in a dictionary called `read`. The dictionary contains the following keys and their corresponding values: \n- 'read_group': an integer representing the read group. \n- 'digitisation': a float representing the di...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_data({'read_group': 0, 'digitisation': 8192.0, 'offset': 23.0, 'range': 1467.61, 'sampling_rate': 4000.0}) == 'Data validation successful'\", \"assert validate_data({'read_group': 1, 'digitisation': 8192.0, 'offset': 23.0, 'range': 1467.61, 'samplin...
{ "split": "train", "index": 2638, "acecode_id": "oss_31851", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the retrieval of a client for a cloud service provider. Your function, `get_cloud_client`, should return a string that represents the type of client being accessed based on the input parameter `client_type`. The function sh...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_cloud_client('AWS') == 'AWS Client'\", \"assert get_cloud_client('GCP') == 'GCP Client'\", \"assert get_cloud_client('Azure') == 'Azure Client'\", \"assert get_cloud_client('aws') == 'Unknown Client'\", \"assert get_cloud_client('gcp') == 'Unknown Client...
{ "split": "train", "index": 2639, "acecode_id": "bigcode_python_fns_20114", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that toggles the debugging mode for a software application. The function should accept a boolean parameter `boolean`. If `boolean` is `True`, the function should enable debugging mode, and if `boolean` is `False`, it should disable it...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert set_debug(True) == None and debug_mode == True\", \"assert set_debug(False) == None and debug_mode == False\", \"assert set_debug(True) == None and debug_mode == True\", \"assert set_debug(False) == None and debug_mode == False\", \"assert set_debug(True) ==...
{ "split": "train", "index": 2640, "acecode_id": "bigcode_python_fns_21299", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of colors, your task is to replace the colors that exceed a specified threshold with a designated color while assigning a specific color to a certain color in the list. You are provided with a list of colors and need to implement a function `replace_colors` that ta...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert replace_colors(['C0', 'C1', 'C2', 'C3'], 'C0', 'black') == ['black', 'rgb(0,116,217)', 'rgb(35,205,205)', 'rgb(61,153,112)']\", \"assert replace_colors(['C4', 'C5', 'C0', 'C2'], 'C0', 'black', ['rgb(255,0,0)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)'...
{ "split": "train", "index": 2641, "acecode_id": "bigcode_python_fns_34512", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a simple game score management system. The function `manage_scores(score_list, banned_list)` takes two parameters: `score_list`, a list of integers representing player scores, and `banned_list`, a list of integers represent...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_scores([10, 20, 30], [20]) == 40\", \"assert manage_scores([5, 15, 25], [5]) == 40\", \"assert manage_scores([1, 2, 3, 4], [3]) == 7\", \"assert manage_scores([0, 10, 20], [0]) == 30\", \"assert manage_scores([50, 50, 50], [50]) == 0\", \"assert manag...
{ "split": "train", "index": 2642, "acecode_id": "bigcode_python_fns_10345", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of individual characters, implement a function that combines these characters into a single string. The function should ignore any whitespace characters in the input list and return the resulting string.\nPlease reason step by step, then write a self-contained Pyth...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert consolidate_chars(['H', 'e', 'l', 'l', 'o']) == 'Hello'\", \"assert consolidate_chars(['P', 'y', 't', 'h', 'o', 'n']) == 'Python'\", \"assert consolidate_chars(['A', 'B', ' ', 'C', 'D']) == 'ABCD'\", \"assert consolidate_chars([' ', ' ', 'H', 'e', 'l', 'l', ...
{ "split": "train", "index": 2643, "acecode_id": "evol_4371", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing a list of physiologic signal files. Each file contains a specific type of physiological signal data including its type, timestamps, sampling rate, and the signal itself. Your goal is to create a function that takes a list of these files and produc...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_physio_files([('PULS_A', [0.0, 1.0, 2.0], 100), ('RESP_B', [0.0, 0.5, 1.0], 50)], verbose=False) == [{'label': 'cardiac', 'sampling_rate': 100, 'physiostarttime': 0.0, 'length': 3}, {'label': 'respiratory', 'sampling_rate': 50, 'physiostarttime': 0.0...
{ "split": "train", "index": 2644, "acecode_id": "bigcode_python_fns_17903", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_valid_alternating_sequence(sequence: str) -> bool` that checks if the given sequence of characters is strictly alternating between upper-case English letters (A-Z) and digits (0-9). The sequence can start with either a letter or a digit. The function sh...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_valid_alternating_sequence('A1B2C3') == True\", \"assert is_valid_alternating_sequence('1A2B3C') == True\", \"assert is_valid_alternating_sequence('A1B2C3D4') == True\", \"assert is_valid_alternating_sequence('1234') == False\", \"assert is_valid_alternat...
{ "split": "train", "index": 2645, "acecode_id": "evol_9905", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function `find_unique_pairs(arr1: List[int], arr2: List[int], target: int) -> List[Tuple[int, int]]` that takes in two numerical arrays and a designated target total. The function should return a list of all unique pairs of elements from the two arrays that, when su...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_unique_pairs([10, 20, 30], [30, 20, 10], 40) == [(10, 30), (20, 20), (30, 10)]\", \"assert find_unique_pairs([1, 2, 3], [4, 4, 4], 7) == [(3, 4)]\", \"assert find_unique_pairs([], [], 5) == []\", \"assert find_unique_pairs([1, 2, 3], [4, 5, 6], 12) == [...
{ "split": "train", "index": 2646, "acecode_id": "evol_21468", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function `extract_book_info(html_content: str) -> List[List[str]]` that takes in a string containing HTML content of a webpage and extracts book information including the title, price, and availability status. The function should return a list of lists, where each i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_book_info('<div class=\\\"flex-article-content\\\"><h4 class=\\\"italic\\\">Book One</h4><p class=\\\"price\\\">$10.00</p><div class=\\\"availability\\\">In Stock</div></div>') == [['Book One', '$10.00', 'In Stock']]\", \"assert extract_book_info('<d...
{ "split": "train", "index": 2647, "acecode_id": "evol_27727", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Write a function to create a new string by appending the provided string to itself, but only if it does not contain any numerical characters. Additionally, remove any punctuation from the string before appending it to itself. If the string contains any numeric characters, retur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert append_string('Python3') == 'Python3'\", \"assert append_string('123abc') == '123abc'\", \"assert append_string('Test string...') == 'Test stringTest string'\", \"assert append_string('Goodbye!') == 'GoodbyeGoodbye'\", \"assert append_string('Hello123') == '...
{ "split": "train", "index": 2648, "acecode_id": "evol_6380", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given a list of 3-dimensional vectors representing logarithmic representations of rotation matrices, convert each vector into a corresponding 3x3 rotation matrix using Rodrigues' rotation formula. The input will be a list of n vectors, where each vector is a tuple of three floa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_log_rot_to_rot_matrix([(0.0, 0.0, 0.0)]) == [[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]]\", \"assert convert_log_rot_to_rot_matrix([(1.0, 0.0, 0.0)]) == [[[1.0, 0.0, 0.0], [0.0, 0.5403023058681398, -0.8414709848078965], [0.0, 0.8414709848078...
{ "split": "train", "index": 2649, "acecode_id": "bigcode_python_fns_43779", "num_tests": 5 }
acecode
[ { "role": "user", "content": "Implement a function that takes a list of strings and returns a dictionary where each unique string is a key and its corresponding value is the number of times that string appears in the list. The input list will only contain lowercase alphabetical strings. For example, given t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert string_list_to_dict(['apple', 'banana', 'apple']) == {'apple': 2, 'banana': 1}\", \"assert string_list_to_dict(['hello', 'hello', 'world', 'welcome', 'hello']) == {'hello': 3, 'world': 1, 'welcome': 1}\", \"assert string_list_to_dict(['test', 'test', 'test']...
{ "split": "train", "index": 2650, "acecode_id": "evol_29338", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an XML string representing a simple hierarchical structure, write a function `parse_xml` that parses the XML and returns a list of tag names found at the top level of the XML document. The XML string will always have a single root element and may contain multiple child el...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_xml('<root><child1/><child2/><child3/></root>') == ['child1', 'child2', 'child3']\", \"assert parse_xml('<root><item1/><item2/></root>') == ['item1', 'item2']\", \"assert parse_xml('<data><record/><record/></data>') == ['record', 'record']\", \"assert ...
{ "split": "train", "index": 2651, "acecode_id": "bigcode_python_fns_47181", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Given a list of strings representing feature names, return a list of integers where each integer is the length of the corresponding string in the input list. If the input list is empty, return an empty list.\nPlease reason step by step, then write a self-contained Python soluti...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_atom_feature_dims(['hydrogen', 'oxygen', 'carbon']) == [8, 6, 6]\", \"assert get_atom_feature_dims(['sodium', 'chlorine']) == [6, 8]\", \"assert get_atom_feature_dims(['neon']) == [4]\", \"assert get_atom_feature_dims(['']) == [0]\", \"assert get_atom_fe...
{ "split": "train", "index": 2652, "acecode_id": "bigcode_python_fns_9038", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to process email addresses based on user commands. The function should support two commands: \"Replace\" and \"Encrypt\". \n\nFor the \"Replace\" command, the function should replace all occurrences of a specified character in the ema...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_email('example@email.com', 'Encrypt') == '101 120 97 109 112 108 101 64 101 109 97 105 108 46 99 111 109'\", \"assert process_email('user@domain.com', 'Replace', 'u') == '-ser@domain.com'\", \"assert process_email('user@domain.com', 'Encrypt') == '11...
{ "split": "train", "index": 2653, "acecode_id": "oss_15249", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Write a Python function `sum_of_squares_tuple(tup, lst)` that computes the sum of squares of each integer in a provided tuple, including any nested tuples. The function should append the outcomes to a designated list. If the tuple is empty, the function should return the string...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_of_squares_tuple((), []) == 'Error: Empty tuple'\", \"assert sum_of_squares_tuple((1, 2, 3), []) == [1, 4, 9]\", \"assert sum_of_squares_tuple((1, -2, 3), []) == 'Error: Negative number in tuple'\", \"assert sum_of_squares_tuple((1, 2.5, 3), []) == 'Erro...
{ "split": "train", "index": 2654, "acecode_id": "evol_25480", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a grid that spans from (0, 0) to (999999, 999999) on an XY-plane. You start at a given square defined by coordinates `source = [sx, sy]` and want to reach a `target = [tx, ty]` square. However, there are certain squares that are blocked, defined by an array `block...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert isEscapePossible([[0,1],[1,0]], [0,0], [0,2]) == False\", \"assert isEscapePossible([], [0,0], [999999,999999]) == True\", \"assert isEscapePossible([[2,2],[2,1],[1,2]], [1,1], [3,3]) == True\", \"assert isEscapePossible([[1,1],[1,2],[2,1]], [0,0], [3,3]) ==...
{ "split": "train", "index": 2655, "acecode_id": "evol_16421", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are given a list of unique integer identifiers. Your task is to implement a function that returns the name of the transcript corresponding to each identifier as a string. The mapping of identifiers to transcript names is predefined as follows: 1 -> 'Biology', 2 -> 'Chemistr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_transcript_name([1]) == ['Biology']\", \"assert get_transcript_name([2]) == ['Chemistry']\", \"assert get_transcript_name([3]) == ['Physics']\", \"assert get_transcript_name([4]) == ['Mathematics']\", \"assert get_transcript_name([5]) == ['Literature']\"...
{ "split": "train", "index": 2656, "acecode_id": "bigcode_python_fns_41896", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string representation of an XML document, implement a function that extracts and counts the occurrences of each unique XML tag. The function should return a dictionary where the keys are the tag names and the values are their respective counts. The XML string will be we...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_xml_tags('<root><child/><child/><child/></root>') == {'root': 1, 'child': 3}\", \"assert count_xml_tags('<a><b><c/><c/></b></a>') == {'a': 1, 'b': 1, 'c': 2}\", \"assert count_xml_tags('<item><name>Item1</name><price>10</price></item>') == {'item': 1, ...
{ "split": "train", "index": 2657, "acecode_id": "evol_27480", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple joint controller for a robotic arm. The controller is responsible for setting the velocity of each joint to a specified value. Your task is to implement the `start_control` function, which should perform the following steps: 1. Print th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert start_control({'joint1': 5.0, 'joint2': 3.0}) == ['r: Set velocity of current joint to 0', '1-2: Number of joint to command', 'ESC: quit']\", \"assert start_control({'jointA': 1.5}) == ['r: Set velocity of current joint to 0', '1-1: Number of joint to comman...
{ "split": "train", "index": 2658, "acecode_id": "oss_6041", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a list of integers and returns a generator that yields only the even numbers from the list. The generator should process the list in a memory-efficient manner by yielding one even number at a time rather than returning a full list of even numbers...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert list(even_number_generator([1, 2, 3, 4, 5, 6])) == [2, 4, 6]\", \"assert list(even_number_generator([7, 8, 9, 10, 11])) == [8, 10]\", \"assert list(even_number_generator([0, 1, 2, 3, 4, 5, 6])) == [0, 2, 4, 6]\", \"assert list(even_number_generator([-2, -1, ...
{ "split": "train", "index": 2659, "acecode_id": "evol_21327", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the Levenshtein distance between two strings. The Levenshtein distance is defined as the minimum number of single-character edits (insertions, deletions, substitutions) required to convert one string into another. Write a function `levenshte...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert levenshtein_distance('kitten', 'sitting') == 3\", \"assert levenshtein_distance('flaw', 'lawn') == 2\", \"assert levenshtein_distance('intention', 'execution') == 5\", \"assert levenshtein_distance('sunday', 'saturday') == 3\", \"assert levenshtein_distance(...
{ "split": "train", "index": 2660, "acecode_id": "evol_14631", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of objects, each representing a data processing module. Each object has a type attribute that can be one of the following: 'MixingModule', 'DataMixingModule', or 'PreMixingModule'. Your task is to implement a function that returns two lists: the first list ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_modules([{'type': 'MixingModule'}, {'type': 'DataMixingModule'}, {'type': 'PreMixingModule'}, {'type': 'MixingModule'}]) == ([{'type': 'MixingModule'}, {'type': 'PreMixingModule'}, {'type': 'MixingModule'}], [{'type': 'DataMixingModule'}])\", \"assert ge...
{ "split": "train", "index": 2661, "acecode_id": "bigcode_python_fns_7819", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Implement a function that takes two strings as input: a main string and a search string. The function should return a tuple containing the frequency of the search string appearing in the main string and a list of the starting indices where the search string is found. The search...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_occurrences('hello hello', 'hello') == (2, [0, 6])\", \"assert find_occurrences('abababab', 'aba') == (3, [0, 2, 4])\", \"assert find_occurrences('CaseSensitive', 'case') == (0, [])\", \"assert find_occurrences('banana', 'na') == (2, [2, 4])\", \"assert...
{ "split": "train", "index": 2662, "acecode_id": "evol_824", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that represents a social media post using a simple data structure. The function should return a dictionary that includes the post's title, description, image URL, date of update, and the number of comments. The function should take the fo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_post('My First Post', 'This is a description of my first post.', 'http://example.com/image.jpg', '2023-10-01T12:00:00', 5) == {'title': 'My First Post', 'description': 'This is a description of my first post.', 'image': 'http://example.com/image.jpg',...
{ "split": "train", "index": 2663, "acecode_id": "oss_1072", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the management of camera snapshots. The function `retrieve_snapshots(cameras: List[str], available_cameras: List[str]) -> List[str]` takes in two parameters: a list of camera names `cameras` for which snapshots are requ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert retrieve_snapshots(['camera1', 'camera2', 'camera3'], ['camera2', 'camera3', 'camera4']) == ['camera2', 'camera3']\", \"assert retrieve_snapshots(['cameraA', 'cameraB'], ['cameraA', 'cameraC']) == ['cameraA']\", \"assert retrieve_snapshots(['camera1', 'camer...
{ "split": "train", "index": 2664, "acecode_id": "oss_27611", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a string as input and returns a modified string that excludes all vowels, digits, punctuation symbols, spaces, and any characters that are not English alphabets. The output should only contain consonants (both uppercase and lowercase).\nPlease re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_vowels_digits_punctuation_whitespace_plus('Hello, World! 123') == 'HllWrld'\", \"assert remove_vowels_digits_punctuation_whitespace_plus('1234567890') == ''\", \"assert remove_vowels_digits_punctuation_whitespace_plus('') == ''\", \"assert remove_vowe...
{ "split": "train", "index": 2665, "acecode_id": "evol_4223", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that takes a list of integers and returns a new list containing only the even integers from the original list. Your function should maintain the order of elements as they appear in the input list. If there are no even integers, return an e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_even_numbers([1, 2, 3, 4, 5]) == [2, 4]\", \"assert filter_even_numbers([10, 15, 20, 25]) == [10, 20]\", \"assert filter_even_numbers([1, 3, 5, 7]) == []\", \"assert filter_even_numbers([2, 4, 6, 8]) == [2, 4, 6, 8]\", \"assert filter_even_numbers([])...
{ "split": "train", "index": 2666, "acecode_id": "oss_28098", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a simple player synchronization system. Each player can either sync with another player or unsync themselves. A player has a unique identifier and can belong to a sync group. You need to implement a function `sync_playe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sync_players(1, 2) == 'Players synced successfully'\", \"assert sync_players(2, 3) == 'Players synced successfully'\", \"assert sync_players(1, 1) == 'Cannot sync with self'\", \"assert sync_players(0, 2) == 'Synchronization failed'\", \"assert sync_players(...
{ "split": "train", "index": 2667, "acecode_id": "bigcode_python_fns_46783", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that manages a list of records for different models. Each record is identified by a model name and consists of fields stored as a dictionary. Your function should take a model name and a dictionary of fields as input and return the primar...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_record_id('User', {'name': 'Alice', 'age': 30}) == 1\", \"assert get_record_id('User', {'name': 'Bob', 'age': 25}) == 2\", \"assert get_record_id('User', {'name': 'Charlie', 'age': 35}) is None\", \"assert get_record_id('User', {'name': 'Alice', 'age': 3...
{ "split": "train", "index": 2668, "acecode_id": "oss_12055", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that filters a list of firewall rules based on a specific criterion. Each rule is represented by a class `FirewallRule` with attributes such as `source_zone`, `target_zone`, `protocol`, and `action`. Your task is to implement t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_rules_by_target_zone([FirewallRule('internal', 'internet', 'tcp', 'allow'), FirewallRule('external', 'dmz', 'udp', 'deny')], 'internet') == [FirewallRule('internal', 'internet', 'tcp', 'allow')]\", \"assert filter_rules_by_target_zone([FirewallRule('i...
{ "split": "train", "index": 2669, "acecode_id": "oss_8601", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a dataset represented as a list of lists, calculate the coverage percentage of the dataset. The coverage is defined as the percentage of non-null values in the dataset. Implement a function `calculate_coverage(dataset)` that takes a dataset as input and returns the covera...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_coverage([[None, None], [None, None]]) == 0.0\", \"assert calculate_coverage([[1, 2, 3], [4, 5, 6]]) == 100.0\", \"assert calculate_coverage([[None, 1], [2, 3], [None, None]]) == 50.0\", \"assert calculate_coverage([[None]]) == 0.0\", \"assert calc...
{ "split": "train", "index": 2670, "acecode_id": "oss_23270", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a gene expression dataset represented as a dictionary of dictionaries. Each gene has a dictionary containing several identifiers (IDs) and their corresponding expression values, along with a 'Total' key representing the total expression value for that gene. Your t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_gene_expression('ABC', {'ABC': {'ID1': 10, 'ID2': 20, 'Total': 30}, 'DEF': {'ID3': 15, 'ID4': 25, 'Total': 40}}) == ['ID1\\\\t10\\\\t30', 'ID2\\\\t20\\\\t30']\", \"assert get_gene_expression('DEF', {'ABC': {'ID1': 10, 'ID2': 20, 'Total': 30}, 'DEF': {'ID...
{ "split": "train", "index": 2671, "acecode_id": "oss_11705", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a string representing a hexadecimal number, convert it into its binary representation. The input string will always be two characters long and will contain valid hexadecimal digits (0-9, A-F). Return the corresponding binary representation as a string. For example, '1A' s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert hex2binary('00') == '00000000'\", \"assert hex2binary('1F') == '00011111'\", \"assert hex2binary('A0') == '10100000'\", \"assert hex2binary('FF') == '11111111'\", \"assert hex2binary('7E') == '01111110'\", \"assert hex2binary('3C') == '00111100'\", \"assert ...
{ "split": "train", "index": 2672, "acecode_id": "bigcode_python_fns_44239", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a function f and a list of integers xs, implement a function eval_function that applies f to each element in xs and returns a list of results. The function f takes a single integer as an argument and you need to evaluate f for each integer in the list xs. For example, if ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert eval_function(lambda x: x + 1, [1, 2, 3]) == [2, 3, 4]\", \"assert eval_function(lambda x: x * 2, [1, 2, 3]) == [2, 4, 6]\", \"assert eval_function(lambda x: x ** 2, [1, 2, 3]) == [1, 4, 9]\", \"assert eval_function(lambda x: x - 1, [1, 2, 3]) == [0, 1, 2]\"...
{ "split": "train", "index": 2673, "acecode_id": "bigcode_python_fns_13843", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `add_transaction(transactions: List[Tuple[str, str, str]]) -> List[str]` that takes a list of tuples representing transactions, where each tuple contains a consumer ID (string), consumer name (string), and product name (string). The function should return a lis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_transaction([('001', 'John Doe', 'Product 1'), ('002', 'Jane Doe', 'Product 2')]) == ['Consumer ID: 001, Consumer Name: John Doe, Product: Product 1', 'Consumer ID: 002, Consumer Name: Jane Doe, Product: Product 2']\", \"assert add_transaction([('003', '...
{ "split": "train", "index": 2674, "acecode_id": "evol_10816", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with generating a configuration string for a data analysis library package. Write a function `generate_config_string` that takes two boolean parameters `include_package_data` and `zip_safe`. The function should return a string that represents the package configur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_config_string(True, False) == 'from setuptools import setup\\\\n\\\\nsetup(\\\\n include_package_data=True,\\\\n zip_safe=False\\\\n)'\", \"assert generate_config_string(False, True) == 'from setuptools import setup\\\\n\\\\nsetup(\\\\n inc...
{ "split": "train", "index": 2675, "acecode_id": "oss_28803", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a user authentication system. This function will receive a dictionary representing a JSON object containing a password. Your goal is to check if the provided password matches a predefined secure password. If the password is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_password({'password': 'secure_password'}) == 'Password is correct'\", \"assert check_password({'password': 'wrong_password'}) == 'Incorrect password'\", \"assert check_password({'password': ''}) == 'Incorrect password'\", \"assert check_password({'pass...
{ "split": "train", "index": 2676, "acecode_id": "oss_5043", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function `determine_format(content_type: str) -> str` that takes a string representing the HTTP 'Content-Type' header and returns the corresponding format type based on a predefined mapping. If the Content-Type does not match any known types, the f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert determine_format('application/atom+xml') == 'atom'\", \"assert determine_format('application/x-bibtex') == 'bibtex'\", \"assert determine_format('application/json') == 'json'\", \"assert determine_format('text/html') == 'snapshot'\", \"assert determine_forma...
{ "split": "train", "index": 2677, "acecode_id": "bigcode_python_fns_42596", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a function decorator called `debug(func)` that is designed to print a tree of execution for debugging purposes. This decorator takes a function `func` as an argument and returns a modified version of that function which, when called, will print a structured repres...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert debug(lambda x: x + 1)(5) == 6\", \"assert debug(lambda x: x * 2)(3) == 6\", \"assert debug(lambda x, y: x - y)(10, 4) == 6\", \"assert debug(lambda: 'Hello, World!')() == 'Hello, World!'\", \"assert debug(lambda s: s.upper())('python') == 'PYTHON'\", \"asse...
{ "split": "train", "index": 2678, "acecode_id": "bigcode_python_fns_26523", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a dictionary representing an object with various fields, implement a function `get_serializable_value(obj: dict, field_name: str) -> Any` that returns the value of the specified field. If the field is present in the dictionary, return its value. If the field does not exis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_serializable_value({'user_id': 123, 'name': 'Alice'}, 'user_id') == 123\", \"assert get_serializable_value({'user_id': 123, 'name': 'Alice'}, 'name') == 'Alice'\", \"assert get_serializable_value({'user_id': 123, 'name': 'Alice'}, 'age') == None\", \"ass...
{ "split": "train", "index": 2679, "acecode_id": "bigcode_python_fns_24704", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a binary tree, write a function to find the maximum sum of non-adjacent nodes in the tree. A node is considered adjacent if it is a direct parent-child relationship. You need to implement the function `find_max_sum(root: Node) -> int`, where `Node` is a class representing...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_max_sum(Node(1)) == 1\", \"assert find_max_sum(Node(10, None, Node(10))) == 10\", \"assert find_max_sum(Node(1, None, Node(1))) == 1\", \"assert find_max_sum(Node(1, Node(2, Node(3, Node(4, Node(5)))))) == 9\", \"assert find_max_sum(Node(1, Node(2), Nod...
{ "split": "train", "index": 2680, "acecode_id": "evol_12959", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with enriching a dataset represented as a list of dictionaries in Python. Each dictionary contains information about an item, specifically its 'id' and 'name'. Your goal is to implement a function `enrich_data` that takes three parameters: a list of dictionaries ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert enrich_data([{'id': 1, 'name': 'item1'}, {'id': 2, 'name': 'item2'}], '2023-10-01T12:00:00Z', 'Source_A') == [{'id': 1, 'name': 'item1', 'enrichment_timestamp': '2023-10-01T12:00:00Z', 'enrichment_source': 'Source_A'}, {'id': 2, 'name': 'item2', 'enrichment_...
{ "split": "train", "index": 2681, "acecode_id": "oss_35412", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Given a string `s`, write a function that counts the occurrences of each character in the string and returns a dictionary where the keys are the characters and the values are their respective counts. The function should ignore case (e.g., 'A' and 'a' are considered the same cha...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count('aba') == {'a': 2, 'b': 1}\", \"assert count('abcddbacdb') == {'a': 2, 'b': 3, 'c': 2, 'd': 3}\", \"assert count('') == {}\", \"assert count('Hello') == {'h': 1, 'e': 1, 'l': 2, 'o': 1}\", \"assert count('aA') == {'a': 2}\", \"assert count('Python') ==...
{ "split": "train", "index": 2682, "acecode_id": "bigcode_python_fns_7218", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given a 2D array of color names, implement a function `color_array` that converts each color name into its corresponding RGB values and returns a new 3D array representing an image with an alpha channel. The output array should have the same dimensions as the input array, with ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert color_array([['red', 'green'], ['blue', 'yellow']], 1.0) == [[[1.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 1.0]], [[0.0, 0.0, 1.0, 1.0], [1.0, 1.0, 0.0, 1.0]]]\", \"assert color_array([['cyan', 'magenta'], ['black', 'white']], 0.5) == [[[0.0, 1.0, 1.0, 0.5], [1.0, ...
{ "split": "train", "index": 2683, "acecode_id": "bigcode_python_fns_49499", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that calculates the total annual energy yield of a solar panel system based on some predefined parameters. Your function should take the following parameters: a string representing the tracking type ('fixed' or 'single-axis'), a fl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_annual_energy_yield('fixed', 0, 0) == 1000\", \"assert calculate_annual_energy_yield('fixed', 30, 0) == 1200\", \"assert calculate_annual_energy_yield('fixed', 0, 30) == 1100\", \"assert calculate_annual_energy_yield('fixed', 30, 30) == 1300\", \"a...
{ "split": "train", "index": 2684, "acecode_id": "oss_22495", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a linting command and configuration for a set of C/C++ source files using a specified linting executable. Implement a function `create_linting_config` that takes two parameters: a string `executable` representing the path t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_linting_config('lint_tool', ['file1.c', 'file2.cpp']) == {'lint_command': 'lint_tool file1.c file2.cpp', 'output': 'lint_output', 'runfiles': ['lint_tool', 'file1.c', 'file2.cpp']}\", \"assert create_linting_config('my_linter', ['main.c']) == {'lint_c...
{ "split": "train", "index": 2685, "acecode_id": "oss_36782", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that retrieves the unique languages from a dictionary of messages. The dictionary has tuples as keys, where each tuple consists of a language code and the corresponding message. Your function should take this dictionary as input and r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_unique_languages({('en', 'Hello'): 'English Hello', ('fr', 'Bonjour'): 'French Hello'}) == ['en', 'fr']\", \"assert get_unique_languages({('es', 'Hola'): 'Spanish Hello', ('de', 'Hallo'): 'German Hello', ('fr', 'Bonjour'): 'French Hello'}) == ['de', 'es'...
{ "split": "train", "index": 2686, "acecode_id": "oss_19589", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a basic error handling mechanism for a web application. Your function should take an HTTP status code as input and return a corresponding custom error message. Implement the function 'handle_error' which accepts one paramet...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert handle_error(404) == 'Sorry, nothing at this URL.'\", \"assert handle_error(500) == 'An internal server error occurred.'\", \"assert handle_error(401) == 'Unexpected error occurred.'\", \"assert handle_error(403) == 'Unexpected error occurred.'\", \"assert h...
{ "split": "train", "index": 2687, "acecode_id": "oss_14274", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two strings `str1` and `str2`, implement a function `shortestCommonSupersequence(str1: str, str2: str) -> str` that returns the shortest string that includes both `str1` and `str2` as subsequences, adhering to the following constraints: \n\n1. The supersequence must not i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert shortestCommonSupersequence('abc', 'cde') == 'abcde'\", \"assert shortestCommonSupersequence('ab', 'bc') == 'abc'\", \"assert shortestCommonSupersequence('abc', 'abc') == 'abc'\", \"assert shortestCommonSupersequence('a', 'a') == 'a'\", \"assert shortestComm...
{ "split": "train", "index": 2688, "acecode_id": "evol_23831", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a string as input, which represents a JSON object. Your function should parse this JSON string and return a Python dictionary. If the input string is not a valid JSON format, your function should return an empty dictionary. Imp...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_json_string('{\\\"key\\\": \\\"value\\\"}') == {'key': 'value'}\", \"assert parse_json_string('{\\\"name\\\": \\\"John\\\", \\\"age\\\": 30}') == {'name': 'John', 'age': 30}\", \"assert parse_json_string('{\\\"is_valid\\\": true}') == {'is_valid': True...
{ "split": "train", "index": 2689, "acecode_id": "bigcode_python_fns_45777", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `is_palindrome(string: str) -> bool` that determines whether a provided string is a palindrome. A palindrome is a string that reads the same forward and backward, ignoring spaces and case differences. The function should return `True` if the string is a palindr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_palindrome('A man a plan a canal Panama') == True\", \"assert is_palindrome('racecar') == True\", \"assert is_palindrome('No lemon no melon') == True\", \"assert is_palindrome('Was it a car or a cat I saw') == True\", \"assert is_palindrome('hello') == Fa...
{ "split": "train", "index": 2690, "acecode_id": "evol_22649", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a list of integers and returns a new list that contains only the unique elements from the input list, maintaining the original order of their first appearance. Write a function called `unique_elements(arr: List[int]) -> Lis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_elements([1, 2, 3, 1, 2, 4]) == [1, 2, 3, 4]\", \"assert unique_elements([5, 5, 5, 5]) == [5]\", \"assert unique_elements([]) == []\", \"assert unique_elements([10, 20, 10, 30, 40, 20]) == [10, 20, 30, 40]\", \"assert unique_elements([7, 8, 9, 7, 8, 7...
{ "split": "train", "index": 2691, "acecode_id": "bigcode_python_fns_13006", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that determines whether a given integer is greater than, equal to, or less than 20. The function should take a single integer input and return a string that states the comparison result based on the following conditions: - If the i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compare_to_twenty(25) == '25 is greater than 20'\", \"assert compare_to_twenty(20) == '20 is equal to 20'\", \"assert compare_to_twenty(15) == '15 is less than 20'\", \"assert compare_to_twenty(30) == '30 is greater than 20'\", \"assert compare_to_twenty(10)...
{ "split": "train", "index": 2692, "acecode_id": "oss_19942", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes version information and dependencies from provided strings instead of files. Write a function `process_dependencies(version_info: str, requirements_info: str) -> tuple` that takes in two parameters: \n- `version_info...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_dependencies('version: 1.0.0', 'numpy==1.21.0\\\\nrequests==2.25.1\\\\n\\\\n#comment') == ('1.0.0', ['numpy==1.21.0', 'requests==2.25.1'])\", \"assert process_dependencies('version: 2.4.1', '# This is a comment\\\\nflask==1.1.2\\\\n\\\\n') == ('2.4.1...
{ "split": "train", "index": 2693, "acecode_id": "oss_14073", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates saving a snapshot of a model during training. The function takes in several parameters and returns a dictionary that represents the model state to be saved. The input parameters are as follows: \n\n- `model_state` (dict...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert save_model_snapshot({'weight': 0.5}, 1, False) == {'model_state': {'weight': 0.5}, 'epoch': 1}\", \"assert save_model_snapshot({'weight': 0.5}, 1, True) == {'model_state': {'weight': 0.5}, 'epoch': 1, 'is_best': True}\", \"assert save_model_snapshot({'weight...
{ "split": "train", "index": 2694, "acecode_id": "bigcode_python_fns_1328", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Tatami, the traditional Japanese floor mats, are rectangular in shape and are utilized to entirely cover the floor space of a room without any overlapping. The standard tatami that we have at our disposal measures 1 x 2 in dimensions. For this problem, we are only considering r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_tatami_free_rooms(2) == 0\", \"assert count_tatami_free_rooms(4) == 0\", \"assert count_tatami_free_rooms(8) == 0\", \"assert count_tatami_free_rooms(12) == 0\", \"assert count_tatami_free_rooms(16) == 0\", \"assert count_tatami_free_rooms(20) == 0\", ...
{ "split": "train", "index": 2695, "acecode_id": "evol_19661", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given two lists, A and B, of the same length consisting of integers. Your task is to implement a function `minDominoRotations(A: List[int], B: List[int]) -> int` that returns the minimum number of rotations needed to make all elements in A or B equal to a single value. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert minDominoRotations([1, 1, 1, 1], [1, 1, 1, 1]) == 0\", \"assert minDominoRotations([1, 2, 3, 4], [3, 4, 5, 6]) == -1\", \"assert minDominoRotations([2, 3, 3, 4], [3, 2, 2, 3]) == 2\", \"assert minDominoRotations([1, 1, 2, 2], [2, 2, 1, 1]) == 2\", \"assert m...
{ "split": "train", "index": 2696, "acecode_id": "evol_7597", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function that converts all even numbers to their binary representation and all odd numbers to their hexadecimal representation. The function should return a single string that concatenates all the results without any spaces. For example, fo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert numbers_conversion([12, 13, 14]) == '1100d1110'\", \"assert numbers_conversion([5]) == '5'\", \"assert numbers_conversion([12]) == '1100'\", \"assert numbers_conversion([]) == ''\", \"assert numbers_conversion([255]) == 'ff'\", \"assert numbers_conversion([2...
{ "split": "train", "index": 2697, "acecode_id": "evol_33659", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates sending SMS messages. Your function should take in two parameters: `recipient_number` (a string representing the recipient's phone number) and `message_content` (a string representing the content of the SMS message). The fu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert send_sms('1234567890', 'Hello!') == 'SMS sent successfully to 1234567890'\", \"assert send_sms('0987654321', 'Goodbye!') == 'SMS sent successfully to 0987654321'\", \"assert send_sms('1234567890', '') == 'Failed to send SMS to 1234567890. Invalid input.'\", ...
{ "split": "train", "index": 2698, "acecode_id": "oss_19575", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of unique integers, write a function `find_maximum_value(nums: List[int]) -> int` that returns the maximum integer from the list. If the list is empty, return -1. \n\nExample:\nInput: nums = [3, 5, 7, 2, 1]\nOutput: 7\n\nInput: nums = []\nOutput: -1\nPlease reason ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_maximum_value([3, 5, 7, 2, 1]) == 7\", \"assert find_maximum_value([-1, -5, -3]) == -1\", \"assert find_maximum_value([10]) == 10\", \"assert find_maximum_value([0, 1, 2]) == 2\", \"assert find_maximum_value([100, 200, 300]) == 300\", \"assert find_maxi...
{ "split": "train", "index": 2699, "acecode_id": "bigcode_python_fns_1587", "num_tests": 16 }