data_source
large_stringclasses
1 value
prompt
listlengths
1
1
ability
large_stringclasses
1 value
reward_model
dict
extra_info
dict
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of integers and removes all duplicate values from the list, returning a new list with unique integers in the order they first appeared. Write a function `remove_duplicates` that accepts a list of integers as input and re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates([1, 2, 3, 2, 1]) == [1, 2, 3]\", \"assert remove_duplicates([4, 5, 6, 5, 4, 4]) == [4, 5, 6]\", \"assert remove_duplicates([10, 20, 10, 30, 40, 20]) == [10, 20, 30, 40]\", \"assert remove_duplicates([1, 1, 1, 1]) == [1]\", \"assert remove_d...
{ "split": "train", "index": 4400, "acecode_id": "oss_32681", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given an array of integers `nums`. Your task is to determine the sign of the cumulative product of all elements in the array. Implement a function `arraySign(nums)` that returns: `1` if the product is positive, `-1` if the product is negative, and `0` if the product is ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert arraySign([-1,-2,-3,-4,3,2,1]) == 1\", \"assert arraySign([1,5,0,2,-3]) == 0\", \"assert arraySign([-1,1,-1,1,-1]) == -1\", \"assert arraySign([2,3,5]) == 1\", \"assert arraySign([-1,0,1]) == 0\", \"assert arraySign([0,0,0]) == 0\", \"assert arraySign([-1,-1...
{ "split": "train", "index": 4401, "acecode_id": "evol_32749", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the weights of items. Your task is to implement a function that calculates the total weight of the items. The function should take a list of integers as input and return a single integer representing the sum of those weights. Write ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_total_weight([1, 2, 3, 4]) == 10\", \"assert calculate_total_weight([0, 0, 0, 0]) == 0\", \"assert calculate_total_weight([10, 20, 30]) == 60\", \"assert calculate_total_weight([100, 200, 300, 400, 500]) == 1500\", \"assert calculate_total_weight([...
{ "split": "train", "index": 4402, "acecode_id": "bigcode_python_fns_22778", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `evaluate_stack_operations(operations: List[str]) -> List[int]` that simulates a series of stack operations. The operations will be represented as a list of strings, where each string can be one of the following: 'push x' (where x is an integer), 'pop', 'pe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_stack_operations(['push 1', 'push 2', 'push 3', 'peek', 'pop', 'size']) == [3, 3, 2]\", \"assert evaluate_stack_operations(['pop', 'peek']) == [-1, -1]\", \"assert evaluate_stack_operations(['push 7', 'push 8', 'size', 'pop', 'size']) == [2, 8, 1]\"...
{ "split": "train", "index": 4403, "acecode_id": "evol_1353", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that determines the appropriate file reader for a given file extension. The function should take a string parameter representing the file extension (e.g., 'png', 'jpg', 'tiff', 'pnm') and return the name of the appropriate file reader or ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_reader_for_file('png') == 'PNGReader'\", \"assert get_reader_for_file('jpg') == 'JPEGReader'\", \"assert get_reader_for_file('tiff') == 'TIFFReader'\", \"assert get_reader_for_file('pnm') == 'PNMReader'\", \"assert get_reader_for_file('gif') == 'None'\",...
{ "split": "train", "index": 4404, "acecode_id": "bigcode_python_fns_14872", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `sum_of_squares_up_to(n: int) -> int` that calculates the sum of squares of all integers from 1 to n. The function should return the result efficiently without using a loop. You may assume that n is a non-negative integer.\nPlease reason step by step, then ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_of_squares_up_to(0) == 0\", \"assert sum_of_squares_up_to(1) == 1\", \"assert sum_of_squares_up_to(2) == 5\", \"assert sum_of_squares_up_to(3) == 14\", \"assert sum_of_squares_up_to(4) == 30\", \"assert sum_of_squares_up_to(5) == 55\", \"assert sum_of_sq...
{ "split": "train", "index": 4405, "acecode_id": "evol_27815", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that retrieves and sorts data from a simulated DynamoDB-like database. Given a list of data entries, each containing a timestamp and a value, your function should filter the entries based on a specified time range and return them sort...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_sorted_data([{'timestamp': '2023-01-01T00:00:00Z', 'value': 1}, {'timestamp': '2023-01-02T00:00:00Z', 'value': 2}], '2023-01-01T00:00:00Z', '2023-01-02T00:00:00Z') == [{'timestamp': '2023-01-01T00:00:00Z', 'value': 1}, {'timestamp': '2023-01-02T00:00:00Z...
{ "split": "train", "index": 4406, "acecode_id": "evol_20664", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with calculating the total size of a font file based on specific font metrics. The size of the font file is determined using the following formula: `file_size = (descent + upos + em) * weight`, where `descent` is the descent metric of the font, `upos` is the upos...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_font_file_size(0, 0, 1000, 1) == 1000\", \"assert calculate_font_file_size(500, -300, 2000, 2) == 4400\", \"assert calculate_font_file_size(400, 0, 1200, 3) == 4800\", \"assert calculate_font_file_size(1000, -500, 1000, 1) == 1500\", \"assert calcu...
{ "split": "train", "index": 4407, "acecode_id": "oss_14649", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Write a Python function that takes in two distinct sorted arrays and returns a list containing the identical elements present in both arrays. You must implement this function without using any built-in Python methods. For example, given the arrays list1 = [2, 4, 6, 12, 14] and ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert common_elements([1, 2, 3], [2, 3, 4]) == [2, 3]\", \"assert common_elements([5, 7, 9], [1, 5, 6]) == [5]\", \"assert common_elements([0, 2, 4, 6], [1, 2, 3, 5]) == [2]\", \"assert common_elements([10, 20, 30], [15, 25, 30]) == [30]\", \"assert common_element...
{ "split": "train", "index": 4408, "acecode_id": "evol_30611", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `find_primes_in_range(start: int, end: int) -> Tuple[List[int], int]` that takes two integers, `start` and `end`, as input and returns a list of all prime numbers within the inclusive range from `start` to `end`. Additionally, the function should return the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_primes_in_range(9, 25) == ([11, 13, 17, 19, 23], 5)\", \"assert find_primes_in_range(10, 20) == ([11, 13, 17, 19], 4)\", \"assert find_primes_in_range(1, 10) == ([2, 3, 5, 7], 4)\", \"assert find_primes_in_range(15, 30) == ([17, 19, 23, 29], 4)\", \"ass...
{ "split": "train", "index": 4409, "acecode_id": "evol_28444", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that initializes a user profile represented by a dictionary. The profile should include fields for the user's name, email, date of birth, and bio. If the bio is not provided, it should default to 'This user has not provided a bio yet'. Yo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_profile('Alice Smith', 'alice@example.com', '1990-05-10') == {'name': 'Alice Smith', 'email': 'alice@example.com', 'date_of_birth': '1990-05-10', 'bio': 'This user has not provided a bio yet'}\", \"assert create_profile('Bob Johnson', 'bob@example.com...
{ "split": "train", "index": 4410, "acecode_id": "oss_9607", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a non-empty string `s` and a subsequence `sub`, implement a function that returns whether the string `s` contains the given subsequence `sub`. A subsequence is derived from another string by deleting some characters without changing the order of the remaining characters. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert isValidSubsequence('hello', 'h') == True\", \"assert isValidSubsequence('hello', 'e') == True\", \"assert isValidSubsequence('hello', 'l') == True\", \"assert isValidSubsequence('hello', 'lo') == True\", \"assert isValidSubsequence('hello', 'he') == True\", ...
{ "split": "train", "index": 4411, "acecode_id": "evol_2426", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string representing a URL. Write a function `launch_url(url: str) -> str` that simulates launching the URL in a web browser by returning a string in the format 'Opening {url} in a browser...'. You do not need to actually open the URL; just return the formatted s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert launch_url('http://github.com/swharden/pyABF') == 'Opening http://github.com/swharden/pyABF in a browser...'\", \"assert launch_url('https://www.leetcode.com') == 'Opening https://www.leetcode.com in a browser...'\", \"assert launch_url('http://example.com')...
{ "split": "train", "index": 4412, "acecode_id": "bigcode_python_fns_39384", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `peculiar_ordering(lst)` that takes a list of numeric inputs, which may include integers, negative numbers, and decimal numbers. The function should sort the list in a unique way following these rules: Start with the lowest numeric value, then find the high...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert peculiar_ordering([1, 2, 3, 4]) == [1, 4, 2, 3]\", \"assert peculiar_ordering([5, 5, 5, 5]) == [5, 5, 5, 5]\", \"assert peculiar_ordering([]) == []\", \"assert peculiar_ordering([-2, 1.5, 3.5, -1]) == [-2, 3.5, -1, 1.5]\", \"assert peculiar_ordering([10, -10...
{ "split": "train", "index": 4413, "acecode_id": "evol_9266", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You need to implement a function that simulates a simplified banking account transaction system. The system should allow for depositing and withdrawing money from an account. Implement a function `process_transaction(account: List[int], transaction: Tuple[str, int]) -> List[int...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_transaction([100], ('deposit', 50)) == [150]\", \"assert process_transaction([200], ('withdraw', 75)) == [125]\", \"assert process_transaction([50], ('withdraw', 100)) == [50]\", \"assert process_transaction([0], ('deposit', 100)) == [100]\", \"asser...
{ "split": "train", "index": 4414, "acecode_id": "evol_13728", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that generates a network request payload. The function should set a timestamp in milliseconds and create a dictionary containing this timestamp. Your function should take no parameters and return a dictionary with a single key 'timest...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_network_request_payload() == {'timestamp': int(time.time() * 1000)}\", \"assert generate_network_request_payload() == {'timestamp': int(time.time() * 1000)}\", \"assert generate_network_request_payload() == {'timestamp': int(time.time() * 1000)}\", ...
{ "split": "train", "index": 4415, "acecode_id": "oss_4973", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `sum_unique_numbers(nums)` that returns the sum of all unique numbers in the list. A number is considered unique if it appears exactly once in the list. If there are no unique numbers, return 0. The input list can contain both positive...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_unique_numbers([1, 2, 3, 2, 1]) == 3\", \"assert sum_unique_numbers([4, 5, 6, 6, 5, 4]) == 0\", \"assert sum_unique_numbers([10, 20, 30, 10, 20]) == 30\", \"assert sum_unique_numbers([0, 0, 0, 0]) == 0\", \"assert sum_unique_numbers([7, 8, 9, 10, 7, 8]) ...
{ "split": "train", "index": 4416, "acecode_id": "bigcode_python_fns_9941", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a list of callbacks based on specific Boolean flags and an optional list of additional callbacks. The function will take the following parameters: `with_lr_finder` (bool), `with_export_augmentations` (bool), `with_reporting...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_callbacks(True, True, True, True, ['AdditionalCallback1']) == ['CallbackReportingStartServer', 'CallbackZipSources', 'CallbackReportingModelSummary', 'CallbackReportingDatasetSummary', 'CallbackReportingExportSamples', 'CallbackProfiler', 'CallbackR...
{ "split": "train", "index": 4417, "acecode_id": "bigcode_python_fns_45656", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Implement a function `decode_cyclic(s: str) -> str` that decodes an encoded input string derived from the provided `encode_cyclic` function. The `encode_cyclic` function reverses groups of three characters, including alphabets, numerics, punctuation, and whitespace. The `decode...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert decode_cyclic('123456') == '321654'\", \"assert decode_cyclic('xyz!@#') == 'zyx#@!'\", \"assert decode_cyclic(' ') == ' '\", \"assert decode_cyclic('!@#') == '#@!'\", \"assert decode_cyclic('') == ''\"]}" }
{ "split": "train", "index": 4418, "acecode_id": "evol_32645", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that returns a list of endorsement services for a given set of service modules. Each service module is represented by a string, and the function should return the list of services in alphabetical order. If no service modules are provided,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_endorsement_services(['serviceA', 'serviceC', 'serviceB']) == ['serviceA', 'serviceB', 'serviceC']\", \"assert get_endorsement_services(['ModuleX', 'ModuleY', 'ModuleZ']) == ['ModuleX', 'ModuleY', 'ModuleZ']\", \"assert get_endorsement_services(['apple',...
{ "split": "train", "index": 4419, "acecode_id": "bigcode_python_fns_1731", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that summarizes a run based on a unique identifier (UID) and a catalog name. The function will take in two parameters: 'catalog_name' (a string representing the name of the catalog) and 'run_uid' (a string representing the unique identifi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert summarize_run('catalog1', 'run1') == 'Summary of run1 from catalog1'\", \"assert summarize_run('catalog1', 'run2') == 'Summary of run2 from catalog1'\", \"assert summarize_run('catalog2', 'run3') == 'Summary of run3 from catalog2'\", \"assert summarize_run('...
{ "split": "train", "index": 4420, "acecode_id": "bigcode_python_fns_47268", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with designing a function that takes in a list of image names and a list of snapshot names, and returns a list of all the valid options available for creating a disk. Each option must be unique, and if an image name and a snapshot name are both provided, the func...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_valid_disk_sources(['image1'], ['snapshot1', 'snapshot2']) == ['image1', 'snapshot1', 'snapshot2']\", \"assert get_valid_disk_sources(['image1', 'image2'], []) == ['image1', 'image2']\", \"assert get_valid_disk_sources([], ['snapshot1']) == ['snapshot1']...
{ "split": "train", "index": 4421, "acecode_id": "bigcode_python_fns_13571", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are given a 2D list representing a grid of cells, where each cell contains an integer value. Your task is to implement a function that rotates the grid by 90 degrees clockwise. This means that each element in the grid should be moved to a new position based on the clockwise...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert rotate_grid([[1]]) == [[1]]\", \"assert rotate_grid([[1, 2], [3, 4]]) == [[3, 1], [4, 2]]\", \"assert rotate_grid([[1, 2, 3]]) == [[1], [2], [3]]\", \"assert rotate_grid([[1], [2], [3]]) == [[3, 2, 1]]\", \"assert rotate_grid([[1, 2], [3, 4], [5, 6]]) == [[5...
{ "split": "train", "index": 4422, "acecode_id": "oss_26390", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates basic stack operations. Write a function `manage_stack(operations: List[Tuple[str, Optional[Union[int, str, bool]]]]) -> List[Optional[Union[int, str, bool]]]` that takes a list of operations and returns the results of ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_stack([('push', 5), ('push', 'hello'), ('push', True), ('pop',)]) == [True]\", \"assert manage_stack([('push', 1), ('push', 2), ('pop',), ('pop',), ('pop',)]) == [2, 1, None]\", \"assert manage_stack([('push', 'a'), ('push', 'b'), ('pop',), ('pop',), ...
{ "split": "train", "index": 4423, "acecode_id": "oss_27910", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `divider(x: int, y: int) -> Union[int, None]` that takes two integers `x` and `y` and returns the result of the division `x / y`. If `y` is zero, the function should return 0. If either `x` or `y` is not an integer, the function should return None. Use nest...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert divider(10, 2) == 5\", \"assert divider(10, 0) == 0\", \"assert divider(10, 'a') == None\", \"assert divider('10', 2) == None\", \"assert divider(10, 5) == 2\", \"assert divider(0, 1) == 0\", \"assert divider(10, -2) == -5\", \"assert divider(-10, 2) == -5\"...
{ "split": "train", "index": 4424, "acecode_id": "evol_19999", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary of books, where each book is represented by a title and a tuple of eight values: (book_price, book_rating, book_pages, book_publication_year, book_sold_copies, book_reviews, book_author, book_genre). You are also given a list of baseline values that e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_books({'Book A': (5.0, 4.0, 150, 2018, 1000, 70, 'Author A', 'Fiction')}, (10.0, 4.5, 300, 2000, 1000, 100, 'Author A', 'Fiction')) == []\", \"assert filter_books({'Book A': (20.0, 4.9, 200, 2021, 500, 90, 'Author A', 'Fiction')}, (15.0, 4.5, 300, 202...
{ "split": "train", "index": 4425, "acecode_id": "evol_20788", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function that converts a list of 7-segment display codes into their corresponding binary and hexadecimal representations. The function should accept a list of strings, each representing a 7-segment code, and return a list of tuples where each tuple contains the char...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_seven_segment(['0110000']) == [('0', '0x30')]\", \"assert convert_seven_segment(['0000110']) == [('1', '0x31')]\", \"assert convert_seven_segment(['1011011']) == [('2', '0x32')]\", \"assert convert_seven_segment(['1001111']) == [('3', '0x33')]\", \"a...
{ "split": "train", "index": 4426, "acecode_id": "evol_36221", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python decorator that measures the execution time of a function and returns the elapsed time in milliseconds as an integer. The decorator should handle functions with any number of positional and keyword arguments. Additionally, the original f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert measure_time(lambda: 1)() == 1\", \"assert measure_time(lambda x: x + 1)(1) == 2\", \"assert measure_time(lambda x, y: x * y)(3, 4) == 12\", \"assert measure_time(lambda: sum(range(1000)))() == 499500\", \"assert measure_time(lambda x=5: x * 2)() == 10\", \"...
{ "split": "train", "index": 4427, "acecode_id": "oss_26340", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes a given JSON-like dictionary and replaces placeholder references within the dictionary with specific values. The function should take in a dictionary `doc`, a base URL string `doc_url`, and an optional dictionary `param...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert expand({'name': '${username}', 'age': 30}, 'http://example.com', {'username': 'Alice'}) == {'name': 'Alice', 'age': 30}\", \"assert expand({'greeting': 'Hello, ${name}!', 'location': '${city}'}, 'http://example.com', {'name': 'Bob', 'city': 'New York'}) == {...
{ "split": "train", "index": 4428, "acecode_id": "bigcode_python_fns_3941", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with processing a list of integers to find the maximum product of any two distinct integers in the list. Implement a function that takes a list of integers and returns the maximum product of any two distinct integers from that list. If the list contains fewer tha...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_product([1, 2, 3, 4]) == 12\", \"assert max_product([0, 0, 0]) == 0\", \"assert max_product([1, -1, 2, -2]) == 2\", \"assert max_product([2]) == 0\", \"assert max_product([]) == 0\", \"assert max_product([3, 5, 1, 8]) == 40\", \"assert max_product([7, 9,...
{ "split": "train", "index": 4429, "acecode_id": "oss_21495", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that computes the sine of a given value. The function should take a single input, which can be an integer, a float, or a string representing a number. If the input can be successfully converted to a float, return the sine of that numb...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sine(0) == 0.0\", \"assert sine(1) == 0.8414709848078965\", \"assert sine(3.14) == 0.0015926529164868282\", \"assert sine('0') == 0.0\", \"assert sine('3.14') == 0.0015926529164868282\", \"assert sine('invalid') == 'invalid'\", \"assert sine('not a number', ...
{ "split": "train", "index": 4430, "acecode_id": "bigcode_python_fns_32371", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with developing a function to generate a simulation filename based on the given parameters. The function should take the following inputs: a strategy name (string), an instrument name (string), a number of simulation days (integer), a start date (string in 'YYYY-...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_simulation_filename('TradingStrategy', 'StockA', 30, '', '') == 'TradingStrategy_StockA_30.txt'\", \"assert generate_simulation_filename('TradingStrategy', 'StockB', 0, '2023-01-01', '2023-01-31') == 'TradingStrategy_StockB_2023-01-01_2023-01-31.txt...
{ "split": "train", "index": 4431, "acecode_id": "bigcode_python_fns_45770", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `is_isomorphic(str1: str, str2: str) -> bool` that checks whether two input strings are isomorphic. Two strings are considered isomorphic if the characters in the first string can be replaced to get the second string. Both strings should maintain the same chara...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_isomorphic('pap%%*4%er', 'tit%%*4%le') == True\", \"assert is_isomorphic('foo', 'add') == True\", \"assert is_isomorphic('bar', 'foo') == False\", \"assert is_isomorphic('paper', 'title') == True\", \"assert is_isomorphic('egg', 'add') == True\", \"assert...
{ "split": "train", "index": 4432, "acecode_id": "evol_23761", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string representing a filename, write a function `verify_image(filename: str) -> bool` that checks whether the filename has a valid image file extension. The valid image file extensions are 'tif', 'jpg', 'gif', 'png', and 'jpeg'. The function should return True if the f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert verify_image('picture.jpg') == True\", \"assert verify_image('photo.PNG') == True\", \"assert verify_image('image.jpeg') == True\", \"assert verify_image('document.tif') == True\", \"assert verify_image('animation.gif') == True\", \"assert verify_image('file...
{ "split": "train", "index": 4433, "acecode_id": "bigcode_python_fns_2470", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lanes of automobiles represented by their start and end positions, write a function that detects concurrent collisions between cars in both lanes. Each car is represented as a tuple of two floats indicating its start and end position. The function should return a list...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert advanced_concurrent_collision_detection(1, [(0.0, 1.0)], [(1.0, 2.0)]) == []\", \"assert advanced_concurrent_collision_detection(2, [(1.0, 2.0), (3.0, 4.0)], [(0.0, 1.0), (2.0, 3.0)]) == []\", \"assert advanced_concurrent_collision_detection(1, [(0.0, 2.0)],...
{ "split": "train", "index": 4434, "acecode_id": "evol_21984", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that represents a service task in a BPMN (Business Process Model and Notation) workflow. The function should return a dictionary that mimics the structure of a service task object, where the dictionary contains two keys: 'name' and...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_service_task() == {'name': 'serviceTask', 'namespace': 'http://www.omg.org/spec/BPMN/20100524/MODEL'}\", \"assert create_service_task()['name'] == 'serviceTask'\", \"assert create_service_task()['namespace'] == 'http://www.omg.org/spec/BPMN/20100524/M...
{ "split": "train", "index": 4435, "acecode_id": "oss_23663", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `insert_and_search` that takes a list of strings and a search string as input. The function should build a Trie data structure with the given list of strings and then return whether the search string exists in the Trie. The Trie should efficiently handle th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert insert_and_search(['apple', 'banana', 'grape'], 'banana') == True\", \"assert insert_and_search(['apple', 'banana', 'grape'], 'cherry') == False\", \"assert insert_and_search(['hello', 'world'], 'hello') == True\", \"assert insert_and_search(['hello', 'world...
{ "split": "train", "index": 4436, "acecode_id": "evol_16652", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a lyrical composition based on a specified theme and a rhyme pattern. The function should accept two parameters: a string `theme` that represents the theme of the composition (either 'love' or 'nature'), and a string `rhyme...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_composition('love', 'XYZ') == []\", \"assert generate_composition('xyz', 'AABB') == []\", \"assert generate_composition('love', 'AAB') == []\", \"assert generate_composition('xyz', 'XYZ') == []\", \"assert generate_composition('nature', 'XYZ') == []...
{ "split": "train", "index": 4437, "acecode_id": "evol_24824", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You have been given a list of lists called `window`, where each inner list contains power readings in watts. Your task is to determine if the most recent power reading (the last element of the outer list) has changed significantly compared to the average of the three previous r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert detect_on([[0, 0, 0, 1], [0, 0, 0, 2], [0, 0, 0, 3], [0, 0, 0, 10]]) == True\", \"assert detect_on([[0, 0, 0, 1], [0, 0, 0, 2], [0, 0, 0, 3], [0, 0, 0, 6]], index=3, threshold=5) == False\", \"assert detect_on([[10, 0, 0, 2], [10, 0, 0, 3], [10, 0, 0, 3], [1...
{ "split": "train", "index": 4438, "acecode_id": "bigcode_python_fns_41211", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Develop a function to determine if a specified integer exists within a multi-dimensional numerical array that can be nested up to 3 levels deep. If the integer is found, return the path to that integer as an array of indices representing the indices at each level of nesting. If...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_path([[1, 2, 3], [4, 5, [6,7,8]], [9, 10]], 7) == [1, 2, 1]\", \"assert find_path([[1, 2, 3], [4, [5, 6], 7], [8, 9]], 5) == [1, 1, 0]\", \"assert find_path([[1, 2, 3], [4, 5, [6,7,8]], [9, 10]], 10) == [2, 1]\", \"assert find_path([[1, 2], [3, [4, 5]],...
{ "split": "train", "index": 4439, "acecode_id": "evol_15166", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the data scraping process for a hypothetical website. The function should be named `scrape_data` and will return a string containing the raw data obtained from the scraping process. The raw data should always be 'Sample raw...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert scrape_data() == 'Sample raw data from scraping'\", \"assert scrape_data() == 'Sample raw data from scraping'\", \"assert scrape_data() == 'Sample raw data from scraping'\", \"assert scrape_data() == 'Sample raw data from scraping'\", \"assert scrape_data() ...
{ "split": "train", "index": 4440, "acecode_id": "oss_9610", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to generate unique names for virtual directories based on a list of metadata directory paths. Each path may contain multiple virtual directories. Your function should take a list of strings, where each string represents a path, and re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_unique_directory_names(['path/to/dir', 'path/to/dir']) == ['dir', 'dir_1']\", \"assert generate_unique_directory_names(['path/to/dir', 'path/to/another_dir']) == ['dir', 'another_dir']\", \"assert generate_unique_directory_names(['dir', 'dir']) == [...
{ "split": "train", "index": 4441, "acecode_id": "oss_2423", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `drop_cap` that takes a string as input and returns a modified version of the string with the following rules: The first letter of the string should be capitalized. Any word in the string that is longer than two characters should have...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert drop_cap('hello world, how are you today?') == 'Hello World, How Are You Today?'\", \"assert drop_cap('a quick brown fox') == 'A Quick Brown Fox'\", \"assert drop_cap('hi') == 'Hi'\", \"assert drop_cap('a') == 'A'\", \"assert drop_cap('') == ''\", \"assert d...
{ "split": "train", "index": 4442, "acecode_id": "oss_16718", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given two lists of logits, `p_logits` and `q_logits`, representing the logits of two softmax categorical distributions, compute the Kullback-Leibler (KL) divergence between the two distributions. The KL divergence is calculated using the formula: D_{KL}(p || q) = ∑_y p(y) * (lo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert kl_divergence([1.0, 2.0], [1.0, 2.0]) == 0.0\", \"assert kl_divergence([0.0, 1.0], [1.0, 0.0]) > 0.0\", \"assert kl_divergence([1.0, 2.0, 3.0], [1.0, 2.0, 3.0]) == 0.0\", \"assert kl_divergence([1.0, 2.0], [1.0, 1.0]) > 0.0\", \"assert kl_divergence([1.0, 3....
{ "split": "train", "index": 4443, "acecode_id": "bigcode_python_fns_20967", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates the square and cube of numbers from 1 to a given integer n, as well as their next consecutive values. Write a function named `generate_square_cube` that takes a single integer `n` as input and returns a list of strings. Eac...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_square_cube(1) == ['1 1 1', '1 2 2']\", \"assert generate_square_cube(2) == ['1 1 1', '1 2 2', '2 4 8', '2 5 9']\", \"assert generate_square_cube(3) == ['1 1 1', '1 2 2', '2 4 8', '2 5 9', '3 9 27', '3 10 28']\", \"assert generate_square_cube(4) == ...
{ "split": "train", "index": 4444, "acecode_id": "oss_18097", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that retrieves user information based on a user ID from a predefined list of users. Each user is represented as a dictionary with 'id', 'name', and 'email' fields. The function should take a user ID as input and return the user dictio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_user_info(1) == {'id': 1, 'name': 'Alice', 'email': 'alice@example.com'}\", \"assert get_user_info(2) == {'id': 2, 'name': 'Bob', 'email': 'bob@example.com'}\", \"assert get_user_info(3) == {'id': 3, 'name': 'Charlie', 'email': 'charlie@example.com'}\", ...
{ "split": "train", "index": 4445, "acecode_id": "bigcode_python_fns_11199", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `recur_luc(n)` that calculates the nth term of the Lucas series using recursion. The Lucas series is defined as follows: L(0) = 2, L(1) = 1, and L(n) = L(n-1) + L(n-2) for n >= 2. Your function should take a single integer input `n` (0 <= n <= 30) and retur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert recur_luc(0) == 2\", \"assert recur_luc(1) == 1\", \"assert recur_luc(2) == 3\", \"assert recur_luc(3) == 4\", \"assert recur_luc(4) == 7\", \"assert recur_luc(5) == 11\", \"assert recur_luc(6) == 18\", \"assert recur_luc(7) == 29\", \"assert recur_luc(8) ==...
{ "split": "train", "index": 4446, "acecode_id": "oss_25399", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers 'target' and a list of lists 'data', write a function that finds the index of the first list in 'data' that is identical to 'target'. If 'target' is not found in 'data', return -1. The function should return the index of the matching list if found, othe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_list_index([1, 2, 3], [[4, 5], [1, 2, 3], [6, 7]]) == 1\", \"assert find_list_index([1, 2], [[1, 2], [1, 2, 3], [4, 5]]) == 0\", \"assert find_list_index([4, 5], [[1, 2, 3], [4, 5], [6]]) == 1\", \"assert find_list_index([7, 8], [[1, 2], [3, 4], [5, 6]]...
{ "split": "train", "index": 4447, "acecode_id": "bigcode_python_fns_31528", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that converts a given distance in meters to kilometers. The function should take a single argument, 'meters', which is a non-negative float or integer representing the distance in meters. If the input is negative, the function should raise a ValueError with the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_meters_to_kilometers(0) == 0.0\", \"assert convert_meters_to_kilometers(1000) == 1.0\", \"assert convert_meters_to_kilometers(2000) == 2.0\", \"assert convert_meters_to_kilometers(5000) == 5.0\", \"assert convert_meters_to_kilometers(10000) == 10.0\"...
{ "split": "train", "index": 4448, "acecode_id": "evol_26595", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a positive integer n, write a function that returns the greatest prime divisor of n. A prime divisor is a prime number that divides n without leaving a remainder.\nPlease reason step by step, then write a self-contained Python solution. Give your final program in a single...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert greatest_prime(13195) == 29\", \"assert greatest_prime(600851475143) == 6857\", \"assert greatest_prime(28) == 7\", \"assert greatest_prime(97) == 97\", \"assert greatest_prime(100) == 5\", \"assert greatest_prime(50) == 5\", \"assert greatest_prime(15) == 5...
{ "split": "train", "index": 4449, "acecode_id": "evol_24002", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that parses a string representing the contents of a configuration file in the INI format and extracts the names of console scripts along with their corresponding entry points. The input string contains sections for console scripts. Each c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_console_scripts('[console_scripts]\\\\nlettuce_webdriver=lettuce_webdriver.parallel_bin:main\\\\n') == {'lettuce_webdriver': 'lettuce_webdriver.parallel_bin:main'}\", \"assert parse_console_scripts('[console_scripts]\\\\nscript_one=module_one:main_func...
{ "split": "train", "index": 4450, "acecode_id": "oss_20586", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers that may contain repeated elements, implement a function to determine the highest product that can be obtained from multiplying any combination of four distinct elements together. If there are less than four unique elements in the list, the function sho...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_product([0, 0, 0, 0]) == 'Less than four distinct elements present in the list'\", \"assert max_product([-1, -2, -3, -4]) == 24\", \"assert max_product([1, 2, 3, 4, 5]) == 120\", \"assert max_product([1, 1, 1, 1, 1, 1]) == 'Less than four distinct elemen...
{ "split": "train", "index": 4451, "acecode_id": "evol_25520", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Implement a function `detect_sequence(input_string: str) -> bool` that checks whether the given input string contains only uppercase letters (A-Z) and digits (0-9). The function should return True if the string matches this criterion and False otherwise. Ensure that the functio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert detect_sequence('AB12') == True\", \"assert detect_sequence('45XY') == True\", \"assert detect_sequence('X4Y2') == True\", \"assert detect_sequence('') == False\", \"assert detect_sequence('ab12') == False\", \"assert detect_sequence('45xy') == False\", \"as...
{ "split": "train", "index": 4452, "acecode_id": "evol_32027", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes an application version string as input and returns a formatted message indicating the start of the application and the version. The function should perform the following actions: 1. Log an informational message 'Starting ap...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert start_application('1.0.0') == {'log': 'Starting application... { Version = 1.0.0 }', 'version': '1.0.0'}\", \"assert start_application('2.1.3') == {'log': 'Starting application... { Version = 2.1.3 }', 'version': '2.1.3'}\", \"assert start_application('3.0.1...
{ "split": "train", "index": 4453, "acecode_id": "oss_1863", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of DNA sequences in FASTA format and combines them into a single string that represents a single FASTA file. A FASTA file typically consists of a header line that starts with '>' followed by the sequence on the next line...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert combine_fasta_sequences(['>seq1', 'ATCG', '>seq2', 'GCTA']) == '>seq1\\\\nATCG\\\\n>seq2\\\\nGCTA\\\\n'\", \"assert combine_fasta_sequences(['>seqA', 'AAAA', '>seqB', 'GGGG', '>seqC', 'CCCC']) == '>seqA\\\\nAAAA\\\\n>seqB\\\\nGGGG\\\\n>seqC\\\\nCCCC\\\\n'\",...
{ "split": "train", "index": 4454, "acecode_id": "bigcode_python_fns_46658", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a 2D list of numbers, your task is to implement a function that adds a constant value of 1 to each row of the list and returns the modified list. The function should take in a list of lists (matrix) and output a new list of lists where each inner list contains the origina...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_constant([[1, 2], [3, 4]]) == [[1, 2, 1], [3, 4, 1]]\", \"assert add_constant([[5, 6], [7, 8], [9, 10]]) == [[5, 6, 1], [7, 8, 1], [9, 10, 1]]\", \"assert add_constant([[0]]) == [[0, 1]]\", \"assert add_constant([[1], [2], [3]]) == [[1, 1], [2, 1], [3, 1...
{ "split": "train", "index": 4455, "acecode_id": "bigcode_python_fns_14130", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that initializes a database handler with specific configurations. The function should take in keyword arguments to specify the database name, collection name, and user information. If no values are provided, the default database name shou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert initialize_db_handler() == {'db': 'nemeadb', 'collection': 'alerts_new', 'user': None}\", \"assert initialize_db_handler(db='mydb') == {'db': 'mydb', 'collection': 'alerts_new', 'user': None}\", \"assert initialize_db_handler(collection='mycollection') == {'...
{ "split": "train", "index": 4456, "acecode_id": "oss_19792", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two strings s1 and s2, implement a function `longest_common_substring(s1: str, s2: str) -> str` that returns the longest common substring between the two strings. If there are multiple substrings of the same maximum length, return any one of them. If there is no common su...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longest_common_substring('Tangible', 'Non-Tangible') == 'Tangible'\", \"assert longest_common_substring('abcde', 'abcxyz') == 'abc'\", \"assert longest_common_substring('abcdef', 'ghijk') == ''\", \"assert longest_common_substring('a', 'a') == 'a'\", \"asser...
{ "split": "train", "index": 4457, "acecode_id": "evol_13106", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to convert a given string into a human-readable name format. The function should take a string as input and return a modified version of the string following specific rules. The function should be named `convert_to_human_name` and sho...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_to_human_name('johnDoe') == 'John doe'\", \"assert convert_to_human_name('MaryAnneSmith') == 'Mary anne smith'\", \"assert convert_to_human_name('janeDoeSmith') == 'Jane doe smith'\", \"assert convert_to_human_name('simple') == 'Simple'\", \"assert c...
{ "split": "train", "index": 4458, "acecode_id": "oss_36224", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Design a Python function that takes a list of CPU usage percentages and a list of temperature readings (in Celsius) as inputs, and returns a list of tuples where each tuple contains the CPU usage and temperature at each index. If the lengths of the two input lists do not match,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cpu_monitor([10, 20, 30], [50, 60, 70]) == [(10, 50), (20, 60), (30, 70)]\", \"assert cpu_monitor([0], [0]) == [(0, 0)]\", \"assert cpu_monitor([], []) == []\", \"assert cpu_monitor([100], [25]) == [(100, 25)]\", \"assert cpu_monitor([10, 20], [30]) == []\",...
{ "split": "train", "index": 4459, "acecode_id": "evol_7249", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a request distribution function for a load balancer. The function should take in two parameters: 'action_type' (a string) and 'target_group_arn' (also a string). If the action_type is 'forward', the function should return a message indicating wh...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert distribute_requests('forward', 'arn:aws:elasticloadbalancing:region:account-id:targetgroup/my-target-group/12345') == 'Forward requests to target group: arn:aws:elasticloadbalancing:region:account-id:targetgroup/my-target-group/12345'\", \"assert distribute_...
{ "split": "train", "index": 4460, "acecode_id": "oss_22809", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that checks whether a given string 's1' is a subsequence of another string 's2'. A string 's1' is considered a subsequence of 's2' if all the characters of 's1' appear in 's2' in the same order, but not necessarily consecutively. The function should take tw...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_subsequence('abc', 'ahbgdc') == True\", \"assert is_subsequence('axc', 'ahbgdc') == False\", \"assert is_subsequence('', 'anystring') == True\", \"assert is_subsequence('abc', '') == False\", \"assert is_subsequence('abc', 'abc') == True\", \"assert is_su...
{ "split": "train", "index": 4461, "acecode_id": "evol_11933", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a file validation system for a version control system. The system should determine whether a file should be skipped during the validation process based on its file extension and name pattern. You are provided with a list of valid file extensions...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert IsFileSkipped('test_script.py') == False\", \"assert IsFileSkipped('test_file.py') == False\", \"assert IsFileSkipped('config_file.sh') == False\", \"assert IsFileSkipped('random_file.txt') == False\", \"assert IsFileSkipped('test_123.py') == False\", \"asse...
{ "split": "train", "index": 4462, "acecode_id": "oss_7585", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Implement a function `generate_password(length: int) -> str` that generates a random password of a specified length. The password should consist of uppercase and lowercase letters, digits, and punctuation characters. The length of the password must be at least 1. If the provide...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_password(1) != ''\", \"assert len(generate_password(8)) == 8\", \"assert len(generate_password(12)) == 12\", \"assert len(generate_password(15)) == 15\", \"assert generate_password(5).isalpha() == False\", \"assert generate_password(10).isdigit() ==...
{ "split": "train", "index": 4463, "acecode_id": "evol_24704", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers representing window attributes, create a function that returns a tuple containing the position (x, y) and size (width, height) of the window. The input list will contain either 4 integers in the format [x, y, width, height] or 1 integer in the format [x...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_window_attributes([100, 200, 300, 400]) == (100, 200, 300, 400)\", \"assert get_window_attributes([50]) == (50, 0, 800, 600)\", \"assert get_window_attributes([0, 0, 1024, 768]) == (0, 0, 1024, 768)\", \"assert get_window_attributes([10, 20, 300, 400]) =...
{ "split": "train", "index": 4464, "acecode_id": "bigcode_python_fns_17751", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `parse_field_descriptor` that takes a field descriptor as input and returns a dictionary containing the parsed information about the field. The field descriptor is a simple object with the following attributes: `name`, `full_name`, `i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_field_descriptor({'name': 'field1', 'full_name': 'package.field1', 'index': 0, 'number': 1, 'type': 'int32', 'cpp_type': 'int', 'label': 'optional'}) == {'name': 'field1', 'full_name': 'package.field1', 'index': 0, 'number': 1, 'type': 'int32', 'cpp_ty...
{ "split": "train", "index": 4465, "acecode_id": "oss_21113", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the counts of items in different regions. Your task is to implement a function that takes this list as input and returns the total count of items across all regions. Write a function `count_total_items(counts: List[int]) -> int` tha...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_total_items([1, 2, 3]) == 6\", \"assert count_total_items([-1, -2, 3]) == 0\", \"assert count_total_items([5, 5, 5, 5]) == 20\", \"assert count_total_items([0, 0, 0]) == 0\", \"assert count_total_items([10, -10, 20]) == 20\", \"assert count_total_items...
{ "split": "train", "index": 4466, "acecode_id": "bigcode_python_fns_41685", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that generates a random passphrase consisting of four unique short phrases or compound words. Each phrase should include at least one unique symbol (not a common symbol such as '@' or '!') and a random number inserted at a random position within the phrase. Add...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_passphrase() != generate_passphrase()\", \"assert len(generate_passphrase().split()) == 4\", \"assert any(char.isdigit() for char in generate_passphrase())\", \"assert any(char in '#$%&()*+,-./:;<=>?[]^_`{|}~' for char in generate_passphrase())\", \...
{ "split": "train", "index": 4467, "acecode_id": "evol_3006", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a given list of file paths and returns a dictionary containing the count of files with each unique file extension. The function should ignore case sensitivity when determining file extensions. Implement the function ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_file_extensions(['file1.txt', 'file2.TXT', 'file3.jpg', 'file4.png', 'file5', 'file6.PnG']) == {'txt': 2, 'jpg': 1, 'png': 2, '': 1}\", \"assert count_file_extensions(['photo.JPG', 'document.docx', 'spreadsheet.XLSX', 'presentation.PPT', '']) == {'jpg'...
{ "split": "train", "index": 4468, "acecode_id": "oss_9191", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the visibility toggle of a scale bar in an image viewer. The function should take an initial visibility state (a boolean) and a list of toggle commands (a list of booleans). Each command in the list represents whether t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert toggle_scale_bar(True, [False]) == False\", \"assert toggle_scale_bar(False, [True]) == True\", \"assert toggle_scale_bar(True, [True, False]) == False\", \"assert toggle_scale_bar(False, [False, True]) == True\", \"assert toggle_scale_bar(True, [True, True]...
{ "split": "train", "index": 4469, "acecode_id": "oss_11742", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a string `x` representing a channel or marker, and a list of strings `ref` representing a reference list of normalized names, implement a function that returns the standardized name that matches the input string. The function should handle the following conditions: If the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert query_normalised_list('Channel1', ['Channel1', 'Channel2', 'Channel3']) == 'Channel1'\", \"assert query_normalised_list('MarkerA', ['MarkerA', 'MarkerB']) == 'MarkerA'\", \"assert query_normalised_list('ChannelX', ['ChannelX', 'ChannelY', 'ChannelZ']) == 'Ch...
{ "split": "train", "index": 4470, "acecode_id": "bigcode_python_fns_48643", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the ages of a group of people. Write a function that takes this list and returns a new list containing only the ages that are greater than or equal to 18. The output list should maintain the original order of the ages. Implement the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_adult_ages([12, 18, 20, 15, 22, 30]) == [18, 20, 22, 30]\", \"assert filter_adult_ages([17, 16, 15, 14, 13]) == []\", \"assert filter_adult_ages([18, 19, 20]) == [18, 19, 20]\", \"assert filter_adult_ages([21, 22, 23, 24]) == [21, 22, 23, 24]\", \"ass...
{ "split": "train", "index": 4471, "acecode_id": "bigcode_python_fns_5983", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the reloading of a configuration dictionary from a given set of defaults. The function should accept a dictionary representing default configurations and another dictionary representing updates. It should return a new dicti...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reload_configuration({'a': 1, 'b': 2}, {'b': 3}) == {'a': 1, 'b': 3}\", \"assert reload_configuration({'x': 10, 'y': 20}, {'y': 25, 'z': 30}) == {'x': 10, 'y': 25, 'z': 30}\", \"assert reload_configuration({'key1': 'value1', 'key2': 'value2'}, {}) == {'key1'...
{ "split": "train", "index": 4472, "acecode_id": "bigcode_python_fns_33656", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a Python function that finds the index of a 'pivot' element. A pivot element is defined as an element where the product of all elements to the left is equal to the sum of all elements to the right. If no such element exists, return -1.\nPlease re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_pivot([10, -10, 0, 10]) == 1\", \"assert find_pivot([5, 10, 15, 10, 5]) == -1\", \"assert find_pivot([2, 0, 2, 0]) == 1\", \"assert find_pivot([3, 1, 2, 3]) == 2\", \"assert find_pivot([1, 2, 1]) == 1\", \"assert find_pivot([3, 5, 2, 2, 1]) == -1\", \"a...
{ "split": "train", "index": 4473, "acecode_id": "evol_28606", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given an array of integers, implement a function that calculates the product of all the elements in the array. The function should handle cases where the array may contain negative numbers, zero, or be empty. If the array is empty, return 0. The array size could be up to 10^6.\...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_product([4,5,1,3]) == 60\", \"assert calculate_product([-1, -2, -3]) == -6\", \"assert calculate_product([0, 1, 2, 3]) == 0\", \"assert calculate_product([1, 2, 3, 0]) == 0\", \"assert calculate_product([]) == 0\", \"assert calculate_product([1]) =...
{ "split": "train", "index": 4474, "acecode_id": "evol_29304", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two speeds of a vehicle during a round-trip journey, calculate the average speed for the entire trip. The average speed can be computed using the formula: `avg_speed = 2 * (speed1 * speed2) / (speed1 + speed2)`, where `speed1` is the speed from point A to point B and `spe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert average_speed(40, 60) == 48.0\", \"assert average_speed(30, 90) == 45.0\", \"assert average_speed(50, 50) == 50.0\", \"assert average_speed(70, 30) == 42.0\", \"assert average_speed(0, 60) == 0.0\", \"assert average_speed(60, 0) == 0.0\", \"assert average_sp...
{ "split": "train", "index": 4475, "acecode_id": "evol_2063", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Design a function `add_entry(title: str, department: str, existing_entries: List[Tuple[str, str]]) -> List[Tuple[str, str]]` that takes in a title, a department, and a list of existing entries (where each entry is a tuple of title and department). The function should add the ne...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_entry('Sarah', 'X', [('Sarah', 'X'), ('Tom', 'Y'), ('Lucy', 'Y')]) == [('Sarah', 'X'), ('Tom', 'Y'), ('Lucy', 'Y')]\", \"assert add_entry('John', 'Z', [('Sarah', 'X'), ('Tom', 'Y'), ('Lucy', 'Y')]) == [('Sarah', 'X'), ('Tom', 'Y'), ('Lucy', 'Y'), ('John'...
{ "split": "train", "index": 4476, "acecode_id": "evol_25637", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the factorial of a non-negative integer using a recursive approach. The function signature should be: def factorial(n: int) -> int. The function should return 1 if n is 0 or 1, and for any other positive integer n, it should return n multipl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert factorial(0) == 1\", \"assert factorial(1) == 1\", \"assert factorial(2) == 2\", \"assert factorial(3) == 6\", \"assert factorial(4) == 24\", \"assert factorial(5) == 120\", \"assert factorial(6) == 720\", \"assert factorial(7) == 5040\", \"assert factorial(...
{ "split": "train", "index": 4477, "acecode_id": "evol_33030", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function that takes a string as input and returns a tuple containing the duplicated string, the count of lowercase vowels, the count of uppercase vowels, the count of lowercase consonants, and the count of uppercase consonants. If the string contains any special ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_string('python') == ('pythonpython', 1, 0, 5, 0)\", \"assert process_string('') == ('', 0, 0, 0, 0)\", \"assert process_string('AaEeIiOoUu') == ('AaEeIiOoUuAaEeIiOoUu', 5, 5, 0, 0)\", \"assert process_string('xyz XYZ') == ('xyz XYZxyz XYZ', 0, 0, 3, ...
{ "split": "train", "index": 4478, "acecode_id": "evol_15658", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a binary search tree (BST) represented by a Node class, where each node has a color attribute, which can be either 'red' or 'black'. The BST follows the red-black tree properties, including: the root is always black, red nodes cannot have red children, and every p...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_grandparent(Node(1, 'red')) is None\", \"assert find_grandparent(Node(2, 'black')) is None\", \"assert find_grandparent(Node(6, 'black', Node(5, 'red', Node(3, 'black'), Node(4, 'black')), Node(7, 'black'))) is None\", \"assert find_grandparent(Node(10,...
{ "split": "train", "index": 4479, "acecode_id": "oss_7538", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are given a list of geographical regions and a network type. Your task is to create a function that simulates the downloading of a network for each region based on the specified network type. The function should return a list of strings where each string indicates the succe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert download_networks(['Manhattan Island, New York City, New York, USA'], 'drive') == ['Successfully downloaded drive network for Manhattan Island, New York City, New York, USA']\", \"assert download_networks(['Los Angeles, California, USA'], 'walk') == ['Succes...
{ "split": "train", "index": 4480, "acecode_id": "bigcode_python_fns_18147", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `get_user` that takes a `username` as input and returns the corresponding user information from a predefined dictionary `users`. The `users` dictionary contains usernames as keys and user data as values in the form of a dictionary wit...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_user('alice') == {'password': 'password123', 'is_authenticated': False, 'is_active': True, 'is_anonymous': False}\", \"assert get_user('bob') == {'password': 'password456', 'is_authenticated': False, 'is_active': True, 'is_anonymous': False}\", \"assert ...
{ "split": "train", "index": 4481, "acecode_id": "oss_919", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with writing a Python function `is_russian_word(word)` that checks whether a given word contains only characters from the Russian alphabet. The Russian alphabet consists of 33 letters, including both uppercase and lowercase characters. You are provided with a dic...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_russian_word('\\u041f\\u0440\\u0438\\u0432\\u0435\\u0442') == True\", \"assert is_russian_word('\\u041f\\u0440\\u0438\\u0432\\u0435\\u0442!') == False\", \"assert is_russian_word('\\u041f\\u0440\\u0438\\u0432\\u0435\\u0442123') == False\", \"assert is_rus...
{ "split": "train", "index": 4482, "acecode_id": "oss_17972", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that retrieves information about available images and their sizes from a predefined list. The function should take a string representing the cloud driver, a string representing the secret key, and a boolean indicating whether the c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_cloud_image_details('AWS', 'my_secret_key', True) == (['Image1', 'Image2', 'Image3'], ['Small', 'Medium', 'Large'], 'Details of Image with ID 38df09864d854b76b5023878ffc80161')\", \"assert get_cloud_image_details('Azure', 'another_secret_key', False) == ...
{ "split": "train", "index": 4483, "acecode_id": "oss_30674", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing image identifiers and a target index. Implement a function `generate_gradcam_masks(img_ids: List[int], target_index: int) -> List[str]` that simulates the generation of Grad-CAM masks for a set of images. The function should return ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_gradcam_masks([1, 2, 3], 0) == ['Mask for image 1', 'Mask for image 2', 'Mask for image 3']\", \"assert generate_gradcam_masks([4], 0) == ['Mask for image 4']\", \"assert generate_gradcam_masks([5, 5, 6], 1) == ['Mask for image 5', 'Mask for image 5...
{ "split": "train", "index": 4484, "acecode_id": "bigcode_python_fns_39854", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing weights of a model. Your task is to implement a function that takes this list of weights and encodes them using a provided encoding function. The encoding function takes an integer as input and returns an encoded version of that int...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert encode_weights([1, 2, 3, 4], lambda x: x * 2) == [2, 4, 6, 8]\", \"assert encode_weights([-1, -2, -3], lambda x: x + 1) == [0, -1, -2]\", \"assert encode_weights([0, 0, 0], lambda x: x * 10) == [0, 0, 0]\", \"assert encode_weights([10, 20, 30], lambda x: x /...
{ "split": "train", "index": 4485, "acecode_id": "bigcode_python_fns_8591", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of integers, write a function `find_max(arr)` that returns the maximum value from the array. The function should handle arrays of length between 1 and 100,000, and the elements can be any integer from -100,000 to 100,000.\nPlease reason step by step, then write a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_max([1]) == 1\", \"assert find_max([-1]) == -1\", \"assert find_max([0]) == 0\", \"assert find_max([1, 2, 3, 4, 5]) == 5\", \"assert find_max([-5, -4, -3, -2, -1]) == -1\", \"assert find_max([-100000, 0, 100000]) == 100000\", \"assert find_max([10, 20, ...
{ "split": "train", "index": 4486, "acecode_id": "evol_6494", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with defining a simple parser for a specific language syntax. The syntax consists of a parser name followed by a colon, an expression, and a newline. Your function should take in a string that represents this syntax and return a dictionary containing the parser n...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_definition('MyParser: x + y') == {'parser_name': 'MyParser', 'expression': 'x + y'}\", \"assert parse_definition('AnotherParser: 42') == {'parser_name': 'AnotherParser', 'expression': '42'}\", \"assert parse_definition('InvalidParser x + y') == {}\", \...
{ "split": "train", "index": 4487, "acecode_id": "bigcode_python_fns_3402", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates basic banking operations. This function should accept a list of operations, where each operation is represented by a tuple. Each tuple can represent one of the following operations: 'create', 'deposit', 'withdraw', or '...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert bank_operations([('create', '12345', 100.0)]) == {'12345': 100.0}\", \"assert bank_operations([('create', '12345', 100.0), ('deposit', '12345', 50.0)]) == {'12345': 150.0}\", \"assert bank_operations([('create', '12345', 100.0), ('withdraw', '12345', 50.0)])...
{ "split": "train", "index": 4488, "acecode_id": "oss_30563", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a number x, determine if it is an integer. The number can be of type int, float, or a string representation of a number that can be converted to an integer. Your function should return True if x is an integer and False otherwise. For example, '3' should be recognized as a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_integer(3) == True\", \"assert is_integer(3.0) == True\", \"assert is_integer('3') == True\", \"assert is_integer(3.2) == False\", \"assert is_integer(float('nan')) == False\", \"assert is_integer(float('inf')) == False\", \"assert is_integer(float('-inf'...
{ "split": "train", "index": 4489, "acecode_id": "bigcode_python_fns_27392", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lists of angles (in radians) and their respective means, implement a function that calculates the circular correlation coefficient between the two lists. The circular correlation coefficient is defined as the normalized dot product of the sine of the centered angles. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert circular_correlation_coefficient([0, 0.5, 1], [0, 0.5, 1], 0.5, 0.5) == 1.0\", \"assert circular_correlation_coefficient([0, 1, 2], [0, 1, 2], 1, 1) == 1.0\", \"assert circular_correlation_coefficient([-1, 0, 1], [1, 0, -1], 0, 0) == -1.0\", \"assert circula...
{ "split": "train", "index": 4490, "acecode_id": "bigcode_python_fns_22112", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with generating a clean command script for a build system based on certain library dependencies and folder paths provided in a dictionary. Implement a function `generate_clean_command(params: dict) -> str` that takes a dictionary `params` with the following keys:...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_clean_command({'library_libft': True, 'folder_libft': 'libft/', 'library_mlx': True, 'compile_mlx': True, 'folder_mlx': 'mlx/'}) == '\\\\t@$(RM) -rf $(BUILDDIR)\\\\n\\\\t@make $@ -C libft/\\\\n\\\\t@make $@ -C mlx/\\\\n'\", \"assert generate_clean_c...
{ "split": "train", "index": 4491, "acecode_id": "bigcode_python_fns_18217", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function `extract_host_from_url(url)` that takes a URL as input and returns the extracted hostname or IP address. The URL may have different formats, including with or without a protocol (e.g., http, https, ftp), with or without a path, and with or without a port...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_host_from_url('https://example.com/path/to/resource') == 'example.com'\", \"assert extract_host_from_url('http://192.168.1.1:8080') == '192.168.1.1'\", \"assert extract_host_from_url('ftp://ftp.example.com') == 'ftp.example.com'\", \"assert extract_h...
{ "split": "train", "index": 4492, "acecode_id": "oss_4202", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of players, each represented by a dictionary containing their civilization ID, user ID, winner status, and team ID, write a function `get_team_statistics(players: List[Dict[str, Union[int, str]]]) -> Dict[str, int]` that computes the following statistics: the total...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_team_statistics([{ 'civilization_id': 1, 'user_id': 'player1', 'winner': True, 'team_id': 1 }, { 'civilization_id': 2, 'user_id': 'player2', 'winner': False, 'team_id': 2 }, { 'civilization_id': 1, 'user_id': 'player3', 'winner': True, 'team_id': 1 }]) =...
{ "split": "train", "index": 4493, "acecode_id": "bigcode_python_fns_22332", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that validates a provided Battl.net URL for adding a player to a game monitoring system. The function should take a string input representing the Battl.net URL and return a boolean value indicating whether the URL is valid. A valid URL mu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_valid_bnet_url('https://username@bnet.com/sc2') == True\", \"assert is_valid_bnet_url('https://user123@bnet.com/sc2') == True\", \"assert is_valid_bnet_url('http://username@bnet.com/sc2') == False\", \"assert is_valid_bnet_url('https://username@bnet.com')...
{ "split": "train", "index": 4494, "acecode_id": "bigcode_python_fns_10086", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that calculates the formatted accuracy of a model based on the provided running accuracy. The function should take a `running_accuracy` parameter and return a dictionary containing the accuracy value formatted to four decimal places u...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_accuracy(0.123456) == {'accuracy': 'Accuracy: 0.1235'}\", \"assert calculate_accuracy(0.987654) == {'accuracy': 'Accuracy: 0.9877'}\", \"assert calculate_accuracy(0.0) == {'accuracy': 'Accuracy: 0.0000'}\", \"assert calculate_accuracy(1.0) == {'acc...
{ "split": "train", "index": 4495, "acecode_id": "oss_12671", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that shortens a given headline to fit within a specified maximum width. If the headline exceeds the maximum width, it should be shortened and an ellipsis ('...') should be appended to indicate that it has been truncated. You need to i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert shorten_headline('Short headline', 20) == 'Short headline'\", \"assert shorten_headline('Just another example', 25) == 'Just another example'\", \"assert shorten_headline('A headline that is too long for the given width', 30) == 'A headline that is too long....
{ "split": "train", "index": 4496, "acecode_id": "oss_417", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Implement a function `generate_asterisk_string(n)` that returns a string consisting of `n` asterisk characters. If the input `n` is not an integer or if it is less than 0 or greater than 1,000,000, the function should return the string 'Invalid input! Input must be an integer b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_asterisk_string(0) == ''\", \"assert generate_asterisk_string(5) == '*****'\", \"assert generate_asterisk_string(10) == '**********'\", \"assert generate_asterisk_string(1) == '*'\", \"assert generate_asterisk_string(100) == '*' * 100\", \"assert ge...
{ "split": "train", "index": 4497, "acecode_id": "evol_33777", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to process email notifications. You are given a dictionary `dict_msg` that contains information about the notification. This dictionary will have the following keys: 'recipient_email', 'subject', and 'message_content'. Your task is to...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert send_email_notification({'recipient_email': 'alice@example.com', 'subject': 'Welcome', 'message_content': 'Hello Alice!'}) == 'Email prepared for sending to alice@example.com with subject: Welcome and message: Hello Alice!'\", \"assert send_email_notificatio...
{ "split": "train", "index": 4498, "acecode_id": "oss_16810", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings representing file names. Your task is to implement a function that takes this list and returns a new list containing only the file names that do not end with '.html'. Each file name in the output list should appear in the same order as in the inp...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_html_files(['index.html', 'style.css', 'script.js', 'about.html']) == ['style.css', 'script.js']\", \"assert filter_html_files(['report.html', 'data.txt', 'summary.doc']) == ['data.txt', 'summary.doc']\", \"assert filter_html_files(['file.html', 'file...
{ "split": "train", "index": 4499, "acecode_id": "bigcode_python_fns_13346", "num_tests": 16 }