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 `generate_passcode` that generates a random passcode adhering to specific constraints. The passcode must have a length between `min_length` and `max_length` (inclusive), and it must contain at least `upper` uppercase letters, `lower` lowercase letters, `dig...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_passcode(8, 10, 1, 1, 1, 1) is not None\", \"assert len(generate_passcode(8, 10, 1, 1, 1, 1)) >= 8\", \"assert len(generate_passcode(8, 10, 1, 1, 1, 1)) <= 10\", \"assert any(c.isupper() for c in generate_passcode(8, 32, 1, 1, 1, 1))\", \"assert any...
{ "split": "train", "index": 73100, "acecode_id": "evol_6752", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lists of integers, determine if it is possible to rearrange the elements of the first list such that it contains exclusively even numbers by swapping elements with the second list. The total sum of elements across both lists must remain unchanged, and the swapped elem...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert exchange([2, 4, 6], [1, 3, 5]) == 0\", \"assert exchange([3, 5], [2, 4]) == 0\", \"assert exchange([1, 1, 1], [2, 2, 2]) == 0\", \"assert exchange([0, 0, 0], [1, 1, 1]) == 0\", \"assert exchange([5, 3], [4, 2]) == 0\", \"assert exchange([2, 2, 2], [1, 1, 1])...
{ "split": "train", "index": 73101, "acecode_id": "evol_298", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the removal of a user from a group. The function, `remove_user_from_group`, takes two parameters: `userid` (a string representing the ID of the user to be removed) and `group` (a string representing the name of the group). ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_user_from_group('me', 'developers') == 'User removed from group'\", \"assert remove_user_from_group('me', 'designers') == 'User removed from group'\", \"assert remove_user_from_group('me', 'managers') == 'User removed from group'\", \"assert remove_us...
{ "split": "train", "index": 73102, "acecode_id": "bigcode_python_fns_48526", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a function that validates two conditions for two groups of strings (group1 and group2). The function should check if all elements in group1 are fully contained within group2 without any repetition. Additionally, for each element in group1, there should be at least one co...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_subset_and_substrings(['cat'], ['catalog', 'dog', 'bird']) == True\", \"assert validate_subset_and_substrings(['hello'], ['hey', 'HelloWorld']) == True\", \"assert validate_subset_and_substrings(['test'], ['try', 'testing', 'best']) == True\", \"ass...
{ "split": "train", "index": 73103, "acecode_id": "evol_21750", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that multiplies two matrices A and B, ensuring that the multiplication is possible only when the number of columns in A equals the number of rows in B. If the matrices cannot be multiplied, return an error message. After performing the multiplication, return th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert mul_and_transpose([[1, 2]], [[3], [4]]) == [[11]]\", \"assert mul_and_transpose([[1]], [[2]]) == [[2]]\", \"assert mul_and_transpose([[1, 2, 3]], [[4], [5], [6]]) == [[32]]\", \"assert mul_and_transpose([[1, 1], [1, 1]], [[2, 2], [2, 2]]) == [[4, 4], [4, 4]]...
{ "split": "train", "index": 73104, "acecode_id": "evol_15076", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that determines if a given number is a prime number. A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. Your function should take a single integer as input and return...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_prime(2) == True\", \"assert is_prime(3) == True\", \"assert is_prime(4) == False\", \"assert is_prime(5) == True\", \"assert is_prime(10) == False\", \"assert is_prime(11) == True\", \"assert is_prime(13) == True\", \"assert is_prime(15) == False\", \"as...
{ "split": "train", "index": 73105, "acecode_id": "oss_8842", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function to compute the sum of squares of a list of integers. The function should take a single parameter, which is a list of integers, and return the sum of the squares of these integers. If the list is empty, the function should retur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_of_squares([1, 2, 3]) == 14\", \"assert sum_of_squares([-1, -2, -3]) == 14\", \"assert sum_of_squares([0, 0, 0]) == 0\", \"assert sum_of_squares([]) == 0\", \"assert sum_of_squares([4, 5, 6]) == 77\", \"assert sum_of_squares([7]) == 49\", \"assert sum_of...
{ "split": "train", "index": 73106, "acecode_id": "oss_24442", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes a given string and removes any leading and trailing characters that are either backticks or whitespace characters. The function should return the modified string without altering the content in between. Implement the fu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_backticks('`Single Backtick`') == 'Single Backtick'\", \"assert remove_backticks(' No Backticks Here ') == 'No Backticks Here'\", \"assert remove_backticks('``Multiple``Backticks``') == 'Multiple``Backticks'\", \"assert remove_backticks('` Trail...
{ "split": "train", "index": 73107, "acecode_id": "oss_36774", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Implement a function that generates an XML document from a 2D list containing personal information about individuals. Each inner list should include the following attributes in order: gender, height (in cms), eye color, country, age, and weight. The function should validate the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_xml_tree([['Male', 180, 'Brown', 'USA', 25, 75], ['Female', 165, 'Blue', 'Canada', 30, 60]], by_age=True) is not None\", \"assert create_xml_tree([['Male', 150, 'Green', 'USA', 10, 40], ['Female', 140, 'Brown', 'Canada', 15, 35]], by_age=False) is not...
{ "split": "train", "index": 73108, "acecode_id": "evol_5937", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `find_primes_in_range(start: int, end: int) -> List[int]` that identifies all prime numbers within a specified range (exclusive). The function should take two parameters: `start` and `end`, which represent the boundaries of the range. The function should return...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_primes_in_range(11, 20) == [13, 17, 19]\", \"assert find_primes_in_range(0, 10) == [2, 3, 5, 7]\", \"assert find_primes_in_range(15, 30) == [17, 19, 23, 29]\", \"assert find_primes_in_range(10, 10) == []\", \"assert find_primes_in_range(5, 15) == [7, 11...
{ "split": "train", "index": 73109, "acecode_id": "evol_21039", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Create a function `serialize_layout` that takes a `scalars_layout` object (of type `Layout`) and serializes it to a string format. The function should return the serialized string representation of the input layout. You can assume that the `Layout` object has a method `serializ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert serialize_layout(Layout()) == 'Serialized Layout'\", \"assert serialize_layout(Layout(type='bar', values=[1, 2, 3])) == 'Serialized Layout with type bar and values [1, 2, 3]'\", \"assert serialize_layout(Layout(type='line', values=[4, 5, 6])) == 'Serialized ...
{ "split": "train", "index": 73110, "acecode_id": "bigcode_python_fns_43443", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that logs the execution time of another function. The logging should include the name of the function, its execution time in seconds, and the arguments passed to the function. The function should handle both positional and keyword ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert log_execution_time(example_function, 1, 2, c=3) == 6\", \"assert log_execution_time(example_function, 5, 5, c=5) == 15\", \"assert log_execution_time(example_function, 10, 20, c=30) == 60\", \"assert log_execution_time(example_function, -1, -2, c=-3) == -6\"...
{ "split": "train", "index": 73111, "acecode_id": "oss_29786", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a timeout mechanism for a network communication system. The timeout value should start at a given initial value and double each time it exceeds a certain threshold of 60 seconds. Your task is to implement a function that takes the initial timeou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_final_timeout(32) == 64\", \"assert calculate_final_timeout(1) == 64\", \"assert calculate_final_timeout(2) == 64\", \"assert calculate_final_timeout(4) == 64\", \"assert calculate_final_timeout(8) == 64\"]}" }
{ "split": "train", "index": 73112, "acecode_id": "oss_27386", "num_tests": 5 }
acecode
[ { "role": "user", "content": "Write a function `find_index(arr, num, flag)` that accepts a list of integers `arr`, an integer `num`, and a boolean `flag`. If `flag` is false, the function should return the index of the smallest integer in `arr` that is greater than or equal to `num`. If `flag` is true, the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_index([1, 2, 3, 4, 5], 3, False) == 2\", \"assert find_index([1, 2, 3, 4, 5], 3, True) == 2\", \"assert find_index([1, 2, 3, 4, 5], 6, False) == -1\", \"assert find_index([1, 2, 3, 4, 5], 0, False) == 0\", \"assert find_index([1, 2, 3, 4, 5], 5, True) =...
{ "split": "train", "index": 73113, "acecode_id": "evol_11134", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that simulates a file operation on a remote server. The function will take in several parameters: a server address, a username, a password, a connection timeout, a search pattern, and an encryption flag. The function should return ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simulate_file_operation('192.168.1.1', 'user1', 'pass1', 30, '*.txt', True) == (False, 'Login failed')\", \"assert simulate_file_operation('192.168.1.2', 'user2', 'pass2', 30, '*.doc', True) == (False, 'File or directory not found')\", \"assert simulate_file...
{ "split": "train", "index": 73114, "acecode_id": "oss_20939", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Implement a function in Python that finds the first and last occurrence of a target value in a sorted list. The function should return a tuple containing the indices of the first and last occurrences of the target value. If the target is not found in the list, return (-1, -1).\...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_first_last([1, 2, 3, 4, 5], 3) == (2, 2)\", \"assert find_first_last([2, 3, 3, 3, 4, 5], 3) == (1, 3)\", \"assert find_first_last([1, 1, 1, 1, 1], 1) == (0, 4)\", \"assert find_first_last([1, 2, 3, 4, 5], 6) == (-1, -1)\", \"assert find_first_last([], 1...
{ "split": "train", "index": 73115, "acecode_id": "evol_31084", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function to merge two tuples element-by-element alternately. If one tuple is longer than the other, append the remaining elements of the longer tuple at the end of the merged result. For example, given tuple1 = (1,2,3) and tuple2 = (4,5,6), the resulting tuple should be...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_tuples((1,2,3), (4,5,6)) == (1, 4, 2, 5, 3, 6)\", \"assert merge_tuples((1,2), (4,5,6)) == (1, 4, 2, 5, 6)\", \"assert merge_tuples((1,2,3,7), (4,5)) == (1, 4, 2, 5, 3, 7)\", \"assert merge_tuples((), (4,5,6)) == (4, 5, 6)\", \"assert merge_tuples((1,2...
{ "split": "train", "index": 73116, "acecode_id": "evol_24514", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers and a threshold value. Your task is to implement a function that determines if the list is corrupted. A list is considered corrupted if the absolute difference between any two adjacent elements exceeds the specified threshold. Implement the foll...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_corrupted([10, 15, 20], 5) == False\", \"assert is_corrupted([5, 10, 15, 25], 8) == True\", \"assert is_corrupted([-5, -10, -15], 4) == True\", \"assert is_corrupted([1, 2, 3, 4, 5], 1) == False\", \"assert is_corrupted([1], 10) == False\", \"assert is_co...
{ "split": "train", "index": 73117, "acecode_id": "oss_16711", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that retrieves all ring interactions associated with a specific ligand ID. Given a dictionary that maps ligand IDs to their corresponding ring interactions, implement a function `fetch_all_by_ligand_id(ligand_id: int) -> List[str]` that t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fetch_all_by_ligand_id(1) == ['Interaction A', 'Interaction B']\", \"assert fetch_all_by_ligand_id(2) == ['Interaction C']\", \"assert fetch_all_by_ligand_id(5) == []\", \"assert fetch_all_by_ligand_id(8) == []\", \"assert fetch_all_by_ligand_id(11) == []\",...
{ "split": "train", "index": 73118, "acecode_id": "oss_28759", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Given a date string in the format MM-DD-YYYY, write a function that converts the date to the format YYYY-MM-DD. The function should take a single string as input and return the reformatted date string. The input date will always be a valid date string in the specified format.\n...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_date('12-31-2021') == '2021-12-31'\", \"assert format_date('01-01-2000') == '2000-01-01'\", \"assert format_date('06-15-1995') == '1995-06-15'\", \"assert format_date('11-22-2022') == '2022-11-22'\", \"assert format_date('04-05-2010') == '2010-04-05'\...
{ "split": "train", "index": 73119, "acecode_id": "bigcode_python_fns_41431", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function that removes duplicate elements, elements that occur more than a specified number of times, and prime numbers from the list. The function should maintain the order of the remaining elements as they appeared in the input list. Write...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates([3, 4, 11, 2, 11, 2, 3, 3], 2) == [4]\", \"assert remove_duplicates([2, 3, 5, 7, 11, 13], 1) == []\", \"assert remove_duplicates([], 2) == []\", \"assert remove_duplicates([5, 5, 5, 5, 5], 4) == []\", \"assert remove_duplicates([4, 6, 8, 10...
{ "split": "train", "index": 73120, "acecode_id": "evol_2428", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given two strings, `one` and `two`, write a function `common_chars(one, two)` that returns a string containing all the common characters between the two input strings. The order of characters in the output should follow their appearance in the first string (`one`). If a charact...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert common_chars('hello', 'world') == 'lo'\", \"assert common_chars('aabbcc', 'abc') == 'abc'\", \"assert common_chars('abcd', 'efgh') == ''\", \"assert common_chars('', 'nonempty') == ''\", \"assert common_chars('nonempty', '') == ''\", \"assert common_chars('a...
{ "split": "train", "index": 73121, "acecode_id": "oss_37060", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a function that takes three parameters: length, breadth, and height, representing the dimensions of a parallelepiped. The function should return the volume of the parallelepiped, calculated using the formula: volume = length * breadth * height.\nPlease reason step by ste...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert volume_of_parallelepiped(2, 3, 4) == 24\", \"assert volume_of_parallelepiped(1, 1, 1) == 1\", \"assert volume_of_parallelepiped(5, 5, 5) == 125\", \"assert volume_of_parallelepiped(2.5, 4.0, 8.0) == 80.0\", \"assert volume_of_parallelepiped(0, 5, 10) == 0\",...
{ "split": "train", "index": 73122, "acecode_id": "evol_30262", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of migration operations, represented as dictionaries. Each operation has the following keys: 'operation_type', 'model_name', 'field_name', and 'field_type'. Your function should extract and return a list of tu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_migration_operations([{'operation_type': 'AlterField', 'model_name': 'project', 'field_name': 'settings', 'field_type': 'models.TextField(blank=True)'}, {'operation_type': 'AddField', 'model_name': 'project', 'field_name': 'description', 'field_type'...
{ "split": "train", "index": 73123, "acecode_id": "oss_7203", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the execution of tests based on a specified testing mode. The function takes a string representing the testing mode as input and returns a corresponding message indicating the result of the test execution. The testing modes...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert run_tests('full') == 'Running all tests...'\", \"assert run_tests('glfw') == 'Running tests using backend: glfw'\", \"assert run_tests('nobackend') == 'Running tests that do not require a backend...'\", \"assert run_tests('examples') == 'Running repository e...
{ "split": "train", "index": 73124, "acecode_id": "oss_23000", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are given an undirected graph represented as an adjacency list, where each node corresponds to an integer and edges represent connections between these nodes. Your task is to write a function `find_connected_components` that takes this adjacency list as input and returns a ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_connected_components({}) == []\", \"assert find_connected_components({0: [1], 1: [0]}) == [[0, 1]]\", \"assert find_connected_components({0: [1], 1: [0], 2: []}) == [[0, 1], [2]]\", \"assert find_connected_components({0: [1, 2], 1: [0], 2: [0], 3: []}) ...
{ "split": "train", "index": 73125, "acecode_id": "oss_24230", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that takes a class as input and returns a dictionary containing the class attributes and their corresponding values. The function should extract and include only those attributes that do not start with double underscores (i.e., spe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_class_attributes(MambotokeaConfig) == {'default_auto_field': 'django.db.models.BigAutoField', 'name': 'mambotokea'}\", \"assert extract_class_attributes(type('Test', (object,), {'attr1': 1, 'attr2': 2})) == {'attr1': 1, 'attr2': 2}\", \"assert extrac...
{ "split": "train", "index": 73126, "acecode_id": "oss_33642", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given two strings, G and P, where G represents a larger body of text and P represents a pattern that needs to be found within G. Your task is to implement a function that determines whether the pattern P exists within the text G. The function should return True if the p...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_pattern('hello world', 'world') == True\", \"assert find_pattern('hello world', 'hello') == True\", \"assert find_pattern('abcde', 'f') == False\", \"assert find_pattern('abcde', 'abcde') == True\", \"assert find_pattern('', 'anything') == False\", \"as...
{ "split": "train", "index": 73127, "acecode_id": "oss_18490", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function called `matrix_addition` that takes two two-dimensional lists (matrices) as input and returns a new matrix that is the element-wise sum of the two input matrices. If the input matrices do not have the same dimensions or contain any non-numeric elements, the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert matrix_addition([[1, 2], [3, 4]], [[5, 6], [7, 8]]) == [[6, 8], [10, 12]]\", \"assert matrix_addition([[0]], [[1]] ) == [[1]]\", \"assert matrix_addition([[1.5, 2.5]], [[3.0, 4.0]]) == [[4.5, 6.5]]\", \"assert matrix_addition([[1, 2, 3], [4, 5, 6]], [[7, 8, ...
{ "split": "train", "index": 73128, "acecode_id": "evol_1780", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simplified version of a neural network decoder used in image segmentation. The decoder consists of three upsample blocks that mirror the downsampling path of an encoder. Each upsample block takes the number of input channels and returns half t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_decoder() == [(256, 256), (128, 128), (64, 64)]\", \"assert len(create_decoder()) == 3\", \"assert create_decoder()[0] == (256, 256)\", \"assert create_decoder()[1] == (128, 128)\", \"assert create_decoder()[2] == (64, 64)\", \"assert type(create_deco...
{ "split": "train", "index": 73129, "acecode_id": "oss_29404", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function `gradient(start, stop, steps)` that generates a list of evenly spaced values between `start` and `stop` with a specified number of `steps`. The function should return a list of floating-point numbers representing the gradient b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert gradient(0, 10, 5) == [0.0, 2.5, 5.0, 7.5, 10.0]\", \"assert gradient(1, 1, 1) == [1.0]\", \"assert gradient(-10, 10, 3) == [-10.0, 0.0, 10.0]\", \"assert gradient(0, 0, 1) == [0.0]\", \"assert gradient(5, 5, 2) == [5.0, 5.0]\", \"assert gradient(0, 1, 2) ==...
{ "split": "train", "index": 73130, "acecode_id": "oss_32662", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings. Your task is to create a function that processes each string by first collapsing any consecutive whitespace into a single space, then decomposing the string into its normalized form, and finally generating a Latinized version of the processed st...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_texts([''], 10) == []\", \"assert process_texts(['Text that exceeds the maximum length limit'], 10) == []\", \"assert process_texts(['Normal text', 'Another normal text'], 100) == ['Normal text', 'Another normal text']\", \"assert process_texts([' L...
{ "split": "train", "index": 73131, "acecode_id": "bigcode_python_fns_41998", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that parses a simulation configuration represented as a string in Protocol Buffers format. The configuration string contains settings for a physics simulation engine. Your goal is to extract specific information from this string and retur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_simulation_config_string('time_step: 0.01\\\\ngravity: [0, -9.81, 0]\\\\nfriction: 0.5') == {'time_step': 0.01, 'gravity': [0, -9.81, 0], 'friction': 0.5}\", \"assert parse_simulation_config_string('time_step: 0.02\\\\ngravity: [0, -9.8, 0]\\\\nfrictio...
{ "split": "train", "index": 73132, "acecode_id": "oss_19521", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `pre_process_tweet(text: str) -> str` that takes a string representing a Twitter post and returns a cleaned version of the text. The cleaned version should remove any URLs, mentions (words starting with '@'), and hashtags (words starting with '#'). Addition...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert pre_process_tweet('Check out my website at http://example.com!') == 'check out my website at '\", \"assert pre_process_tweet('@user Hello World! #greetings') == ' hello world! '\", \"assert pre_process_tweet('No links here, just text!') == 'no links here, ju...
{ "split": "train", "index": 73133, "acecode_id": "evol_28931", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string s, implement a function that calculates the cumulative value of the ordinal numbers of all lowercase consonants located at odd index positions within the string. The consonants should be evaluated in reverse order. Return the total sum of these ordinal values.\nP...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_ord_lower('dBBE') == 0\", \"assert sum_ord_lower('rAtInG') == 0\", \"assert sum_ord_lower('cOdE') == 0\", \"assert sum_ord_lower('gHjKl') == 0\", \"assert sum_ord_lower('mNoPqRs') == 0\", \"assert sum_ord_lower('yEs') == 0\"]}" }
{ "split": "train", "index": 73134, "acecode_id": "evol_20882", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Given a string of words, implement a function that encodes the words into tokens using a simple tokenizer. The tokenizer is defined by a mapping of words to their corresponding token IDs, as well as special token IDs for beginning of sequence (BOS) and end of sequence (EOS). Yo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert encode_words('hello world', 1, 2, {'hello': 3, 'world': 4}) == ([1, 3, 4], [3, 4, 2], [3, 4])\", \"assert encode_words('goodbye', 1, 2, {'goodbye': 5}) == ([1, 5], [5, 2], [5])\", \"assert encode_words('hello', 1, 2, {'hello': 3}) == ([1, 3], [3, 2], [3])\",...
{ "split": "train", "index": 73135, "acecode_id": "bigcode_python_fns_17229", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of dictionaries, where each dictionary represents a chromosome arm with a key 'log2' that contains a list of log2 ratios. Your task is to implement a function `extract_log2_ratios(chromosomes: List[Dict[str, List[float]]]) -> List[List[float]]` that extract...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_log2_ratios([{'log2': [1.0, 0.5, -0.3]}, {'log2': [0.8, -0.2]}]) == [[1.0, 0.5, -0.3], [0.8, -0.2]]\", \"assert extract_log2_ratios([{'log2': [0.0]}, {'log2': [0.1, 0.2, 0.3]}]) == [[0.0], [0.1, 0.2, 0.3]]\", \"assert extract_log2_ratios([]) == []\",...
{ "split": "train", "index": 73136, "acecode_id": "bigcode_python_fns_20756", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that sorts a given array of integers in ascending order without using any built-in sorting functions. The function should take an array of integers as input and return the sorted array.\nPlease reason step by step, then write a self-contained Python solutio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sort_array([11, 5, 9, 3, 6, 2, 15, 1, 18, 14, 33, 21, 17]) == [1, 2, 3, 5, 6, 9, 11, 14, 15, 17, 18, 21, 33]\", \"assert sort_array([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == [1, 1, 2, 3, 3, 4, 5, 5, 5, 6, 9]\", \"assert sort_array([10, 7, 8, 9, 1, 5]) == [1, 5, ...
{ "split": "train", "index": 73137, "acecode_id": "evol_32855", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a list of integers as input and performs a series of operations on those integers. Specifically, you need to compute the cumulative bitwise XOR of all the integers in the list. Your function should return the final result a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cumulative_xor([1, 2, 3]) == 0\", \"assert cumulative_xor([5, 1, 2]) == 6\", \"assert cumulative_xor([0, 0, 0]) == 0\", \"assert cumulative_xor([10, 15, 10]) == 15\", \"assert cumulative_xor([-1, -1, -1]) == -1\", \"assert cumulative_xor([2**31 - 1, 0]) == 2...
{ "split": "train", "index": 73138, "acecode_id": "oss_2659", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Write a function `display_employee_info(job_title: str, years_of_experience: int) -> str` that takes an employee's job title and years of experience as input and returns a formatted string displaying the job title and years of experience in the following format: 'Job Title: {jo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert display_employee_info('Software Engineer', 5) == 'Job Title: Software Engineer, Years of Experience: 5'\", \"assert display_employee_info('Data Scientist', 3) == 'Job Title: Data Scientist, Years of Experience: 3'\", \"assert display_employee_info('Project M...
{ "split": "train", "index": 73139, "acecode_id": "evol_13042", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of test cases, each represented as a dictionary containing the following keys: 'preCaseId', 'preCaseName', 'preCaseType', and optionally 'preIntfName' and 'preSystemName'. Your task is to implement a function `get_testcase_chain(testcase_id: int, case_type:...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_testcase_chain(1, 1, []) == [{'preCaseId': 1, 'preCaseName': 'Test Case 1__Expected Result 1', 'preCaseType': '\\u63a5\\u53e3\\u7528\\u4f8b'}]\", \"assert get_testcase_chain(27, 2, []) == [{'preCaseId': 27, 'preCaseName': 'Main Test Case 1__Expected Resu...
{ "split": "train", "index": 73140, "acecode_id": "bigcode_python_fns_34259", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are given a string representing a file path. Your task is to implement a function that checks if the file path is an absolute path or not. An absolute path starts with either a '/' (indicating a Unix-like system) or a drive letter followed by a colon and a backslash (indica...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_absolute_path('/home/user/file.txt') == True\", \"assert is_absolute_path('file.txt') == False\", \"assert is_absolute_path('../user/file.txt') == False\", \"assert is_absolute_path('/var/log/syslog') == True\", \"assert is_absolute_path('D:\\\\Documents\...
{ "split": "train", "index": 73141, "acecode_id": "bigcode_python_fns_38636", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Write a function named `absolute_difference` that takes two parameters and returns the absolute difference between them. The function should only accept integers or floating-point numbers. If either of the inputs is not a number, the function should return the string 'Invalid i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert absolute_difference(5, 3) == 2\", \"assert absolute_difference(3.5, 1.5) == 2.0\", \"assert absolute_difference(-2, -5) == 3\", \"assert absolute_difference(0, 0) == 0\", \"assert absolute_difference(7.5, 2.5) == 5.0\", \"assert absolute_difference(10, -10) ...
{ "split": "train", "index": 73142, "acecode_id": "evol_30995", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of MPEG stream file paths represented as strings, which include one '.dash' file and multiple '.m4s' files. Your task is to implement a function that checks for the following conditions: 1. There must be exactly one '.dash' file in the list. 2. There must b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert gather_files(['video.dash', 'segment1.m4s', 'segment2.m4s']) == 'video.dash'\", \"assert gather_files(['single.dash', 'clip1.m4s']) == 'single.dash'\", \"assert gather_files(['input.dash', 'part1.m4s', 'part2.m4s', 'part3.m4s']) == 'input.dash'\", \"assert g...
{ "split": "train", "index": 73143, "acecode_id": "bigcode_python_fns_11435", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a python function called 'string_reverser_recursive' that takes in a string as input and returns a new string which is reversed. Implement this function using recursion instead of in-built python methods. If the input is not a string, the function should raise TypeError.\...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert string_reverser_recursive('hello') == 'olleh'\", \"assert string_reverser_recursive('') == ''\", \"assert string_reverser_recursive('a') == 'a'\", \"assert string_reverser_recursive('12345') == '54321'\", \"assert string_reverser_recursive('racecar') == 'rac...
{ "split": "train", "index": 73144, "acecode_id": "evol_10484", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `fibonacci_reverse(n: int) -> List[int]` that computes the Fibonacci sequence up to the nth number and returns the sequence in reverse order. The Fibonacci sequence is defined as follows: the first two numbers are 0 and 1, and each subsequent number is the sum ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fibonacci_reverse(1) == [0]\", \"assert fibonacci_reverse(2) == [1, 0]\", \"assert fibonacci_reverse(3) == [1, 1, 0]\", \"assert fibonacci_reverse(4) == [2, 1, 1, 0]\", \"assert fibonacci_reverse(5) == [3, 2, 1, 1, 0]\", \"assert fibonacci_reverse(6) == [5, ...
{ "split": "train", "index": 73145, "acecode_id": "evol_19961", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the process of managing bookmarks in a version control system. The function `manage_bookmark` takes three parameters: a list of bookmarks (strings), a string representing a new bookmark to add, and a string representing a b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_bookmark(['alpha', 'bravo', 'charlie'], 'delta', 'bravo') == ['alpha', 'charlie', 'delta']\", \"assert manage_bookmark(['alpha', 'bravo'], 'bravo', 'alpha') == ['bravo']\", \"assert manage_bookmark([], 'alpha', 'bravo') == ['alpha']\", \"assert manage...
{ "split": "train", "index": 73146, "acecode_id": "bigcode_python_fns_8763", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of numerical values representing spectral data, along with a mapping dictionary that describes how to transform these values into a structured format. The mapping dictionary will have spectral data properties as keys and...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_spectral_data([1.0, 2.0, 3.0], {'flux': lambda x: x * 10, 'wavelength': lambda x: x + 1}) == {'flux': [10.0, 20.0, 30.0], 'wavelength': [2.0, 3.0, 4.0]}\", \"assert transform_spectral_data([0.5, 1.5, 2.5], {'intensity': lambda x: x ** 2}) == {'inte...
{ "split": "train", "index": 73147, "acecode_id": "bigcode_python_fns_2984", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string that contains a function name followed by its arguments separated by ' | '. Your task is to implement a function that splits this string into two parts: the function name and a list of its arguments. The function name is the first part of the string, and ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert split_function_string('myFunction | arg1 | arg2') == ('myFunction', ['arg1', 'arg2'])\", \"assert split_function_string('calculate | 5 | 10') == ('calculate', ['5', '10'])\", \"assert split_function_string('processData | data1') == ('processData', ['data1'])...
{ "split": "train", "index": 73148, "acecode_id": "bigcode_python_fns_13097", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function `find_least_frequency_word(text: str) -> str` that takes a string `text` as input and finds the least frequently occurring word in the given text. Exclude common English stop words such as 'and', 'of', 'to', etc. The function should return the least freq...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_least_frequency_word('Hello world hello test test hello') == 'world'\", \"assert find_least_frequency_word('Sample test with repeated words test test') == 'sample'\", \"assert find_least_frequency_word('One two three four five six seven eight nine ten')...
{ "split": "train", "index": 73149, "acecode_id": "evol_7950", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that filters a list of dictionaries based on specified conditions for various keys. The filtering conditions are given in a nested dictionary format where each key corresponds to a field in the dictionaries. For each key, the conditio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert apply_filter_conditions([{'name': 'Alice', 'age': 25, 'city': 'New York'}], {'age': {'operator': '>', 'value': 20}}) == [{'name': 'Alice', 'age': 25, 'city': 'New York'}]\", \"assert apply_filter_conditions([{'name': 'Bob', 'age': 30, 'city': 'San Francisco'...
{ "split": "train", "index": 73150, "acecode_id": "oss_7867", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that calculates the Euclidean distance between two points in a 2D Cartesian coordinate system. Each point is represented by its x and y coordinates. The function should take in four parameters: x1, y1, x2, and y2, which correspond to ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_distance(0, 0, 3, 4) == 5.0\", \"assert calculate_distance(1, 1, 1, 1) == 0.0\", \"assert calculate_distance(0, 0, 0, 0) == 0.0\", \"assert calculate_distance(1, 2, 4, 6) == 5.0\", \"assert calculate_distance(-1, -2, -4, -6) == 5.0\", \"assert calc...
{ "split": "train", "index": 73151, "acecode_id": "oss_5191", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `evaluate_expression(exp: str) -> int` that takes a mathematical expression as a string input and evaluates it according to the order of operations (BIDMAS/BODMAS). The expression will consist of non-negative integers, the operators `+`, `-`, `*`, `/`, and ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_expression('3 + 5') == 8\", \"assert evaluate_expression('10 - 2 * 5') == 0\", \"assert evaluate_expression('4 * (3 + 2)') == 20\", \"assert evaluate_expression('(2 + 3) * (5 - 2)') == 15\", \"assert evaluate_expression('10 / 2 + 3') == 8\", \"asser...
{ "split": "train", "index": 73152, "acecode_id": "evol_25677", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary `data` where each key is a string representing an algorithm's claimed epsilon value, and the corresponding value is a list of tuples. Each tuple contains two floats: the first float is the test epsilon value and the second float is the p-value associa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_pvalues({'0.1': [(0.01, 0.03), (0.02, 0.04)], '0.2': [(0.03, 0.05)]}) == [0.03, 0.04, 0.05]\", \"assert extract_pvalues({'0.05': [(0.01, 0.1)], '0.15': [(0.02, 0.2), (0.03, 0.15)]}) == [0.1, 0.2, 0.15]\", \"assert extract_pvalues({'1.0': [(0.1, 0.5),...
{ "split": "train", "index": 73153, "acecode_id": "bigcode_python_fns_30498", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes a given byte string into smaller chunks. Each chunk should contain at most 65535 bytes. Your function should take a byte string `data` as input and return a list of byte strings, where each byte string is a chunk of the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_data_chunks(b'') == []\", \"assert process_data_chunks(b'abc') == [b'abc']\", \"assert process_data_chunks(b'a' * 65535) == [b'a' * 65535]\", \"assert process_data_chunks(b'a' * 65536) == [b'a' * 65535, b'a']\", \"assert process_data_chunks(b'a' * 13...
{ "split": "train", "index": 73154, "acecode_id": "oss_34541", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Implement a function `add_global_information` that takes a request object and adds a global attribute `some_info` to it. The value of `some_info` should be the string 'Information'. The function should return the modified request object.\nPlease reason step by step, then write ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_global_information({})['some_info'] == 'Information'\", \"assert add_global_information({'key': 'value'})['some_info'] == 'Information'\", \"assert add_global_information({'user': 'Alice'})['some_info'] == 'Information'\", \"assert add_global_information...
{ "split": "train", "index": 73155, "acecode_id": "evol_34319", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a 2D list (matrix) representing a grayscale image and returns a new 2D list where each pixel value is replaced by the average of its neighboring pixels. The neighboring pixels are the ones directly adjacent to the pixel (up...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert average_neighbors([[0, 0], [0, 0]]) == [[0, 0], [0, 0]]\", \"assert average_neighbors([[255, 255], [255, 255]]) == [[255, 255], [255, 255]]\", \"assert average_neighbors([[100]]) == [[100]]\", \"assert average_neighbors([[10, 10, 10], [10, 10, 10], [10, 10, ...
{ "split": "train", "index": 73156, "acecode_id": "bigcode_python_fns_24021", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with implementing an access control system for a simple application. Your function should take a list of user names and a user name to check for access. The function should return a boolean value indicating whether the given user name is allowed access based on t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_user_authorized(['alice', 'bob', 'charlie'], 'bob') == True\", \"assert is_user_authorized(['alice', 'bob', 'charlie'], 'dave') == False\", \"assert is_user_authorized([], 'bob') == False\", \"assert is_user_authorized(['eve'], 'eve') == True\", \"assert ...
{ "split": "train", "index": 73157, "acecode_id": "bigcode_python_fns_1424", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that processes parameters for a lead-acid battery model. Write a function `process_lead_acid_parameters` that takes in two parameters: a dictionary `parameter_values` containing parameter values for a lead-acid battery model, a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_lead_acid_parameters({'C_e': 100, 'sigma_n': 0.5, 'temperature': 25}, 'temperature') == {'C_e': 100, 'sigma_n': 0.5}\", \"assert process_lead_acid_parameters({'C_e': 100, 'temperature': 25}, 'sigma_n') == {'C_e': 100, 'sigma_n': None}\", \"assert pro...
{ "split": "train", "index": 73158, "acecode_id": "oss_13139", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a decorator function named `task` that allows you to assign a weight to a function. The decorator should be able to accept either a weight as an integer or no arguments at all. If a weight is provided, it should be attached to the function as an att...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert task(5)(lambda: None).locust_task_weight == 5\", \"assert task(10)(lambda: None).locust_task_weight == 10\", \"assert task(1)(lambda: None).locust_task_weight == 1\", \"assert task(3)(lambda: None).locust_task_weight == 3\", \"assert task(100)(lambda: None)....
{ "split": "train", "index": 73159, "acecode_id": "bigcode_python_fns_10379", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `can_user_post(user_id: str, group_id: str) -> bool` that determines whether a user can post in a given group based on their user ID and the group ID. The function should return `True` if the user has permission to post in the group a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_user_post('postingMember', 'group1') == True\", \"assert can_user_post('notPostingMember', 'group1') == False\", \"assert can_user_post('postingMember', 'group2') == True\", \"assert can_user_post('user123', 'group1') == False\", \"assert can_user_post('...
{ "split": "train", "index": 73160, "acecode_id": "oss_18996", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of numeric values, implement a function `complex_computation(lst)` that computes the absolute value of each number, converts these absolute values into their closest lower integers, and then arranges the absolute integers in increasing order. Finally, the function ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert complex_computation([2, -3, 4]) == 4\", \"assert complex_computation([1.5, 4.8, -2.2, -7]) == 28\", \"assert complex_computation([1, -5, 9, -3]) == 45\", \"assert complex_computation([3.2, -2.7, 0]) == 3\", \"assert complex_computation([-1.7, 2, 2, -5]) == 1...
{ "split": "train", "index": 73161, "acecode_id": "evol_8040", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function that simulates the behavior of the Python `split()` method. The function should take in a string, a separator character, and an optional maximum number of splits, and return a list of substrings obtained by splitting the original string at each occurrence o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert custom_split('apple,banana,orange,grape', ',', 2) == ['apple', 'banana', 'orange,grape']\", \"assert custom_split('one,two,three', ',', 1) == ['one', 'two,three']\", \"assert custom_split('singleword', ',', 1) == ['singleword']\", \"assert custom_split('spli...
{ "split": "train", "index": 73162, "acecode_id": "oss_27511", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a token swapping mechanism in a sentence. The function should take a string input, representing a sentence, and two boolean parameters: `respect_ents` and `respect_eos`. The function should randomly swap two neighboring tok...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert token_swap('hello world', 0.5, True, True) == 'hello world'\", \"assert token_swap('the quick brown fox', 0.5, True, True) == 'the quick brown fox'\", \"assert token_swap('swapping tokens is fun', 0.5, True, True) == 'swapping tokens is fun'\", \"assert toke...
{ "split": "train", "index": 73163, "acecode_id": "bigcode_python_fns_42514", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are given a string representing a font name. Your task is to create a function that sets the font for a text editor. Implement a function `set_text_font(font_name: str) -> str` that takes a string `font_name` as input and returns a confirmation message indicating that the f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert set_text_font('Arial') == 'Font changed to Arial'\", \"assert set_text_font('Verdana') == 'Font changed to Verdana'\", \"assert set_text_font('Helvetica') == 'Font changed to Helvetica'\", \"assert set_text_font('Times New Roman') == 'Font changed to Times N...
{ "split": "train", "index": 73164, "acecode_id": "bigcode_python_fns_21479", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string containing both letters and numbers, implement a function `mirror_string(s: str) -> str` that returns the mirror reflection of the given string. The mirror reflection is defined as the string reversed. For example, if the input string is \"hello123\", the output ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert mirror_string('abcd1234') == '4321dcba'\", \"assert mirror_string('hello') == 'olleh'\", \"assert mirror_string('1234') == '4321'\", \"assert mirror_string('a1b2c3') == '3c2b1a'\", \"assert mirror_string('') == ''\", \"assert mirror_string('abcdef') == 'fedc...
{ "split": "train", "index": 73165, "acecode_id": "evol_10755", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function that takes this list and returns a new list containing only the unique elements from the original list in the order of their first appearance. Do not use any built-in functions to remove duplicates. The function should return an empty ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_elements([1, 2, 3, 2, 1]) == [1, 2, 3]\", \"assert unique_elements([4, 5, 4, 6, 5]) == [4, 5, 6]\", \"assert unique_elements([]) == []\", \"assert unique_elements([10]) == [10]\", \"assert unique_elements([1, 1, 1, 1]) == [1]\", \"assert unique_elemen...
{ "split": "train", "index": 73166, "acecode_id": "bigcode_python_fns_13171", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates adding a member to a list of users with associated roles. The function should take in a list of current members and their roles, add a new member with a specified role, and return the updated list of members. Each member is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_member([{'member': 'Alice', 'role': 'viewer'}, {'member': 'Bob', 'role': 'editor'}], {'member': 'Charlie', 'role': 'admin'}) == [{'member': 'Alice', 'role': 'viewer'}, {'member': 'Bob', 'role': 'editor'}, {'member': 'Charlie', 'role': 'admin'}]\", \"asse...
{ "split": "train", "index": 73167, "acecode_id": "bigcode_python_fns_25021", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of positive integers, implement a function that returns a sorted list of unique elements found at prime indices. The resulting list should only include elements that are odd. The indices start from zero. For example, if the input list is [15, 33, 1421, 65, 1, 15], ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert odd_elements_prime_index([2, 4, 6, 8, 10]) == []\", \"assert odd_elements_prime_index([0, 2, 4, 6, 8]) == []\", \"assert odd_elements_prime_index([]) == []\", \"assert odd_elements_prime_index([17, 20, 21, 24, 30]) == [21]\", \"assert odd_elements_prime_inde...
{ "split": "train", "index": 73168, "acecode_id": "evol_36136", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given a year between 2001 and 2100, write a function `count_fridays_13th_in_year(year: int) -> int` that returns the number of Fridays that fell on the 13th of the month during that year. You can assume the input year is always valid and within the specified range.\nPlease reas...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_fridays_13th_in_year(2001) == 2\", \"assert count_fridays_13th_in_year(2003) == 1\", \"assert count_fridays_13th_in_year(2004) == 2\", \"assert count_fridays_13th_in_year(2005) == 1\", \"assert count_fridays_13th_in_year(2006) == 2\", \"assert count_fr...
{ "split": "train", "index": 73169, "acecode_id": "evol_6213", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a list of strings representing filenames, implement a function `find_python_files(filenames: List[str]) -> List[str]` that returns a list of all valid Python filenames from the input list. A valid Python filename must end with the '.py' extension and must not start with a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_python_files(['script.py', 'module.py', 'README.md', '.hidden.py']) == ['script', 'module']\", \"assert find_python_files(['test.py', '.temp.py', 'data.txt', 'example.py']) == ['test', 'example']\", \"assert find_python_files(['.hidden', 'file.py', 'ano...
{ "split": "train", "index": 73170, "acecode_id": "bigcode_python_fns_21428", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a formatted string representing a customized presentation sheet. The function should take in parameters to define the title, font, alignment, background color, and position of the title on the sheet. The function should ret...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_presentation_sheet('Sample Presentation', ('Avenir-Roman', 80), 0, 'lightgray', 30, 350) == \\\"Title: Sample Presentation, Font: Avenir-Roman, Size: 80, Alignment: Left, Background Color: lightgray, Position: (30, 350)\\\"\", \"assert generate_pres...
{ "split": "train", "index": 73171, "acecode_id": "oss_5293", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of lists, `one_res`, implement a function `add_elements(one_res: List[List[int]]) -> List[int]` that flattens the list of lists into a single list containing all the integers. The output list should maintain the order of the integers as they appear in `one_res`. Re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_elements([[1, 2], [3, 4], [5]]) == [1, 2, 3, 4, 5]\", \"assert add_elements([[10, 20], [], [30, 40]]) == [10, 20, 30, 40]\", \"assert add_elements([[], [], []]) == []\", \"assert add_elements([[1], [2], [3], [4], [5]]) == [1, 2, 3, 4, 5]\", \"assert add_...
{ "split": "train", "index": 73172, "acecode_id": "bigcode_python_fns_28454", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers representing the number of tweets each user has made, write a function that returns the maximum and minimum number of tweets made by any user in the list. The function should take a list of integers as input and return a tuple containing the maximum and...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_min_tweets([10, 20, 30, 40]) == (40, 10)\", \"assert max_min_tweets([5, 15, 25]) == (25, 5)\", \"assert max_min_tweets([100, 200, 300, 400, 500]) == (500, 100)\", \"assert max_min_tweets([1]) == (1, 1)\", \"assert max_min_tweets([0, 0, 0]) == (0, 0)\", \...
{ "split": "train", "index": 73173, "acecode_id": "bigcode_python_fns_3099", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates warning generation in Python. The function, `generate_warning`, takes an input string representing a warning message and generates a warning of type `UserWarning` with that message. Your function should also have an optiona...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_warning('This is a warning', 'always') is None\", \"assert generate_warning('This is a warning', 'ignore') is None\", \"assert generate_warning('This is a warning', 'default') is None\", \"assert generate_warning('This is a warning', 'module') is No...
{ "split": "train", "index": 73174, "acecode_id": "bigcode_python_fns_43678", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of operations that can include both integers and floating point numbers, implement a function 'below_zero' that returns True if the cumulative balance drops below zero at any point during the operations. The function should also accept an optional boolean flag 'han...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert below_zero([1, 2, 3], False) == False\", \"assert below_zero([-1, -2, 3], False) == True\", \"assert below_zero([-1.1, 0.1, -0.1], True) == True\", \"assert below_zero([0.0, -0.1], True) == True\", \"assert below_zero([1, 2, -4], False) == True\", \"assert b...
{ "split": "train", "index": 73175, "acecode_id": "evol_21379", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that clears all handlers from a given list of loggers. Each logger is represented by a dictionary containing the 'name' of the logger and a list of 'handlers'. Your function should remove all handlers from each logger, returning the modif...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert clear_loggers([{'name': 'logger1', 'handlers': ['handler1']}, {'name': 'logger2', 'handlers': ['handler2', 'handler3']}]) == [{'name': 'logger1', 'handlers': []}, {'name': 'logger2', 'handlers': []}]\", \"assert clear_loggers([{'name': 'loggerA', 'handlers':...
{ "split": "train", "index": 73176, "acecode_id": "bigcode_python_fns_37839", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `remove_special_chars(input_str: str) -> str` that takes a string as input and returns a new string with all special characters removed. The output string should only contain alphanumeric characters and spaces.\nPlease reason step by step, then write a self-con...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_special_chars('Python@3.8#') == 'Python38'\", \"assert remove_special_chars('Special#Char$%s!') == 'SpecialChars'\", \"assert remove_special_chars('') == ''\", \"assert remove_special_chars('NoSpecialChars') == 'NoSpecialChars'\", \"assert remove_spec...
{ "split": "train", "index": 73177, "acecode_id": "evol_17019", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a simple bank account management system. Your function should accept a series of commands that represent deposits and withdrawals and return the final balance of the account. The commands will be provided as a list of strin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert final_balance(['deposit 100', 'withdraw 50', 'deposit 25']) == 75\", \"assert final_balance(['deposit 200', 'withdraw 300']) == 200\", \"assert final_balance(['deposit 500', 'withdraw 100', 'withdraw 100', 'withdraw 100']) == 200\", \"assert final_balance(['...
{ "split": "train", "index": 73178, "acecode_id": "oss_15199", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two binary strings, implement a function `string_xor(a: str, b: str) -> str` that returns the result of the XOR operation on the two strings. The function should raise a `ValueError` if either of the strings exceeds a length of 10^3 characters or if they contain character...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert string_xor('1010', '1100') == '0110'\", \"assert string_xor('0', '0') == '0'\", \"assert string_xor('1', '1') == '0'\", \"assert string_xor('111', '000') == '111'\", \"assert string_xor('101', '010') == '111'\", \"assert string_xor('1101', '1011') == '0110'\...
{ "split": "train", "index": 73179, "acecode_id": "evol_7212", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a file name as input and returns the name of the corresponding hidden file. A hidden file is a file that starts with a dot ('.') at the beginning of its name. If the input file name already starts with a dot, return the name as...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert make_hidden_filename('example.txt') == '.example.txt'\", \"assert make_hidden_filename('.hiddenfile') == '.hiddenfile'\", \"assert make_hidden_filename('document.docx') == '.document.docx'\", \"assert make_hidden_filename('data.csv') == '.data.csv'\", \"asse...
{ "split": "train", "index": 73180, "acecode_id": "bigcode_python_fns_22300", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that creates a repeater function. The repeater function takes a function `f` and an integer `n` as input and returns a new function that applies `f` to its input `n` times. For example, if `f` is the function that increments it...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert make_repeater(lambda x: x + 1, 2)(3) == 5\", \"assert make_repeater(lambda x: x * 2, 3)(1) == 8\", \"assert make_repeater(lambda x: x - 1, 4)(10) == 6\", \"assert make_repeater(lambda x: x + 3, 1)(5) == 8\", \"assert make_repeater(lambda x: x ** 2, 2)(2) == ...
{ "split": "train", "index": 73181, "acecode_id": "oss_27020", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a stack data structure using a singly linked list in Python that supports the following operations: push(x), pop(), peek(), and getMin(). The push(x) function adds an element x to the top of the stack. The pop() function removes the element from the top of the stack and ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert min_stack_operations([('push', 1), ('push', 2), ('peek', 0)]) == [2]\", \"assert min_stack_operations([('push', 10), ('push', 20), ('push', 5), ('getMin', 0)]) == [5]\", \"assert min_stack_operations([('push', 6), ('getMin', 0)]) == [6]\", \"assert min_stack...
{ "split": "train", "index": 73182, "acecode_id": "evol_14613", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that filters products by their brand name. You have a list of products, where each product is represented as a dictionary containing 'name' and 'brand_name' keys. The function `get_products_by_brand(products, brand_name)` should take two ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_products_by_brand([{'name': 'Product1', 'brand_name': 'BrandA'}, {'name': 'Product2', 'brand_name': 'BrandB'}, {'name': 'Product3', 'brand_name': 'BrandA'}], 'BrandA') == ['Product1', 'Product3']\", \"assert get_products_by_brand([{'name': 'Product1', 'b...
{ "split": "train", "index": 73183, "acecode_id": "oss_7750", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are to implement a function named 'intersperse'. This function takes 'numbers', a list of integers, and a separate integer 'delimiter' as inputs. The output should be a list with the integer 'delimiter' inserted between each pair of consecutive integers in 'numbers'. Additi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert intersperse([], 4) == []\", \"assert intersperse([1], 4) == [1]\", \"assert intersperse([1, 2], 4) == [1, 4, 2]\", \"assert intersperse([1, 2, 3], 4) == [1, 4, 2, 4, 3]\", \"assert intersperse([1, 3, 5], 9) == [1, 9, 3, 9, 5]\", \"assert intersperse([2, 4, 6...
{ "split": "train", "index": 73184, "acecode_id": "evol_16574", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a sentence as input and transforms each word into lowercase letters while reversing the order of letters in each word. The function should also ensure that any punctuation remains at the end of the respective words. The input is a string, and the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_words('The Quick, Brown Fox Jumps Over The Lazy Dog.') == 'eht kciuq, nworb xof spmuj revo eht yzal god.'\", \"assert reverse_words('Hello, World!') == 'olleh, dlrow!'\", \"assert reverse_words('What A Wonderful World!') == 'tahw a lufrednow dlrow!'\...
{ "split": "train", "index": 73185, "acecode_id": "evol_26739", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a callable (function or coroutine) and a string name as input. The function should execute the callable and catch any exceptions that occur during its execution. If an exception is caught, it should log a warning message contai...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_thread_wrapper(lambda: 1 + 1, 'addition') == 2\", \"assert get_thread_wrapper(lambda: 'Hello ' + 'World', 'greeting') == 'Hello World'\", \"assert get_thread_wrapper(lambda: [1, 2, 3], 'list_creation') == [1, 2, 3]\", \"assert get_thread_wrapper(lambda: ...
{ "split": "train", "index": 73186, "acecode_id": "bigcode_python_fns_41469", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are given a list of integers called `numbers`. Your task is to write a Python function `find_largest_smallest` that finds the largest and smallest numbers in the list and returns them as a tuple in the format `(largest, smallest)`. The function should handle the following c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_largest_smallest([]) == (None, None)\", \"assert find_largest_smallest([5]) == (5, 5)\", \"assert find_largest_smallest([1, 2, 3, 4, 5]) == (5, 1)\", \"assert find_largest_smallest([-1, -2, -3, -4, -5]) == (-1, -5)\", \"assert find_largest_smallest([0])...
{ "split": "train", "index": 73187, "acecode_id": "oss_28487", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function `generate_random_string(length: int) -> str` that generates a random string of a specified length. The string must include at least 2 uppercase letters and 3 digits. If the length is less than 5, the function should return an empty string. The function s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_random_string(10) != ''\", \"assert len(generate_random_string(10)) == 10\", \"assert sum(1 for c in generate_random_string(10) if c.isupper()) >= 2\", \"assert sum(1 for c in generate_random_string(10) if c.isdigit()) >= 3\", \"assert len(generate_...
{ "split": "train", "index": 73188, "acecode_id": "evol_859", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with merging two lists of integers. One list contains even numbers and the other contains odd numbers. Write a function `merge_and_sort_even_odd(even_numbers: List[int], odd_numbers: List[int]) -> List[int]` that takes two lists of integers as input, merges them ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_and_sort_even_odd([2, 4, 6], [1, 3, 5]) == [1, 2, 3, 4, 5, 6]\", \"assert merge_and_sort_even_odd([0, 2, 4], [1, 3, 5]) == [0, 1, 2, 3, 4, 5]\", \"assert merge_and_sort_even_odd([10, 8, 6], [7, 5, 3]) == [3, 5, 6, 7, 8, 10]\", \"assert merge_and_sort_e...
{ "split": "train", "index": 73189, "acecode_id": "oss_26291", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a function that accepts a list of integers and performs shell sorting on it. The function should not use any built-in Python sorting functionalities. Additionally, the function should handle error conditions appropriately, such as when the input is not a list or contains...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert shell_sort([14, 52, 7, 1, 9, 75, 3]) == [1, 3, 7, 9, 14, 52, 75]\", \"assert shell_sort([5, 3, 8, 6, 2]) == [2, 3, 5, 6, 8]\", \"assert shell_sort([10]) == [10]\", \"assert shell_sort([]) == []\", \"assert shell_sort([4, 1, 3, 2]) == [1, 2, 3, 4]\", \"assert...
{ "split": "train", "index": 73190, "acecode_id": "evol_23523", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Create a function `prime_product_dict(n)` that constructs a dictionary where the keys are all prime numbers less than or equal to `n`, and the values are the product of the prime number and a given constant `k` (where `k` is set to 2). The function should return this dictionary...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prime_product_dict(20) == {2: 4, 3: 6, 5: 10, 7: 14, 11: 22, 13: 26, 17: 34, 19: 38}\", \"assert prime_product_dict(1) == {}\", \"assert prime_product_dict(2) == {2: 4}\", \"assert prime_product_dict(3) == {2: 4, 3: 6}\", \"assert prime_product_dict(4) == {2...
{ "split": "train", "index": 73191, "acecode_id": "evol_15247", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with comparing two software version numbers. Each version number is represented as a string in the format 'x.y.z', where x, y, and z are non-negative integers. Your goal is to write a function `compare_versions(current_version: str, target_version: str) -> int` t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compare_versions('1.2.3', '1.1.5') == 1\", \"assert compare_versions('1.0.0', '1.0.0') == 0\", \"assert compare_versions('2.1.1', '1.9.9') == 1\", \"assert compare_versions('1.2.3', '1.2.3') == 0\", \"assert compare_versions('1.10.1', '1.9.9') == 1\", \"asse...
{ "split": "train", "index": 73192, "acecode_id": "oss_34611", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string, implement a function that checks if the string matches the pattern of two consecutive symbols '#' followed by exactly four alphabetic characters (either uppercase or lowercase). The function should return True if the string matches this pattern and False otherwi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert match_string('##abcd') == True\", \"assert match_string('##ABCD') == True\", \"assert match_string('##aBcD') == True\", \"assert match_string('##1234') == False\", \"assert match_string('##ab') == False\", \"assert match_string('###abc') == False\", \"assert...
{ "split": "train", "index": 73193, "acecode_id": "evol_5814", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a waypoint blocking system for a drone's flight control software. Your goal is to create a function that simulates sending a waypoint blocking command to a drone. The function should accept the following parameters: x (the x-coordinate of the wa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert send_waypoint_blocking(10, 20, 30, 1.57, 5, 2, True) == 'Waypoint Block Command: (10, 20, 30) Yaw: 1.57 Vel: 5 Acc: 2 Relative: True'\", \"assert send_waypoint_blocking(0, 0, 0, 0, 0, 0, False) == 'Waypoint Block Command: (0, 0, 0) Yaw: 0 Vel: 0 Acc: 0 Relat...
{ "split": "train", "index": 73194, "acecode_id": "oss_31412", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `process_data` that takes an integer and a string as parameters, encodes them, and returns them as a formatted string. The encoding format should be 'Encoded: <integer>, <string>'. For example, if the input integer is 5 and the string...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_data(0, 'Test') == 'Encoded: 0, Test'\", \"assert process_data(1, 'Hello') == 'Encoded: 1, Hello'\", \"assert process_data(42, 'World') == 'Encoded: 42, World'\", \"assert process_data(-10, 'Negative') == 'Encoded: -10, Negative'\", \"assert process_...
{ "split": "train", "index": 73195, "acecode_id": "oss_4025", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `clean_and_extract_data(json_strings: List[str]) -> List[Tuple[str, str]]` that takes a list of JSON strings, each representing customer feedback data, and returns a list of tuples containing cleaned 'Customer_Feedback' and 'Feedback_Type' fields. The clean...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert clean_and_extract_data(['{\\\"Customer_Feedback\\\": \\\"Great service!\\\", \\\"Feedback_Type\\\": \\\"Positive\\\"}', '{\\\"Customer_Feedback\\\": \\\"\\\", \\\"Feedback_Type\\\": \\\"Negative\\\"}', '{\\\"Customer_Feedback\\\": \\\"Could be better.\\\", \...
{ "split": "train", "index": 73196, "acecode_id": "evol_10148", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that calculates the percentage of a download that has been completed based on the number of blocks downloaded, the size of each block, and the total size of the file. Implement a function `calculate_download_progress(num_blocks: int, bloc...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_download_progress(0, 1, 1) == 0\", \"assert calculate_download_progress(1, 1, 1) == 100\", \"assert calculate_download_progress(1, 1, 100) == 1\", \"assert calculate_download_progress(50, 2, 100) == 100\", \"assert calculate_download_progress(0, 10...
{ "split": "train", "index": 73197, "acecode_id": "bigcode_python_fns_14031", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `get_open_order_list(recv_window: Optional[int] = None) -> Dict[str, Any]` that simulates a query to retrieve open OCO (One Cancels Other) orders from a trading API. The function takes an optional parameter `recv_window`, which represents...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_open_order_list() == {'timestamp': int(time.time() * 1000)}\", \"assert get_open_order_list(50000) == {'recvWindow': 50000, 'timestamp': int(time.time() * 1000)}\", \"assert get_open_order_list(0) == {'recvWindow': 0, 'timestamp': int(time.time() * 1000)...
{ "split": "train", "index": 73198, "acecode_id": "bigcode_python_fns_17294", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that takes a string as input and returns a modified version of the string based on specific rules. The function should perform the following operations: 1. Convert the input string to lowercase. 2. Replace all occurrences of the le...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert modify_string('example') == '3xampl3helper'\", \"assert modify_string('') == 'helper'\", \"assert modify_string('eE') == '33helper'\", \"assert modify_string('Repetition') == 'r3p3titionhelper'\", \"assert modify_string('letter') == 'l3tt3rhelper'\", \"asser...
{ "split": "train", "index": 73199, "acecode_id": "oss_19455", "num_tests": 8 }