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 `is_prime(n)` that checks whether a given integer n is a prime number. The function should return True for prime numbers and False for non-prime numbers. The function must also handle negative integers and non-integer types appropriately, raising a TypeErro...
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(13) == True\", \"assert is_prime(17) == True\", \"assert is_prime(19) == True\", \"ass...
{ "split": "train", "index": 76800, "acecode_id": "evol_13588", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that generates a list of all the even numbers between two given integers, inclusive. Additionally, for each even number, the function should indicate whether it is a prime number or not. Return a dictionary where each key is an even number and the correspon...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert even_prime_dict(2, 10) == {2: True, 4: False, 6: False, 8: False, 10: False}\", \"assert even_prime_dict(1, 5) == {2: True, 4: False}\", \"assert even_prime_dict(10, 20) == {10: False, 12: False, 14: False, 16: False, 18: False, 20: False}\", \"assert even_p...
{ "split": "train", "index": 76801, "acecode_id": "evol_29137", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of two integers representing low and high byte values (in the range of 0 to 255), write a function `join_complementary_byteblocks(block)` that combines these two byte values into a single signed integer. The first integer in the list represents the low byte, and th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert join_complementary_byteblocks([0, 0]) == 0\", \"assert join_complementary_byteblocks([255, 255]) == -1\", \"assert join_complementary_byteblocks([1, 1]) == 257\", \"assert join_complementary_byteblocks([0, 1]) == 256\", \"assert join_complementary_byteblocks...
{ "split": "train", "index": 76802, "acecode_id": "bigcode_python_fns_27909", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the initialization of a stochastic process in Python. The function should accept four parameters: `rho0` (a float representing the initial value of the process), `alpha` (a float representing a parameter that influences...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert initialize_process(1.0, 0.5, 0.3, 0.1) == {'rho0': 1.0, 'alpha': 0.5, 'drift_coef': 0.15, 'diffusion_coef': 0.1}\", \"assert initialize_process(5.0, 0.0, 0.5, 2.5) == {'rho0': 5.0, 'alpha': 0.0, 'drift_coef': 0.0, 'diffusion_coef': 2.5}\", \"assert initializ...
{ "split": "train", "index": 76803, "acecode_id": "oss_20665", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with analyzing the performance of different models on a specific dataset. The performance metrics are provided in a tabular format where each row contains the following columns: Model, Dataset, Input Size, Precision (mAP), Recall (mAR), F1 Score, Accuracy (mACC)....
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_average_metrics('VOC', [['Model', 'Dataset', 'Input Size', 'Precision (mAP)', 'Recall (mAR)', 'F1 Score', 'Accuracy (mACC)', 'Overall Accuracy'], ['Model A', 'VOC', '300', '5.00', '30.00', '4.00', '75.00', '75.00'], ['Model B', 'VOC', '300', '10.00...
{ "split": "train", "index": 76804, "acecode_id": "oss_29001", "num_tests": 12 }
acecode
[ { "role": "user", "content": "The Fibonacci sequence is constructed by summing the preceding two terms, commencing with 1 and 2. Write a function that calculates the sum of all even Fibonacci numbers that do not exceed a given limit. The function should take an integer parameter 'limit' and return the sum o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_even_fibonacci(10) == 10\", \"assert sum_even_fibonacci(2) == 2\", \"assert sum_even_fibonacci(8) == 10\", \"assert sum_even_fibonacci(34) == 44\", \"assert sum_even_fibonacci(100) == 44\", \"assert sum_even_fibonacci(4000000) == 4613732\", \"assert sum_...
{ "split": "train", "index": 76805, "acecode_id": "evol_31494", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `hcf(x: int, y: int) -> int` that calculates the Highest Common Factor (HCF) of two given integers, x and y. The HCF is the largest integer that divides both x and y without leaving a remainder. For example, the HCF of 18 and 15 is 3.\nPlease reason step by...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert hcf(18, 15) == 3\", \"assert hcf(20, 8) == 4\", \"assert hcf(100, 75) == 25\", \"assert hcf(54, 24) == 6\", \"assert hcf(7, 3) == 1\", \"assert hcf(14, 28) == 14\", \"assert hcf(9, 27) == 9\", \"assert hcf(21, 14) == 7\", \"assert hcf(11, 0) == 11\", \"asser...
{ "split": "train", "index": 76806, "acecode_id": "evol_28653", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python decorator called `@type_safe` that ensures type safety for function arguments. The decorator should validate that the arguments passed to a function match the expected types defined in the function signature. If any argument does not ma...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert checked(True, 'item') == None\", \"assert checked(False, 'item') == None\", \"assert checked(True, '') == None\", \"assert checked(False, 'another_item') == None\", \"assert checked(False, 'test') == None\", \"assert checked(True, 'valid') == None\", \"asser...
{ "split": "train", "index": 76807, "acecode_id": "oss_19501", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given a list of image captions, your task is to create a function named `group_captions_by_image_id` that takes a list of dictionaries as input. Each dictionary contains an 'image_id' (a string) and a 'caption' (a string). The function should return a dictionary where the keys ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert group_captions_by_image_id([{'image_id': '1', 'caption': 'A dog.'}, {'image_id': '1', 'caption': 'A cat.'}, {'image_id': '2', 'caption': 'A bird.'}]) == {'1': ['A dog.', 'A cat.'], '2': ['A bird.']}\", \"assert group_captions_by_image_id([{'image_id': '1', '...
{ "split": "train", "index": 76808, "acecode_id": "bigcode_python_fns_34832", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function called `perfect_square` that takes a positive integer N as input and checks if it is a perfect square. If N is a perfect square, return its integer square root. If N is not a perfect square, return the string 'Error: The provided number is not a perfect squ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert perfect_square(1) == 1\", \"assert perfect_square(4) == 2\", \"assert perfect_square(9) == 3\", \"assert perfect_square(16) == 4\", \"assert perfect_square(25) == 5\", \"assert perfect_square(36) == 6\", \"assert perfect_square(49) == 7\", \"assert perfect_s...
{ "split": "train", "index": 76809, "acecode_id": "evol_10578", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string that contains a message with mentions of users in a chat application. Each mention is formatted as '@username'. Your task is to create a function that takes this string as input and returns a list of unique usernames mentioned in the message. If there are...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_usernames('Hello @alice and @bob, how are you?') == ['alice', 'bob']\", \"assert extract_usernames('No mentions here!') == []\", \"assert extract_usernames('@Alice, @bob, and @charlie are online.') == ['alice', 'bob', 'charlie']\", \"assert extract_u...
{ "split": "train", "index": 76810, "acecode_id": "bigcode_python_fns_46316", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that rounds a floating-point number based on two parameters: `round_down` and `random_round`. The function should return an integer value of the input number, taking into account the rounding direction specified by `round_down` (True for rounding down, Fals...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert customize_rounding(4.7) == 4\", \"assert customize_rounding(-3.2) == -4\", \"assert customize_rounding(4.7, round_down=False) == 5\", \"assert customize_rounding(-3.2, round_down=False) == -3\", \"assert customize_rounding(4.5) == 4\", \"assert customize_rou...
{ "split": "train", "index": 76811, "acecode_id": "evol_3883", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `display_prime_keys(dictionary)` that takes a dictionary with string keys and integer values as input. The function should return a list of keys that correspond to prime number values. A prime number is defined as a number greater than 1 that has no positiv...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert display_prime_keys({'Amy': 3, 'Bob': 5, 'Charlie': 4, 'David': 11, 'Eva': 12, 'Fred': 13}) == ['Amy', 'Bob', 'David', 'Fred']\", \"assert display_prime_keys({'Alice': 2, 'Eve': 4, 'Mallory': 7}) == ['Alice', 'Mallory']\", \"assert display_prime_keys({'A': 1,...
{ "split": "train", "index": 76812, "acecode_id": "evol_3711", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that processes a command expression for a database inspection. The command can be one of the following forms: a single 'DBINSPECT', 'DBINSPECT' followed by a list of arguments (arglist), or 'DBINSPECT' followed by a MACRO. Your function sh...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_command('DBINSPECT') == 'Single DBINSPECT'\", \"assert process_command('DBINSPECT arg1 arg2') == 'DBINSPECT with Arguments'\", \"assert process_command('DBINSPECT MACRO') == 'DBINSPECT with MACRO'\", \"assert process_command('DBINSPECT arg1') == 'DBI...
{ "split": "train", "index": 76813, "acecode_id": "bigcode_python_fns_18918", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates connecting to a database. The function should take a string parameter `database_url`, which represents the URL of the database to connect to. If the database URL starts with 'valid', the function should return a string 'Con...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert connect_to_database('valid://db') == 'Connection established'\", \"assert connect_to_database('valid://another_db') == 'Connection established'\", \"assert connect_to_database('invalid://db') == 'Connection failed'\", \"assert connect_to_database('invalid://...
{ "split": "train", "index": 76814, "acecode_id": "oss_28021", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of integers. Your function should take in a list of integers and return a new list containing the squares of each integer. Additionally, if a negative integer is encountered, it should be excluded from the out...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert square_positive_numbers([1, 2, 3]) == [1, 4, 9]\", \"assert square_positive_numbers([-1, -2, -3]) == []\", \"assert square_positive_numbers([5, 6, -7]) == [25, 36]\", \"assert square_positive_numbers([]) == []\", \"assert square_positive_numbers([-10, 10, 20...
{ "split": "train", "index": 76815, "acecode_id": "oss_34279", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `get_assembly(name: str) -> Optional[str]` that simulates fetching assembly code based on the provided assembly name. The function should take a single parameter `name`, which is a string representing the name of the assembly to be fetche...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_assembly('x86') == 'mov eax, ebx'\", \"assert get_assembly('x64') == 'mov rax, rbx'\", \"assert get_assembly('ARM') == 'mov r0, r1'\", \"assert get_assembly('x86_64') == None\", \"assert get_assembly('MIPS') == None\", \"assert get_assembly('') == None\"...
{ "split": "train", "index": 76816, "acecode_id": "oss_14262", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of temperature readings from multiple CPU cores, where each reading is represented as a list of integers. Your task is to calculate the mean temperature for each set of readings across all CPU cores. Implement a function `mean_temperature(readings: List[Lis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert mean_temperature([[95, 85, 75], [100, 90, 80], [105, 95, 85]]) == [100.00, 90.00, 80.00]\", \"assert mean_temperature([[32, 45, 28], [30, 40, 25], [35, 50, 30]]) == [32.33, 45.00, 27.67]\", \"assert mean_temperature([[70], [80], [90]]) == [80.00]\", \"assert...
{ "split": "train", "index": 76817, "acecode_id": "bigcode_python_fns_34305", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of instructions represented as strings. Each instruction may include a version indicator (e.g., '32' or '64') after a dollar sign ($). Your program should extract the instructions following the dollar sign, re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_instructions(['# This is a comment', 'LOAD_CONST$32 0', 'LOAD_CONST$64 1', 'STORE_NAME$32 x', 'STORE_NAME$64 y']) == {'LOAD_CONST', 'STORE_NAME'}\", \"assert extract_instructions(['# Another comment', 'ADD$32 2', 'SUBTRACT$64 3']) == {'ADD', 'SUBTRAC...
{ "split": "train", "index": 76818, "acecode_id": "oss_18825", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function that returns a new list containing only the unique elements from the input list, preserving the original order of their first appearance. The input list may contain both positive and negative integers, as well as zero. Your functio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_elements([1, 2, 3, 1, 2, 3]) == [1, 2, 3]\", \"assert unique_elements([4, 5, 4, 6, 7]) == [4, 5, 6, 7]\", \"assert unique_elements([1, 1, 1, 1]) == [1]\", \"assert unique_elements([0, -1, 0, -2, -1]) == [0, -1, -2]\", \"assert unique_elements([]) == [...
{ "split": "train", "index": 76819, "acecode_id": "bigcode_python_fns_31699", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Develop a function that eliminates non-even elements from a nested heterogeneous tuple. The function should handle tuples embedded within other tuples and expunge non-even elements from these as well. It should process integers, floating-point numbers, string data types, and bi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_odd_elements((1, 2, 3, 4)) == (2, 4)\", \"assert remove_odd_elements((1.0, 2.0, 3.0, 4.0)) == (2.0, 4.0)\", \"assert remove_odd_elements((1, '2', 3, '4')) == ('2', '4')\", \"assert remove_odd_elements((1, 2, 3, '5', '6', 7.0)) == (2, '6')\", \"assert ...
{ "split": "train", "index": 76820, "acecode_id": "evol_19019", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given a positive integer number, write a function `is_narcissistic` that determines if the number is a Narcissistic number. A number is considered Narcissistic if the sum of its digits each raised to the power of the number of digits equals the number itself. For example, 153 i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_narcissistic(153) == True\", \"assert is_narcissistic(9474) == True\", \"assert is_narcissistic(370) == True\", \"assert is_narcissistic(371) == True\", \"assert is_narcissistic(407) == True\", \"assert is_narcissistic(123) == False\", \"assert is_narciss...
{ "split": "train", "index": 76821, "acecode_id": "bigcode_python_fns_20436", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `validate_password(password: str, min_length: int, use_special_chars: bool, upper_lower_case: bool, digits: bool) -> bool` that checks whether a given password adheres to specified guidelines. The guidelines include a minimum length for the password, whethe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_password('Password123!', 10, True, True, True) == True\", \"assert validate_password('1234567890', 10, False, False, False) == True\", \"assert validate_password('password', 8, False, False, False) == True\", \"assert validate_password('Password123'...
{ "split": "train", "index": 76822, "acecode_id": "evol_32584", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the installation of software packages on a server. The function should take a list of package names as input and return a list of installed packages. The function should also print 'server package initializes ...' when it s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert install_packages([]) == []\", \"assert install_packages(['package1']) == ['package1']\", \"assert install_packages(['package1', 'package2']) == ['package1', 'package2']\", \"assert install_packages(['package1', 'package1']) == ['package1']\", \"assert instal...
{ "split": "train", "index": 76823, "acecode_id": "oss_16992", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that constructs a min-heap from a given list of integers. The function should return the min-heap as a list. You can use any internal representation to maintain the heap structure, but the output must be a list that represents the heap. The input will be a ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert construct_fib_heap([25, 15, 36, 23, 47, 64, 59]) == [15, 23, 36, 25, 47, 64, 59]\", \"assert construct_fib_heap([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert construct_fib_heap([5, 4, 3, 2, 1]) == [1, 2, 3, 5, 4]\", \"assert construct_fib_heap([10, 20, 30]...
{ "split": "train", "index": 76824, "acecode_id": "evol_20964", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `index_papers_to_geodata(papers: List[Dict]) -> Dict[str, Dict]` that takes a list of papers and organizes their associated geolocation data. Each paper is represented by a dictionary containing its ID, name, type, and a list of files. Ea...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert index_papers_to_geodata([]) == {}\", \"assert index_papers_to_geodata([{'id': 3, 'name': 'Paper 3', 'type': 'Article', 'files': [{'id': 3, 'name': 'File 3', 'locations': [{'id': 'loc3', 'description': 'Location 3', 'geometry': (3, 3)}]}]}]) == {'loc3': {'id'...
{ "split": "train", "index": 76825, "acecode_id": "bigcode_python_fns_24309", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are given a list of irregular verbs, where each verb is represented as a dictionary containing its base form, past simple form, past participle form, and translation in Italian. Write a function `get_verb_info(verb, irregular_verbs)` that takes a string `verb` and a list of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_verb_info('read', [{'Base': 'read', 'PS': 'read', 'PP': 'read', 'Italiano': 'leggere'}]) == \\\"read is the verb to read. Its paradigm is read, read, read. It means leggere.\\\"\", \"assert get_verb_info('go', [{'Base': 'go', 'PS': 'went', 'PP': 'gone', ...
{ "split": "train", "index": 76826, "acecode_id": "bigcode_python_fns_9579", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with comparing software versions represented as strings. Each version follows the semantic versioning format, which consists of three non-negative integers separated by periods (e.g., '1.0.2'). Write a function `compare_versions(version1: str, version2: str) -> s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compare_versions('1.0.2', '1.0.1') == 'Version 1 is greater'\", \"assert compare_versions('1.0.1', '1.0.2') == 'Version 2 is greater'\", \"assert compare_versions('1.0.0', '1.0.0') == 'Versions are equal'\", \"assert compare_versions('2.0.0', '1.9.9') == 'Ve...
{ "split": "train", "index": 76827, "acecode_id": "oss_32062", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a parser for a simplified version of the SyGuS input language, which is used for specifying syntax-guided synthesis problems. A sort expression in the SyGuS input language can be a single sort or a sequence of sorts. A single sort can be a basic...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sortStar('Int Bool (List Int)') == ['Int', 'Bool', '(List Int)']\", \"assert sortStar('Bool Tree') == ['Bool', 'Tree']\", \"assert sortStar('Int') == ['Int']\", \"assert sortStar('(List Bool) (Tree Int)') == ['(List Bool)', '(Tree Int)']\", \"assert sortStar...
{ "split": "train", "index": 76828, "acecode_id": "oss_12426", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the median value of a 2D list of integers. If the number of elements in the list is even, return the interpolated median value. The input will be a list of lists containing numerical data. The numbers are not guaranteed to be in order. Write...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert median_2d_list([[3, 9, 2], [8, 12], [7, 5, 10]]) == 7.5\", \"assert median_2d_list([[1, 2], [3, 4], [5]]) == 3\", \"assert median_2d_list([[100, 200], [50, 75, 25]]) == 75\", \"assert median_2d_list([[5, 3], [1, 2], [4]]) == 3\", \"assert median_2d_list([[2,...
{ "split": "train", "index": 76829, "acecode_id": "evol_5540", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string containing various types of brackets: normal brackets '()', square brackets '[]', and curly brackets '{}'. Your task is to determine if the count of each type of bracket is even. If the counts of two types of brackets are odd, return a string indicating w...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_bracket_mismatch('()[]{}') == 'NONE'\", \"assert check_bracket_mismatch('[]{}') == 'NONE'\", \"assert check_bracket_mismatch('()()()') == 'NONE'\", \"assert check_bracket_mismatch('{[()]}') == 'NONE'\", \"assert check_bracket_mismatch('(){}[]()') == 'N...
{ "split": "train", "index": 76830, "acecode_id": "bigcode_python_fns_4213", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with validating a build plan represented as a dictionary. Write a function named validate_build_plan_schema(build_plan_dict) that takes a dictionary as input and checks whether it conforms to a specific schema. The dictionary must contain the following keys: 'id'...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_build_plan_schema({'id': 'f47ac10b-58cc-4372-a567-0e02b2c3d479', 'project_id': 'f47ac10b-58cc-4372-a567-0e02b2c3d480', 'build_id': 'f47ac10b-58cc-4372-a567-0e02b2c3d481', 'job_id': 'f47ac10b-58cc-4372-a567-0e02b2c3d482', 'plan_id': 'f47ac10b-58cc-43...
{ "split": "train", "index": 76831, "acecode_id": "oss_17905", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates loading a configuration from a specified file. The function should take a string representing the filename (without the extension) as input and return a list of section names that would hypothetically be found in that c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert load_configuration_sections('new_settings_load') == ['General', 'Database', 'Logging']\", \"assert load_configuration_sections('app_config') == ['Settings', 'User', 'Permissions']\", \"assert load_configuration_sections('default') == ['DefaultSettings', 'Def...
{ "split": "train", "index": 76832, "acecode_id": "bigcode_python_fns_7061", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates extracting frames from a video file. Given a total number of frames `total_frames`, your function should return a list of frame indices that would be saved as JPEG files. If `total_frames` is less than or equal to zero, ret...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_frame_indices(5) == [0, 1, 2, 3, 4]\", \"assert get_frame_indices(0) == []\", \"assert get_frame_indices(-3) == []\", \"assert get_frame_indices(1) == [0]\", \"assert get_frame_indices(10) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\", \"assert get_frame_indices(2...
{ "split": "train", "index": 76833, "acecode_id": "bigcode_python_fns_41648", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with evaluating a mathematical equation based on a specified value for the variable 'x'. The value of 'x' is provided in a specific format 'xk', where 'x' is the base and 'k' is the exponent. Your goal is to implement a function that takes this value of 'x', calc...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert solution('2 3', 'x + 5') == 13\", \"assert solution('1 4', 'x**2 - x') == 0\", \"assert solution('5 1', '2*x - 3') == 7\", \"assert solution('0 10', 'x**2 + 2*x + 1') == 1\", \"assert solution('2 1', 'x + 10') == 12\", \"assert solution('10 1', 'x**2 - 10') ...
{ "split": "train", "index": 76834, "acecode_id": "oss_36910", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a simple authentication process. The function, `simple_auth`, will take a single argument, `auth_token`, which is a string. Your goal is to determine whether the authentication is successful based on the value of `auth_...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simple_auth('valid_token') == {'status': 'authenticated'}\", \"assert simple_auth('invalid_token') == {'error': 'authentication failed'}\", \"assert simple_auth('') == {'error': 'authentication failed'}\", \"assert simple_auth('valid_token') == {'status': 'a...
{ "split": "train", "index": 76835, "acecode_id": "bigcode_python_fns_41640", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function `get_element_at_index(lst: List[int], index: int) -> int` that takes a list and a positive integer index as input. The function should return the element at the index, using modulo operation with the length of the list to handle ca...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_element_at_index([1, 2, 3], 1) == 2\", \"assert get_element_at_index([1, 2, 3], 2) == 3\", \"assert get_element_at_index([1, 2, 3], 3) == 1\", \"assert get_element_at_index([1, 2, 3], 4) == 2\", \"assert get_element_at_index([1, 2, 3], 5) == 3\", \"asser...
{ "split": "train", "index": 76836, "acecode_id": "evol_13738", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Write a Python function that takes a list of strings and reverses the order of the last 3 items in the list. If the list has fewer than 3 items, return the list unchanged. The function should have the following signature: def reverse_last_three(my_list: List[str]) -> List[str]:...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_last_three(['apple', 'banana']) == ['apple', 'banana']\", \"assert reverse_last_three(['apple']) == ['apple']\", \"assert reverse_last_three([]) == []\", \"assert reverse_last_three(['one', 'two', 'three', 'four', 'five']) == ['one', 'two', 'five', '...
{ "split": "train", "index": 76837, "acecode_id": "evol_482", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a list of integers and a non-negative integer representing the number of positions to rotate the list to the right, implement a function `rotate_list(my_list, positions)` that returns the rotated list. For example, if the input list is [1, 2, 3, 4, 5] and the rotation cou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert rotate_list([1, 2, 3, 4, 5], 3) == [3, 4, 5, 1, 2]\", \"assert rotate_list([1, 2, 3], 1) == [3, 1, 2]\", \"assert rotate_list([1, 2, 3, 4, 5], 0) == [1, 2, 3, 4, 5]\", \"assert rotate_list([1, 2, 3, 4, 5], 5) == [1, 2, 3, 4, 5]\", \"assert rotate_list([1], 1...
{ "split": "train", "index": 76838, "acecode_id": "evol_14941", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a custom exception class in Python. Create a class `CustomException` that inherits from the built-in `Exception` class. The `CustomException` class should have an `encode` method that returns a dictionary containing the exception message and any...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert CustomException('Error occurred').encode() == {'details': 'Error occurred'}\", \"assert CustomException('Error occurred', code=404).encode() == {'details': 'Error occurred', 'code': 404}\", \"assert CustomException('Error occurred', user='admin').encode() ==...
{ "split": "train", "index": 76839, "acecode_id": "oss_33611", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of floating-point numbers. Your task is to implement a function that extracts the decimal parts of these numbers and returns a new list containing only these decimal parts rounded to two decimal places. The decimal part of a number is defined as the fractio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_decimals([1.234, 2.345, 3.456]) == [0.23, 0.35, 0.46]\", \"assert extract_decimals([0.1, 0.2, 0.3]) == [0.10, 0.20, 0.30]\", \"assert extract_decimals([-1.5, -2.5, -3.5]) == [0.50, 0.50, 0.50]\", \"assert extract_decimals([100.01, 200.02]) == [0.01, ...
{ "split": "train", "index": 76840, "acecode_id": "oss_22682", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are given a user object that contains various fields: first_name, last_name, email, and username. Your task is to implement a function `user_to_dict(user)` that translates the user fields into a dictionary format defined by a field mapping. The mapping is as follows: 'first...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert user_to_dict(User(first_name='John', last_name='Doe', email='john@example.com', username='johndoe')) == {'givenName': 'John', 'familyName': 'Doe', 'email': 'john@example.com', 'displayName': 'johndoe'}\", \"assert user_to_dict(User(first_name='Alice', last_n...
{ "split": "train", "index": 76841, "acecode_id": "bigcode_python_fns_19191", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of integers, implement a function `can_arrange(arr)` that determines the largest index where an element can be swapped with another to create a sorted arrangement. The function should return a dictionary containing the following keys: 'index' (the largest index o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_arrange([1, 2, 4, 3, 5]) == {'index': 2, 'swap_with': 3, 'num_swaps': 1, 'inversions': 1}\", \"assert can_arrange([1, 2, 3]) == {'index': -1, 'swap_with': -1, 'num_swaps': 0, 'inversions': 0}\", \"assert can_arrange([1, 3, 2]) == {'index': 1, 'swap_with'...
{ "split": "train", "index": 76842, "acecode_id": "evol_14556", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the product of all prime numbers less than or equal to a given integer n. The function should handle errors gracefully by returning None for negative inputs or non-integer types. The function should return the product of the prime numbers fo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prime_product(10) == 210\", \"assert prime_product(20) == 9699690\", \"assert prime_product(-5) == None\", \"assert prime_product(2) == 2\", \"assert prime_product(3) == 6\", \"assert prime_product(4) == 6\", \"assert prime_product(5) == 30\", \"assert prime...
{ "split": "train", "index": 76843, "acecode_id": "evol_35523", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that calculates the total number of items selected and their total amount based on a list of item amounts. The function should take a list of integers representing the amounts of the items and return a tuple containing the total number of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_totals([10, 20, 30]) == (3, 60)\", \"assert calculate_totals([5, 15, 25, 35]) == (4, 80)\", \"assert calculate_totals([]) == (0, 0)\", \"assert calculate_totals([1]) == (1, 1)\", \"assert calculate_totals([100, 200, 300, 400, 500]) == (5, 1500)\", ...
{ "split": "train", "index": 76844, "acecode_id": "oss_23123", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given an integer array `nums` and two types of operations: updating an element at a specific index and retrieving the product of elements in a specified range. Implement a function `range_product(nums: List[int], updates: List[Tuple[int, int]], queries: List[Tuple[int, ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert range_product([1, 3, 5], [(1, 2)], [(0, 2)]) == [10]\", \"assert range_product([2, 3, 4], [(0, 1)], [(1, 2)]) == [12]\", \"assert range_product([1, 2, 3, 4], [(3, 1)], [(1, 3)]) == [6]\", \"assert range_product([0, 1, 2], [(1, 3)], [(0, 2)]) == [0]\", \"asse...
{ "split": "train", "index": 76845, "acecode_id": "evol_8242", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates reloading configuration parameters for a system. The function should take a list of configuration file names and return a string indicating that the configurations have been reloaded successfully. The output should be forma...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reload_configs(['config1.yaml', 'config2.yaml']) == 'Configurations reloaded from: config1.yaml, config2.yaml.'\", \"assert reload_configs(['configA.json']) == 'Configurations reloaded from: configA.json.'\", \"assert reload_configs(['settings.xml', 'prefere...
{ "split": "train", "index": 76846, "acecode_id": "bigcode_python_fns_6801", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string, implement a function that removes all duplicated characters in the string and returns a tuple containing the modified string with duplicates removed (in the order of their first occurrence) and the count of distinct characters in the string. \n\nFunction signatu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates_and_count('Hello World') == ('Helo Wrd', 8)\", \"assert remove_duplicates_and_count('aabbcc') == ('abc', 3)\", \"assert remove_duplicates_and_count('') == ('', 0)\", \"assert remove_duplicates_and_count('abcabcabc') == ('abc', 3)\", \"asser...
{ "split": "train", "index": 76847, "acecode_id": "evol_10990", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are given a set of logical implications in the form of First Order Logic expressions. Each expression takes the form of 'A(x) => B(x)', where A(x) and B(x) are predicates and x is a variable. Your task is to write a program that can determine whether a given set of logical ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_consistent(['A(x) => B(x)', 'B(x) => C(x)']) == True\", \"assert is_consistent(['A(x) => B(x)', 'C(x) => A(x)']) == True\", \"assert is_consistent(['A(x) => B(x)', 'B(x) => C(x)', 'C(x) => D(x)', 'E(x) => F(x)']) == True\", \"assert is_consistent(['A(x) =...
{ "split": "train", "index": 76848, "acecode_id": "oss_15800", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given a tuple containing multiple strings, implement a function that randomly shuffles the order of the strings within the tuple and returns a new shuffled tuple. Please note that tuples are immutable, so you will need to convert the tuple into a list for shuffling. The functio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert shuffle_tuple(('apple', 'banana', 'cherry', 'date')) != ('apple', 'banana', 'cherry', 'date')\", \"assert len(shuffle_tuple(('dog', 'cat', 'mouse'))) == 3\", \"assert isinstance(shuffle_tuple(('red', 'green', 'blue')), tuple)\", \"assert shuffle_tuple(('a', ...
{ "split": "train", "index": 76849, "acecode_id": "evol_8993", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `evaluate_offer(custo_max: float, custo: float, beneficio: int, status: bool) -> str` that evaluates an offer based on the maximum cost the user is willing to pay, the actual cost of the offer, the expected benefit rating on a scale from ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_offer(100.0, 90.0, 4, True) == 'Offer Accepted! Status: Showing'\", \"assert evaluate_offer(100.0, 110.0, 4, False) == 'Offer Rejected! Status: Not showing'\", \"assert evaluate_offer(100.0, 80.0, 2, True) == 'Offer Rejected! Status: Showing'\", \"a...
{ "split": "train", "index": 76850, "acecode_id": "bigcode_python_fns_25135", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a logging function that returns a logging object configured to log messages to standard output (stdout). The logging level should be set to INFO, and the logging format should include the timestamp, log level, and the log message. The function shoul...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_stdout_logger().level == logging.INFO\", \"assert len(create_stdout_logger().handlers) == 1\", \"assert isinstance(create_stdout_logger().handlers[0], logging.StreamHandler)\", \"assert create_stdout_logger().name == 'stdout_logger'\", \"assert create...
{ "split": "train", "index": 76851, "acecode_id": "bigcode_python_fns_22538", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given a list of objects representing resources. Implement a function `mark_used` that marks an object as used by adding it to a global collection of used objects. The function should accept an object as input and return the object after marking it as used. The global co...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert mark_used('resource1') == 'resource1'\", \"assert mark_used('resource2') == 'resource2'\", \"assert mark_used(42) == 42\", \"assert mark_used((1, 2, 3)) == (1, 2, 3)\", \"assert mark_used('resource1') == 'resource1'\", \"assert mark_used('resource3') == 'res...
{ "split": "train", "index": 76852, "acecode_id": "bigcode_python_fns_15398", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that constructs an initial node for a beam search algorithm. Given a context string and a device identifier, your function should prepare the initial decoder input and create a root node for the beam search. The root node should be re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert build_init_nodes('hello', 'cpu') == [{'parent': None, 'action': None, 'decoder_input': 'hello_cpu', 'depth': 0, 'length': 5}]\", \"assert build_init_nodes('world', 'gpu') == [{'parent': None, 'action': None, 'decoder_input': 'world_gpu', 'depth': 0, 'length'...
{ "split": "train", "index": 76853, "acecode_id": "bigcode_python_fns_24267", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to monitor and log the duration of garbage collection cycles for a node statistics service. Your function will take in two parameters: a string 'phase' which indicates the phase of the garbage collection cycle, and a dictionary 'info'...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert monitor_gc_duration('start', {'generation': 0}) is None\", \"assert monitor_gc_duration('start', {'generation': 1}) is None\", \"assert monitor_gc_duration('start', {'generation': 2}) is None\", \"assert monitor_gc_duration('end', {'generation': 0}) is None\...
{ "split": "train", "index": 76854, "acecode_id": "oss_6721", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that trims sequences from a list of quality scores based on specified trimming rules. Implement a function `trim_sequences(quality_scores: List[int], trim_minlen: int) -> List[int]` that takes a list of integers representing the quality s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert trim_sequences([25, 15, 30, 18, 22], 2) == [25, 30, 22]\", \"assert trim_sequences([19, 20, 21], 1) == [20, 21]\", \"assert trim_sequences([10, 10, 10], 1) == []\", \"assert trim_sequences([30, 25, 15, 22, 19], 2) == [30, 25, 22]\", \"assert trim_sequences([...
{ "split": "train", "index": 76855, "acecode_id": "bigcode_python_fns_44085", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `divide(a: Union[int, float], b: Union[int, float]) -> Union[float, None]` that takes two numbers `a` and `b`, and returns the result of dividing `a` by `b`. If `b` is zero or if either `a` or `b` is not a number (i.e., not an integer or float), the functio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert divide(10, 2) == 5.0\", \"assert divide(10, 0) == None\", \"assert divide(10, 'a') == None\", \"assert divide('a', 2) == None\", \"assert divide(10.0, 2) == 5.0\", \"assert divide(10, 2.5) == 4.0\", \"assert divide(-10, 2) == -5.0\", \"assert divide(10, -2) ...
{ "split": "train", "index": 76856, "acecode_id": "evol_6534", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a simple representation of a grid mosaic based on provided grid information. The function will take a dictionary `mom6_grid` with the following structure: {'filenames': {'mosaic': str, 'directory': str, 'supergrid': str}, '...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_grid_mosaic({'filenames': {'mosaic': 'mosaic_file.nc', 'directory': '/path/to/grid', 'supergrid': 'supergrid_file.nc'}, 'netcdf_info': {'string_length': 10, 'tile_str': 'tile1'}}) == {'mosaic_name': 'mosaic_file', 'grid_location': '/path/to/grid', '...
{ "split": "train", "index": 76857, "acecode_id": "bigcode_python_fns_23959", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that formats a string captured from stderr, ensuring that the resulting string does not exceed a specified maximum length. The function takes two parameters: `stderr`, a string containing characters captured from stderr, and `max_len`...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_output('Critical error occurred', 20) == 'Critical error oc...'\", \"assert format_output('Info: All systems operational', 30) == 'Info: All systems operational'\", \"assert format_output('Warning: Check your inputs', 30) == 'Warning: Check your input...
{ "split": "train", "index": 76858, "acecode_id": "oss_36282", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Write a function that takes as input a tuple of numbers (t_1,...,t_{N+1}) and returns a tuple of length N where the i-th element of the tuple is equal to t_i + t_{i+1}. The function should also handle negative numbers and zeros, and return an error message if the input is not a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert tuple_sum((1, 2, 3)) == (3, 5)\", \"assert tuple_sum((0, 0, 0)) == (0, 0)\", \"assert tuple_sum((-1, -2, -3)) == (-3, -5)\", \"assert tuple_sum((5, -5, 5)) == (0, 0)\", \"assert tuple_sum((10, 20, 30, 40)) == (30, 50, 70)\", \"assert tuple_sum((1, -1, 1, -1)...
{ "split": "train", "index": 76859, "acecode_id": "evol_655", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a function `create_abac_route(pattern: str, view: Callable, required_attributes: List[str], name: Optional[str] = None) -> AbacRoute` that constructs an instance of an `AbacRoute` class. This class should ensure that the route is only accessible to users with the defined...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_abac_route('/home/', my_view, ['admin', 'editor'], 'home_route').pattern == '/home/'\", \"assert create_abac_route('/about/', my_view, ['user'], 'about_route').name == 'about_route'\", \"assert create_abac_route('/contact/', my_view, [], None).require...
{ "split": "train", "index": 76860, "acecode_id": "evol_29299", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the scores of players in a game. Your task is to write a function that selects a player at random from the list of scores. The function should take in a list of scores and return the score of the randomly selected player. If the lis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert select_random_player([10, 20, 30]) in [10, 20, 30]\", \"assert select_random_player([5, 15, 25, 35, 45]) in [5, 15, 25, 35, 45]\", \"assert select_random_player([1]) == 1\", \"assert select_random_player([]) == -1\", \"assert select_random_player([100, 200])...
{ "split": "train", "index": 76861, "acecode_id": "bigcode_python_fns_45247", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of edges representing an undirected graph. An edge is represented as a tuple (u, v) where u and v are the vertices connected by the edge. A loop edge is an edge that connects a vertex to itself (i.e., u == v). Write a function `count_loops(edges: List[Tuple...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_loops([]) == 0\", \"assert count_loops([(1, 1)]) == 1\", \"assert count_loops([(1, 2), (2, 2), (1, 1)]) == 2\", \"assert count_loops([(1, 2), (2, 3), (3, 3), (3, 1)]) == 1\", \"assert count_loops([(0, 0), (0, 1), (1, 1), (1, 2), (2, 2)]) == 3\", \"asse...
{ "split": "train", "index": 76862, "acecode_id": "bigcode_python_fns_49301", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to decode a string encoded using a specific format. The encoding format involves using a combination of letters and numbers to represent a repeating pattern within the string. A number represents the number of times the subsequent sub...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert decodeString('2[3[a]b]') == 'aaabaaab'\", \"assert decodeString('1[abc]') == 'abc'\", \"assert decodeString('4[x]') == 'xxxx'\", \"assert decodeString('3[ab2[c]]') == 'abccabccabcc'\", \"assert decodeString('5[xyz]') == 'xyzxyzxyzxyzxyz'\", \"assert decodeSt...
{ "split": "train", "index": 76863, "acecode_id": "oss_30950", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given a string of words, and your task is to count the number of mundane and enthusiastic sentences in the text. A mundane sentence starts with the pronoun 'I', while an enthusiastic sentence ends with '!'. Sentences are defined by their ending punctuation marks: '.', '...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_bored('I am happy. I will go home.') == (2, 0)\", \"assert is_bored('I think it will rain. Do you agree?') == (1, 0)\", \"assert is_bored('I enjoy coding. Python is fun!') == (1, 1)\", \"assert is_bored('I am bored. I am not excited.') == (2, 0)\", \"asse...
{ "split": "train", "index": 76864, "acecode_id": "evol_7603", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that filters even numbers from a list. Write a function named `filter_even_numbers` that takes a list of integers as input and returns a new list containing only the even numbers from the original list. Your function should handle var...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_even_numbers([]) == []\", \"assert filter_even_numbers([2, 4, 6, 8, 10]) == [2, 4, 6, 8, 10]\", \"assert filter_even_numbers([1, 3, 5, 7, 9]) == []\", \"assert filter_even_numbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [2, 4, 6, 8, 10]\", \"assert filter...
{ "split": "train", "index": 76865, "acecode_id": "oss_8910", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of alphanumeric strings that may contain both letters and numbers. Your task is to implement a function that sorts this list in a way that takes into account both the numeric and alphabetic parts of the strings. The sorting should prioritize the numeric par...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sorted_nicely(['apple', 'banana', '2', '1']) == ['1', '2', 'apple', 'banana']\", \"assert sorted_nicely(['item20', 'item2', 'item1']) == ['item1', 'item2', 'item20']\", \"assert sorted_nicely(['a1', 'a2', 'b1', 'b2']) == ['a1', 'a2', 'b1', 'b2']\", \"assert ...
{ "split": "train", "index": 76866, "acecode_id": "bigcode_python_fns_33827", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that switches the capitalization of each alphabetical character in a given string. The function should leave special characters, punctuation, and numbers unchanged. For instance, if the input is 'Hello World! 2022', the expected output should be 'hELLO wORL...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert change_capitalization('Hello World! 2022') == 'hELLO wORLD! 2022'\", \"assert change_capitalization('Python3 is Fun!') == 'pYTHON3 IS fUN!'\", \"assert change_capitalization('12345') == '12345'\", \"assert change_capitalization('') == ''\", \"assert change_c...
{ "split": "train", "index": 76867, "acecode_id": "evol_653", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `fib_or_prime(n)` that takes an integer `n` as input. The function should return the `n`th Fibonacci number if `n` is not a prime number. If `n` is a prime number, the function should return the `n`th prime number instead. The Fibonacci numbers are defined ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fib_or_prime(0) == 0\", \"assert fib_or_prime(1) == 1\", \"assert fib_or_prime(4) == 3\", \"assert fib_or_prime(5) == 11\", \"assert fib_or_prime(6) == 8\", \"assert fib_or_prime(7) == 17\", \"assert fib_or_prime(8) == 21\", \"assert fib_or_prime(9) == 34\",...
{ "split": "train", "index": 76868, "acecode_id": "evol_34009", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers and a binary operation defined as a function that takes two integers and returns an integer. Your task is to implement a function `check_associative_and_identity(nums: List[int], operation: Callable[[int, int], int]) -> Tuple[bool, bool]` that d...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_associative_and_identity([0, 1, 2], lambda x, y: x + y) == (True, True)\", \"assert check_associative_and_identity([1, 2], lambda x, y: x - y) == (False, False)\", \"assert check_associative_and_identity([2, 3, 4], lambda x, y: x * y) == (True, False)\...
{ "split": "train", "index": 76869, "acecode_id": "oss_1631", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a list of pet names and their respective ages. The function should return a list of dictionaries where each dictionary represents a pet and contains the following keys: 'id' (auto-incremented starting from 0), 'name' (the n...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_pet_list([('Buddy', 3), ('Max', 5)]) == [{'id': 0, 'name': 'Buddy', 'age': 3}, {'id': 1, 'name': 'Max', 'age': 5}]\", \"assert create_pet_list([('Bella', 2)]) == [{'id': 0, 'name': 'Bella', 'age': 2}]\", \"assert create_pet_list([]) == []\", \"assert ...
{ "split": "train", "index": 76870, "acecode_id": "oss_8410", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a number `n` representing the target number of the character 'A' on a notepad. Initially, the notepad contains only one character 'A'. You can perform three operations: `Copy All`, `Paste`, and `Delete`. Your task is to determine the minimum number of operations r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert minSteps(1) == 0\", \"assert minSteps(2) == 2\", \"assert minSteps(3) == 3\", \"assert minSteps(4) == 4\", \"assert minSteps(5) == 5\", \"assert minSteps(6) == 5\", \"assert minSteps(7) == 7\", \"assert minSteps(8) == 6\", \"assert minSteps(9) == 6\", \"asse...
{ "split": "train", "index": 76871, "acecode_id": "evol_34466", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function to process a list of integers and return a new list that contains only the even integers from the original list. The function should take the following parameters: \n- `numbers`: A list of integers. \nThe function should return a l...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_even_numbers([1, 2, 3, 4, 5]) == [2, 4]\", \"assert filter_even_numbers([10, 15, 20, 25, 30]) == [10, 20, 30]\", \"assert filter_even_numbers([0, -2, -4, 5, 8]) == [0, -2, -4, 8]\", \"assert filter_even_numbers([]) == []\", \"assert filter_even_number...
{ "split": "train", "index": 76872, "acecode_id": "oss_8967", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `get_categories(structure_slug: str, structure: List[str]) -> Dict[str, List[str]]` that returns a dictionary containing categories for a given organizational structure. Each category is represented as a string in a list. The input will b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_categories('office1', ['Category A', 'Category B', 'Category C']) == {'office1': ['Category A', 'Category B', 'Category C']}\", \"assert get_categories('office2', ['Category D']) == {'office2': ['Category D']}\", \"assert get_categories('office4', ['Cate...
{ "split": "train", "index": 76873, "acecode_id": "bigcode_python_fns_49414", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that determines the winner of a poll based on the votes received. The poll can have multiple options, and each option has a certain number of votes. Your function should take a list of integers representing the votes for each option, and ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_poll_winner([10, 20, 30]) == 2\", \"assert find_poll_winner([5, 5, 5]) == 0\", \"assert find_poll_winner([1, 2, 3, 2]) == 2\", \"assert find_poll_winner([0, 0, 0, 1]) == 3\", \"assert find_poll_winner([100, 100, 50]) == 0\", \"assert find_poll_winner([1...
{ "split": "train", "index": 76874, "acecode_id": "bigcode_python_fns_34790", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a program that simulates a book search functionality. Write a function `search_books_by_title(title)` that takes a string `title` as input and checks against a predefined list of book titles. If no books are found with the given title, the function ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert search_books_by_title('Python Programming') == ['Python Programming Basics', 'Advanced Python Programming']\", \"assert search_books_by_title('Data Science') == ['Data Science from Scratch', 'Python for Data Science']\", \"assert search_books_by_title('unkno...
{ "split": "train", "index": 76875, "acecode_id": "oss_11427", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a dictionary containing details about a news source and extracts specific information based on certain criteria. The function should take in the source details dictionary and return a formatted string based on the ex...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_source_info({'category': 'Technology', 'language': 'English', 'country': 'United States'}) == 'This is a Technology news source from the United States.'\", \"assert extract_source_info({'category': 'Technology', 'language': 'English', 'country': 'Can...
{ "split": "train", "index": 76876, "acecode_id": "oss_17005", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given an encoded array of integers where each pair represents a value and its repeat count, decode this array into a float array where each value is divided by a specified divisor. You need to implement a function `decode_and_scale(encoded: List[int], n: int, divisor: int) -> L...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert decode_and_scale([2, 3, 3, 2], 5, 1) == [2.0, 2.0, 2.0, 3.0, 3.0]\", \"assert decode_and_scale([1, 4, 5, 1], 5, 1) == [1.0, 1.0, 1.0, 1.0, 5.0]\", \"assert decode_and_scale([10, 2, 20, 3], 5, 2) == [5.0, 5.0, 10.0, 10.0, 10.0]\", \"assert decode_and_scale([0...
{ "split": "train", "index": 76877, "acecode_id": "bigcode_python_fns_507", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that generates a payload dictionary based on a given scene ID. The function should take a string parameter `scene_id` and return a dictionary containing a single key-value pair where the key is 'scenename' and the value is equal to th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_payload('TEST') == {'scenename': 'TEST'}\", \"assert get_payload('') == {}\", \"assert get_payload('SampleScene') == {'scenename': 'SampleScene'}\", \"assert get_payload('Scene123') == {'scenename': 'Scene123'}\", \"assert get_payload(' ') == {'scenename...
{ "split": "train", "index": 76878, "acecode_id": "bigcode_python_fns_43000", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `triangle_area(a, b, c)` that calculates and returns the area and the altitude of a triangle defined by side lengths a, b, and c. The triangle should either be an isosceles (two sides are equal) or a scalene triangle (all sides have unequal lengths). If the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert triangle_area(1, 2, 10) == -1\", \"assert triangle_area(6, 8, 10) == (24.00, 4.80)\", \"assert triangle_area(1, 1, 1) == -1\", \"assert triangle_area(5, 5, 5) == -1\", \"assert triangle_area(10, 10, 10) == -1\", \"assert triangle_area(9, 12, 15) == (54.00, 7...
{ "split": "train", "index": 76879, "acecode_id": "evol_12320", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are given a list of tokens representing various programming constructs (e.g., method declarations, variable declarations, if statements, etc.). Each token is represented by its type as a string. Your task is to create a function named `token_mapper` that takes a single toke...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert token_mapper('FieldDeclaration') == 'Parsing a field declaration'\", \"assert token_mapper('MethodInvocation') == 'Parsing a method invocation'\", \"assert token_mapper('VariableDeclaration') == 'Parsing a variable declaration'\", \"assert token_mapper('Meth...
{ "split": "train", "index": 76880, "acecode_id": "bigcode_python_fns_29444", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a role identifier, a set of states, and a reason, implement a function `getStateLabels(role: int, states: set, reason: str, positiveStateLabelDict: dict, negativeStateLabelDict: dict) -> List[str]` that processes the states and returns a list of labels for both positive a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert getStateLabels(1, {1, 2, 3}, 'focus', {1: 'Active', 2: 'Enabled'}, {3: 'Disabled'}) == ['Active', 'Enabled', 'Disabled']\", \"assert getStateLabels(2, {1, 2, 3}, 'change', {1: 'Checked'}, {2: 'Unchecked', 3: 'Not Active'}) == ['Checked', 'Unchecked', 'Not Ac...
{ "split": "train", "index": 76881, "acecode_id": "bigcode_python_fns_23490", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a documentation page for a specific API endpoint. The function, `generate_api_doc_page`, takes a `request` object as input. Your goal is to extract the `voter_api_device_id` from the request and use it, along with a predefi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_api_doc_page({'voter_api_device_id': '12345'}) == {'voter_api_device_id': '12345'}\", \"assert generate_api_doc_page({'voter_api_device_id': 'abcde'}) == {'voter_api_device_id': 'abcde'}\", \"assert generate_api_doc_page({}) == None\", \"assert gene...
{ "split": "train", "index": 76882, "acecode_id": "bigcode_python_fns_19152", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that simulates a simple game of dice. The game involves rolling two dice and summing the values obtained. The function should take an integer `n` as input, representing the number of times the dice should be rolled. The function sh...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simulate_dice_rolls(0) == {}\", \"assert simulate_dice_rolls(1) == {2: 1} or simulate_dice_rolls(1) == {3: 1} or simulate_dice_rolls(1) == {4: 1} or simulate_dice_rolls(1) == {5: 1} or simulate_dice_rolls(1) == {6: 1} or simulate_dice_rolls(1) == {7: 1} or s...
{ "split": "train", "index": 76883, "acecode_id": "oss_30883", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Implement a function `evaluate_expression(expression: str, var_values: dict) -> float` that takes a mathematical expression in string format and a dictionary of variable values. The expression may include basic arithmetic operations (+, -, *, /), as well as single-letter variab...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_expression('10 / (2 + 3)', {}) == 2.0\", \"assert evaluate_expression('a + b', {'a': 3, 'b': 4}) == 7.0\", \"assert evaluate_expression('x / 0', {'x': 10}) == 'Error! Division by zero.'\", \"assert evaluate_expression('5 * (3 + 2)', {}) == 25.0\", \...
{ "split": "train", "index": 76884, "acecode_id": "evol_5732", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string that has been encoded using a cyclic shift method where every group of three characters is transformed by moving the first character to the end of the group, implement a function that decodes the string back to its original form. The function should be able to ha...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert decode_cyclic('abc') == 'cab'\", \"assert decode_cyclic('ab') == 'ab'\", \"assert decode_cyclic('') == ''\", \"assert decode_cyclic(' ') == ' '\", \"assert decode_cyclic('a') == 'a'\"]}" }
{ "split": "train", "index": 76885, "acecode_id": "evol_13816", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a list of control names representing different shapes. Your task is to implement a function that replaces every shape in the list with a new shape based on the specified control type. The function should take the following parameters: a list of strings `control_na...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert replace_shapes(['circle', 'square', 'triangle'], 'square', True) == ['square', 'square', 'square']\", \"assert replace_shapes(['circle', 'circle'], 'circle', False) == ['circle', 'circle']\", \"assert replace_shapes(['triangle'], 'triangle', True) == ['trian...
{ "split": "train", "index": 76886, "acecode_id": "bigcode_python_fns_8685", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `validate_email(email: str) -> bool` that validates an email address using a regular expression. The function should check for the correct sequence of characters, including an '@' symbol and a '.' character, as well as ensuring a sufficient length for the l...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_email('test@example.com') == True\", \"assert validate_email('user.name+tag+sorting@example.com') == True\", \"assert validate_email('user@domain.co.in') == True\", \"assert validate_email('user@sub.domain.com') == True\", \"assert validate_email('t...
{ "split": "train", "index": 76887, "acecode_id": "evol_10413", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a function that checks if an input argument is a non-empty list or tuple of strings. Your task is to implement a function `check_format(instruction: str, arg: Union[list, tuple], argname: str) -> None` that takes three parameters: `instruction` (a string describin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_format('TestInstruction', ['validString'], 'testArg') is None\", \"assert check_format('TestInstruction', ('validString',), 'testArg') is None\", \"assert check_format('TestInstruction', ['string1', 'string2'], 'testArg') is None\", \"assert check_form...
{ "split": "train", "index": 76888, "acecode_id": "bigcode_python_fns_41252", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a two-dimensional array representing an image, where each element is a tuple containing four integers (R, G, B, A) that represent the red, green, blue, and alpha channels of a pixel respectively. You also have a background color represented as a tuple of three int...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_background_color([[(0, 0, 0, 255), (0, 0, 0, 255)], [(0, 0, 0, 255), (0, 0, 0, 255)]], (255, 255, 255)) == [[(255, 255, 255, 255), (255, 255, 255, 255)], [(255, 255, 255, 255), (255, 255, 255, 255)]]\", \"assert add_background_color([[(128, 0, 0, 255), (...
{ "split": "train", "index": 76889, "acecode_id": "oss_1268", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to compare log data from two different version control systems. Your function should take in two tuples, `d1` and `d2`, where each tuple contains the parsed log data in the format `(head, branch, tags, revs)`. The function should comp...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compare_data(('a1', 'main', ['tag1'], ['rev1']), ('a1', 'main', ['tag1'], ['rev2']) ) == False\", \"assert compare_data(('a1', 'main', ['tag1'], ['rev1']), ('a2', 'main', ['tag1'], ['rev1']) ) == True\", \"assert compare_data(('a1', 'dev', ['tag2'], ['rev1']...
{ "split": "train", "index": 76890, "acecode_id": "oss_34902", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the sizes of files in a directory. Your task is to determine if there is any change in the sizes of files between two consecutive checks. Implement a function `check_file_sizes(sizes: List[int]) -> bool` that returns `True` if there...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_file_sizes([100, 200, 300]) == True\", \"assert check_file_sizes([100, 100, 100]) == False\", \"assert check_file_sizes([250, 250, 300]) == True\", \"assert check_file_sizes([50]) == False\", \"assert check_file_sizes([1, 2, 3, 4, 5]) == True\", \"asse...
{ "split": "train", "index": 76891, "acecode_id": "bigcode_python_fns_35494", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that converts a given string into a \"checklist\" format. The function should replace each occurrence of the word \"TODO\" in the input string with a checkbox symbol (✓) and return the modified string. Write a Python function calle...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_to_checklist('TODO: Complete task 1, TODO: Review task 2, TODO: Submit task 3') == '\\u2713: Complete task 1, \\u2713: Review task 2, \\u2713: Submit task 3'\", \"assert convert_to_checklist('No tasks to do') == 'No tasks to do'\", \"assert convert_t...
{ "split": "train", "index": 76892, "acecode_id": "oss_26548", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that processes a list of chat events and returns a new list containing only the unique events based on their event IDs. Given a list of dictionaries where each dictionary represents a chat event with an 'event_id' key, your function should...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_unique_events([]) == []\", \"assert filter_unique_events([{'event_id': '1'}, {'event_id': '1'}, {'event_id': '2'}]) == [{'event_id': '1'}, {'event_id': '2'}]\", \"assert filter_unique_events([{'event_id': '1'}, {'event_id': '2'}, {'event_id': '3'}, {'...
{ "split": "train", "index": 76893, "acecode_id": "bigcode_python_fns_2154", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with simulating a simple state machine for controlling a robotic system. This state machine will transition between different states based on the outcome of a simulated action. Your task is to implement a function named `robot_state_machine_action` that takes a s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert robot_state_machine_action('preempted') == 'preempted'\", \"assert robot_state_machine_action('success') == 'GATE'\", \"assert robot_state_machine_action('failure') == 'LOCATE'\", \"assert robot_state_machine_action('unknown') == 'Invalid Outcome'\", \"asser...
{ "split": "train", "index": 76894, "acecode_id": "oss_30708", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes book events for a financial trading system. The function should take two parameters: a string `symbol` representing the trading symbol and a dictionary `data` containing book event data. The `data` dictionary will have ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert deal_book_event('AAPL', {'bid': 150.0, 'ask': 155.0, 'timestamp': 1633072800}) == None\", \"assert deal_book_event('GOOGL', {'bid': 2800.0, 'ask': 2795.0, 'timestamp': 1633072801}) == None\", \"assert deal_book_event('TSLA', {'bid': 720.0, 'ask': 720.0, 'tim...
{ "split": "train", "index": 76895, "acecode_id": "oss_23012", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that summarizes the configuration of a scientific instrument based on various parameters. The parameters you need to consider are the 'unit' of measurement, 'abslimits' which define the absolute limits of the instrument's measurements, 'v...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert instrument_configuration('deg', (-720, 720), (), 2, 0.001, 'SetDetectors(adet)') == 'Instrument Configuration:\\\\nUnit: deg\\\\nAbsolute Limits: (-720, 720)\\\\nVisibility: ()\\\\nSpeed: 2\\\\nPrecision: 0.001\\\\nStartup Code: SetDetectors(adet)'\", \"asse...
{ "split": "train", "index": 76896, "acecode_id": "oss_8923", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `create_unique_id()` that generates a unique identifier using the UUID (Universally Unique Identifier) algorithm. The function should ensure that each generated ID is unique by keeping track of previously generated IDs in a set. If a generated ID already ex...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_unique_id() != create_unique_id()\", \"assert create_unique_id() != create_unique_id()\", \"assert create_unique_id() != create_unique_id()\", \"assert create_unique_id() != create_unique_id()\", \"assert create_unique_id() != create_unique_id()\", \"...
{ "split": "train", "index": 76897, "acecode_id": "evol_24993", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a training process for a machine learning model using given hyperparameters. Your function should accept parameters for model training including input dimensions, number of blocks, activation function, dropout rate, and...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simulate_training((6000, 3), 5, 32, 375, 'relu', 0.1, True, 'gaussian', 'max', True, [0.80, 0.20], 'generator', 200, 200) == {'input_dimension': (6000, 3), 'gmlp_blocks': 5, 'gmlp_dim': 32, 'seq_len': 375, 'activation': 'relu', 'drop_rate': 0.1, 'shuffle': T...
{ "split": "train", "index": 76898, "acecode_id": "bigcode_python_fns_31451", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Alice and Bob are playing a game with a pile of stones. Each stone has a value determined by two players, Alice and Bob, who may value the stones differently. Alice starts first. The players can only choose stones that are at prime indices or at index 1. You are given two integ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert stoneGameVI([1, 2, 3, 4, 5], [5, 4, 3, 2, 1]) == 1\", \"assert stoneGameVI([10, 20, 30], [30, 20, 10]) == 1\", \"assert stoneGameVI([7, 5, 9, 1, 2], [1, 2, 3, 4, 5]) == 1\", \"assert stoneGameVI([1, 3, 5, 7, 11], [2, 4, 6, 8, 10]) == 1\", \"assert stoneGameV...
{ "split": "train", "index": 76899, "acecode_id": "evol_7078", "num_tests": 8 }