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 simulates a simplified form submission processing system. The function should accept two parameters: a username (string) and a password (string). If the username or password is empty, the function should return 'Invalid input'. If bo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert handle_form_submission('user1', 'pass1') == 'Hello, user1! Your password is pass1.'\", \"assert handle_form_submission('user2', 'pass2') == 'Hello, user2! Your password is pass2.'\", \"assert handle_form_submission('', 'pass3') == 'Invalid input'\", \"assert...
{ "split": "train", "index": 76500, "acecode_id": "oss_32722", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a user login process. The function, `login_user`, should take a single parameter, `username`, which is a string representing the username of the user trying to log in. The function should check if the provided username is i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert login_user('alice') == 'Login successful'\", \"assert login_user('bob') == 'Login successful'\", \"assert login_user('charlie') == 'Login successful'\", \"assert login_user('dave') == 'Login successful'\", \"assert login_user('eve') == 'Login failed'\", \"as...
{ "split": "train", "index": 76501, "acecode_id": "bigcode_python_fns_25568", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with evaluating combinations of chemical reactants based on their performance scores. Each combination consists of a list of tuples, where each tuple contains a reactant ID (a string) and its corresponding performance score (a float). Your goal is to implement a ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_combination([('A', 10.0), ('B', 20.0)], 'average') == (['A', 'B'], 15.0)\", \"assert evaluate_combination([('C', 5.0), ('D', 15.0)], 'average') == (['C', 'D'], 10.0)\", \"assert evaluate_combination([('E', 30.0), ('F', 40.0)], 'average') == (['E', '...
{ "split": "train", "index": 76502, "acecode_id": "bigcode_python_fns_40684", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `sum_2d_array(arr)` that takes a 2-dimensional list of integers and returns the total sum of all the integers in the list. You should utilize nested loops to iterate through each sub-list efficiently. For example, given the input `arr = [[1, 2], [3, 4], [5, 6]]...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_2d_array([[1, 2], [3, 4], [5, 6]]) == 21\", \"assert sum_2d_array([[0]]) == 0\", \"assert sum_2d_array([[1, -1], [2, -2]]) == 0\", \"assert sum_2d_array([[10, 20], [30, 40]]) == 100\", \"assert sum_2d_array([[5], [5], [5]]) == 15\", \"assert sum_2d_array...
{ "split": "train", "index": 76503, "acecode_id": "evol_24502", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the configuration of a command-line tool by accepting specific settings as parameters. Your function should accept the following parameters:\n\n1. `base_dir` (string): Represents the base directory. Default value is `'base'...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert configure_tool() == {'base_dir': 'base', 'output_dir': 'test_output', 'dim': 32, 'subset': '', 'seed': 42}\", \"assert configure_tool('custom_base') == {'base_dir': 'custom_base', 'output_dir': 'test_output', 'dim': 32, 'subset': '', 'seed': 42}\", \"assert ...
{ "split": "train", "index": 76504, "acecode_id": "oss_7913", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a migration file for a new model in a Django web application. The model represents a simple product with three attributes: a name, a price, and a description. Your goal is to implement a function that generates the migration operations necessary to ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_migration() == [{'operation': 'CreateModel', 'name': 'Product', 'fields': [{'name': 'id', 'type': 'AutoField', 'primary_key': True}, {'name': 'name', 'type': 'CharField', 'max_length': 100}, {'name': 'price', 'type': 'DecimalField', 'max_digits': 10...
{ "split": "train", "index": 76505, "acecode_id": "oss_3288", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function that finds the maximum product of any two distinct integers in the list. The function should return this maximum product. If the list contains fewer than two integers, return 0. \n\nFunction Signature: `def max_product(nums: List[int])...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_product([1, 2, 3, 4]) == 12\", \"assert max_product([-1, 2, 3, 4]) == 12\", \"assert max_product([0, 0, 0, 0]) == 0\", \"assert max_product([1]) == 0\", \"assert max_product([]) == 0\", \"assert max_product([-1, 1]) == -1\", \"assert max_product([5, 5]) ...
{ "split": "train", "index": 76506, "acecode_id": "bigcode_python_fns_24146", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given two strings, `patient_id` and `study_id`, representing identifiers for a patient and a study respectively. Your task is to implement a function that simulates the retrieval of a public key based on these identifiers. The retrieval process involves concatenating th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_public_key('patient123', 'study456') == 'public_key_study456_patient123'\", \"assert get_public_key('user1', 'test_study') == 'public_key_test_study_user1'\", \"assert get_public_key('abc', 'xyz') == 'public_key_xyz_abc'\", \"assert get_public_key('demo'...
{ "split": "train", "index": 76507, "acecode_id": "bigcode_python_fns_24578", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with transforming a string of Korean characters based on a specified transformation dictionary that maps certain Korean consonants to their corresponding transformed values. Specifically, the consonant 'ㅈ' should be transformed to 'ㄵ', and the consonant 'ㅎ' shoul...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_consonants('\\u3148\\u314e\\u3148\\u314e') == '\\u3135\\u3136\\u3135\\u3136'\", \"assert transform_consonants('\\uc548\\ub155\\ud558\\uc138\\uc694') == '\\uc548\\ub155\\ud558\\uc138\\uc694'\", \"assert transform_consonants('\\u314e\\u3148\\u314e') ...
{ "split": "train", "index": 76508, "acecode_id": "oss_24256", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You need to create a function that generates a string representing the contents of a temporary file. The function should accept two parameters: 'contents', which is a string representing the content to be written to the temporary file, and 'suffix', which is an optional string ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_temp_file('Hello, World!', '.txt') == 'Hello, World! (temporary file: tempfile.txt)'\", \"assert create_temp_file('Data', '') == 'Data (temporary file: tempfile)'\", \"assert create_temp_file('Sample content', '.json') == 'Sample content (temporary fi...
{ "split": "train", "index": 76509, "acecode_id": "bigcode_python_fns_25892", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a 2D list of strings representing seats in a classroom. Each seat can either be empty (represented by '.') or occupied (represented by 'X'). Your task is to implement a function `max_students(seats)` that returns the maximum number of students that can be seated i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_students([['.', '.', '.', '.'], ['.', 'X', '.', 'X'], ['.', '.', '.', '.']]) == 4\", \"assert max_students([['.', '.', 'X'], ['X', 'X', 'X'], ['.', '.', 'X']]) == 2\", \"assert max_students([['X', 'X', 'X'], ['X', 'X', 'X'], ['X', 'X', 'X']]) == 0\", \"a...
{ "split": "train", "index": 76510, "acecode_id": "evol_14256", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with managing a simple friend request system for a social media platform. Write a function `manage_friend_requests(operations: List[Tuple[str, str]]) -> Dict[str, List[str]]` that processes a list of friend request operations and returns a dictionary with each us...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_friend_requests([('send', 'Alice', 'Bob'), ('send', 'Bob', 'Alice'), ('accept', 'Alice', 'Bob'), ('send', 'Alice', 'Charlie'), ('accept', 'Charlie', 'Alice'), ('reject', 'Charlie', 'Bob')]) == {'Alice': ['Bob', 'Charlie'], 'Bob': ['Alice'], 'Charlie':...
{ "split": "train", "index": 76511, "acecode_id": "oss_22229", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are given two lists of strings, `reference` and `current`. Each string represents a distinguished name (DN) of an entry in a database. Your task is to identify which entries from the `reference` list are missing in the `current` list and return them as a list. Additionally,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_entries(['entryA', 'entryB'], ['entryB', 'entryC']) == (['entryA'], ['entryB'])\", \"assert update_entries(['module1', 'module2'], ['module1']) == (['module2'], ['module1'])\", \"assert update_entries([], ['entry1', 'entry2']) == ([], [])\", \"assert ...
{ "split": "train", "index": 76512, "acecode_id": "bigcode_python_fns_19417", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Write a Python function that reduces a list to a maximum of 5 distinct elements by consistently dismissing the least frequently occurring elements. If two elements have the same frequency, the one that was added most recently should be dismissed first. The list can contain inte...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reduce_to_five([1, 1, 1, 2, 2, 3, 3, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert reduce_to_five(['a', 'b', 'a', 'c', 'b', 'a', 'd', 'e']) == ['a', 'b', 'c', 'd', 'e']\", \"assert reduce_to_five([1, 1, 2, 2, 3]) == [1, 2, 3]\", \"assert reduce_to_five([]) == []\", ...
{ "split": "train", "index": 76513, "acecode_id": "evol_31539", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `send_output(destination: str, data: Any) -> str` that handles sending data to different types of output destinations based on the given destination string. The function takes two parameters: `destination`, which is a string represent...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert send_output('hdfs', 'sample_data') == 'Data sent to HDFS'\", \"assert send_output('s3', 'sample_data') == 'Data sent to S3'\", \"assert send_output('local', 'sample_data') == 'Data saved locally'\", \"assert send_output('ftp', 'sample_data') == 'Error: Desti...
{ "split": "train", "index": 76514, "acecode_id": "oss_20432", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that compares two objects and returns `True` if the first object is less than the second object, and `False` otherwise. The comparison should be based on the natural ordering of the objects. For example, if the objects are integers, t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_less_than(5, 10) == True\", \"assert is_less_than(10, 5) == False\", \"assert is_less_than(3.14, 2.71) == False\", \"assert is_less_than(2.71, 3.14) == True\", \"assert is_less_than('apple', 'banana') == True\", \"assert is_less_than('banana', 'apple') ==...
{ "split": "train", "index": 76515, "acecode_id": "oss_10618", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a directed graph represented as a list of edges where each edge is a tuple consisting of a source node, a label, and a target node. Your task is to create a function `graph_to_text(edges: List[Tuple[int, str, int]], quoting: bool = True) -> str` that generates a t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert graph_to_text([(0, 'a', 1), (1, 'a', 0)], quoting=True) == \\\"'0' 'a' '1'\\\\n'1' 'a' '0'\\\\n\\\"\", \"assert graph_to_text([(0, 'a', 1), (1, 'a', 0)], quoting=False) == '0 a 1\\\\n1 a 0\\\\n'\", \"assert graph_to_text([], quoting=True) == ''\", \"assert g...
{ "split": "train", "index": 76516, "acecode_id": "bigcode_python_fns_18797", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that retrieves the most recent blog post titles from a list of blog posts. Each blog post is represented as a dictionary containing a title and a timestamp. Your function should take in a list of blog posts and an integer num, and return ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_recent_blog_titles([{'title': 'Post 1', 'timestamp': '2023-10-01T10:00:00'}, {'title': 'Post 2', 'timestamp': '2023-10-02T09:30:00'}, {'title': 'Post 3', 'timestamp': '2023-10-01T12:00:00'}], 2) == ['Post 2', 'Post 3']\", \"assert get_recent_blog_titles(...
{ "split": "train", "index": 76517, "acecode_id": "bigcode_python_fns_43423", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function `estimate_pi(n: int) -> float` that estimates the value of Pi using a Monte Carlo simulation method. The function should take an integer `n` as input, representing the number of random points to generate. The function should return an estimate of Pi based o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert estimate_pi(1) >= 0.0 and estimate_pi(1) <= 4.0\", \"assert estimate_pi(10) >= 0.0 and estimate_pi(10) <= 4.0\", \"assert estimate_pi(100) >= 0.0 and estimate_pi(100) <= 4.0\", \"assert estimate_pi(1000) >= 0.0 and estimate_pi(1000) <= 4.0\", \"assert estima...
{ "split": "train", "index": 76518, "acecode_id": "evol_29701", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function called `replace_zeros` that takes a list of integers as input and replaces all occurrences of the integer zero with the integer one. The function should return the modified list. For example, given the input [1, 0, 1, 0, 0], the output should be [1, 1, 1, 1, 1]...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert replace_zeros([1, 0, 1, 0, 0]) == [1, 1, 1, 1, 1]\", \"assert replace_zeros([0, 0, 0]) == [1, 1, 1]\", \"assert replace_zeros([1, 2, 3]) == [1, 2, 3]\", \"assert replace_zeros([0, 1, 0, 2, 0]) == [1, 1, 1, 2, 1]\", \"assert replace_zeros([]) == []\", \"asser...
{ "split": "train", "index": 76519, "acecode_id": "evol_22849", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that sorts a given list of integers into ascending order using the Shell sort algorithm. The function should take a list of integers as input and return a new list that is sorted in ascending order.\nPlease reason step by step, then write a self-contained P...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert shell_sort([4, 3, 2, 5, 9, 1, 8]) == [1, 2, 3, 4, 5, 8, 9]\", \"assert shell_sort([10, 7, 8, 9, 1, 5]) == [1, 5, 7, 8, 9, 10]\", \"assert shell_sort([3, 0, 2, 5, -1, 4, 1]) == [-1, 0, 1, 2, 3, 4, 5]\", \"assert shell_sort([1]) == [1]\", \"assert shell_sort([...
{ "split": "train", "index": 76520, "acecode_id": "evol_32863", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a string input representing the name of a view and returns a formatted string that describes the view configuration. The output string should include the name of the view, and a preset message indicating that the configuration ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_view_configuration('Dashboard') == 'View Configuration for Dashboard has been retrieved.'\", \"assert get_view_configuration('Settings') == 'View Configuration for Settings has been retrieved.'\", \"assert get_view_configuration('Profile') == 'View Confi...
{ "split": "train", "index": 76521, "acecode_id": "bigcode_python_fns_41866", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string representing a version number, implement a function `version_info(version: str) -> Tuple[int, int, int]` that parses the version number and returns it as a tuple of integers. The version number will be in the format 'major.minor.patch', where 'major', 'minor', an...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert version_info('1.0.0') == (1, 0, 0)\", \"assert version_info('2.5.10') == (2, 5, 10)\", \"assert version_info('0.0.1') == (0, 0, 1)\", \"assert version_info('10.4.3') == (10, 4, 3)\", \"assert version_info('01.02.003') == (1, 2, 3)\", \"assert version_info('0...
{ "split": "train", "index": 76522, "acecode_id": "bigcode_python_fns_13499", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes an integer as input and returns a string representing its textual characterization if the integer is within the range of 0 to 5 inclusive. If the integer is outside this range, return 'Invalid number'.\nPlease reason step by step, then write a se...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert number_to_text(0) == 'Zero'\", \"assert number_to_text(1) == 'One'\", \"assert number_to_text(2) == 'Two'\", \"assert number_to_text(3) == 'Three'\", \"assert number_to_text(4) == 'Four'\", \"assert number_to_text(5) == 'Five'\", \"assert number_to_text(-1) ...
{ "split": "train", "index": 76523, "acecode_id": "evol_27237", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that takes a list of strings and returns a new list containing only the elements that have a length of 4 or greater.\nPlease reason step by step, then write a self-contained Python solution. Give your final program in a single ```python code block." } ]
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_strings(['cat', 'dog', 'elephant', 'rat']) == ['elephant']\", \"assert filter_strings(['apple', 'is', 'a', 'fruit']) == ['apple', 'fruit']\", \"assert filter_strings(['one', 'two', 'three', 'four']) == ['three', 'four']\", \"assert filter_strings(['',...
{ "split": "train", "index": 76524, "acecode_id": "evol_9604", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Write a function `is_palindrome(var)` that checks if a given variable is a palindrome. A palindrome is a sequence that reads the same backward as forward. The function should handle both strings and numbers, and it should be case-insensitive. Additionally, any spaces in the inp...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_palindrome('A man a plan a canal Panama') == True\", \"assert is_palindrome(12321) == True\", \"assert is_palindrome('racecar') == True\", \"assert is_palindrome('hello') == False\", \"assert is_palindrome('Step on no pets') == True\", \"assert is_palindr...
{ "split": "train", "index": 76525, "acecode_id": "evol_16033", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given a variable `graph` which can either be a string representing the name of a graph file or a graph object itself. Your task is to implement a function `retrieve_graph(graph_name)` that retrieves the graph based on the input. If the input is a string and does not hav...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert retrieve_graph({'A': ['B', 'C'], 'B': ['A', 'D'], 'C': ['A'], 'D': ['B']}) == {'A': ['B', 'C'], 'B': ['A', 'D'], 'C': ['A'], 'D': ['B']}\", \"assert retrieve_graph('example_graph') == 'example_graph.p'\", \"assert retrieve_graph('test_graph') == 'test_graph....
{ "split": "train", "index": 76526, "acecode_id": "bigcode_python_fns_37469", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `viz_property(statement: str, properties: List[str]) -> str` that generates a formatted string for a Graphviz element. The function should take in a string `statement` that represents the base graphical element and a list of strings `prop...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert viz_property('node', []) == 'node;'\", \"assert viz_property('node', ['color=red']) == 'node[color=red];'\", \"assert viz_property('node', ['shape=circle']) == 'node[shape=circle];'\", \"assert viz_property('node', ['color=blue', 'shape=square']) == 'node[co...
{ "split": "train", "index": 76527, "acecode_id": "bigcode_python_fns_25631", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a dictionary, implement a function that returns a list of key-value pairs, where each pair is represented as a tuple. The function should handle both Python 2 and Python 3 compatibility, returning the items in the form of a list. The input will be a dictionary with string...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_items({'a': 1, 'b': 2, 'c': 3}) == [('a', 1), ('b', 2), ('c', 3)]\", \"assert get_items({'x': 10, 'y': 20}) == [('x', 10), ('y', 20)]\", \"assert get_items({'name': 42}) == [('name', 42)]\", \"assert get_items({}) == []\", \"assert get_items({'key1': 100...
{ "split": "train", "index": 76528, "acecode_id": "bigcode_python_fns_24870", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of coordinates representing the vertices of a polygon and a set of points. Your task is to determine whether each point lies inside the polygon or not. Implement a function `points_in_polygon(polygon: List[Tuple[float, float]], points: List[Tuple[float, flo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert points_in_polygon([(0, 0), (5, 0), (5, 5), (0, 5)], [(1, 1), (6, 1), (3, 3)]) == [True, False, True]\", \"assert points_in_polygon([(0, 0), (3, 0), (3, 3), (0, 3)], [(1, 1), (3, 3), (4, 4)]) == [True, True, False]\", \"assert points_in_polygon([(0, 0), (1, 0...
{ "split": "train", "index": 76529, "acecode_id": "bigcode_python_fns_33606", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with simulating a secure connection between a client and a server using TLS (Transport Layer Security). The connection utilizes a client certificate for authentication. Given the following parameters: a boolean indicating if the client certificate is trusted, a s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert test_tls_connection(True, 'localhost', 'CERT_REQUIRED') == 'Connection successful'\", \"assert test_tls_connection(False, 'localhost', 'CERT_REQUIRED') == 'bad handshake: unknown CA'\", \"assert test_tls_connection(True, 'localhost', 'CERT_OPTIONAL') == 'Con...
{ "split": "train", "index": 76530, "acecode_id": "bigcode_python_fns_26692", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two sorted arrays of distinct integers, merge them into a single sorted array. The first array contains only positive integers, while the second array contains only non-negative integers. Implement a function called `merge_sorted_arrays` that takes two arrays as input and...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_sorted_arrays([1, 3, 5], [2, 4, 6]) == [1, 2, 3, 4, 5, 6]\", \"assert merge_sorted_arrays([10, 15, 20], [5, 10, 30]) == [5, 10, 10, 15, 20, 30]\", \"assert merge_sorted_arrays([0, 2, 4], [1, 3, 5]) == [0, 1, 2, 3, 4, 5]\", \"assert merge_sorted_arrays(...
{ "split": "train", "index": 76531, "acecode_id": "evol_18337", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `analyze_text(text: str) -> Dict[str, int]` that accepts a block of text and evaluates each sentence within this text individually. The function should identify any sentences that contain uncommon punctuation marks (i.e., punctuation marks that are not alphanum...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert analyze_text('This is a test sentence. It has no uncommon marks!') == {'This is a test sentence.': 0, 'It has no uncommon marks!': 1}\", \"assert analyze_text('No punctuation here') == {'No punctuation here': 0}\", \"assert analyze_text('Let''s test: this is...
{ "split": "train", "index": 76532, "acecode_id": "evol_5788", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are given a list of tuples where each tuple contains a file name and its corresponding dimensions in the format (file_name, rows, columns). Your task is to implement a function that calculates the total number of rows and columns across all the files in the list. The functi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert total_rows_columns([('file1.txt', 1, 2), ('file2.txt', 1, 2)]) == (2, 4)\", \"assert total_rows_columns([('test1.txt', 0, 0), ('test2.txt', 0, 0)]) == (0, 0)\", \"assert total_rows_columns([('data1.csv', 3, 4), ('data2.csv', 0, 0)]) == (3, 4)\", \"assert tot...
{ "split": "train", "index": 76533, "acecode_id": "oss_34191", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_palindrome(s: str) -> bool` that checks if the given string `s` is a palindrome, considering only alphanumeric characters and ignoring case. An empty string is considered a palindrome.\nPlease reason step by step, then write a self-contained Python solu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_palindrome('A man, a plan, a canal: Panama') == True\", \"assert is_palindrome('racecar') == True\", \"assert is_palindrome('') == True\", \"assert is_palindrome('12321') == True\", \"assert is_palindrome('Was it a car or a cat I saw?') == True\", \"asser...
{ "split": "train", "index": 76534, "acecode_id": "evol_23883", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Create a function that finds the most frequent odd number from an array of integers and returns a string in the format 'X appears Y times', where X is the most frequent odd number and Y is its count. If there are multiple odd numbers with the same frequency, return the one whic...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert frequent_odd([]) == 'There is no odd number in the array.'\", \"assert frequent_odd([2, 4, 6, 8]) == 'There is no odd number in the array.'\", \"assert frequent_odd([1, 1, 1, 1]) == '1 appears 4 times'\", \"assert frequent_odd([3, 3, 3, 5]) == '3 appears 3 t...
{ "split": "train", "index": 76535, "acecode_id": "evol_6315", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary where the keys are integers representing genomic positions and the values are strings representing gene names. You are also provided with a list of genomic positions and a range defined by a start and an end position. Write a function `find_genes_over...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_genes_overlapping_or_nearest({1: 'GeneA', 2: 'GeneB', 3: 'GeneC'}, [1, 2, 3], 1, 2) == (['GeneA', 'GeneB'], [0, 0])\", \"assert find_genes_overlapping_or_nearest({1: 'GeneA'}, [1], 1, 1) == (['GeneA'], [0])\", \"assert find_genes_overlapping_or_nearest(...
{ "split": "train", "index": 76536, "acecode_id": "bigcode_python_fns_41945", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Implement a function `calculate_sum(a, b)` that takes two parameters `a` and `b`. The function should check if `a` and `b` are either integers or floats. If they are not, attempt to convert them to floats. If conversion fails, raise a ValueError with the message 'Invalid input:...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_sum('10', 20) == 30.0\", \"assert calculate_sum(10, '20') == 30.0\", \"assert calculate_sum('5.5', '4.5') == 10.0\", \"assert calculate_sum(0, 0) == 0\", \"assert calculate_sum(-5, 5) == 0\", \"assert calculate_sum(True, False) == 1\", \"assert cal...
{ "split": "train", "index": 76537, "acecode_id": "evol_31077", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given a user ID, create a function that returns the total number of sessions for that user. A session is represented by a unique ID. You are given a list of sessions where each session is represented as an integer ID. Implement a function `count_sessions(user_id: Optional[int],...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_sessions(1, [1, 2, 3, 4]) == 4\", \"assert count_sessions(2, [5, 6, 7]) == 3\", \"assert count_sessions(3, []) == 0\", \"assert count_sessions(None, [1, 2, 3]) == 0\", \"assert count_sessions(4, [8, 9, 10, 11, 12]) == 5\", \"assert count_sessions(5, [1...
{ "split": "train", "index": 76538, "acecode_id": "bigcode_python_fns_6082", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with calculating the total duration of 'note-on' events from a list of MIDI messages. Each message is represented as a dictionary with two keys: 'time' (an integer representing the delta time of the message) and 'type' (a string that can either be 'note_on' or 'n...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_total_note_on_duration([{'time': 100, 'type': 'note_on'}, {'time': 200, 'type': 'note_off'}, {'time': 150, 'type': 'note_on'}]) == 250\", \"assert calculate_total_note_on_duration([{'time': 50, 'type': 'note_on'}, {'time': 50, 'type': 'note_on'}, {...
{ "split": "train", "index": 76539, "acecode_id": "oss_13731", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a simple role-based access control for a web application. The function `can_delete_page(user_role: str, page_id: int) -> bool` takes in two parameters: a string `user_role` and an integer `page_id`. The `user_role` can be e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_delete_page('admin', 2) == True\", \"assert can_delete_page('admin', 1) == True\", \"assert can_delete_page('admin', 10) == True\", \"assert can_delete_page('user', 2) == False\", \"assert can_delete_page('user', 1) == False\", \"assert can_delete_page('...
{ "split": "train", "index": 76540, "acecode_id": "bigcode_python_fns_31992", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a program to manage quiz questions. Implement the function `get_random_question(chat_id, category)` that takes a user's chat ID and a question category as input and returns a random question from the specified category. If a question has already bee...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_random_question(123, 'history') == 'A question has already been assigned to you for this category'\", \"assert get_random_question(456, 'science') == 'A question has already been assigned to you for this category'\", \"assert get_random_question(789, 'ma...
{ "split": "train", "index": 76541, "acecode_id": "oss_22046", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of strings. The function should accept a list of strings as input and return a single string that concatenates all the strings in the list, separated by a space. If the input list is empty, the function should...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert concatenate_strings(['Hello', 'world']) == 'Hello world'\", \"assert concatenate_strings(['Python', 'is', 'fun']) == 'Python is fun'\", \"assert concatenate_strings(['LeetCode', 'is', 'great', 'for', 'practice']) == 'LeetCode is great for practice'\", \"asse...
{ "split": "train", "index": 76542, "acecode_id": "oss_18793", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lists of integers, `y_true` and `y_pred`, representing the true labels and predicted labels respectively, write a function `mean_iou(y_true: List[int], y_pred: List[int], num_classes: int) -> float` that calculates the mean Intersection over Union (mIoU) for the provi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert mean_iou([0, 0, 0, 0], [0, 0, 0, 0], 2) == 0.0\", \"assert mean_iou([1, 2, 2, 1], [2, 1, 1, 0], 3) == 0.0\", \"assert mean_iou([1, 2, 0], [0, 1, 2], 3) == 0.0\", \"assert mean_iou([0, 0, 0], [0, 1, 1], 2) == 0.0\", \"assert mean_iou([], [], 2) == 0.0\", \"as...
{ "split": "train", "index": 76543, "acecode_id": "bigcode_python_fns_27147", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the retrieval of a job's status based on a user's API key and a job queue ID. The function `get_job_status(api_key, jq_id)` should take in two parameters: a string `api_key` representing the user's API key and an integer `j...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_job_status('valid_api_key', 1) == 'Job Retrieved'\", \"assert get_job_status('valid_api_key', 2) == 'Job Retrieved'\", \"assert get_job_status('valid_api_key', 3) == 'Job Retrieved'\", \"assert get_job_status('valid_api_key', 4) == 'Job Retrieved'\", \"a...
{ "split": "train", "index": 76544, "acecode_id": "bigcode_python_fns_21041", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given a string representation of an XML document, implement a function `extract_node_names(xml_string: str, namespace: str = None) -> List[str]` that extracts the names of all nodes in the XML. If a namespace is provided, only include node names from that specified namespace. I...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_node_names('<root xmlns:foo=\\\"http://www.foo.com\\\"><foo:child>Foo</foo:child></root>', 'http://www.foo.com') == ['child']\", \"assert extract_node_names('<root xmlns:bar=\\\"http://www.bar.com\\\"><bar:child>Bar</bar:child></root>', 'http://www.b...
{ "split": "train", "index": 76545, "acecode_id": "evol_22714", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function `cycpattern_check(a: str, b: str) -> bool` that takes two strings as input and checks whether any rotation of the second string `b` can be found as a subsequence in the first string `a`. The check should be case-insensitive, and special characters should be...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cycpattern_check('Hello', 'ELl') == True\", \"assert cycpattern_check('Whas$sup', 'pSUs') == False\", \"assert cycpattern_check('aB!ab', 'BAa') == True\", \"assert cycpattern_check('EfEF', 'EeFf') == False\", \"assert cycpattern_check('Hi^mensS', 'sImen') ==...
{ "split": "train", "index": 76546, "acecode_id": "evol_2531", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given a string `s` and an integer `k`, return `true` if a permutation of the string could form a palindrome and the frequency of each character in the string is less than or equal to `k`. A palindrome is a word that reads the same backward as forward. You should implement a sin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert palindrome_permutation('code', 2) == False\", \"assert palindrome_permutation('aab', 2) == True\", \"assert palindrome_permutation('carerac', 2) == True\", \"assert palindrome_permutation('aaabbb', 2) == False\", \"assert palindrome_permutation('abc', 1) == ...
{ "split": "train", "index": 76547, "acecode_id": "evol_23776", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `greet_user(name: str, greeting: str = 'Hello') -> str` that takes a name and an optional greeting message. If the greeting is not provided, it should default to 'Hello'. The function should return a formatted string that combines the greeting and the name, suc...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert greet_user('Alice') == 'Hello, Alice!'\", \"assert greet_user('Bob', 'Good morning') == 'Good morning, Bob!'\", \"assert greet_user('Charlie') == 'Hello, Charlie!'\", \"assert greet_user('Diana', 'Welcome') == 'Welcome, Diana!'\", \"assert greet_user('Eve') ...
{ "split": "train", "index": 76548, "acecode_id": "evol_221", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of dictionaries where each dictionary contains a 'product_id', 'feature_id', and 'rating', and a dictionary that maps 'feature_id' to its corresponding weight, implement a function that calculates the comprehensive evaluation score for the product. The score is cal...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_product_score([{'product_id': 1, 'feature_id': 1, 'rating': 0}, {'product_id': 1, 'feature_id': 2, 'rating': 0}, {'product_id': 1, 'feature_id': 3, 'rating': 0}], {1: 0.5, 2: 0.3, 3: 0.2}) == 0.0\", \"assert get_product_score([{'product_id': 1, 'feature_...
{ "split": "train", "index": 76549, "acecode_id": "evol_19196", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given a list of integers. Your task is to find and return the sum of all even integers in the list. If there are no even integers, return 0. The function should be implemented as `def sum_of_evens(nums: List[int]) -> int:`.\nPlease reason step by step, then write a self...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_of_evens([1, 2, 3, 4, 5]) == 6\", \"assert sum_of_evens([10, 15, 20, 25]) == 30\", \"assert sum_of_evens([-2, -1, 0, 1, 2]) == 0\", \"assert sum_of_evens([0, 2, 4, 6, 8]) == 20\", \"assert sum_of_evens([1, 3, 5]) == 0\", \"assert sum_of_evens([2, 4, 6, 8...
{ "split": "train", "index": 76550, "acecode_id": "oss_25229", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two 2D arrays, determine if one array is a permutation of the other. A permutation means that both arrays contain the same elements but possibly in a different order. The arrays are guaranteed to have the same dimensions. Implement the function `allclose_perm(arr1: List[L...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert allclose_perm([[1.0, 2.0], [3.0, 4.0]], [[3.0, 4.0], [1.0, 2.0]]) == True\", \"assert allclose_perm([[1.0, 2.0], [3.0, 4.0]], [[1.0, 2.0], [4.0, 3.0]]) == True\", \"assert allclose_perm([[1.0]], [[1.0]]) == True\", \"assert allclose_perm([[1.0, 2.0]], [[2.0,...
{ "split": "train", "index": 76551, "acecode_id": "bigcode_python_fns_3155", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing word ids from TV scripts. Your task is to implement a function that creates sequences of a specified length from this list. Each sequence should consist of `sequence_length` consecutive word ids, and you should also provide the next...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_sequences([1, 2, 3], 3) == ([[1, 2, 3]], [0])\", \"assert create_sequences([5, 6, 7, 8, 9], 4) == ([[5, 6, 7, 8]], [9])\", \"assert create_sequences([10, 20, 30, 40, 50, 60], 5) == ([[10, 20, 30, 40, 50]], [60])\", \"assert create_sequences([], 1) == ...
{ "split": "train", "index": 76552, "acecode_id": "bigcode_python_fns_44125", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the deletion of a file based on a given file ID. The function receives a file ID as input and returns a tuple containing the file ID and a string representing the full path of the file that would have been deleted. For the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert delete_file(1) == (1, '/path/to/file1.txt')\", \"assert delete_file(2) == (2, '/path/to/file2.txt')\", \"assert delete_file(10) == (10, 'File not found')\", \"assert delete_file(0) == (0, 'File not found')\", \"assert delete_file(-1) == (-1, 'File not found'...
{ "split": "train", "index": 76553, "acecode_id": "bigcode_python_fns_2338", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Write a Python function `extract_primes(nums)` that takes a list of integers `nums` as input and returns a new list containing only the prime numbers from the input list. A prime number is defined as a natural number greater than 1 that cannot be formed by multiplying two small...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_primes([2, 3, 4, 5, 6, 7, 8, 9, 10]) == [2, 3, 5, 7]\", \"assert extract_primes([1, 4, 6, 8, 9]) == []\", \"assert extract_primes([11, 13, 17, 19]) == [11, 13, 17, 19]\", \"assert extract_primes([15, 21, 22, 24]) == []\", \"assert extract_primes([2, ...
{ "split": "train", "index": 76554, "acecode_id": "evol_32223", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a dictionary, return a list of all the keys in the dictionary. The keys should be returned in the order they were added to the dictionary. If the dictionary is empty, return an empty list. Implement a function named `get_keys_from_dict` that takes one argument: a dictiona...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_keys_from_dict({'a': 1, 'b': 2, 'c': 3}) == ['a', 'b', 'c']\", \"assert get_keys_from_dict({'name': 'Alice', 'age': 30}) == ['name', 'age']\", \"assert get_keys_from_dict({}) == []\", \"assert get_keys_from_dict({'x': 10, 'y': 20, 'z': 30}) == ['x', 'y',...
{ "split": "train", "index": 76555, "acecode_id": "bigcode_python_fns_18470", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function that returns the sum of the odd numbers in the list.\nPlease reason step by step, then write a self-contained Python solution. Give your final program in a single ```python code block." } ]
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_odd_numbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\", \"assert sum_odd_numbers([0, 1, 2, 3, 4, 5]) == 9\", \"assert sum_odd_numbers([-5, -4, -3, -2, -1]) == -9\", \"assert sum_odd_numbers([2, 4, 6, 8]) == 0\", \"assert sum_odd_numbers([1, 3, 5, 7, 9]) ==...
{ "split": "train", "index": 76556, "acecode_id": "evol_21658", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function called `filter_lines` that takes a list of strings, representing lines of text. Your function should return a new list that includes only the non-empty lines that do not start with the '#' character (which signifies a comment). The input ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_lines(['Hello, World!', '', '# This is a comment', 'Python is great!', '#', 'Code more!']) == ['Hello, World!', 'Python is great!', 'Code more!']\", \"assert filter_lines(['# Comment line', '# Another comment', '']) == []\", \"assert filter_lines(['',...
{ "split": "train", "index": 76557, "acecode_id": "bigcode_python_fns_23605", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function that takes multiple strings as input and returns the first string that contains the alphabetically earliest non-repeating character. If no string contains a non-repeating character, return an appropriate message. The function should handle cases where all c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert earliest_string('googlesearch', 'bingsearch') == 'googlesearch'\", \"assert earliest_string('apple', 'banana', 'cherry') == 'apple'\", \"assert earliest_string('abcd', 'efgh', 'ijkl') == 'abcd'\", \"assert earliest_string('abc', 'aabb') == 'abc'\", \"assert ...
{ "split": "train", "index": 76558, "acecode_id": "evol_20869", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with updating a data structure to store gauge metrics based on provided metric definitions. Write a Python function that takes in a metric type, metric name, a dictionary containing the metric definition (which includes a description, labels, and a value), and an...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_gauge_metric('gauge', 'metric1', {'desc': 'Description 1', 'labels': {'label1': 'value1'}, 'value': 10}, {}) is None\", \"assert update_gauge_metric('gauge', 'metric1', {'desc': 'Description 1', 'labels': {'label1': 'value1'}, 'value': 10}, {'metric1'...
{ "split": "train", "index": 76559, "acecode_id": "oss_17455", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string representing a video file name. The file name consists of the video title, followed by a series of characters representing the video's properties. The properties are enclosed within square brackets and separated by a single space. Each property is in the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_video_info('my_video[resolution=1080p format=mp4]') == {'title': 'my_video', 'properties': {'resolution': '1080p', 'format': 'mp4'}}\", \"assert parse_video_info('funny_cat_video[resolution=720p format=avi length=10m]') == {'title': 'funny_cat_video', ...
{ "split": "train", "index": 76560, "acecode_id": "oss_3346", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `set_configuration` that will accept two optional parameters: `target_offload` and `allow_fallback_to_host`, along with any additional keyword arguments that represent configuration settings. The function should return a dictionary repres...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert set_configuration() == {'target_offload': 'auto', 'allow_fallback_to_host': False}\", \"assert set_configuration(target_offload='gpu') == {'target_offload': 'gpu', 'allow_fallback_to_host': False}\", \"assert set_configuration(allow_fallback_to_host=True) ==...
{ "split": "train", "index": 76561, "acecode_id": "bigcode_python_fns_24090", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of non-negative integers, implement a function that returns a new list containing the factorial of each element in the input list. The input list may contain duplicates. For example, if the input list is [1, 2, 3], the output should be [1, 2, 6].\nPlease reason ste...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert factorials([0]) == [1]\", \"assert factorials([1]) == [1]\", \"assert factorials([2]) == [2]\", \"assert factorials([3]) == [6]\", \"assert factorials([4]) == [24]\", \"assert factorials([5]) == [120]\", \"assert factorials([1, 2, 3]) == [1, 2, 6]\", \"asser...
{ "split": "train", "index": 76562, "acecode_id": "evol_33877", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function `process_numbers(data: List[int]) -> List[int]` that returns a new list where each integer in the input list is processed by a function `do_process(num: int) -> int`. The `do_process` function is assumed to be defined elsewhere. Yo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_numbers([1, 2, 3]) == [do_process(1), do_process(2), do_process(3)]\", \"assert process_numbers([0]) == [do_process(0)]\", \"assert process_numbers([-1, -2, -3]) == [do_process(-1), do_process(-2), do_process(-3)]\", \"assert process_numbers([]) == [...
{ "split": "train", "index": 76563, "acecode_id": "evol_6109", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the behavior of a training history for a machine learning model. The function should take in a dictionary representing the training history and a metric name to analyze. The training history dictionary contains two keys: 'l...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compute_average_loss({'loss': [0.5, 0.4], 'val_loss': [0.6, 0.65]}, 'loss') == (0.45, 0.625)\", \"assert compute_average_loss({'loss': [0.0, 0.0, 0.0], 'val_loss': [0.0, 0.0, 0.0]}, 'loss') == (0.0, 0.0)\", \"assert compute_average_loss({'loss': [0.25, 0.5, ...
{ "split": "train", "index": 76564, "acecode_id": "bigcode_python_fns_32673", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a simple login system with a timeout feature. Your function should track the time of the last successful login and enforce a timeout period during which subsequent login attempts will be rejected. You will implement a funct...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert login_with_timeout(10, 5) == False\", \"assert login_with_timeout(5, 3) == False\", \"assert login_with_timeout(15, 5) == False\", \"assert login_with_timeout(10, 19) == False\", \"assert login_with_timeout(30, 29) == False\", \"assert login_with_timeout(1, ...
{ "split": "train", "index": 76565, "acecode_id": "oss_25226", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a file name for an adapter based on the type of adapter and the direction specified. The adapters can be of three types: 'PCRFree', 'Rubicon', and 'Nextera'. The directions can be 'fwd', 'rev', or 'revcomp'. Your function s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_adapter_filename('PCRFree', 'fwd') == 'adapters_PCRFree_fwd.fa'\", \"assert generate_adapter_filename('Rubicon', 'rev') == 'adapters_Rubicon_rev.fa'\", \"assert generate_adapter_filename('Nextera', 'revcomp') == 'adapters_Nextera_revcomp.fa'\", \"as...
{ "split": "train", "index": 76566, "acecode_id": "bigcode_python_fns_37565", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function to evaluate whether a new performance score is significantly better than the current best score based on a relative threshold. Write a function `is_better(curr: float, best: float, score_threshold: float) -> bool` that compares the curren...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_better(1.05, 1.0, 0.1) == False\", \"assert is_better(0.9, 1.0, 0.1) == False\", \"assert is_better(1.0, 1.0, 0.0) == False\", \"assert is_better(1.0, 1.0, 0.1) == False\", \"assert is_better(1.2, 1.0, 0.1) == True\", \"assert is_better(1.0, 0.9, 0.1) == ...
{ "split": "train", "index": 76567, "acecode_id": "oss_35129", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given an array of integers representing elevation data, write a function that determines the highest peak in a mountain range. A peak is defined as a sequence of continuous ascending integers followed by continuous descending integers. Your function should return the highest po...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_peaks([9, 10, 12, 15, 7, 8, 11]) == [15]\", \"assert find_peaks([1, 2, 3, 4, 3, 2, 1]) == [4]\", \"assert find_peaks([5, 6, 7, 6, 5, 4, 3, 2]) == [7]\", \"assert find_peaks([5, 4, 3, 2, 1]) == []\", \"assert find_peaks([1, 3, 2, 5, 4, 6, 5]) == [6]\", \...
{ "split": "train", "index": 76568, "acecode_id": "evol_25490", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a ship being hit by aliens in a game. The game has a scoreboard that tracks the number of ships left. Each time the ship is hit, the number of ships left decreases by one. If the number of ships left is greater than zer...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert ship_hit(3) == (2, True)\", \"assert ship_hit(2) == (1, True)\", \"assert ship_hit(5) == (4, True)\", \"assert ship_hit(10) == (9, True)\", \"assert ship_hit(7) == (6, True)\", \"assert ship_hit(4) == (3, True)\", \"assert ship_hit(9) == (8, True)\", \"asser...
{ "split": "train", "index": 76569, "acecode_id": "bigcode_python_fns_10443", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a basic startup routine. The function should take a variable number of keyword arguments, each representing a configuration setting for the startup process. The function should return a dictionary containing the provide...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert startup() == {'host': 'localhost', 'port': '8000', 'debug': 'False'}\", \"assert startup(host='127.0.0.1') == {'host': '127.0.0.1', 'port': '8000', 'debug': 'False'}\", \"assert startup(port=8080) == {'host': 'localhost', 'port': '8080', 'debug': 'False'}\",...
{ "split": "train", "index": 76570, "acecode_id": "bigcode_python_fns_28795", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of dictionaries, where each dictionary represents a genetic variant with the following keys: 'filter' (a string), 'snp_gt' (a float). Your task is to implement a function that returns a list of genetic variants that meet the following criteria: the 'filter'...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_variants([{'filter': 'PASS', 'snp_gt': 95.0}, {'filter': 'FAIL', 'snp_gt': 88.0}, {'filter': 'PASS', 'snp_gt': 92.0}]) == [{'filter': 'PASS', 'snp_gt': 95.0}, {'filter': 'PASS', 'snp_gt': 92.0}]\", \"assert filter_variants([{'filter': 'PASS', 'snp_gt'...
{ "split": "train", "index": 76571, "acecode_id": "bigcode_python_fns_10978", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string `s` and a set of words `wordDict`. Write a function `can_segment(s: str, wordDict: set) -> bool` that returns a boolean value indicating whether the string `s` can be segmented into a space-separated sequence of one or more dictionary words from `wordDict...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_segment('leetcode', {'leet', 'code'}) == True\", \"assert can_segment('applepenapple', {'apple', 'pen'}) == True\", \"assert can_segment('catsanddog', {'cats', 'dog', 'sand', 'and', 'cat'}) == True\", \"assert can_segment('pineapplepenapple', {'apple', '...
{ "split": "train", "index": 76572, "acecode_id": "oss_31669", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a person's name and age as input and returns a formatted string that displays this information. The function should be defined as `display_info(name: str, age: int) -> str`, where `name` is the name of the person and `age` ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert display_info('Alice', 25) == 'Name: Alice, Age: 25'\", \"assert display_info('Bob', 30) == 'Name: Bob, Age: 30'\", \"assert display_info('Charlie', 22) == 'Name: Charlie, Age: 22'\", \"assert display_info('Diana', 35) == 'Name: Diana, Age: 35'\", \"assert di...
{ "split": "train", "index": 76573, "acecode_id": "oss_4619", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes log messages and extracts specific information from them. The log messages are formatted using the logging module and contain various fields such as log level, module, line number, function name, and the actual messa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_log_messages(['\\\\n\\\\033[1mDEBUG -- module1:123:func1\\\\033[0m\\\\nThis is a debug message']) == [{'level': 'DEBUG', 'module': 'module1', 'line_number': 123, 'function_name': 'func1'}]\", \"assert parse_log_messages(['\\\\n\\\\033[1mINFO -- module2...
{ "split": "train", "index": 76574, "acecode_id": "oss_9387", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Develop a Python function that calculates the surface area of a circular sector. This function should accept a list of tuples, where each tuple contains the radius and central angle of a sector. The function must return a list of surface areas corresponding to each sector. If a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_multiple_circular_sectors([(0, 90), (5, 360), (5, 370)]) == [0.0, 78.54, None]\", \"assert process_multiple_circular_sectors([(3, 0), (-3, 90), (3, 400)]) == [0.0, None, None]\", \"assert process_multiple_circular_sectors([(10, 0), (10, -10), (5, 90)...
{ "split": "train", "index": 76575, "acecode_id": "evol_25253", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates submitting coverage analysis data to a specified service. The function should accept two parameters: a string representing the service name and a boolean indicating whether the function should operate in debug mode. In regu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert submit_coverage_data('my_service', False) == 'Coverage data submitted to my_service.'\", \"assert submit_coverage_data('my_service', True) == '{\\\"coverage_data\\\": \\\"Coverage data in debug mode for my_service.\\\"}'\", \"assert submit_coverage_data('ano...
{ "split": "train", "index": 76576, "acecode_id": "oss_33424", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a parent query by replacing specific placeholder tokens with corresponding table names derived from child queries. Each child query is represented by a unique identifier, a table name, and a token that must be replac...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_child_queries('SELECT * FROM {token}', [ChildQuery(1, 'table1', '{token}'), ChildQuery(2, 'table2', '{token}')]) == 'SELECT * FROM table1'\", \"assert process_child_queries('SELECT * FROM {token1} JOIN {token2}', [ChildQuery(1, 'users', '{token1}'), ...
{ "split": "train", "index": 76577, "acecode_id": "oss_32449", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple subscription management system for a software service. Your goal is to create a function `manage_subscriptions(operations)` that processes a list of subscription operations and returns a list of results based on those operations. Each o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_subscriptions([('subscribe', 'user1', 'basic')]) == ['Success']\", \"assert manage_subscriptions([('subscribe', 'user2', 'premium'), ('change_plan', 'user3', 'basic')]) == ['Success', 'NotSubscribed']\", \"assert manage_subscriptions([('subscribe', 'u...
{ "split": "train", "index": 76578, "acecode_id": "oss_25623", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that resets a dropdown selection based on user interaction. The function should take two parameters: a string `val` that represents the current selection of the dropdown and an integer `n_clicks` that indicates the number of times the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert clear_dropdown('Option1', 1) == None\", \"assert clear_dropdown('None', 1) == 'None'\", \"assert clear_dropdown('Option2', 0) == 'Option2'\", \"assert clear_dropdown('Value', 3) == None\", \"assert clear_dropdown('None', 0) == 'None'\", \"assert clear_dropdo...
{ "split": "train", "index": 76579, "acecode_id": "bigcode_python_fns_15276", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a complex number as input and returns a tuple containing its integer component and decimal component. The function should have two optional parameters: `round_down` (defaulting to True) which determines whether to round down or up the integer com...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert dissect_complex_number(4.7+3j, convert_to_ratio=True) == (4, Fraction(7, 10)+3j)\", \"assert dissect_complex_number(0.0+0j) == (0, 0.0+0j)\", \"assert dissect_complex_number(2.5+4j) == (2, 0.5+4j)\", \"assert dissect_complex_number(10.0+0j) == (10, 0.0+0j)\"...
{ "split": "train", "index": 76580, "acecode_id": "evol_14599", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that retrieves a token and its expiry time based on a provided configuration. The function should accept a boolean parameter `verbose` which indicates whether the function should return the token or just update the configuration. The func...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert retrieve_token(True, True, 10000) == 'token_value'\", \"assert retrieve_token(False, True, 10000) == ''\", \"assert retrieve_token(True, False, 20000) == ''\", \"assert retrieve_token(False, False, 30000) == ''\", \"assert retrieve_token(True, True, 5000) ==...
{ "split": "train", "index": 76581, "acecode_id": "bigcode_python_fns_10051", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers. Write a function called `sum_of_squares` that takes this list as an input and returns the sum of the squares of all the integers in the list. For example, if the input list is [1, 2, 3], the output should be 14 because 1^2 + 2^2 + 3^2 = 1 + 4 +...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_of_squares([1, 2, 3]) == 14\", \"assert sum_of_squares([-1, -2, -3]) == 14\", \"assert sum_of_squares([0, 0, 0]) == 0\", \"assert sum_of_squares([1, -1, 2]) == 6\", \"assert sum_of_squares([3, 4, 5]) == 50\", \"assert sum_of_squares([-3, -4, -5]) == 50\"...
{ "split": "train", "index": 76582, "acecode_id": "bigcode_python_fns_15410", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple logging system in Python. Your goal is to create a function called `create_logger()` that initializes a logger with a specific name and returns the logger object. The logger should have the name \"root\". Your function should not take a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_logger().name == 'root'\", \"assert isinstance(create_logger(), logging.Logger)\", \"assert create_logger().handlers == []\", \"assert create_logger().propagate == True\", \"assert create_logger().name.startswith('root')\", \"assert create_logger().di...
{ "split": "train", "index": 76583, "acecode_id": "oss_21517", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given a string abbreviation representing a system identifier, implement a function that returns the corresponding system identifier URL. If the abbreviation is not supported, raise a RuntimeError with a message indicating the abbreviation is not supported. The only supported ab...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert to_system('HP') == 'http://www.human-phenotype-ontology.org/'\", \"assert to_system('HP') == 'http://www.human-phenotype-ontology.org/'\", \"assert to_system('HP') == 'http://www.human-phenotype-ontology.org/'\", \"assert to_system('HP') == 'http://www.human...
{ "split": "train", "index": 76584, "acecode_id": "bigcode_python_fns_23957", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Implement a function called `bubble_sort` that takes a list of integers as input and sorts the list in ascending order using the bubble sort algorithm. The function should not return anything; instead, it should modify the input list in place.\nPlease reason step by step, then ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert bubble_sort([64, 34, 25, 12, 22, 11, 90]) == None and [11, 12, 22, 25, 34, 64, 90] == [11, 12, 22, 25, 34, 64, 90]\", \"assert bubble_sort([5, 4, 3, 2, 1]) == None and [1, 2, 3, 4, 5] == [1, 2, 3, 4, 5]\", \"assert bubble_sort([1, 2, 3, 4, 5]) == None and [1...
{ "split": "train", "index": 76585, "acecode_id": "evol_15551", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a graph represented as an adjacency list, where each key in the dictionary represents a node and the corresponding value is a list of neighboring nodes. Your task is to implement a function `breadth_first_search(graph, initial_node)` that performs a breadth-first ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert breadth_first_search({1: [2, 3], 2: [4], 3: [5], 4: [], 5: []}, 1) == 5\", \"assert breadth_first_search({1: [2], 2: [3], 3: []}, 1) == 3\", \"assert breadth_first_search({1: [], 2: [3]}, 1) == 1\", \"assert breadth_first_search({1: [2, 3]}, 4) == 0\", \"ass...
{ "split": "train", "index": 76586, "acecode_id": "oss_24999", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a string `filename` representing the name of an image file, write a function `get_history_lines` that extracts the 'HISTORY' header line from a simulated header dictionary. The function should take a `filename` and an optional integer `extension` (default is 0). The heade...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_history_lines('image1.jpg') == 'No history found'\", \"assert get_history_lines('image2.png', 0) == 'No history found'\", \"assert get_history_lines('image5.bmp') == 'No history found'\", \"assert get_history_lines('image8.tiff', 2) == 'No history found'...
{ "split": "train", "index": 76587, "acecode_id": "bigcode_python_fns_6374", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that retrieves an object from a list based on a specified condition. Your function should take a list of objects, an owner identifier, and two boolean flags: include_staff and include_superuser. The function should check if the object...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_owned_object([{'owner': 'user1', 'is_staff': False, 'is_superuser': False}, {'owner': 'user2', 'is_staff': False, 'is_superuser': False}], 'user1', False, False) == {'owner': 'user1', 'is_staff': False, 'is_superuser': False}\", \"assert get_owned_object...
{ "split": "train", "index": 76588, "acecode_id": "bigcode_python_fns_36030", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function `min_perfect_square` that returns the minimum perfect square that is the product of three unique prime numbers. A perfect square is an integer that is the square of an integer. You may assume the primes are 2, 3, and 5. The function should not take any para...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert min_perfect_square() == 900\", \"assert min_perfect_square() != 500\", \"assert min_perfect_square() == 900\", \"assert min_perfect_square() % 30 == 0\", \"assert min_perfect_square() > 800\", \"assert min_perfect_square() < 1000\", \"assert min_perfect_squa...
{ "split": "train", "index": 76589, "acecode_id": "evol_20813", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Define a metaclass called `ValidatorMeta` that enforces the requirement that any class using this metaclass must implement a method named `execute`. If the class does not implement this method, the metaclass should raise a `TypeError`. Implement this functionality in a single f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_class_with_validator('ValidClass', {'execute': lambda self: None}) is not None\", \"assert create_class_with_validator('AnotherValidClass', {'execute': lambda self: print('Executing')}) is not None\", \"assert create_class_with_validator('YetAnotherVa...
{ "split": "train", "index": 76590, "acecode_id": "evol_34159", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Implement a function `exponentiate(num: float, power: int) -> float` that takes a numerical value `num` and an integer `power`, and returns the result of raising `num` to the power of `power`. The function should handle both positive and negative powers correctly, including the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert exponentiate(2, 3) == 8\", \"assert exponentiate(3, 2) == 9\", \"assert exponentiate(5, 0) == 1\", \"assert exponentiate(0, 5) == 0\", \"assert exponentiate(0, 0) == 1\", \"assert exponentiate(-2, 3) == -8\", \"assert exponentiate(-2, 2) == 4\", \"assert exp...
{ "split": "train", "index": 76591, "acecode_id": "evol_2278", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a string and replaces all non-alphanumeric characters with a specified replacement symbol. The function should have a case-sensitive option that determines if the original letter casing should be preserved or converted to lowercase for processing...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert substitute_characters('Hello World!', '*', True) == 'Hello*World*'\", \"assert substitute_characters('Hello World!', '*', False) == 'hello*world*'\", \"assert substitute_characters('Python3.8', '-', True) == 'Python3-8'\", \"assert substitute_characters('Pyt...
{ "split": "train", "index": 76592, "acecode_id": "evol_8405", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Given a list of zip codes and their associated rate areas in the format of a list of tuples, where each tuple consists of a zip code, state, and rate area, implement a function that returns a dictionary mapping each zip code to a set of its corresponding rate areas. The input w...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert zip_rate_areas([('12345', 'NY', '1'), ('12345', 'NY', '2'), ('12345', 'CA', '3'), ('67890', 'TX', '1')]) == {'12345': {'NY 1', 'NY 2', 'CA 3'}, '67890': {'TX 1'}}\", \"assert zip_rate_areas([('11111', 'NY', 'A'), ('22222', 'NY', 'A'), ('11111', 'NY', 'B')]) ...
{ "split": "train", "index": 76593, "acecode_id": "bigcode_python_fns_40761", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string consisting of characters, numbers, and special characters, write a function that generates all unique permutations of the characters in the string and returns them in alphabetical order. The function should handle cases with duplicate characters correctly.\nPleas...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_permutations('abc') == ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']\", \"assert unique_permutations('aab') == ['aab', 'aba', 'baa']\", \"assert unique_permutations('123') == ['123', '132', '213', '231', '312', '321']\", \"assert unique_permutations('!@#...
{ "split": "train", "index": 76594, "acecode_id": "evol_26469", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Implement a function that checks if a given string consists only of printable ASCII characters. A printable ASCII character is defined as any character with an ASCII value between 32 and 126, inclusive. The function should return True if the string contains only printable ASCII...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert ascii_checker('Hello, World!') == True\", \"assert ascii_checker('1234567890') == True\", \"assert ascii_checker('') == True\", \"assert ascii_checker('A quick brown fox jumps over the lazy dog.') == True\", \"assert ascii_checker('Special characters: @#$%^&...
{ "split": "train", "index": 76595, "acecode_id": "evol_14915", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given a list of integers, a target sum, and a desired subset size, write a Python function that returns all unique subsets of the specified size that add up to the target sum. If no such subsets exist, return an empty list. The function should be defined as follows: def find_su...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_subsets_with_sum([1, 2, 3, 4, 5], 5, 1) == [[5]]\", \"assert find_subsets_with_sum([], 0, 0) == [[]]\", \"assert find_subsets_with_sum([10, 20, 30], 60, 3) == [[10, 20, 30]]\", \"assert find_subsets_with_sum([1, 2, 3, 4, 5], 0, 0) == [[]]\", \"assert fi...
{ "split": "train", "index": 76596, "acecode_id": "evol_35359", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given an encyclopedia represented as a dictionary where each key is an entry and the value is a list of related articles, implement a function that returns a new dictionary containing each entry and the count of its related articles. The function should only take the encycloped...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert relatedArticles_count({'sandwich':['bread', 'butter', 'cheese'], 'pasta':['macaroni', 'sauce', 'cheese']}) == {'sandwich': 3, 'pasta': 3}\", \"assert relatedArticles_count({'apple':['fruit', 'red', 'green'], 'carrot':['vegetable', 'orange']}) == {'apple': 3,...
{ "split": "train", "index": 76597, "acecode_id": "evol_7759", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an integer `i`, implement a function `bytes_chr(i: int) -> str` that returns a byte string of length 1 whose ordinal value is equal to `i`. The input `i` will be in the range of 0 to 255 (inclusive). Your function should return the corresponding character as a string. If ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert bytes_chr(0) == '\\\\x00'\", \"assert bytes_chr(1) == '\\\\x01'\", \"assert bytes_chr(65) == 'A'\", \"assert bytes_chr(255) == '\\\\xff'\", \"assert bytes_chr(128) == '\\\\x80'\", \"assert bytes_chr(100) == 'd'\", \"assert bytes_chr(144) == '\\\\x90'\", \"as...
{ "split": "train", "index": 76598, "acecode_id": "bigcode_python_fns_44297", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of comic book objects and performs various operations on them. Each comic book object contains attributes such as `release_name` and `comic_id`. Implement a function `process_comics` that takes a list of comic...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_comics([Comic('Comic1', 1), Comic('Comic2', 2)], '/base/directory') == ['/base/directory/comix_dl/Comic1', '/base/directory/comix_dl/Comic2']\", \"assert process_comics([Comic('ComicA', 1)], '/another/base') == ['/another/base/comix_dl/ComicA']\", \"...
{ "split": "train", "index": 76599, "acecode_id": "oss_14066", "num_tests": 16 }