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 implementing a function that processes and formats log data for a training process. The function should take in the current epoch number, the number of data steps seen, the start time of the training, and the total running time. It should then construct a lo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_log(1, 500, 1632345600.0, 1200.0) == 'Epoch: 1\\\\nData steps: 500 | Tot running time: 1200.0'\", \"assert format_log(2, 1000, 1632345600.0, 2400.0) == 'Epoch: 2\\\\nData steps: 1000 | Tot running time: 2400.0'\", \"assert format_log(3, 1500, 16323456...
{ "split": "train", "index": 69800, "acecode_id": "oss_1054", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the heights of bars in a histogram. Write a function `max_area(heights: List[int]) -> int` that calculates the area of the largest rectangle that can be formed under the histogram. The rectangle can be formed by using one or more co...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_area([2,1,5,6,2,3]) == 10\", \"assert max_area([1,1,1,1,1]) == 5\", \"assert max_area([4,2,0,3,2,5]) == 6\", \"assert max_area([1,3,2,5,4]) == 8\", \"assert max_area([0]) == 0\", \"assert max_area([5]) == 5\", \"assert max_area([2,1,2]) == 3\", \"assert ...
{ "split": "train", "index": 69801, "acecode_id": "bigcode_python_fns_44368", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that takes a string as input and transforms all alphabetic characters into their upper-case equivalents. Additionally, convert any numeric digits in the string to their binary representation. Non-alphabetic and non-numeric characters should remain unchanged. Im...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert('hello world 123') == 'HELLO WORLD 11011'\", \"assert convert('Python 3.8') == 'PYTHON 11.1000'\", \"assert convert('Test 1') == 'TEST 1'\", \"assert convert('') == ''\", \"assert convert('A1B2C3') == 'A1B10C11'\", \"assert convert('Text with symbols...
{ "split": "train", "index": 69802, "acecode_id": "evol_18528", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `find_max_sum_subarray(arr)` that returns the maximum sum of any contiguous subarray within the given list. A subarray is a contiguous part of an array. The function should handle lists of varying lengths, including empty lists. You ca...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_max_sum_subarray([1, 2, 3, 4, 5]) == 15\", \"assert find_max_sum_subarray([-1, -2, -3, -4, -5]) == -1\", \"assert find_max_sum_subarray([1, -2, 3, 4, -1]) == 7\", \"assert find_max_sum_subarray([0, -1, 2, 3, 4, -2]) == 9\", \"assert find_max_sum_subarra...
{ "split": "train", "index": 69803, "acecode_id": "bigcode_python_fns_10795", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function `create_merchandise` that takes three parameters: `moniker` (a unique string identifier), `synopsis` (a string description of the merchandise), and `monetary_value` (a positive float representing the price of the merchandise). The function should validate t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_merchandise('item1', 'A great item', 10.0) == 'Moniker: item1, Synopsis: A great item, Monetary Value: 10.0'\", \"assert create_merchandise('item2', 'Another fantastic item', 15.5) == 'Moniker: item2, Synopsis: Another fantastic item, Monetary Value: ...
{ "split": "train", "index": 69804, "acecode_id": "evol_4541", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with combining two lists of changes for a version control system. Implement a function called `combine_changes` that takes two lists, `changes1` and `changes2`, as input. The function should return a new list containing all unique changes from both lists. The ord...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert combine_changes(['a', 'b', 'c'], ['b', 'c', 'd']) == ['a', 'b', 'c', 'd']\", \"assert combine_changes(['x', 'y'], ['y', 'z']) == ['x', 'y', 'z']\", \"assert combine_changes([], ['a', 'b']) == ['a', 'b']\", \"assert combine_changes(['a', 'b', 'c'], []) == ['a...
{ "split": "train", "index": 69805, "acecode_id": "oss_4986", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks if a given package is already installed based on a list of installed packages. The function should take a string representing the package name to check, and a list of strings representing the installed packages. If the pac...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_package_installed('numpy', ['numpy', 'pandas', 'scikit-learn']) == True\", \"assert is_package_installed('tensorflow', ['numpy', 'pandas', 'scikit-learn']) == False\", \"assert is_package_installed('requests', ['flask', 'requests', 'django']) == True\", \...
{ "split": "train", "index": 69806, "acecode_id": "bigcode_python_fns_11938", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `convert_to_lowercase_remove_digits_and_special_chars(text)` that accepts a string and returns a new string that has been converted to lowercase, devoid of digits, and any special characters. The resulting string should only contain alphabetic characters. F...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_to_lowercase_remove_digits_and_special_chars('') == ''\", \"assert convert_to_lowercase_remove_digits_and_special_chars('abcDEF3') == 'abcdef'\", \"assert convert_to_lowercase_remove_digits_and_special_chars('AAAAA4') == 'aaaaa'\", \"assert convert_t...
{ "split": "train", "index": 69807, "acecode_id": "evol_33908", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string representing a user identifier, write a function `is_unambiguous_user_identifier(argument: str) -> bool` that determines if the argument is a valid user mention (starting with '@'), a user ID (a numeric string), or a username with a discriminator (formatted as 'n...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_unambiguous_user_identifier('@user123') == True\", \"assert is_unambiguous_user_identifier('123456789') == True\", \"assert is_unambiguous_user_identifier('username#5678') == True\", \"assert is_unambiguous_user_identifier('user#123') == False\", \"assert...
{ "split": "train", "index": 69808, "acecode_id": "bigcode_python_fns_16985", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of network service addresses, write a function `locate_ns(addresses: List[str], timeout: float) -> List[str]` that returns a list of addresses that can be located without timing out. The function should accept a list of strings `addresses`, where each string repres...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert locate_ns(['reachable1', 'unreachable1', 'reachable2'], 0.0) == ['reachable1', 'unreachable1', 'reachable2']\", \"assert locate_ns([], 0.0) == []\", \"assert locate_ns(['reachable'], 0.5) == ['reachable']\", \"assert locate_ns(['reachable', 'reachable', 'rea...
{ "split": "train", "index": 69809, "acecode_id": "bigcode_python_fns_33308", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are given an integer n. Your task is to implement a function `countPrimes(n: int) -> int` that returns the count of prime numbers less than n. A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. Your function s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert countPrimes(0) == 0\", \"assert countPrimes(1) == 0\", \"assert countPrimes(2) == 0\", \"assert countPrimes(3) == 1\", \"assert countPrimes(4) == 2\", \"assert countPrimes(10) == 4\", \"assert countPrimes(20) == 8\", \"assert countPrimes(30) == 10\", \"asser...
{ "split": "train", "index": 69810, "acecode_id": "oss_17445", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `fibonacci_sequence(n)` that returns a list containing the Fibonacci sequence up to the nth term. The Fibonacci sequence is defined as follows: the first two terms are 0 and 1, and each subsequent term is the sum of the previous two terms. Your function should ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fibonacci_sequence(0) == []\", \"assert fibonacci_sequence(1) == [0]\", \"assert fibonacci_sequence(2) == [0, 1]\", \"assert fibonacci_sequence(3) == [0, 1, 1]\", \"assert fibonacci_sequence(4) == [0, 1, 1, 2]\", \"assert fibonacci_sequence(5) == [0, 1, 1, 2...
{ "split": "train", "index": 69811, "acecode_id": "evol_19083", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that checks if a given string is a palindrome. A palindrome is a word, phrase, number, or other sequences of characters that reads the same forward and backward (ignoring spaces, punctuation, and capitalization). Your function shou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_palindrome('A man a plan a canal Panama') == 'Yes'\", \"assert is_palindrome('racecar') == 'Yes'\", \"assert is_palindrome('Hello') == 'No'\", \"assert is_palindrome('Was it a car or a cat I saw') == 'Yes'\", \"assert is_palindrome('No lemon, no melon') =...
{ "split": "train", "index": 69812, "acecode_id": "oss_34930", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a class `Vehicle` that represents a vehicle with the following attributes: `make`, `model`, `year`, and `mileage`. It should have a method `drive(miles)` that increments the mileage by the given miles. Additionally, create two subclasses: `Car` and `Truck`. The `Car` sub...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert Vehicle('Toyota', 'Camry', 2020).make == 'Toyota'\", \"assert Vehicle('Toyota', 'Camry', 2020).model == 'Camry'\", \"assert Vehicle('Toyota', 'Camry', 2020).get_mileage() == 0\", \"assert Car('Honda', 'Civic', 2022, 5).passengers == 5\", \"assert Car('Honda'...
{ "split": "train", "index": 69813, "acecode_id": "evol_10232", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Implement the function `quick_sort(arr: List[int]) -> List[int]` that sorts an array of integers using the QuickSort algorithm. The function should return a new sorted list of integers. The input list may contain duplicate elements.\nPlease reason step by step, then write a sel...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert quick_sort([3, 6, 8, 10, 1, 2, 1]) == [1, 1, 2, 3, 6, 8, 10]\", \"assert quick_sort([5, 3, 8, 1, 2]) == [1, 2, 3, 5, 8]\", \"assert quick_sort([]) == []\", \"assert quick_sort([4]) == [4]\", \"assert quick_sort([2, 2, 2]) == [2, 2, 2]\", \"assert quick_sort(...
{ "split": "train", "index": 69814, "acecode_id": "evol_35208", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of integers, write a function `remove_duplicates(arr)` that returns a new array containing only the unique elements of the input array, preserving the order of their first appearance. The output array should not contain any duplicate values. The function should b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates([1, 2, 3, 1, 2, 3]) == [1, 2, 3]\", \"assert remove_duplicates([4, 5, 4, 6, 7, 6]) == [4, 5, 6, 7]\", \"assert remove_duplicates([1, 1, 1, 1]) == [1]\", \"assert remove_duplicates([]) == []\", \"assert remove_duplicates([0, -1, -1, 0]) == [...
{ "split": "train", "index": 69815, "acecode_id": "evol_34921", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `contains_hello(text: str) -> bool` that takes a string as input and returns True if the string contains the substring 'hello' anywhere within it, and False otherwise.\nPlease reason step by step, then write a self-contained Python solution. Give your final pro...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert contains_hello('hello world') == True\", \"assert contains_hello('say hello') == True\", \"assert contains_hello('this is a test') == False\", \"assert contains_hello('Hello there') == False\", \"assert contains_hello('he said hello again') == True\", \"asse...
{ "split": "train", "index": 69816, "acecode_id": "evol_4674", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Develop a function that removes any duplicates from a given list while maintaining the original order of elements. The function should not use any built-in or external libraries or functions for removing duplicates. The list can contain any type of elements, including integers,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates([1, 2, 'a', 1, 2, 'a', 'b', 'b']) == [1, 2, 'a', 'b']\", \"assert remove_duplicates(['apple', 'banana', 'apple', 'orange']) == ['apple', 'banana', 'orange']\", \"assert remove_duplicates([True, False, True, True]) == [True, False]\", \"asse...
{ "split": "train", "index": 69817, "acecode_id": "evol_29598", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the process of rendering images from a given set of data and configuration. Your function should take a tuple representing a block of image data, a dictionary of variables related to the block, and a configuration dictionar...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert render_images(('label', 'content', 1), {'image_path_iterator': ['img1.png', 'img2.png']}, {'compress_images': False}) == 'Rendered output for img1.png and img2.png'\", \"assert render_images(('label', 'content', 2), {'image_path_iterator': []}, {'compress_im...
{ "split": "train", "index": 69818, "acecode_id": "bigcode_python_fns_39651", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of frames represented as integers and a series of key press events that can either be 'left' or 'right'. Your task is to implement a function `navigate_frames(frames: List[int], events: List[str]) -> int` that simulates the navigation through these frames b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert navigate_frames([1, 2, 3], ['right', 'right', 'left']) == 1\", \"assert navigate_frames([1, 2, 3], ['left', 'right', 'right']) == 2\", \"assert navigate_frames([1, 2, 3], ['left', 'left']) == 0\", \"assert navigate_frames([1, 2, 3], ['right', 'left', 'left']...
{ "split": "train", "index": 69819, "acecode_id": "bigcode_python_fns_26356", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Write a function `remove_duplicates` that takes a list of integers as input and returns a new list containing only the unique integers from the input list, preserving the order of their first appearance. Do not use any built-in Python functions or libraries to achieve this.\nPl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates([4, 1, 2, 4, 5, 2, 2, 5]) == [4, 1, 2, 5]\", \"assert remove_duplicates([1, 1, 1, 1]) == [1]\", \"assert remove_duplicates([]) == []\", \"assert remove_duplicates([10, 20, 10, 30, 20]) == [10, 20, 30]\", \"assert remove_duplicates([5, 5, 6,...
{ "split": "train", "index": 69820, "acecode_id": "evol_28849", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that validates the input parameters needed to create a new certificate. The function should check the following conditions: \n\n1. The issuer key name must not be empty. \n2. The key store must contain the issuer key name. \n3. The durati...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_cert_params('issuer_key', {'issuer_key', 'signing_key'}, 365, '/server/myserver', False) == True\", \"assert validate_cert_params('', {'issuer_key', 'signing_key'}, 365, '/server/myserver', False) == False\", \"assert validate_cert_params('issuer_ke...
{ "split": "train", "index": 69821, "acecode_id": "bigcode_python_fns_23772", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes in two strings, `uuid` and `local_id`, representing the ID of a path computation service and the ID of an endpoint, respectively. Your function should return a concatenated string that combines both IDs in the format 'UUID: {uu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_path_id('123e4567-e89b-12d3-a456-426614174000', 'local-001') == 'UUID: 123e4567-e89b-12d3-a456-426614174000, Local ID: local-001'\", \"assert generate_path_id('abcdef12-3456-7890-abcd-ef1234567890', 'local-002') == 'UUID: abcdef12-3456-7890-abcd-ef1...
{ "split": "train", "index": 69822, "acecode_id": "bigcode_python_fns_13723", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_text_field_filled(text: str) -> bool` that checks if the input string `text` is exactly equal to \"Hello World!\". The function should return `True` if the input matches, otherwise return `False`.\nPlease reason step by step, then write a self-contained...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_text_field_filled('Hello World!') == True\", \"assert is_text_field_filled('hello world!') == False\", \"assert is_text_field_filled('Hello World') == False\", \"assert is_text_field_filled('Hello') == False\", \"assert is_text_field_filled('World!') == F...
{ "split": "train", "index": 69823, "acecode_id": "evol_22023", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a data model for a news article in a web application. Your task is to define a function that takes parameters for the various attributes of a news article and returns a dictionary that represents the article. The article should contain the following...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_news_article(['Section1', 'Section2'], 'http://example.com/image.jpg', 'A brief annotation.', 'Main content of the article.', True, 'This is a meta title.', 'keyword1, keyword2', 'Description of the article.') == {'sections': ['Section1', 'Section2'],...
{ "split": "train", "index": 69824, "acecode_id": "oss_10533", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the area of a trapezoid given its two bases and height. The function should take three parameters: base_a (the length of the first base), base_b (the length of the second base), and height (the height of the trapezoid). The area of a trapezo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert trapezoid_area(10, 20, 5) == 75.0\", \"assert trapezoid_area(5, 15, 10) == 100.0\", \"assert trapezoid_area(8, 12, 4) == 40.0\", \"assert trapezoid_area(1, 1, 1) == 1.0\", \"assert trapezoid_area(0, 0, 10) == 0.0\", \"assert trapezoid_area(10, 0, 5) == 25.0\...
{ "split": "train", "index": 69825, "acecode_id": "evol_5908", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of distinct positive integers representing different coin denominations and a target amount of money. Your task is to write a function to compute the number of combinations that make up that amount using the coins. You may assume that you have an infinite n...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert coin_combinations(4, [1, 2]) == 3\", \"assert coin_combinations(5, [5]) == 1\", \"assert coin_combinations(0, [1, 2, 3]) == 1\", \"assert coin_combinations(6, [1, 2, 3]) == 7\", \"assert coin_combinations(3, [2]) == 0\", \"assert coin_combinations(1, [1]) ==...
{ "split": "train", "index": 69826, "acecode_id": "oss_6068", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that parses a configuration represented as a list of strings into a dictionary. Each string is a key-value pair formatted as 'key = value'. The values can be of the following types: Float, Int, Path, and String. Your goal is to implem...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_config(['height = 5.8', 'age = 25', 'data_dir = /usr/data', 'name = John Doe']) == {'height': 5.8, 'age': 25, 'data_dir': '/usr/data', 'name': 'John Doe'}\", \"assert parse_config(['temp = 36.6', 'pressure = 1013']) == {'temp': 36.6, 'pressure': 1013}\...
{ "split": "train", "index": 69827, "acecode_id": "oss_2909", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with building a function that constructs a complete URL from a base URL and an endpoint. The function should take two strings as input: a base URL and an endpoint. The endpoint is appended to the base URL following proper URL conventions. Your function should ens...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert build_url('http://example.com', 'api/v1/resource') == 'http://example.com/api/v1/resource'\", \"assert build_url('http://example.com/', 'api/v1/resource') == 'http://example.com/api/v1/resource'\", \"assert build_url('http://example.com', '/api/v1/resource')...
{ "split": "train", "index": 69828, "acecode_id": "bigcode_python_fns_32601", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing custom exception handling for a chess game in Python. You need to create a custom exception class called `InvalidChessPieceException` that inherits from the base `Exception` class. This exception should be raised when an invalid chess piece is s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert InvalidMovementTargetException().args[0] == 'Invalid target for movement'\", \"assert InvalidMovementOriginException().args[0] == 'Invalid origin for movement'\", \"assert isinstance(InvalidMovementTargetException(), Exception)\", \"assert isinstance(Invalid...
{ "split": "train", "index": 69829, "acecode_id": "oss_22350", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing a tree structure, where each integer corresponds to a value in a node. Your task is to implement a function that, given this list, returns a new list containing the values of all nodes that can be selected based on their values. A n...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert select_nodes([1, 2, 3, 2, 1]) == [1, 2, 2, 1]\", \"assert select_nodes([4, 5, 6]) == []\", \"assert select_nodes([10]) == []\", \"assert select_nodes([1, 1, 1]) == [1, 1, 1]\", \"assert select_nodes([]) == []\", \"assert select_nodes([1, 2, 3, 4, 5, 6, 7]) =...
{ "split": "train", "index": 69830, "acecode_id": "bigcode_python_fns_49342", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Develop a Python function that removes all instances of the number 3 from a given list. Additionally, if three consecutive numbers in the list sum up to 3, delete only the first number in that sequence. Implement a function named 'eradicate_three' that takes a list of integers ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert eradicate_three([2, 3, 3, 4, 5, 6, 4, 7]) == [2, 4, 5, 6, 4, 7]\", \"assert eradicate_three([1, 2, 3]) == [1, 2]\", \"assert eradicate_three([3, 1, 2]) == [1, 2]\", \"assert eradicate_three([3, 3, 3]) == []\", \"assert eradicate_three([0, 0, 0]) == [0, 0, 0]...
{ "split": "train", "index": 69831, "acecode_id": "evol_433", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python program that processes a list of strings representing programming language classifiers and extracts specific information from them. Each string in the list follows the format 'Category :: Subcategory :: Sub-subcategory', where each part is ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_subcategories(['Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8']) == {'Python': 2, '3.7': 1, '3.8': 1}\", \"assert extract_subcategories(['Topic :: Internet :: WWW/HTTP :: Dynamic Content']) == {'Internet': 1, 'WWW/HTT...
{ "split": "train", "index": 69832, "acecode_id": "oss_32563", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of bounding boxes represented as a 2D array where each bounding box is defined by its top-left and bottom-right coordinates (top-left x, top-left y, bottom-right x, bottom-right y). Your task is to write a function that processes this list of bounding boxes...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_bounding_boxes([[1, 2, 3, 4], [5, 6, 7, 8]]) == ['Bounding Box: (1, 2) to (3, 4)', 'Bounding Box: (5, 6) to (7, 8)']\", \"assert format_bounding_boxes([[0, 0, 1, 1], [2, 2, 3, 3], [4, 4, 5, 5]]) == ['Bounding Box: (0, 0) to (1, 1)', 'Bounding Box: (2,...
{ "split": "train", "index": 69833, "acecode_id": "bigcode_python_fns_15626", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with managing relations between a collection of items represented by strings. Implement a function `manage_relations` that takes a list of operations and returns the results of specific queries about these relations. Each operation can be one of the following typ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_relations(['add A B friend', 'add A C friend', 'get A friend']) == [['B', 'C']]\", \"assert manage_relations(['add A B friend', 'add A C friend', 'check A B friend']) == [True]\", \"assert manage_relations(['add A B friend', 'remove A B friend', 'chec...
{ "split": "train", "index": 69834, "acecode_id": "oss_6713", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `fib_imperative(n: int) -> List[int]` that returns the first `n` numbers in the Fibonacci series using an imperative programming approach. The Fibonacci series is defined as follows: the first two numbers are 0 and 1, and each subsequent number is the sum o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fib_imperative(1) == [0]\", \"assert fib_imperative(2) == [0, 1]\", \"assert fib_imperative(3) == [0, 1, 1]\", \"assert fib_imperative(4) == [0, 1, 1, 2]\", \"assert fib_imperative(5) == [0, 1, 1, 2, 3]\", \"assert fib_imperative(6) == [0, 1, 1, 2, 3, 5]\", ...
{ "split": "train", "index": 69835, "acecode_id": "evol_17103", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of sensor readings from different locations represented as tuples. Each tuple contains three elements: the sensor ID (an integer), the location ID (an integer), and the reading value (a float). Write a function `get_sensor_readings(readings: List[Tuple[int,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_sensor_readings([(1, 101, 10.5), (1, 102, 11.0), (2, 101, 9.0), (1, 101, 12.0), (2, 102, 8.5)]) == {1: {101: 12.0, 102: 11.0}, 2: {101: 9.0, 102: 8.5}}\", \"assert get_sensor_readings([(1, 101, 5.0), (1, 101, 7.0), (1, 102, 6.0)]) == {1: {101: 7.0, 102: ...
{ "split": "train", "index": 69836, "acecode_id": "bigcode_python_fns_23003", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a custom exception class in Python for handling allocation errors in a memory management system. The custom exception class, `AllocationError`, should take two parameters: `resource_name` (a string) and `allocation_size` (an integer). Additional...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert AllocationError('Memory', 256).__repr__() == \\\"AllocationError('Memory', 256)\\\"\", \"assert AllocationError('Disk', 1024).__repr__() == \\\"AllocationError('Disk', 1024)\\\"\", \"assert AllocationError('CPU', 1).__repr__() == \\\"AllocationError('CPU', 1...
{ "split": "train", "index": 69837, "acecode_id": "oss_31947", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple banking system that allows a user to manage their account balance. Your goal is to write a function called `bank_account_operations` that simulates a series of banking operations on a single account. The function takes the following par...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert bank_account_operations(1000, [('deposit', 500), ('withdraw', 300), ('transfer', 200)]) == 1000\", \"assert bank_account_operations(500, [('withdraw', 600)]) == 500\", \"assert bank_account_operations(1000, [('deposit', 200), ('transfer', 300)]) == 900\", \"...
{ "split": "train", "index": 69838, "acecode_id": "oss_20141", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are given a string that represents either a URI (Uniform Resource Identifier) or a CURIE (Compact URI). Your task is to implement a function `extract_name(item: str, schema: Optional[dict] = None) -> str` that extracts the name from the input string based on the following r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_name('http://example.com/resource/123') == '123'\", \"assert extract_name('example:resource') == 'resource'\", \"assert extract_name('http://example.com/api/v1/users') == 'users'\", \"assert extract_name('curie:example') == 'example'\", \"assert extr...
{ "split": "train", "index": 69839, "acecode_id": "bigcode_python_fns_35233", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a configuration function for a plotting library. The function 'configure_plot' should accept two integer parameters: 'figsizex' and 'figsizey', which specify how many figures should be arranged next to each other in the x-direction and y-direction, ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert configure_plot(2, 2) == {'figsize': (2.625, 2.375), 'labelpad': 10, 'autolayout': True, 'frame': True}\", \"assert configure_plot(1, 1) == {'figsize': (5.25, 4.75), 'labelpad': 10, 'autolayout': True, 'frame': False}\", \"assert configure_plot(3, 2) == {'fig...
{ "split": "train", "index": 69840, "acecode_id": "bigcode_python_fns_34051", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are working on a security analysis tool that processes program paths and checks for tainted data. Your task is to implement a function that simulates the untainting of two buffers based on certain conditions. Given a program path's state, you need to determine the status of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert untaint_buffers(False, False, False) == (None, None)\", \"assert untaint_buffers(True, False, False) == ('Tainted', None)\", \"assert untaint_buffers(False, True, False) == (None, 'Tainted')\", \"assert untaint_buffers(True, True, False) == ('Tainted', 'Tain...
{ "split": "train", "index": 69841, "acecode_id": "oss_2751", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Write a function `select_random_fact(data: List[Dict[str, Any]]) -> str` that takes in a list of cat facts, where each fact is represented as a dictionary containing at least a 'text' key. The function should randomly select and return one fact's text from the provided list of ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert select_random_fact([{'text': 'Cats can make over 100 different sounds.'}, {'text': 'Cats sleep for 70% of their lives.'}, {'text': 'A group of cats is called a clowder.'}]) in ['Cats can make over 100 different sounds.', 'Cats sleep for 70% of their lives.',...
{ "split": "train", "index": 69842, "acecode_id": "evol_32136", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that checks whether a given list of strings contains specific keywords. The function should take a list of strings and return a list of the keywords that are present in the input list. Your function should be named `find_keywords` and it ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_keywords(['public-keys', 'other-string']) == ['public-keys']\", \"assert find_keywords(['some-string', 'images']) == ['images']\", \"assert find_keywords(['random', 'data', 'here']) == []\", \"assert find_keywords(['nothing', 'special']) == []\", \"asse...
{ "split": "train", "index": 69843, "acecode_id": "bigcode_python_fns_30726", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a program that simulates a simple quiz game. The program should present a series of questions to the user and calculate their score based on the number of correct answers given. Your task is to implement the function `calculate_score(answers: List[s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_score(['B', 'A', 'B', 'B', 'C']) == 'Excellent! You scored 5/5. Well done!'\", \"assert calculate_score(['A', 'B', 'B', 'B', 'C']) == 'Not bad! You scored 3/5. Keep it up!'\", \"assert calculate_score(['B', 'B', 'B', 'B', 'C']) == 'Excellent! You s...
{ "split": "train", "index": 69844, "acecode_id": "oss_17979", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that simulates the counting of lines of code in a list of Python files. Each file's content is represented as a list of strings, where each string corresponds to a line in the file. Your function should take as input a list of list...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_python_files_and_lines([['print(1)', 'print(2)'], ['def func():', ' pass'], []]) == (3, 4)\", \"assert count_python_files_and_lines([[], [], []]) == (3, 0)\", \"assert count_python_files_and_lines([['line1', 'line2', 'line3'], ['line4']]) == (2, 4)\...
{ "split": "train", "index": 69845, "acecode_id": "oss_33156", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks if a given C++ abstract declarator is valid. An abstract declarator can be a simple type specifier or a pointer abstract declarator. The valid types are 'int', 'float', 'double', and 'char'. A pointer abstract declarator c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_valid_abstract_declarator('int') == True\", \"assert is_valid_abstract_declarator('float') == True\", \"assert is_valid_abstract_declarator('double') == True\", \"assert is_valid_abstract_declarator('char') == True\", \"assert is_valid_abstract_declarator...
{ "split": "train", "index": 69846, "acecode_id": "oss_8538", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a time represented as a string in the format 'YYYY-MM-DD HH:MM:SS'. Your task is to convert this time string to a different string format 'HH:MM:SS on YYYY-MM-DD'. Implement a function that takes a time string as input and returns the formatted time string. If the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_time_format('2023-10-01 12:30:45') == '12:30:45 on 2023-10-01'\", \"assert convert_time_format('2022-01-15 00:00:00') == '00:00:00 on 2022-01-15'\", \"assert convert_time_format('2023-12-31 23:59:59') == '23:59:59 on 2023-12-31'\", \"assert convert_t...
{ "split": "train", "index": 69847, "acecode_id": "bigcode_python_fns_32814", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that checks whether a given string represents a numeric palindrome. A numeric palindrome is defined as a number that reads the same forwards and backwards. If the string is not numeric, the function should return 'Error: String is not numeric.' If the numer...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_numeric_palindrome('12321') == True\", \"assert is_numeric_palindrome('123456') == 'Error: Number is not a palindrome.'\", \"assert is_numeric_palindrome('98789') == True\", \"assert is_numeric_palindrome('abc') == 'Error: String is not numeric.'\", \"ass...
{ "split": "train", "index": 69848, "acecode_id": "evol_9380", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the IDs of different IoCs (Indicators of Compromise). You need to create a function that checks if a specific IoC ID can be ignored based on the following rules: an IoC ID can be ignored if it is not null and has not previously been...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_ignore_ioc(1, []) == True\", \"assert can_ignore_ioc(2, [1]) == True\", \"assert can_ignore_ioc(3, [1, 2]) == True\", \"assert can_ignore_ioc(4, [1, 2, 3]) == True\", \"assert can_ignore_ioc(6, [1, 2, 3, None]) == True\", \"assert can_ignore_ioc(7, [None...
{ "split": "train", "index": 69849, "acecode_id": "bigcode_python_fns_11593", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You need to create a function that generates a JSON response representing a \"Bad Gateway\" error. The function should have one parameter, `message`, which is a string that defaults to \"Bad gateway\". The output of the function should be a dictionary containing two key-value p...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert bad_gateway() == {'id': 'bad_gateway', 'message': 'Bad gateway'}\", \"assert bad_gateway('Service unavailable') == {'id': 'bad_gateway', 'message': 'Service unavailable'}\", \"assert bad_gateway('Timeout error') == {'id': 'bad_gateway', 'message': 'Timeout e...
{ "split": "train", "index": 69850, "acecode_id": "bigcode_python_fns_39510", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an adjacency matrix representing a directed graph, implement a function `detect_cycle(graph: List[List[int]]) -> Tuple[bool, List[int]]` that detects if the graph contains a cycle. The function should return a tuple where the first element is a boolean indicating whether ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert detect_cycle([[0, 1], [0, 0]]) == (False, [])\", \"assert detect_cycle([[0, 1], [1, 0]]) == (True, [0, 1])\", \"assert detect_cycle([[0, 1, 0], [0, 0, 0], [0, 0, 0]]) == (False, [])\", \"assert detect_cycle([[0, 1, 1], [0, 0, 0], [0, 0, 0]]) == (False, [])\"...
{ "split": "train", "index": 69851, "acecode_id": "evol_35921", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a list of cumulative weights that represent a discrete probability distribution, implement a function that samples an integer index from this distribution. The input list `cum_weights` is guaranteed to be non-empty and will satisfy the condition that the last element equa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sample_index([0.2, 0.5, 1.0]) in [0, 1, 2]\", \"assert sample_index([0.1, 0.3, 0.6, 1.0]) in [0, 1, 2, 3]\", \"assert sample_index([0.33, 0.66, 1.0]) in [0, 1, 2]\", \"assert sample_index([0.25, 0.5, 0.75, 1.0]) in [0, 1, 2, 3]\", \"assert sample_index([0.1,...
{ "split": "train", "index": 69852, "acecode_id": "bigcode_python_fns_44798", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a configuration parser for a reinforcement learning algorithm. Your goal is to create a Python function that takes a dictionary of configuration parameters and returns a formatted string summarizing the settings. The function should accept the f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert summarize_rl_config({'action_repeat': 1, 'frame_stack': 3, 'do_curl_updates': False, 'dont_detach_critic': False, 'dont_detach_actor': False}) == 'Action Repeat: 1, Frame Stack: 3, CURL Updates: Disabled, Detach Critic: Enabled, Detach Actor: Enabled'\", \"a...
{ "split": "train", "index": 69853, "acecode_id": "oss_26523", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that converts pressure between two units: atmospheres (atm) and Pascals (Pa). The function should take two parameters: a float 'value' representing the pressure and a string 'unit' which is either 'atm' or 'Pa'. If the unit is 'atm', convert the value to Pa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_pressure(1.0, 'atm') == 101325\", \"assert convert_pressure(101325, 'Pa') == 1.0\", \"assert convert_pressure(0.5, 'atm') == 50662.5\", \"assert convert_pressure(50662.5, 'Pa') == 0.5\", \"assert convert_pressure(2.0, 'atm') == 202650\", \"assert con...
{ "split": "train", "index": 69854, "acecode_id": "evol_19877", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with simulating a command-line argument parser for a test system in Python. Your goal is to implement a function called `parse_arguments` that takes a list of command-line arguments as input and returns a dictionary containing the parsed arguments. The function s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_arguments(['--key', 'myKey']) == {'key': 'myKey', 'ecode_sensitive': False, 'print_all': False, 'version': None, 'list': False, 'compiler': None}\", \"assert parse_arguments(['--key', 'myKey', '--ecode_sensitive']) == {'key': 'myKey', 'ecode_sensitive'...
{ "split": "train", "index": 69855, "acecode_id": "oss_30782", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given two 2D lists (matrices) of integers representing sequences of queries and keys. Each list contains B rows (batch size), where each row consists of T_q and T_k integers for queries and keys respectively. Your task is to implement a function that generates a boolean...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_padding_mask([[1]], [[1]], 0) == [[[False]]]\", \"assert generate_padding_mask([[0]], [[0]], 0) == [[[True]]]\", \"assert generate_padding_mask([[1]], [[0]], 1) == [[[False]]]\", \"assert generate_padding_mask([[0]], [[1]], 0) == [[[False]]]\", \"as...
{ "split": "train", "index": 69856, "acecode_id": "bigcode_python_fns_31721", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a list of integers `n`. Write a Python function that returns the last element of the list. The list will always contain at least one element. Your function should be able to handle lists of varying lengths.\n\nFunction signature: `def get_last_element(n: List[int]...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_last_element([5, 8, 3, 9, 2]) == 2\", \"assert get_last_element([10, 20, 30, 40, 50]) == 50\", \"assert get_last_element([1]) == 1\", \"assert get_last_element([-1, -2, -3]) == -3\", \"assert get_last_element([100, 200, 300, 400]) == 400\", \"assert get_...
{ "split": "train", "index": 69857, "acecode_id": "oss_24719", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a JSON string representation of an object, write a function that converts this JSON string into an instance of the MyClass class. The MyClass constructor takes three parameters: first_name (string), last_name (string), and is_active (boolean). The function should parse th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert json_to_obj('{\\\"first_name\\\":\\\"John\\\", \\\"last_name\\\":\\\"Doe\\\", \\\"is_active\\\":true}') == MyClass('John', 'Doe', True)\", \"assert json_to_obj('{\\\"first_name\\\":\\\"Alice\\\", \\\"last_name\\\":\\\"Smith\\\", \\\"is_active\\\":false}') ==...
{ "split": "train", "index": 69858, "acecode_id": "bigcode_python_fns_8703", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that takes a list of software package strings in the format 'package_name==version_number' and processes this list to extract specific information. Your function should perform the following tasks:\n1. Extract the names of all the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_packages(['numpy==1.21.0', 'pandas==1.3.1', 'matplotlib==3.4.3']) == ['numpy: 1.21.0', 'pandas: 1.3.1', 'matplotlib: 3.4.3']\", \"assert extract_packages(['requests==2.26.0', 'flask==2.0.1', 'invalidentry']) == ['requests: 2.26.0', 'flask: 2.0.1']\",...
{ "split": "train", "index": 69859, "acecode_id": "oss_32965", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function that checks if a given string consists solely of letters and ends with the consecutive letters 'oo'. The string should not contain any numeric characters or punctuation marks. Return True if the string meets these criteria, otherwise return False.\nPlease r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert match_string('falloo') == True\", \"assert match_string('hello') == False\", \"assert match_string('hellooo') == True\", \"assert match_string('loo') == True\", \"assert match_string('f4lloo') == False\", \"assert match_string('hellooo!') == False\", \"asser...
{ "split": "train", "index": 69860, "acecode_id": "evol_19941", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `group_tasks_by_type(tasks: List[Tuple[str, str]]) -> Dict[str, List[str]]` that takes a list of tuples where each tuple contains a task name and its associated type. The function should group the tasks by their type and return a dict...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert group_tasks_by_type([('task1', 'typeA'), ('task2', 'typeB'), ('task3', 'typeA')]) == {'typeA': ['task1', 'task3'], 'typeB': ['task2']}\", \"assert group_tasks_by_type([('task1', 'typeC'), ('task2', 'typeC'), ('task3', 'typeD')]) == {'typeC': ['task1', 'task2...
{ "split": "train", "index": 69861, "acecode_id": "bigcode_python_fns_7731", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function `calculate_geometric_mean(values: List[float]) -> float` that calculates the geometric mean of a list of positive numerical values. The function should handle the following cases: if the list is empty, it should return None; if the list contains any non-...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_geometric_mean([2, 8]) == 4.0\", \"assert calculate_geometric_mean([1, 1, 1, 1]) == 1.0\", \"assert calculate_geometric_mean([]) == None\", \"assert calculate_geometric_mean([-1, 2, 3]) == None\", \"assert calculate_geometric_mean([0, 1, 2]) == Non...
{ "split": "train", "index": 69862, "acecode_id": "evol_16159", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Implement a function that performs a safe division of two numbers. The function should take two parameters, a and b. If b is equal to zero, the function should return 0. Otherwise, it should return the result of a divided by b. The function signature should be `def safe_div(a: ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert safe_div(10, 2) == 5.0\", \"assert safe_div(10, -2) == -5.0\", \"assert safe_div(-10, 2) == -5.0\", \"assert safe_div(-10, -2) == 5.0\", \"assert safe_div(0, 1) == 0.0\", \"assert safe_div(0, -1) == 0.0\", \"assert safe_div(1, 0) == 0\", \"assert safe_div(-1...
{ "split": "train", "index": 69863, "acecode_id": "bigcode_python_fns_5185", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a 3-dimensional vector or three separate components representing a translation in space, create a homogeneous transformation matrix. If a single vector is provided, the function should return a homogeneous transformation matrix with a unit rotation submatrix and the trans...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transformation([1, 2, 3]) == [[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0, 1]]\", \"assert transformation(1, 2, 3) == [[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 3], [0, 0, 0, 1]]\", \"assert transformation([0, 0, 0]) == [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0,...
{ "split": "train", "index": 69864, "acecode_id": "bigcode_python_fns_44047", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates pushing a point to a graph. The function should take in two parameters: a graph ID (as a string) and a dictionary representing a point with at least a 'value' key (an integer) and an optional 'date' key (a string in the for...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert push_point_to_graph('graph_1', {'value': 10}) == {'point': {'value': 10}}\", \"assert push_point_to_graph('graph_2', {'value': 20, 'date': '2023-10-01'}) == {'point': {'value': 20, 'date': '2023-10-01'}}\", \"assert push_point_to_graph('graph_3', {'value': 1...
{ "split": "train", "index": 69865, "acecode_id": "bigcode_python_fns_48491", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that takes in two lists of integers and swaps the elements at each corresponding index from both lists. The function should return the modified lists after the swap. The input lists are guaranteed to be of the same length.\nPlease reason step by step, then writ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert swap_elements([1, 2, 3], [4, 5, 6]) == ([4, 5, 6], [1, 2, 3])\", \"assert swap_elements([10, 20, 30], [40, 50, 60]) == ([40, 50, 60], [10, 20, 30])\", \"assert swap_elements([7, 8, 9], [1, 2, 3]) == ([1, 2, 3], [7, 8, 9])\", \"assert swap_elements([0], [1]) ...
{ "split": "train", "index": 69866, "acecode_id": "evol_16745", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_exclusive_alphabet(string: str) -> bool` that determines if a given string exclusively consists of alphabetic characters from 'a' to 'z' and 'A' to 'Z'. The function should return True if the string contains only alphabetic characters and False otherwis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_exclusive_alphabet('hello') == True\", \"assert is_exclusive_alphabet('Hello') == True\", \"assert is_exclusive_alphabet('HELLO') == True\", \"assert is_exclusive_alphabet('') == True\", \"assert is_exclusive_alphabet('hello123') == False\", \"assert is_e...
{ "split": "train", "index": 69867, "acecode_id": "evol_607", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `evaluate_expression(x)` that takes a variable `x` which can either be a list of numbers or a 2D list (matrix) of numbers. The function should return the same list or matrix, but with each number converted to a float. If `x` is a 1D list with a single eleme...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_expression(5) == 5.0\", \"assert evaluate_expression(3.14) == 3.14\", \"assert evaluate_expression([1]) == 1.0\", \"assert evaluate_expression([1.5]) == 1.5\", \"assert evaluate_expression([[1, 2], [3, 4]]) == [[1.0, 2.0], [3.0, 4.0]]\", \"assert ev...
{ "split": "train", "index": 69868, "acecode_id": "bigcode_python_fns_38189", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers and a desired length, write a function that generates a sequence of random integers from the list of specified length. The function should return a string representation of the sequence. For example, if the input list is [1, 2, 3] and the length is 3, a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_sequence([1, 2, 3], 3) in ['123', '132', '213', '231', '312', '321']\", \"assert generate_sequence([4, 5, 6], 2) in ['45', '46', '54', '56', '64', '65']\", \"assert generate_sequence([0, 1], 1) in ['0', '1']\", \"assert generate_sequence([-1, -2, -3...
{ "split": "train", "index": 69869, "acecode_id": "bigcode_python_fns_29387", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of dependencies and generates a dependency graph. The dependency graph should represent the relationships between different dependencies, where each dependency is a node and the edges represent the dependencie...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_dependency_graph([('numpy', 'scipy'), ('matplotlib', 'numpy'), ('pandas', 'numpy')]) == {'numpy': ['scipy'], 'scipy': [], 'matplotlib': ['numpy'], 'pandas': ['numpy']}\", \"assert generate_dependency_graph([('a', 'b'), ('b', 'c'), ('c', 'd'), ('d', ...
{ "split": "train", "index": 69870, "acecode_id": "oss_11179", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string, write a function that checks whether the string is a palindrome or not. A palindrome is defined as a sequence of characters that reads the same backward as forward, ignoring spaces and capitalization. Your function should return True if the string is a palindrom...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_palindrome('racecar') == True\", \"assert is_palindrome('hello') == False\", \"assert is_palindrome('A man a plan a canal Panama') == True\", \"assert is_palindrome('Was it a car or a cat I saw') == True\", \"assert is_palindrome('No lemon, no melon') == ...
{ "split": "train", "index": 69871, "acecode_id": "oss_14077", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function to manage chapters in a digital magazine application. The function should take a list of chapter titles and contents, then return a formatted string that represents the content of the magazine. Each chapter should be displayed with its ti...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_magazine([]) == ''\", \"assert format_magazine([('Introduction', 'Welcome to our magazine!')]) == 'Introduction\\\\nWelcome to our magazine!'\", \"assert format_magazine([('Chapter 1', 'Content of chapter 1'), ('Chapter 2', 'Content of chapter 2')]) =...
{ "split": "train", "index": 69872, "acecode_id": "oss_30854", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that converts a given list of data types to their corresponding SQL data types. The function should take the list as input and return a new list with the data types converted to their SQL equivalents. If a data type is not foun...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_to_sql_types(['int', 'float', 'string', 'timestamp']) == ['integer', 'real', 'varchar', 'timestamp']\", \"assert convert_to_sql_types(['int', 'boolean', 'string']) == ['integer', 'boolean', 'varchar']\", \"assert convert_to_sql_types(['float', 'strin...
{ "split": "train", "index": 69873, "acecode_id": "oss_21413", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_valid_string(s: str) -> bool` that determines if a given string `s` consists exclusively of uppercase English letters (A-Z) and numerical digits (0-9). The function should return True if the string meets this condition, and False otherwise.\nPlease reas...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_valid_string('AB12') == True\", \"assert is_valid_string('45XY') == True\", \"assert is_valid_string('X4Y2') == True\", \"assert is_valid_string('A1B2C3') == True\", \"assert is_valid_string('12345') == True\", \"assert is_valid_string('ABCDE') == True\",...
{ "split": "train", "index": 69874, "acecode_id": "evol_27985", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of flight dates in the format 'YYYY-MM-DD'. Your task is to implement a function that returns a new list containing only the flight dates that are after January 1, 2018. The input list may contain duplicate dates, and the output list should include each val...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_flight_dates(['2018-01-01', '2018-01-02', '2017-12-31', '2018-01-03']) == ['2018-01-02', '2018-01-03']\", \"assert filter_flight_dates(['2019-05-04', '2018-02-15', '2017-12-25', '2018-01-01', '2018-01-02', '2019-05-04']) == ['2018-01-02', '2018-02-15'...
{ "split": "train", "index": 69875, "acecode_id": "bigcode_python_fns_49209", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Implement a function `is_palindrome(num: int) -> bool` that checks if a given integer is a palindrome. A palindrome is a number that remains the same when its digits are reversed. For example, 121 and 12321 are palindromes, while 123 and 10 are not. The function should return T...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_palindrome(121) == True\", \"assert is_palindrome(12321) == True\", \"assert is_palindrome(123) == False\", \"assert is_palindrome(10) == False\", \"assert is_palindrome(0) == True\", \"assert is_palindrome(-121) == False\", \"assert is_palindrome(111) ==...
{ "split": "train", "index": 69876, "acecode_id": "evol_22364", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a non-negative integer n, implement a function `intricate_computation(n)` that returns the sum of all integers from 0 to n (inclusive). The function should be optimized for large inputs, where n can be as large as 10^7. You should aim for an O(1) time complexity solution....
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert intricate_computation(0) == 0\", \"assert intricate_computation(1) == 1\", \"assert intricate_computation(2) == 3\", \"assert intricate_computation(3) == 6\", \"assert intricate_computation(4) == 10\", \"assert intricate_computation(5) == 15\", \"assert intr...
{ "split": "train", "index": 69877, "acecode_id": "evol_308", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a notification message for a security system startup. The function should take a single input parameter, `url`, which is a string representing the URL of the security system. The function should return a formatted string th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert email_startup('http://example.com') == 'INFO - Security system is up and running: Nothing to worry about. This message is sent after the security system starts up. Take a peak: http://example.com'\", \"assert email_startup('https://testsite.org') == 'INFO - ...
{ "split": "train", "index": 69878, "acecode_id": "bigcode_python_fns_40859", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a university professor's details including their name, affiliated university, academic title, number of published research papers, average student rating, and average citations per paper, implement a function that calculates the professor's impact factor. The impact facto...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calc_impact_factor(10, 5) == 50\", \"assert calc_impact_factor(0, 10) == 'Cannot calculate impact factor: number of papers or average citations is not valid.'\", \"assert calc_impact_factor(5, 0) == 'Cannot calculate impact factor: number of papers or averag...
{ "split": "train", "index": 69879, "acecode_id": "evol_31242", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary where the keys are strings and the values can be of any type. Your task is to create a function that generates a new dictionary from the input dictionary, including only the keys that do not start with an underscore ('_'). Additionally, for each value...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_saveable_dict({'_private': 1, 'public': 'value', 'another_key': 3.14}) == {'public': 'value', 'another_key': 3.14}\", \"assert generate_saveable_dict({'_hidden': 'secret', 'name': 'Alice', 'age': 30}) == {'name': 'Alice', 'age': 30}\", \"assert gene...
{ "split": "train", "index": 69880, "acecode_id": "bigcode_python_fns_25749", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a clustering evaluation metric using Python. You need to compare two sets of documents: a set of gold standard documents (`gold_documents`) and a set of automatically generated documents (`auto_documents`). Your goal is to calculate the Jaccard ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_clusters(['doc1', 'doc2', 'doc3'], ['doc1', 'doc2']) == 0.6666666666666666\", \"assert evaluate_clusters(['a', 'b', 'c'], ['b', 'c', 'd']) == 0.5\", \"assert evaluate_clusters(['x', 'y', 'z'], ['a', 'b', 'c']) == 0.0\", \"assert evaluate_clusters(['...
{ "split": "train", "index": 69881, "acecode_id": "oss_30627", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two normal vectors represented by their x and y components, write a function `normal_to_angle(x: float, y: float) -> float` that calculates the angle (in degrees) between the x-axis and the vector formed by the given components. The angle should be measured counterclockwi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert normal_to_angle(1, 0) == 0.0\", \"assert normal_to_angle(0, 1) == 90.0\", \"assert normal_to_angle(-1, 0) == 180.0\", \"assert normal_to_angle(0, -1) == -90.0\", \"assert normal_to_angle(1, 1) == 45.0\", \"assert normal_to_angle(-1, 1) == 135.0\", \"assert n...
{ "split": "train", "index": 69882, "acecode_id": "bigcode_python_fns_5160", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `insertion_point(arr: List[Union[int, float, str]], val: Union[int, float, str]) -> int` that returns the leftmost index at which a given value can be inserted into a sorted array `arr` while maintaining the sorted order. The function should work for arrays...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert insertion_point([1, 2, 3, 4, 5], 3) == 2\", \"assert insertion_point([1, 2, 3, 4, 5], 0) == 0\", \"assert insertion_point([1, 2, 3, 4, 5], 6) == 5\", \"assert insertion_point([1, 1, 1, 1, 1], 1) == 0\", \"assert insertion_point([1, 1, 1, 1, 1], 2) == 5\", \"...
{ "split": "train", "index": 69883, "acecode_id": "evol_5849", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given three lists representing different sections of a color matrix: `left`, `right`, and `blank`. Each list contains instances of the `Color` class, which can represent various colors. Your task is to write a function that takes these three lists as input and returns a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_colors([Color.WHITE], [Color.RED], [Color.WHITE]) == {'WHITE': 2, 'RED': 1}\", \"assert count_colors([], [], []) == {}\", \"assert count_colors([Color.RED], [Color.RED], [Color.RED]) == {'RED': 3}\", \"assert count_colors([Color.WHITE, Color.WHITE], [C...
{ "split": "train", "index": 69884, "acecode_id": "oss_4254", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks the status of a company's registration based on its ID. Write a function `check_company_status(company_id)` that takes an integer `company_id` as input and returns a message based on the status of the company. The function...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_company_status(1) == 'Company registration verified'\", \"assert check_company_status(2) == 'Company registration pending verification'\", \"assert check_company_status(5) == 'Company not found'\", \"assert check_company_status(8) == 'Company not found...
{ "split": "train", "index": 69885, "acecode_id": "oss_11463", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are given two lists of integers, `list1` and `list2`. Your task is to implement a function `analyze_lists(list1, list2)` that returns a tuple containing two elements: the first element is the set difference between `list1` and `list2` (i.e., the elements that are present in...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert analyze_lists([1, 2, 3], [2, 3, 4]) == ([1], 0.6666666666666666)\", \"assert analyze_lists([], [1, 2, 3]) == ([], 0.0)\", \"assert analyze_lists([1, 2, 3], []) == ([1, 2, 3], 0.0)\", \"assert analyze_lists([1, 2, 3], [1, 2, 3]) == ([], 1.0)\", \"assert analy...
{ "split": "train", "index": 69886, "acecode_id": "oss_5703", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are given two lists of strings, `src` and `trg`, where each list contains a sequence of words. Your task is to create a function that takes these two lists as input and returns a new list containing pairs of corresponding words from both lists, formatted as strings in the f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_word_pairs(['hello', 'world'], ['hola', 'mundo']) == ['hello hola', 'world mundo']\", \"assert create_word_pairs(['apple', 'banana', 'cherry'], ['manzana', 'pl\\u00e1tano']) == ['apple manzana', 'banana pl\\u00e1tano']\", \"assert create_word_pairs(['...
{ "split": "train", "index": 69887, "acecode_id": "bigcode_python_fns_48625", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string `training_data` consisting of lowercase letters. Your task is to write a function `count_substrings` that takes in the `training_data` string and returns the count of non-overlapping occurrences of the substring 'train' within the given string. For exampl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_substrings('train_train') == 2\", \"assert count_substrings('train') == 1\", \"assert count_substrings('trainxyztrain') == 2\", \"assert count_substrings('xyzxyz') == 0\", \"assert count_substrings('traintraintrain') == 3\", \"assert count_substrings('...
{ "split": "train", "index": 69888, "acecode_id": "oss_24280", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function named `select_parser` that acts as a parser selector for bibliographic references. The function should take a string input called `parser_name`, which can either be 'APS' or 'NATURE'. Based on the value of `parser_name`, the functi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert select_parser('APS')() == 'References parsed in APS format'\", \"assert select_parser('NATURE')() == 'References parsed in Nature format'\", \"assert select_parser('INVALID') == None\", \"assert select_parser('APS')() == 'References parsed in APS format'\", ...
{ "split": "train", "index": 69889, "acecode_id": "oss_17699", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_blank_or_none(value: str) -> bool` that checks whether a given string is either empty, consists solely of whitespace characters, or is None. The function should return True if any of these conditions are met, and False otherwise. Your implementation sho...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_blank_or_none(None) == True\", \"assert is_blank_or_none('') == True\", \"assert is_blank_or_none(' ') == True\", \"assert is_blank_or_none('a') == False\", \"assert is_blank_or_none(' a ') == False\", \"assert is_blank_or_none('abc') == False\", \"as...
{ "split": "train", "index": 69890, "acecode_id": "bigcode_python_fns_33061", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a dictionary with uppercase keys and converts it into a new dictionary where all keys are converted to lowercase. The input dictionary may contain any number of key-value pairs. Your function should return the new dictionary wi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_keys_to_lowercase({'SERVER_NAME': 'example.com', 'PORT': 8080, 'DEBUG': True}) == {'server_name': 'example.com', 'port': 8080, 'debug': True}\", \"assert convert_keys_to_lowercase({'HELLO': 'world', 'GOODBYE': 'moon'}) == {'hello': 'world', 'goodbye'...
{ "split": "train", "index": 69891, "acecode_id": "oss_9509", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that checks if any string in a given list starts with the character 't'. The function should return True if at least one string starts with 't' (case insensitive), otherwise return False. The input will be a list of strings.\nPlease reason step by step, then wr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert starts_with_t(['dog', 'turtle', 'car', 'cat']) == True\", \"assert starts_with_t(['apple', 'banana', 'cherry']) == False\", \"assert starts_with_t(['tiger', 'lion', 'bear']) == True\", \"assert starts_with_t(['Taco', 'pizza', 'sushi']) == True\", \"assert st...
{ "split": "train", "index": 69892, "acecode_id": "evol_31549", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that initializes a `Run` object with a specific identifier and a context. The function should take two parameters: `context`, which is an object containing a `tree` attribute, and `id_`, which is a string representing the identifier. Your...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert initialize_run({'obj': {'tree': 'sample_tree'}}, 'test_id_1') == Run('test_id_1', 'sample_tree')\", \"assert initialize_run({'obj': {'tree': 'another_tree'}}, 'test_id_2') == Run('test_id_2', 'another_tree')\", \"assert initialize_run({'obj': {'tree': 'tree_...
{ "split": "train", "index": 69893, "acecode_id": "bigcode_python_fns_35985", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two arrays of equal length representing the x-coordinates and y-coordinates of a set of vertices in meters, write a function that converts these two arrays into a list of tuples. Each tuple should represent a vertex as (x, y). The function should take two parameters: an a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert vertex_arrays_to_list([1, 2, 3], [4, 5, 6]) == [(1, 4), (2, 5), (3, 6)]\", \"assert vertex_arrays_to_list([-1, -2, -3], [4, 5, 6]) == [(-1, 4), (-2, 5), (-3, 6)]\", \"assert vertex_arrays_to_list([0], [0]) == [(0, 0)]\", \"assert vertex_arrays_to_list([5, 10...
{ "split": "train", "index": 69894, "acecode_id": "bigcode_python_fns_9856", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates collecting user command-line arguments and options. The function should accept the following parameters: an optional string argument `arg1`, an optional string argument `arg2`, a string option `str_opt`, an integer opti...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert collect_args() == {}\", \"assert collect_args(arg1='test', arg2='example') == {'arg1': 'test', 'arg2': 'example'}\", \"assert collect_args(str_opt='hello') == {'str_opt': 'hello'}\", \"assert collect_args(int_opt=42) == {'int_opt': 42}\", \"assert collect_ar...
{ "split": "train", "index": 69895, "acecode_id": "bigcode_python_fns_15687", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the operations of a simple bank account. The function should accept a list of operations and an initial balance, and return the final balance after performing all the operations. The operations can be either a deposit (...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert final_balance([], 100) == 100\", \"assert final_balance([50, -30, -20], 100) == 100\", \"assert final_balance([20, 30, -10], 0) == 40\", \"assert final_balance([-10, 10, -5], 10) == 5\", \"assert final_balance([100, 200, -150], 0) == 150\", \"assert final_ba...
{ "split": "train", "index": 69896, "acecode_id": "oss_26589", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that verifies if a given command string is a valid list rulesets command. The valid commands are 'lr' and 'listrulesets'. Your function should take a single string input and return True if the command is valid, otherwise return False....
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_valid_ruleset_command('lr') == True\", \"assert is_valid_ruleset_command('listrulesets') == True\", \"assert is_valid_ruleset_command('list') == False\", \"assert is_valid_ruleset_command('rulesets') == False\", \"assert is_valid_ruleset_command('') == Fa...
{ "split": "train", "index": 69897, "acecode_id": "bigcode_python_fns_29904", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Complete the function named 'encrypt'. This function takes a string as input and outputs an encrypted string generated based on the offset alphabet. The function should employ a customized schema to offset the alphabet: all uppercase characters are to be shifted 5 places down, ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert encrypt('1234!@#$') == '1234!@#$'\", \"assert encrypt('abcXYZ') == 'ijkCDE'\", \"assert encrypt('!@*&^%') == '!@*&^%'\", \"assert encrypt('') == ''\", \"assert encrypt('A B C') == 'F G H'\", \"assert encrypt('a b c') == 'i j k'\"]}" }
{ "split": "train", "index": 69898, "acecode_id": "evol_34502", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates updating the content of a file based on a given service name and new content. The function should check if the service name does not contain a forward slash ('/'). If the service name is valid, the function will return ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_file('example_service', 'New content for the file') == True\", \"assert update_file('test_service', 'Another content') == True\", \"assert update_file('valid_service_name', 'This is valid') == True\", \"assert update_file('another_valid_service', 'Upd...
{ "split": "train", "index": 69899, "acecode_id": "oss_16922", "num_tests": 16 }