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": "Implement a function that sorts a dictionary by its values. The function should handle dictionaries with mixed data types as values, sorting numeric values in ascending order and string values alphabetically. The keys should remain associated with their respective values after ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sort_dict({'a': 1, 'b': 2, 'c': 3}) == {'a': 1, 'b': 2, 'c': 3}\", \"assert sort_dict({'x': 'apple', 'y': 'banana', 'z': 'cherry'}) == {'x': 'apple', 'y': 'banana', 'z': 'cherry'}\", \"assert sort_dict({'a': 3, 'b': 1, 'c': 2}) == {'b': 1, 'c': 2, 'a': 3}\",...
{ "split": "train", "index": 78400, "acecode_id": "evol_12893", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with merging two sorted lists into a single sorted list. Implement a function `merge_sorted_lists(list1: List[int], list2: List[int]) -> List[int]` that takes in two sorted lists of integers and returns a new sorted list that contains all the elements from both i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_sorted_lists([1, 3, 5], [2, 4, 6]) == [1, 2, 3, 4, 5, 6]\", \"assert merge_sorted_lists([], [2, 4, 6]) == [2, 4, 6]\", \"assert merge_sorted_lists([1, 1, 1], [1, 1, 1]) == [1, 1, 1, 1, 1, 1]\", \"assert merge_sorted_lists([1, 2, 3], []) == [1, 2, 3]\",...
{ "split": "train", "index": 78401, "acecode_id": "bigcode_python_fns_30707", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that returns the n-th element in a Fibonacci sequence, where the sequence starts with 0 as the first element and 1 as the second element. The function should take a single integer n as input, and return the n-th Fibonacci number. If n is less than or equal ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fibonacci(1) == 0\", \"assert fibonacci(2) == 1\", \"assert fibonacci(3) == 1\", \"assert fibonacci(4) == 2\", \"assert fibonacci(5) == 3\", \"assert fibonacci(6) == 5\", \"assert fibonacci(7) == 8\", \"assert fibonacci(8) == 13\", \"assert fibonacci(9) == 2...
{ "split": "train", "index": 78402, "acecode_id": "evol_14633", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a boolean value `b`, implement a function `boolean_to_string(b: Optional[bool]) -> Optional[str]` that converts the boolean value to its string representation. If `b` is None, the function should return None. If `b` is True, return the string 'true'. If `b` is False, retu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert boolean_to_string(None) == None\", \"assert boolean_to_string(True) == 'true'\", \"assert boolean_to_string(False) == 'false'\", \"assert boolean_to_string(True) == 'true'\", \"assert boolean_to_string(False) == 'false'\", \"assert boolean_to_string(None) ==...
{ "split": "train", "index": 78403, "acecode_id": "bigcode_python_fns_44089", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary `poses_set` containing 3D pose data, where each key is a joint name and each value is a tuple representing the 3D coordinates (x, y, z) of that joint. Your task is to write a function `center_poses` that modifies the `poses_set` dictionary to center t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert center_poses({'center_hip': (1, 2, 3), 'joint1': (4, 5, 6), 'joint2': (7, 8, 9)}) == ({'center_hip': (0, 0, 0), 'joint1': (3, 3, 3), 'joint2': (6, 6, 6)}, {'center_hip': (1, 2, 3), 'joint1': (4, 5, 6), 'joint2': (7, 8, 9)})\", \"assert center_poses({'center_...
{ "split": "train", "index": 78404, "acecode_id": "oss_19784", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `compute_primality_hash(n)` that returns `True` if the given integer `n` is a prime number and `False` otherwise. You should use a mapping structure to enhance the performance of primality checking. The function should not take any additional parameters. A ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compute_primality_hash(2) == True\", \"assert compute_primality_hash(3) == True\", \"assert compute_primality_hash(4) == False\", \"assert compute_primality_hash(5) == True\", \"assert compute_primality_hash(6) == False\", \"assert compute_primality_hash(7) ...
{ "split": "train", "index": 78405, "acecode_id": "evol_2524", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that processes input data based on the number and type of arguments provided. The function should be defined as follows: `def process_data(*args, **kwargs):`. The function should adhere to the following rules: 1. If no argument...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_data() == []\", \"assert process_data([3, 1, 2]) == [1, 2, 3]\", \"assert process_data([5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]\", \"assert process_data(1, 2, 3) == (3, 2, 1)\", \"assert process_data('a', 'b', 'c') == ('c', 'b', 'a')\", \"assert process_d...
{ "split": "train", "index": 78406, "acecode_id": "oss_35252", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are given a list of dictionaries where each dictionary represents a corporation with the following keys: 'Type', 'Name', and 'Info'. Your task is to process this list and store the information into three dictionaries: 'orgbook_corp_types', 'orgbook_corp_names', and 'orgbook...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_corporations([{'Type': 'Tech', 'Name': 'Company A', 'Info': 'Information A'}, {'Type': 'Finance', 'Name': 'Company B', 'Info': 'Information B'}, {'Type': 'Tech', 'Name': 'Company C', 'Info': 'Information C'}]) == ({'Tech': ['Company A', 'Company C'],...
{ "split": "train", "index": 78407, "acecode_id": "oss_14173", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a paragraph of text. Your task is to implement a function that creates a unique jumble of words from the given text. Each word in the text should be jumbled such that its letters are rearranged randomly. Additionally, ensure that the jumbled words are unique, mean...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_jumble('apple banana cherry') != 'apple banana cherry'\", \"assert create_jumble('dog cat') != 'dog cat'\", \"assert create_jumble('quick brown fox') != 'quick brown fox'\", \"assert create_jumble('hello world') != 'hello world'\", \"assert create_jum...
{ "split": "train", "index": 78408, "acecode_id": "evol_34643", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that handles the response from a dashboard creation API. Your function should log appropriate messages based on the HTTP response code and any encountered exceptions. You will receive three inputs: a message dictionary containing t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert handle_dashboard_response({'name': 'test_dashboard'}, MockResponse(200), MockLogger()) == None\", \"assert handle_dashboard_response({'name': 'dashboard1'}, MockResponse(404), MockLogger()) == None\", \"assert handle_dashboard_response({'name': 'dashboard2'}...
{ "split": "train", "index": 78409, "acecode_id": "oss_16720", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a Python function that converts a given quantity from inches to centimeters. The function should take a single parameter, `inches`, which represents the length in inches, and return the equivalent length in centimeters. Use the conversion factor where 1 inch is equal ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert inches_to_cm(0) == 0.0\", \"assert inches_to_cm(1) == 2.54\", \"assert inches_to_cm(2) == 5.08\", \"assert inches_to_cm(10) == 25.4\", \"assert inches_to_cm(25) == 63.5\", \"assert inches_to_cm(50) == 127.0\", \"assert inches_to_cm(100) == 254.0\", \"assert ...
{ "split": "train", "index": 78410, "acecode_id": "evol_8163", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of integers, implement a function called `split_list` that divides the array into two halves. If the array has an odd number of elements, the first half should contain one fewer element than the second half. The function should return a tuple containing both halv...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert split_list([1, 2, 3, 4, 5, 6]) == ([1, 2, 3], [4, 5, 6])\", \"assert split_list([]) == ([], [])\", \"assert split_list([10, 20, 30, 40]) == ([10, 20], [30, 40])\", \"assert split_list([2, 4, 6, 8, 10, 12, 14, 16]) == ([2, 4, 6, 8], [10, 12, 14, 16])\", \"ass...
{ "split": "train", "index": 78411, "acecode_id": "evol_26882", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with creating a version comparison function for a software curator tool. The curator tool manages different versions of software packages and needs a way to compare two version strings to determine which one is the latest. The version strings follow the semantic ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compare_versions('1.2.3', '1.2.4') == -1\", \"assert compare_versions('0.1', '0.1.0') == 0\", \"assert compare_versions('2.0', '1.9.9') == 1\", \"assert compare_versions('1.0.0', '1') == 0\", \"assert compare_versions('1.0.1', '1.0') == 1\", \"assert compare...
{ "split": "train", "index": 78412, "acecode_id": "oss_25164", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that generates a random integer between 1 and 10 (inclusive). The function should return this integer each time it is called.\nPlease reason step by step, then write a self-contained Python solution. Give your final program in a single ```python code block....
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert 1 <= generate_random_number() <= 10\", \"assert 1 <= generate_random_number() <= 10\", \"assert 1 <= generate_random_number() <= 10\", \"assert 1 <= generate_random_number() <= 10\", \"assert 1 <= generate_random_number() <= 10\", \"assert 1 <= generate_rand...
{ "split": "train", "index": 78413, "acecode_id": "evol_1337", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given an initial learning rate and the current epoch number in a training schedule. Your task is to implement a function that adjusts the learning rate based on the following rules: \n1. If the epoch is less than 5, the learning rate should be linearly increased from 0 ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert adjust_learning_rate(0.1, 0) == 0.02\", \"assert adjust_learning_rate(0.1, 1) == 0.04\", \"assert adjust_learning_rate(0.1, 2) == 0.06\", \"assert adjust_learning_rate(0.1, 3) == 0.08\", \"assert adjust_learning_rate(0.1, 4) == 0.1\", \"assert adjust_learnin...
{ "split": "train", "index": 78414, "acecode_id": "bigcode_python_fns_9968", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are designing an ATM interface that provides a list of operations to a user based on their account type. Implement a function `atm_options(acc_type: str) -> List[str]` that takes an account type as input and returns a list of available ATM operations as strings. The operati...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert atm_options('savings') != ['Withdraw Money', 'Deposit Money', 'Check Balance']\", \"assert atm_options('current') != ['Exit Session', 'Print Mini Statement']\", \"assert atm_options('business') != ['Withdraw Money', 'Check Balance', 'Deposit Money']\", \"ass...
{ "split": "train", "index": 78415, "acecode_id": "bigcode_python_fns_42134", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are given a string that represents a sequence of tokens separated by spaces. Your task is to implement a function that takes this string as input and returns a list of unique tokens in the order they first appear. A token is defined as a sequence of non-space characters. Th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_unique_tokens(' apple banana apple ') == ['apple', 'banana']\", \"assert extract_unique_tokens('hello world hello') == ['hello', 'world']\", \"assert extract_unique_tokens(' test case ') == ['test', 'case']\", \"assert extract_unique_tokens('...
{ "split": "train", "index": 78416, "acecode_id": "oss_8106", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a server plugin configuration defined by a dictionary of events, a custom value, and a server configuration object. Each event is represented by a string key and an EventDescriptor object which contains the event type and plug mode. Your task is to write a functio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_event_info('GET', {'custom_value': 'custom1', 'events': {'GET': EventDescriptor(EventType.GET, EventPlugMode.ON_APP)}, 'server': ServerConfig(LoggingConfig('INFO', '/var/logs'))}) == ('custom1', EventDescriptor(EventType.GET, EventPlugMode.ON_APP))\", \"...
{ "split": "train", "index": 78417, "acecode_id": "oss_33801", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given a list of dictionaries, where each dictionary contains information about a geographic region. Each dictionary can have the following keys: '_id', 'casecount', 'country', 'admin1', 'admin2', and 'admin3'. The '_id' key maps to another dictionary with keys 'latitude...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_regions([{'_id': {'latitude': 10.0, 'longitude': 20.0}, 'casecount': 5, 'country': 'USA', 'admin1': 'California', 'admin2': None, 'admin3': None}]) == [{'_id': 'California', 'casecount': 5, 'country': 'USA', 'country_code': 'USA', 'admin1': 'Califo...
{ "split": "train", "index": 78418, "acecode_id": "bigcode_python_fns_6063", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function called `cross_product` that takes two 3D vectors represented as lists of three integers each and returns their cross product as a list. The input vectors will be given as `vector1` and `vector2`. Each vector is guaranteed to have exactly three elements. The...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cross_product([1, 2, 3], [4, 5, 6]) == [-3, 6, -3]\", \"assert cross_product([0, 1, 0], [1, 0, 0]) == [0, 0, -1]\", \"assert cross_product([1, 0, 0], [0, 1, 0]) == [0, 0, 1]\", \"assert cross_product([1, 2, 3], [3, 2, 1]) == [-4, 8, -4]\", \"assert cross_pro...
{ "split": "train", "index": 78419, "acecode_id": "evol_12991", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function that takes a list of words and rearranges them in alphabetical order, returning the new order as a list. The input list may contain duplicates and the order should be case-insensitive. For example, the input list ['pear', 'Apple', 'cherry', 'banana', 'Grape...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert rearrange_words(['pear', 'apple', 'cherry', 'banana', 'grape']) == ['apple', 'banana', 'cherry', 'grape', 'pear']\", \"assert rearrange_words(['Apple', 'banana', 'Cherry', 'grape', 'pear']) == ['Apple', 'banana', 'Cherry', 'grape', 'pear']\", \"assert rearra...
{ "split": "train", "index": 78420, "acecode_id": "evol_9394", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `find_max_even(numbers)` that returns the maximum even number from the list. If there are no even numbers, return -1. The function should handle an empty list and return -1 in that case as well. \n\nFunction Signature: `def find_max_ev...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_max_even([1, 2, 3, 4, 5]) == 4\", \"assert find_max_even([2, 4, 6, 8]) == 8\", \"assert find_max_even([1, 3, 5, 7]) == -1\", \"assert find_max_even([]) == -1\", \"assert find_max_even([-1, -2, -3, -4]) == -2\", \"assert find_max_even([-2, -4, -6]) == -2...
{ "split": "train", "index": 78421, "acecode_id": "bigcode_python_fns_6603", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of account deposit and withdrawal operations with zero starting balance. Operations can be integers, string representations of integers, or tuples (first element: int operation, second: string frequency). When a tuple is encountered, the operation is performed repe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert below_zero([(2, '5'), 3]) == False\", \"assert below_zero([1, -2, '-4', 5, (3, '-2')]) == True\", \"assert below_zero([1, '-2', -3], True) == True\", \"assert below_zero([5, -5, (2, '2')]) == False\", \"assert below_zero([10, -3, (2, '1')]) == False\", \"ass...
{ "split": "train", "index": 78422, "acecode_id": "evol_35699", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that reads a variable or an array from a given data buffer. The function should take a list of integers representing the buffer and a tuple specifying the type and shape of the variable to be read. Your function should return the vari...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert read_variable([1, 2, 3], ('int', None)) == 1\", \"assert read_variable([1.0, 2.0, 3.0], ('float', None)) == 1.0\", \"assert read_variable([1, 2, 3, 4, 5], ('array', (2, 2))) == [[1, 2], [3, 4]]\", \"assert read_variable([3.14, 1.618, 2.718], ('float', None))...
{ "split": "train", "index": 78423, "acecode_id": "oss_33384", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a binary tree, write a function that calculates the sum of all its nodes' values. The function should return a single integer representing the total sum of all node values in the binary tree.\nPlease reason step by step, then write a self-contained Python solution. Give y...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_of_tree_nodes(TreeNode(1)) == 1\", \"assert sum_of_tree_nodes(TreeNode(1, TreeNode(2), TreeNode(3))) == 6\", \"assert sum_of_tree_nodes(TreeNode(1, TreeNode(2, TreeNode(4), TreeNode(5)), TreeNode(3))) == 15\", \"assert sum_of_tree_nodes(TreeNode(5, TreeN...
{ "split": "train", "index": 78424, "acecode_id": "evol_17667", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with grouping items by their unique identifiers based on a given mapping of identifiers to names. You are provided with two lists: one containing mappings of identifiers to names, and another containing records that associate identifiers with unique item IDs. You...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert group_items_by_identifier([{'id': 1, 'name': 'Red'}, {'id': 2, 'name': 'Green'}, {'id': 3, 'name': 'Blue'}], [{'item_id': 1, 'identifier_id': 1}, {'item_id': 1, 'identifier_id': 2}, {'item_id': 2, 'identifier_id': 1}]) == {1: ['Red', 'Green'], 2: ['Red']}\",...
{ "split": "train", "index": 78425, "acecode_id": "bigcode_python_fns_39662", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function that accepts a list of strings and returns the string with the maximum length from the list. If there are multiple strings with the same length, return the first one that appears in the list. If the list is empty, return an empty string.\nPlease reason step...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longest_string(['cat', 'dog', 'elephant']) == 'elephant'\", \"assert longest_string(['apple', 'banana', 'kiwi']) == 'banana'\", \"assert longest_string(['short', 'tiny', 'longer']) == 'longer'\", \"assert longest_string(['one', 'two', 'three', 'four']) == 't...
{ "split": "train", "index": 78426, "acecode_id": "evol_29512", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a dictionary representation of an asset entity within a show. The function should accept the following parameters: `show_name` (a string), `asset_name` (a string), `asset_type` (a string), `hero` (a string), and `target_dat...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_asset('Show A', 'Asset 1', 'Type A', 'Hero A', '2023-12-01') == ({'name': 'Asset 1', 'show': 'Show A', 'type': 'Type A', 'hero': 'Hero A', 'target_date': '2023-12-01'}, {'name': 'Show A', 'assets': [{'name': 'Asset 1'}]})\", \"assert create_asset('Sho...
{ "split": "train", "index": 78427, "acecode_id": "bigcode_python_fns_10402", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `find_most_frequent(arr)` that receives a list of integers and returns a dictionary containing the most frequent numbers along with their counts. In case of ties, include all numbers that have the highest frequency. The output should maintain the order of f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_most_frequent([1, 1, 2, 3, 3, 2, 1]) == {1: 3}\", \"assert find_most_frequent([2, 2, 3, 4, 4, 2, 5, 5]) == {2: 3}\", \"assert find_most_frequent([5, 5, 6, 6, 5, 6]) == {5: 3, 6: 3}\", \"assert find_most_frequent([7, 8, 7, 9, 8, 9, 8]) == {8: 3}\", \"ass...
{ "split": "train", "index": 78428, "acecode_id": "evol_33915", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Develop a function 'findDuplicatesWithIndices' that identifies duplicates in a tuple and returns a dictionary containing each duplicate's first and last index positions. If there are no duplicates, return an empty dictionary. For example, given the input tuple (1, 2, 3, 1, 2), ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert findDuplicatesWithIndices((2, 6, 8, 4, 6)) == {6: {'first_index': 1, 'last_index': 4}}\", \"assert findDuplicatesWithIndices((1, 2, 3, 1, 2)) == {1: {'first_index': 0, 'last_index': 3}, 2: {'first_index': 1, 'last_index': 4}}\", \"assert findDuplicatesWithIn...
{ "split": "train", "index": 78429, "acecode_id": "evol_32862", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a simple menu system for a restaurant. Write a function `print_menu()` that takes no parameters and returns a string containing a formatted menu with the following items: '1. Pizza - $10', '2. Burger - $8', '3. Salad - $5', and '4. Drink - $2'. Each...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert print_menu() == 'Menu:\\\\n1. Pizza - $10\\\\n2. Burger - $8\\\\n3. Salad - $5\\\\n4. Drink - $2\\\\n'\", \"assert print_menu() == 'Menu:\\\\n1. Pizza - $10\\\\n2. Burger - $8\\\\n3. Salad - $5\\\\n4. Drink - $2\\\\n'\", \"assert print_menu() == 'Menu:\\\\n1...
{ "split": "train", "index": 78430, "acecode_id": "bigcode_python_fns_36000", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a 2D list representing an image where each element is an integer. The image has a width of `width` and height of `height`. You also have a starting position represented as a tuple (x, y), where `x` is the column index and `y` is the row index. The task is to imple...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cycle_position([[1, 2]], (0, 0)) == (1, 0)\", \"assert cycle_position([[1, 2, 3], [4, 5, 6]], (2, 0)) == (0, 1)\", \"assert cycle_position([[1, 2, 3]], (3, 0)) == False\", \"assert cycle_position([[1, 2, 3, 4]], (0, 0)) == (1, 0)\", \"assert cycle_position([...
{ "split": "train", "index": 78431, "acecode_id": "bigcode_python_fns_21072", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Write a function `generate_prime_cubes(n: int) -> dict` that takes an integer `n` as input and returns a dictionary where the keys are all prime numbers from 1 to `n` and the values are the cubes of those prime numbers. If there are no prime numbers up to `n`, return an empty d...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_prime_cubes(1) == {}\", \"assert generate_prime_cubes(2) == {2: 8}\", \"assert generate_prime_cubes(3) == {2: 8, 3: 27}\", \"assert generate_prime_cubes(4) == {2: 8, 3: 27}\", \"assert generate_prime_cubes(5) == {2: 8, 3: 27, 5: 125}\", \"assert gen...
{ "split": "train", "index": 78432, "acecode_id": "evol_15718", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with calculating the total impedance of a circuit composed of various electrical components. Write a function `calculate_total_impedance(components)` that takes in a list of tuples where each tuple consists of a component type and its value. The component type is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_total_impedance([('R', 10)]) == (10+0j)\", \"assert calculate_total_impedance([('L', 5)]) == 5j\", \"assert calculate_total_impedance([('C', 2)]) == (0-0.5j)\", \"assert calculate_total_impedance([('R', 10), ('L', 5)]) == (10+5j)\", \"assert calcul...
{ "split": "train", "index": 78433, "acecode_id": "oss_1281", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that serializes user profile data into a specific format. The function `serialize_user_profile` takes a `user_profile` object as input and returns a dictionary containing the serialized data. The `user_profile` object has the follo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert serialize_user_profile(UserProfile('Alice Smith', 'alice@example.com', datetime(1990, 5, 15), 'avatar_url')) == {'full_name': 'Alice Smith', 'mail': 'alice@example.com', 'birth_date': '15-05-1990', 'avatar': 'avatar_url'}\", \"assert serialize_user_profile(U...
{ "split": "train", "index": 78434, "acecode_id": "oss_20289", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that takes a string as input and returns the reversed version of that string. The function should handle standard ASCII characters and should not modify the case of the characters. Implement the function `reverse_string(s: str) -> ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_string('hello') == 'olleh'\", \"assert reverse_string('Python') == 'nohtyP'\", \"assert reverse_string('12345') == '54321'\", \"assert reverse_string('') == ''\", \"assert reverse_string('a') == 'a'\", \"assert reverse_string('abcdefg') == 'gfedcba'\...
{ "split": "train", "index": 78435, "acecode_id": "oss_31103", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a structured API response based on a simple web application. The function should accept a string representing the application output and return a dictionary representing the API response. The response should include a 'body...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_api_response('Hello, World!') == {'body': 'Hello, World!', 'statusCode': '200', 'headers': {'Content-Length': '13', 'Content-Type': 'text/plain'}}\", \"assert create_api_response('') == {'body': '', 'statusCode': '200', 'headers': {'Content-Length': '...
{ "split": "train", "index": 78436, "acecode_id": "bigcode_python_fns_35639", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are given a string that contains system resource information in a specific format. Your task is to write a function that extracts the load average, CPU usage, and memory usage from this string. The string will contain the following sections: 'Load average:', 'CPU states:', ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_system_resources('Load average: 1 minute: 0.21 5 minutes: 0.33 15 minutes: 0.33\\\\nCPU states : 5.18% user, 5.18% kernel, 89.63% idle\\\\nMemory usage: 8167876K total, 3906632K used, 4261244K free') == {'load_avg_1min': 0.21, 'cpu...
{ "split": "train", "index": 78437, "acecode_id": "bigcode_python_fns_37430", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates reading a configuration value from a bridge device. The function should accept a string representing the name of the bridge device and return a simulated forward delay timer as an integer. The function should return the fol...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert bridge_forward_delay('bridge1') == 15\", \"assert bridge_forward_delay('bridge2') == 20\", \"assert bridge_forward_delay('bridge3') == 10\", \"assert bridge_forward_delay('bridge4') == -1\", \"assert bridge_forward_delay('bridge5') == -1\", \"assert bridge_f...
{ "split": "train", "index": 78438, "acecode_id": "bigcode_python_fns_12599", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are working with a data processing pipeline that involves defining a schema based on a given list of column specifications. The schema is represented as a list of dictionaries, where each dictionary contains the name and type of a column. Your task is to write a function `e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_column_names([]) == []\", \"assert extract_column_names([{'name': 'col1', 'type': 'int'}]) == ['col1']\", \"assert extract_column_names([{'name': 'col1', 'type': 'int'}, {'name': 'col2', 'type': 'string'}]) == ['col1', 'col2']\", \"assert extract_col...
{ "split": "train", "index": 78439, "acecode_id": "oss_25335", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function `convert_number(number, conversion_type)` that converts a given number from one format to another based on the specified conversion type. The function should support the following conversions: 'int_to_roman' converts an integer to its Roman numeral represen...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_number(25, 'int_to_hex') == '19'\", \"assert convert_number('19', 'hex_to_int') == 25\", \"assert convert_number('CDXLVI', 'roman_to_int') == 446\", \"assert convert_number(446, 'int_to_roman') == 'CDXLVI'\", \"assert convert_number(255, 'int_to_hex'...
{ "split": "train", "index": 78440, "acecode_id": "evol_2164", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the setup of a character's domain in a role-playing game. The function `setup_domain(character: str, create_vassals: bool) -> str` takes in a character's name and a boolean indicating whether to create vassals or not. If `c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert setup_domain('Arthur', True) == 'Vassals created for Arthur.'\", \"assert setup_domain('Lancelot', False) == 'No vassals created for Lancelot.'\", \"assert setup_domain('Guinevere', True) == 'Vassals created for Guinevere.'\", \"assert setup_domain('Merlin',...
{ "split": "train", "index": 78441, "acecode_id": "bigcode_python_fns_45424", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function that takes a list of IP addresses as input and returns a list of dictionaries containing the IP address, its physical location (latitude, longitude), and the Internet Service Provider (ISP) associated with each IP address. If an IP address is invalid or ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_info(['0.0.0.0']) == [{'ip': '0.0.0.0', 'error': 'Invalid or non-routable address'}]\", \"assert get_info(['192.168.1.1']) == [{'ip': '192.168.1.1', 'error': 'Invalid or non-routable address'}]\", \"assert get_info(['2001:db8::']) == [{'ip': '2001:db8::'...
{ "split": "train", "index": 78442, "acecode_id": "evol_27178", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given two strings, determine if they are one edit away from being equal. An edit is defined as either inserting, deleting, or replacing a character in the string. Implement a function `one_edit_away(string_1: str, string_2: str) -> bool` that returns True if the two strings are...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert one_edit_away('abc', 'ab') == True\", \"assert one_edit_away('ab', 'abc') == True\", \"assert one_edit_away('abc', 'abd') == True\", \"assert one_edit_away('abcd', 'abc') == True\", \"assert one_edit_away('abc', 'abcd') == True\", \"assert one_edit_away('abc...
{ "split": "train", "index": 78443, "acecode_id": "bigcode_python_fns_30414", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the scores of students in a class. Write a function `calculate_average_score(scores: List[int]) -> float` that calculates the average score of the students. The average score should be returned as a floating point number rounded to ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_average_score([90, 80, 70]) == 80.00\", \"assert calculate_average_score([100, 90, 80, 70, 60]) == 80.00\", \"assert calculate_average_score([45, 55, 65, 75]) == 60.00\", \"assert calculate_average_score([100]) == 100.00\", \"assert calculate_avera...
{ "split": "train", "index": 78444, "acecode_id": "bigcode_python_fns_38980", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a version number of a QR code, ranging from 1 to 40. Your task is to implement a function that returns the number of correction bytes required for the specified version based on the defined correction level H. Implement the function `correction_bytes(version: int)...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert correction_bytes(1) == 17\", \"assert correction_bytes(2) == 28\", \"assert correction_bytes(3) == 22\", \"assert correction_bytes(4) == 16\", \"assert correction_bytes(5) == 22\", \"assert correction_bytes(6) == 28\", \"assert correction_bytes(7) == 26\", \...
{ "split": "train", "index": 78445, "acecode_id": "bigcode_python_fns_1708", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a command for copying files in a Linux system. Write a function `generate_copy_command(base_dir, file_name)` that takes in the base directory path as a string `base_dir` and the filename of the file to be copied as a string `file_name`. The function...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_copy_command('/home/user/documents/', 'report.pdf') == 'cp \\\"/home/user/documents/report.pdf\\\" /tmp/.temp_file'\", \"assert generate_copy_command('/var/www/html/', 'index.html') == 'cp \\\"/var/www/html/index.html\\\" /tmp/.temp_file'\", \"asser...
{ "split": "train", "index": 78446, "acecode_id": "oss_10905", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates tab completion for a command-line interface (CLI). The function should provide command and argument completions based on the user's input. You will implement the function `handle_tab_complete(user_input: str) -> List[st...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert handle_tab_complete('c') == ['command1', 'command2', 'command3']\", \"assert handle_tab_complete('command') == ['command1', 'command2', 'command3']\", \"assert handle_tab_complete('com') == ['command1', 'command2', 'command3']\", \"assert handle_tab_complete...
{ "split": "train", "index": 78447, "acecode_id": "oss_11983", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are given a string representing the contents of a file named 'CODEOWNERS'. Your task is to validate if this string is up to date with a predefined valid content string. Implement a function `validate_codeowners(file_content: str, valid_content: str) -> bool` that returns Tr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_codeowners('user1 @team1\\\\nuser2 @team2', 'user1 @team1\\\\nuser2 @team2') == True\", \"assert validate_codeowners('user1 @team1\\\\nuser2 @team2 ', 'user1 @team1\\\\nuser2 @team2') == True\", \"assert validate_codeowners(' user1 @team1\\\\nuser2 ...
{ "split": "train", "index": 78448, "acecode_id": "bigcode_python_fns_921", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given two floating-point numbers, `prev_close` and `close`, along with an `Order` object that contains information about a trading order. The `Order` object has several attributes, including `price`, `size`, `size_type`, `direction`, `fees`, `fixed_fees`, `slippage`, `m...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert replace_inf_price_nb(100.0, 150.0, Order(price=200.0, size=10, size_type='market', direction='buy', fees=0.1, fixed_fees=5.0, slippage=0.01, min_size=1, max_size=100, size_granularity=0.1, reject_prob=0.0, lock_cash=False, allow_partial=True, raise_reject=Fa...
{ "split": "train", "index": 78449, "acecode_id": "bigcode_python_fns_35687", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that applies a Caesar cipher with a specified shift and a keyword cipher to encrypt and then decrypt a given message. The function should take three parameters: a message (string), a shift (integer), and a keyword (string). It should return the original mes...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert caesar_keyword_cipher('This is a secret message', 3, 'cryptography') == 'This is a secret message'\", \"assert caesar_keyword_cipher('Hello, World!', 5, 'keyword') == 'Hello, World!'\", \"assert caesar_keyword_cipher('A quick brown fox', -1, 'cipher') == 'A ...
{ "split": "train", "index": 78450, "acecode_id": "evol_30663", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the processing of input data in a neural network model for intent classification and slot filling in natural language processing. The function should take the following parameters: \n1. `use_intent_context_concat` (bool...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_input(True, 10, 3, 5, 64) == ([0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0])\", \"assert process_input(False, 20, 4, 6, 128) == ([0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0])\", \"assert process_input(True, 5, 2, 3, 32) == ([0.0, 0.0], [0.0, 0.0...
{ "split": "train", "index": 78451, "acecode_id": "oss_10967", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a nested list of strings, write a Python function `remove_string(nested_list, target)` that removes all occurrences of a specific string from the list. The list can contain both strings and other nested lists. If the target string is found, it should be removed from all l...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_string([['banana', 'apple'], ['mango', 'orange', 'apple'], ['apple', 'peach', 'prune']], 'apple') == [['banana'], ['mango', 'orange'], ['peach', 'prune']]\", \"assert remove_string([['banana', 'apple'], ['mango', 'orange'], ['peach', 'prune']], 'apple...
{ "split": "train", "index": 78452, "acecode_id": "evol_25222", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given a non-negative integer `num`, write a function `factorial(num: int) -> int` that calculates the factorial of `num`. The factorial of a non-negative integer `n` is the product of all positive integers less than or equal to `n`. For example, the factorial of 5 is 5 * 4 * 3 ...
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": 78453, "acecode_id": "bigcode_python_fns_23004", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function to sort a given list of numbers (either integers or floats) in ascending order without using any built-in sort functions. The function should take a list of numbers as input and return a new list that contains the numbers sorted in ascending order.\nPlease ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert bubble_sort([3, 1, 4, 1, 5]) == [1, 1, 3, 4, 5]\", \"assert bubble_sort([1.1, 2.2, 3.3, 0.0]) == [0.0, 1.1, 2.2, 3.3]\", \"assert bubble_sort([5, 3, 8, 6, 2]) == [2, 3, 5, 6, 8]\", \"assert bubble_sort([7.1, 5.5, 6.3]) == [5.5, 6.3, 7.1]\", \"assert bubble_s...
{ "split": "train", "index": 78454, "acecode_id": "evol_29155", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that prepares a host configuration based on provided settings and system devices. The function should take in a dictionary representing a host configuration and a dictionary of system devices. The function should return a new configur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prepareHostConfig({'test': 'value'}, {'wan': [{'name': 'eth0'}], 'lan': [], 'wifi': []}) == {'test': 'value', 'wan_device': 'eth0'}\", \"assert prepareHostConfig({'test': 'value'}, {'wan': [], 'lan': [], 'wifi': []}) == {'test': 'value', 'wan_device': 'none'...
{ "split": "train", "index": 78455, "acecode_id": "bigcode_python_fns_29608", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of field objects and a list of group names. Each field object has two methods: `is_displayed()` which returns a boolean indicating whether the field is visible, and `get_attribute(class_name)` which returns a string representing the class of the field. Your...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_invisibility([], []) == True\", \"assert check_invisibility([Field(False, 'class1')], []) == True\", \"assert check_invisibility([Field(False, 'class2')], ['group1']) == False\", \"assert check_invisibility([Field(True, 'class3')], []) == False\", \"as...
{ "split": "train", "index": 78456, "acecode_id": "bigcode_python_fns_14020", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function XNOR(A, B) that takes two boolean inputs A and B, and returns the result of the XNOR operation on these inputs. The XNOR operation returns True if both inputs are the same (either both True or both False) and False otherwise.\nPlease reason step by step, th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert XNOR(True, True) == True\", \"assert XNOR(True, False) == False\", \"assert XNOR(False, True) == False\", \"assert XNOR(False, False) == True\", \"assert XNOR(True, True) == True\", \"assert XNOR(False, False) == True\", \"assert XNOR(True, True) == True\", ...
{ "split": "train", "index": 78457, "acecode_id": "evol_30968", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string `s`, write a function `reverse_string(s)` that returns the string in reverse order without using any built-in functions for reversing. Your function should handle empty strings and strings with special characters correctly.\nPlease reason step by step, then write...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_string('hello') == 'olleh'\", \"assert reverse_string('') == ''\", \"assert reverse_string('Python') == 'nohtyP'\", \"assert reverse_string('12345') == '54321'\", \"assert reverse_string('!@#$%') == '%$#@!'\", \"assert reverse_string('racecar') == 'r...
{ "split": "train", "index": 78458, "acecode_id": "evol_15767", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with comparing two lists of file paths to identify the differences between them. Your goal is to implement a function named `compare_file_lists` that takes two lists of strings, `list1` and `list2`, representing paths to files. The function should return a dictio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compare_file_lists(['file1.txt', 'file2.txt'], ['file2.txt', 'file3.txt']) == {'added': ['file3.txt'], 'removed': ['file1.txt'], 'modified': []}\", \"assert compare_file_lists(['file1.txt', 'file2.txt'], ['file1.txt', 'file2.txt']) == {'added': [], 'removed'...
{ "split": "train", "index": 78459, "acecode_id": "oss_13156", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You need to implement a function that takes a dictionary containing a 'timestamp' key and a 'message' key. The function should remove the 'timestamp' key from the dictionary and generate a formatted string that includes the current timestamp in the format 'YYYY-MM-DD' and the m...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_message({'timestamp': '2023-10-01', 'message': 'Hello World'}) == '2023-10-01 [999] \\ud83e\\udd16 \\ud83d\\udcab | Hello World'\", \"assert format_message({'timestamp': '2023-10-02', 'message': 'Sample message'}) == '2023-10-02 [999] \\ud83e\\udd16 ...
{ "split": "train", "index": 78460, "acecode_id": "oss_21194", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `check_for_header(header: str, include_dirs: List[str], define_macros: List[str]) -> bool` that checks whether a given header file can be successfully compiled. The function will take three parameters: a string `header` representing t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_for_header('nonexistent.h', ['/usr/include'], []) == False\", \"assert check_for_header('iostream', ['./', '/usr/include'], []) == False\", \"assert check_for_header('stdio.h', [], []) == False\", \"assert check_for_header('nonexistent.h', ['dir1', 'di...
{ "split": "train", "index": 78461, "acecode_id": "bigcode_python_fns_6228", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Implement a function that takes a list of integers and returns a new list containing only the even integers from the original list, preserving the order of their first occurrence.\nPlease reason step by step, then write a self-contained Python solution. Give your final program ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_even_numbers([1, 2, 3, 4, 5]) == [2, 4]\", \"assert filter_even_numbers([10, 15, 22, 33]) == [10, 22]\", \"assert filter_even_numbers([1, 3, 5]) == []\", \"assert filter_even_numbers([2, 4, 6, 8]) == [2, 4, 6, 8]\", \"assert filter_even_numbers([]) ==...
{ "split": "train", "index": 78462, "acecode_id": "evol_20830", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with constructing a command string for a geographic information system (GIS) project to convert a shapefile from the WGS84 Geographic coordinate system (EPSG:4326) to the UTM (Universal Transverse Mercator) coordinate system. The UTM zone is determined by an inte...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert construct_ogr2ogr_command(1) == \\\"ogr2ogr -t_srs '+proj=utm +zone=1 +ellps=GRS80 +datum=NAD83 units=m' \\\"\", \"assert construct_ogr2ogr_command(2) == \\\"ogr2ogr -t_srs '+proj=utm +zone=2 +ellps=GRS80 +datum=NAD83 units=m' \\\"\", \"assert construct_ogr2...
{ "split": "train", "index": 78463, "acecode_id": "oss_10171", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string `MAC`, return 'Ethernet' if it is a valid MAC address with a valid Ethernet interface name, 'Wireless' if it is a valid MAC address with a valid wireless interface name, or 'Neither' if it is not a valid MAC address or the interface name is invalid. A valid MAC a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validateMacAndInterface('08:00:27:ce:4f:8e/eth0') == 'Ethernet'\", \"assert validateMacAndInterface('08:00:27:ce:4f:8e/wlan0') == 'Wireless'\", \"assert validateMacAndInterface('08:00:27:ce:4f:8e/eth01') == 'Neither'\", \"assert validateMacAndInterface('08:0...
{ "split": "train", "index": 78464, "acecode_id": "evol_22421", "num_tests": 16 }
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 unique elements from the original list while preserving their original order. The input list may contain duplicate values. Implement the function `unique_elements(arr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_elements([1, 2, 3, 2, 1]) == [1, 2, 3]\", \"assert unique_elements([5, 5, 5, 5]) == [5]\", \"assert unique_elements([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert unique_elements([]) == []\", \"assert unique_elements([10, 20, 10, 30, 20, 40]) == [10,...
{ "split": "train", "index": 78465, "acecode_id": "bigcode_python_fns_40468", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `can_arrange_v2(arr, limits, criterion)` that locates an element in the array suitable for a distinct role based on a specified criterion and also finds a likely swap contender according to a constraint where the swapping elements must be within specified l...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_arrange_v2([1, 2, 4, 3, 5], (2, 4), lambda x: x % 2 == 0) == {'index': 2, 'swap_with': 3}\", \"assert can_arrange_v2([2, 4, 6, 8, 10], (0, 4), lambda x: x % 2 == 1) == {'index': -1, 'swap_with': -1}\", \"assert can_arrange_v2([10, 20, 30, 40], (1, 2), la...
{ "split": "train", "index": 78466, "acecode_id": "evol_23214", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to normalize a given answer text. The normalization process involves converting the text to lowercase, removing punctuation, articles (such as 'a', 'an', 'the'), and extra whitespace. Write a function `normalize_answer(s: str) -> str`...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert normalize_answer('The quick brown fox jumps over a lazy dog.') == 'quick brown fox jumps over lazy dog'\", \"assert normalize_answer('Hello, World! This is a test.') == 'hello world this is test'\", \"assert normalize_answer(' A string with irregular...
{ "split": "train", "index": 78467, "acecode_id": "oss_29341", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `check_character_type(character: str) -> str` that checks if the given input character is a vowel or consonant. The function should return 'The input character is a vowel.' if the character is a vowel, 'The input character is a consonant.' if the character is a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_character_type('a') == 'The input character is a vowel.'\", \"assert check_character_type('E') == 'The input character is a vowel.'\", \"assert check_character_type('i') == 'The input character is a vowel.'\", \"assert check_character_type('O') == 'The...
{ "split": "train", "index": 78468, "acecode_id": "evol_12329", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `validate_user(user: str, entered_pwd: str) -> bool` that checks the validity of a user's credentials against a predefined users database. The function should simulate fetching a user's hashed password and salt from the database. If the user does not exist,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_user('UnknownUser', 'any_password') == False\", \"assert validate_user('', 'correct_password') == False\", \"assert validate_user('', '') == False\", \"assert validate_user('ExistingUser', 'password') == False\", \"assert validate_user('NonexistentU...
{ "split": "train", "index": 78469, "acecode_id": "evol_17108", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a string as input, which represents a label for a piece of code. The function should return 'Valid' if the code corresponding to the label exists, and 'Invalid' if it does not. For this purpose, assume that you have a prede...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_code_label('code1') == 'Valid'\", \"assert check_code_label('code2') == 'Valid'\", \"assert check_code_label('code3') == 'Valid'\", \"assert check_code_label('code4') == 'Valid'\", \"assert check_code_label('code5') == 'Invalid'\", \"assert check_code_...
{ "split": "train", "index": 78470, "acecode_id": "bigcode_python_fns_21493", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that transforms a list of company records into a dictionary. Each company record is represented as a dictionary with keys 'ticker', 'title', and 'cik_str'. Your function should take a list of these company records and return a dictionary ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_company_cik_map([{'ticker': 'AAPL', 'title': 'Apple Inc.', 'cik_str': '0000320193'}, {'ticker': 'MSFT', 'title': 'Microsoft Corp.', 'cik_str': '0000789019'}], 'ticker') == {'AAPL': '0000320193', 'MSFT': '0000789019'}\", \"assert get_company_cik_map([{'ti...
{ "split": "train", "index": 78471, "acecode_id": "bigcode_python_fns_38349", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a 2D array representing a bitmap image. Your task is to pixelize a circular region in the bitmap image. The function should take the bitmap, the center coordinates (x, y) of the circle, the radius r of the circle, and the dimension n for the pixelization. Pixeliza...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert pixelize_circle([[0, 0], [0, 0]], 0, 0, 1, 1) == [[0, 0], [0, 0]]\", \"assert pixelize_circle([[255, 255], [255, 255]], 0, 0, 1, 1) == [[255, 255], [255, 255]]\", \"assert pixelize_circle([[255, 100, 100], [100, 100, 100], [100, 100, 100]], 1, 1, 1, 1) == [[...
{ "split": "train", "index": 78472, "acecode_id": "bigcode_python_fns_9607", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Given two strings, s1 and s2, implement a function that concatenates them and returns the resulting string. You must not use the built-in concatenation operator. Instead, you can use a custom string manipulation technique to achieve this.\nPlease reason step by step, then write...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert append_strings('Hello', 'World') == 'HelloWorld'\", \"assert append_strings('Python', 'Programming') == 'PythonProgramming'\", \"assert append_strings('', '') == ''\", \"assert append_strings('OpenAI', '') == 'OpenAI'\", \"assert append_strings('', 'GPT-3') ...
{ "split": "train", "index": 78473, "acecode_id": "evol_19406", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array `arr` that represents a permutation of numbers from `1` to `n`, and a binary string of size `n` that initially has all its bits set to zero. At each step `i` from `1` to `n`, the bit at position `arr[i]` is set to `1`. You are given an integer `m`, and you need t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert findLatestStep([3,5,1,2,4], 1, [1,1,1,1,1]) == 4\", \"assert findLatestStep([3,1,5,4,2], 2, [1,1,1,1,1]) == -1\", \"assert findLatestStep([1], 1, [1]) == 1\", \"assert findLatestStep([1,2,3,4], 3, [1,1,1,1]) == 3\", \"assert findLatestStep([1,2,3,4,5], 5, [1...
{ "split": "train", "index": 78474, "acecode_id": "evol_21609", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with managing and updating visualization data in a project. You need to implement a function `process_visualization_data` that takes in the following parameters: \n\n- `visual_sequences` (dict): The initial dictionary of sequences for visualization. \n- `visual_m...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_visualization_data({'a': 1}, {'x': 10}, {'b': 2}, {'y': 20}) == ({'a': 1, 'b': 2}, {'x': 10, 'y': 20})\", \"assert process_visualization_data({}, {}, {'a': 1}, {'x': 10}) == ({'a': 1}, {'x': 10})\", \"assert process_visualization_data({'a': 1}, {'x':...
{ "split": "train", "index": 78475, "acecode_id": "oss_13072", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string represents a remote git reference formatted as 'git_hash refs/tags/tag_name'. Your task is to extract the tags from these strings, filter them based on a regular expression, and return a sorted list of tuples. Each tuple should...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_and_sort_tags(['abc123 refs/tags/v1.0.0', 'def456 refs/tags/v1.2.0', 'ghi789 refs/tags/v1.1.0'], '.', None) == [('1.2.0', 'v1.2.0', 'def456'), ('1.1.0', 'v1.1.0', 'ghi789'), ('1.0.0', 'v1.0.0', 'abc123')]\", \"assert extract_and_sort_tags(['abc123 re...
{ "split": "train", "index": 78476, "acecode_id": "bigcode_python_fns_19362", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that performs arithmetic addition. Your task is to create a function `add_numbers` that takes two integers as input and returns their sum. For example, if the input is 3 and 5, the output should be 8. Implement only this function with...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_numbers(1, 2) == 3\", \"assert add_numbers(0, 0) == 0\", \"assert add_numbers(-1, 1) == 0\", \"assert add_numbers(-5, -3) == -8\", \"assert add_numbers(10, 5) == 15\", \"assert add_numbers(100, 200) == 300\", \"assert add_numbers(999, 1) == 1000\", \"ass...
{ "split": "train", "index": 78477, "acecode_id": "oss_3007", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `str_to_binary` that takes a string as input and returns its content converted into a binary string. Each character in the input string should be represented in binary format using 8 bits. For example, the character 'A' should be represented as '01000001'.\nPle...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert str_to_binary('A') == '01000001'\", \"assert str_to_binary('Hello') == '01001000 01100101 01101100 01101100 01101111'\", \"assert str_to_binary('') == ''\", \"assert str_to_binary('123') == '00110001 00110010 00110011'\", \"assert str_to_binary('!@#') == '00...
{ "split": "train", "index": 78478, "acecode_id": "evol_5310", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `estimate_value_count_and_proportion(arr: List[int], value: int) -> Tuple[int, float]` that takes a list of integers `arr` and an integer `value`. The function should return a tuple containing the count of occurrences of `value` in `arr` and the relative pr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert estimate_value_count_and_proportion([1, 2, 3, 4, 1], 1) == (2, 0.4)\", \"assert estimate_value_count_and_proportion([1, 2, 3, 4, 5], 6) == (0, 0.0)\", \"assert estimate_value_count_and_proportion([], 1) == (0, 0.0)\", \"assert estimate_value_count_and_propor...
{ "split": "train", "index": 78479, "acecode_id": "evol_9558", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Create a function that takes a list containing numbers and nested lists of numbers, and removes any duplicate numbers from the entire structure. The function should not use any built-in Python functions or libraries to remove duplicates. The input list can contain integers and ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates_nested([1, 2, [2, 3], 3, 4, [4, 5, 5]]) == [1, 2, 3, 4, 5]\", \"assert remove_duplicates_nested([1, 1, [1, 1], [1], 1]) == [1]\", \"assert remove_duplicates_nested([[1, 2], [2, 3], [1, 3]]) == [1, 2, 3]\", \"assert remove_duplicates_nested(...
{ "split": "train", "index": 78480, "acecode_id": "evol_30699", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a list of integers and returns a new list containing only the unique integers, preserving the order of their first occurrence. Additionally, compute the average of these unique integers and return both the updated list and the average as a tuple....
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_avg([1, 1, 2, 3, 3, 4, 4, 5, 6]) == ([1, 2, 3, 4, 5, 6], 3.5)\", \"assert unique_avg([10, 10, 20, 30, 20, 40]) == ([10, 20, 30, 40], 25.0)\", \"assert unique_avg([5, 5, 5, 5, 5]) == ([5], 5.0)\", \"assert unique_avg([1, 2, 3, 4, 5]) == ([1, 2, 3, 4, 5...
{ "split": "train", "index": 78481, "acecode_id": "evol_20627", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function that finds and returns the index of the first occurrence of a floating point number in a provided sequence. The sequence may contain nested sequences such as lists or tuples. If no floating point number is present, return None.\nPlease reason step by ste...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_float([1, 'text', (2, 3), [4.5, 'string'], 5]) == 3\", \"assert find_float(['a', [1, 2, 3], (4, 5.0)]) == 2\", \"assert find_float([None, [1, 2], (3, 4)]) == None\", \"assert find_float([1.1, [2, 3], 'hello']) == 0\", \"assert find_float([1, 2, [3, 4], ...
{ "split": "train", "index": 78482, "acecode_id": "evol_5140", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with validating author details for a library management system. Implement a function called `validate_author_details` that takes four parameters: `first_name`, `last_name`, `date_of_birth`, and `biography`. The function should enforce the following validation rul...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_author_details('John', 'Doe', '2000-01-01', 'Author biography here.') == []\", \"assert validate_author_details('', 'Doe', '2000-01-01', 'Author biography here.') == ['First name cannot be empty']\", \"assert validate_author_details('John', '', '200...
{ "split": "train", "index": 78483, "acecode_id": "oss_33012", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that performs term transformation based on a given parameter. The function should take two inputs: a string `term` and a string `parameter`, and return the transformed result based on the following transformation rules: - If the `par...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_term('hello', 'uppercase') == 'HELLO'\", \"assert transform_term('world', 'reverse') == 'dlrow'\", \"assert transform_term('python', 'length') == 6\", \"assert transform_term('code', 'duplicate') == 'codecode'\", \"assert transform_term('test', 'in...
{ "split": "train", "index": 78484, "acecode_id": "oss_27109", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `sanitize_and_validate_user_data(data: Dict[str, Any]) -> Tuple[bool, Union[str, Dict[str, str]]]` that takes a dictionary containing user data with keys 'first_name', 'last_name', 'age', and 'email'. The function should validate the data: first and last na...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sanitize_and_validate_user_data({'first_name': 'John', 'last_name': 'Doe', 'age': 30, 'email': 'john@example.com'}) == (True, 'User data is valid')\", \"assert sanitize_and_validate_user_data({'first_name': '', 'last_name': 'Doe', 'age': 30, 'email': 'john@e...
{ "split": "train", "index": 78485, "acecode_id": "evol_26325", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Implement a function `update_label(current_label: str, new_text: str) -> str` that takes in the current label text and a new text. The function should return the new label text if the new text is not empty; otherwise, it should return the current label text. This simulates upda...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_label('Hello World!', 'Greetings from New Window!') == 'Greetings from New Window!'\", \"assert update_label('Hello World!', '') == 'Hello World!'\", \"assert update_label('Current Label', 'New Update') == 'New Update'\", \"assert update_label('Curren...
{ "split": "train", "index": 78486, "acecode_id": "evol_35942", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `update_private_value` that takes an integer `value` as an argument and returns the updated value of a private variable initialized to 0. The function should simulate modifying the value of a private variable. You can assume that `value` will always be an integ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_private_value(5) == 5\", \"assert update_private_value(-10) == -10\", \"assert update_private_value(0) == 0\", \"assert update_private_value(100) == 100\", \"assert update_private_value(-1) == -1\", \"assert update_private_value(42) == 42\", \"assert ...
{ "split": "train", "index": 78487, "acecode_id": "evol_28743", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Create a function `string_to_camelcase(s: str) -> str` that converts a given string to CamelCase. The function should also check if the string is a valid base64 string or a boolean. If the string is a boolean (i.e., either 'true' or 'false'), the function should return the bool...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert string_to_camelcase('this_is_a_string') == 'ThisIsAString'\", \"assert string_to_camelcase('hello_world') == 'HelloWorld'\", \"assert string_to_camelcase('base_case') == 'BaseCase'\", \"assert string_to_camelcase('singleword') == 'Singleword'\", \"assert str...
{ "split": "train", "index": 78488, "acecode_id": "evol_35797", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a file path for saving an artifact based on its name. The function should ensure that the file path is formatted as 'artifacts/{name}.png', where {name} is the provided artifact name. The function does not need to check for...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_artifact_path('example') == 'artifacts/example.png'\", \"assert get_artifact_path('test_artifact') == 'artifacts/test_artifact.png'\", \"assert get_artifact_path('my_image') == 'artifacts/my_image.png'\", \"assert get_artifact_path('data') == 'artifacts/...
{ "split": "train", "index": 78489, "acecode_id": "bigcode_python_fns_9376", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that retrieves configuration data for a specified plugin from a mock server. The function should be named `get_plugin_config` and take a single parameter `plugin_name`, which is a string representing the name of the plugin. The functi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_plugin_config('cpu') == 'CPU configuration data'\", \"assert get_plugin_config('memory') == 'Memory configuration data'\", \"assert get_plugin_config('disk') == 'Disk configuration data'\", \"assert get_plugin_config('network') == 'Unknown plugin'\", \"a...
{ "split": "train", "index": 78490, "acecode_id": "oss_19732", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that converts a given temperature from Celsius to Fahrenheit. The function should take a single argument representing the temperature in Celsius and return the equivalent temperature in Fahrenheit.\nPlease reason step by step, then write a self-contained Python...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_celsius_to_fahrenheit(0) == 32.0\", \"assert convert_celsius_to_fahrenheit(100) == 212.0\", \"assert convert_celsius_to_fahrenheit(-40) == -40.0\", \"assert convert_celsius_to_fahrenheit(37) == 98.6\", \"assert convert_celsius_to_fahrenheit(20) == 68...
{ "split": "train", "index": 78491, "acecode_id": "evol_16725", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a ZIP code, implement a function that returns the type of locations available in that ZIP code. The function should take two parameters: a zip_code (a string) and a boolean only_return_po_boxes. If only_return_po_boxes is True, the function should return 'PO Boxes' if the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert request_location_type('12345', True) == 'PO Boxes'\", \"assert request_location_type('67890', True) == 'None'\", \"assert request_location_type('67890', False) == 'Routes'\", \"assert request_location_type('22222', True) == 'None'\", \"assert request_locatio...
{ "split": "train", "index": 78492, "acecode_id": "bigcode_python_fns_19849", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a custom comparison method for two classes in Python, `ClassA` and `ClassB`. Each class has a method called `compare` that takes another instance as an argument and returns an integer based on their relative order. Your implementation of the `co...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert ClassA().compare(ClassB()) == 0\", \"assert ClassA().compare(ClassA()) == 0\", \"assert ClassB().compare(ClassA()) == 0\", \"assert ClassB().compare(ClassB()) == 0\", \"assert ClassA().compare(ClassB()) == 0\", \"assert ClassB().compare(ClassA()) == 0\", \"a...
{ "split": "train", "index": 78493, "acecode_id": "oss_2438", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the retrieval of loading images for a mobile application based on various parameters. The function should take in the following parameters: `mobi_app` (a string, either 'android', 'iphone', or 'ipad'), `platform` (a str...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_loading_image_params('android', 'android', 1920, 1080, 999999999, '') == {'mobi_app': 'android', 'platform': 'android', 'height': 1920, 'width': 1080, 'build': 999999999, 'birth': '0101'}\", \"assert get_loading_image_params('iphone', 'ios', 0, 0, 1, '12...
{ "split": "train", "index": 78494, "acecode_id": "bigcode_python_fns_46161", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a function `find_max` that takes a list of integers as input and is intended to return the maximum value in the list. Your task is to complete the `find_max` function so that it correctly returns the maximum value in the input list. You can assume that the input l...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_max([1, 2, 3, 4, 5]) == 5\", \"assert find_max([-1, -2, -3, -4, -5]) == -1\", \"assert find_max([0, 0, 0, 0]) == 0\", \"assert find_max([5, 1, 2, 3]) == 5\", \"assert find_max([-1, 1, 0]) == 1\", \"assert find_max([2, 4, 6, 8, 10]) == 10\", \"assert fin...
{ "split": "train", "index": 78495, "acecode_id": "oss_97", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string that represents a JSON object. Your task is to write a function that checks if the string is a valid JSON. If the string is a valid JSON, return the parsed JSON object. If the string is not a valid JSON, return None. The function should be named `parse_js...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_json('{\\\"key\\\": \\\"value\\\"}') == {'key': 'value'}\", \"assert parse_json('{\\\"name\\\": \\\"John\\\", \\\"age\\\": 30}') == {'name': 'John', 'age': 30}\", \"assert parse_json('invalid json') == None\", \"assert parse_json('{\\\"array\\\": [1, 2...
{ "split": "train", "index": 78496, "acecode_id": "bigcode_python_fns_13402", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function that calculates the Euclidean distance between two sets of points in a 3D space. The function should take two 2D lists (or arrays) as input, where each list contains an equal number of points represented as [x, y, z] coordinates. The function should retu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert euclidean_distance([[0, 0, 0]], [[1, 1, 1]]) == [1.7320508075688772]\", \"assert euclidean_distance([[1, 2, 3]], [[1, 2, 3]]) == [0.0]\", \"assert euclidean_distance([[1, 0, 0]], [[0, 1, 0]]) == [1.4142135623730951]\", \"assert euclidean_distance([[1, 2, 3],...
{ "split": "train", "index": 78497, "acecode_id": "evol_5506", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that decodes a string that was encoded using a specific encoding method. The encoding method groups the input string into chunks of three characters and then rotates the characters within each chunk to the left by one position. Your f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert decode_cyclic('bca') == 'abc'\", \"assert decode_cyclic('ab') == 'ab'\", \"assert decode_cyclic('!@#') == '#!@'\", \"assert decode_cyclic('') == ''\", \"assert decode_cyclic('a') == 'a'\", \"assert decode_cyclic(' ') == ' '\"]}" }
{ "split": "train", "index": 78498, "acecode_id": "evol_19681", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a list of command-line arguments as strings and returns a formatted string representing these arguments. The formatted string should concatenate the arguments in the same order they appear in the input list, separating each...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_command_line_arguments(['alignment', '--database', 'mmetsp']) == 'alignment --database mmetsp'\", \"assert format_command_line_arguments(['--sample_dir', 'tests/aux_data/mmetsp/samples_METs_small']) == '--sample_dir tests/aux_data/mmetsp/samples_METs_...
{ "split": "train", "index": 78499, "acecode_id": "bigcode_python_fns_42438", "num_tests": 16 }