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": "Given a square matrix A of size n x n, implement a function that computes the LU factorization of the matrix. The LU factorization represents the matrix as the product of a lower triangular matrix L and an upper triangular matrix U, where L has ones on its diagonal. Your functi... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert lu_factorization([[2, 3], [5, 4]]) == ([[1.0, 0.0], [2.5, 1.0]], [[2, 3], [0.0, -3.5]])\", \"assert lu_factorization([[1, 2, 3], [0, 1, 4], [0, 0, 1]]) == ([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], [[1, 2, 3], [0.0, 1.0, 4.0], [0.0, 0.0, 1.0]])\",... | {
"split": "train",
"index": 72300,
"acecode_id": "bigcode_python_fns_46745",
"num_tests": 9
} |
acecode | [
{
"role": "user",
"content": "Implement a function that takes a multi-dimensional list containing discrete characters and returns a single string that consolidates all the alphabetic characters while ignoring non-alphabetic characters and spaces. The sequence of characters should be preserved as they appear... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert consolidate_list([['H', 'e', 'l', 'l', 'o'], [' ', 'W', 'o', '/', 'r', 'l', 'd'], ['1', '!', ' ', 'P', 'y', 't'], ['h', 'o', 'n', '4', '5', '6']]) == 'HelloWorldPython'\", \"assert consolidate_list([['a', 'b', 'c'], ['1', '2', '3'], ['d', 'e', 'f']]) == 'abc... | {
"split": "train",
"index": 72301,
"acecode_id": "evol_16732",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a job scheduling system using a queue. Your task is to write a Python function that processes job settings from a list of dictionaries and adds them to a queue for processing. Each job is represented as a dictionary with the following attributes... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_jobs([{'job_id': 1, 'job_name': 'Job1', 'priority': 1, 'execution_time': 5}, {'job_id': 2, 'job_name': 'Job2', 'priority': 2, 'execution_time': 3}]) == None\", \"assert process_jobs([{'job_id': 3, 'job_name': 'Job3', 'priority': 3, 'execution_time': ... | {
"split": "train",
"index": 72302,
"acecode_id": "oss_35460",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates adding command-line arguments to an argument group for a machine learning application. The function should take a boolean parameter `show_supsup_task_inference` and return a list of dictionaries representing the argument op... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert add_arguments(False) == [{'name': '--full_test_interval', 'type': 'int', 'default': -1, 'help': 'Full testing interval for tasks'}]\", \"assert add_arguments(True) == [{'name': '--full_test_interval', 'type': 'int', 'default': -1, 'help': 'Full testing inter... | {
"split": "train",
"index": 72303,
"acecode_id": "bigcode_python_fns_25691",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates the movement of a Spider between Nests and Webs. The Spider can either move to a new Nest or move onto a Web. Your function should take the following parameters: \\n- `initial_location`: a string representing the initial lo... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert final_location('Nest', ['move to nest']) == 'Nest'\", \"assert final_location('Nest', ['move on web']) == 'On a Web'\", \"assert final_location('Web', ['move to nest', 'move on web']) == 'On a Web'\", \"assert final_location('Nest', ['move on web', 'move to ... | {
"split": "train",
"index": 72304,
"acecode_id": "oss_30337",
"num_tests": 9
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that converts an array into a min heap. A min heap is a complete binary tree where the value of each node is less than or equal to the values of its children. Your function should return the modified array representing the min heap and th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert convert_to_min_heap([1, 2, 3]) == ([1, 2, 3], 0)\", \"assert convert_to_min_heap([None, 1, 2]) == ([1, None, 2], 1)\", \"assert convert_to_min_heap([1, 1, 1]) == ([1, 1, 1], 0)\", \"assert convert_to_min_heap([3, None, 2, 1]) == ([1, 3, 2, None], 2)\", \"ass... | {
"split": "train",
"index": 72305,
"acecode_id": "evol_22688",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are given an array of integers. Write a function that implements the merge sort algorithm to sort the array in ascending order. The function should take an array as input and return a new array containing the sorted elements. Do not use any built-in sorting functions. Your ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert merge_sort([38, 27, 43, 3, 9, 82, 10]) == [3, 9, 10, 27, 38, 43, 82]\", \"assert merge_sort([5, 2, 9, 1, 5, 6]) == [1, 2, 5, 5, 6, 9]\", \"assert merge_sort([1, 1, 1, 1]) == [1, 1, 1, 1]\", \"assert merge_sort([10, 9, 8, 7, 6]) == [6, 7, 8, 9, 10]\", \"asser... | {
"split": "train",
"index": 72306,
"acecode_id": "bigcode_python_fns_43885",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that represents the encounter location status code in a healthcare system. The function should take two parameters: a string 'code' representing the encounter location status code and a string 'display' representing the display name of th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_encounter_location_status_code('active', 'Active Location') == {'code': 'active', 'display': 'Active Location'}\", \"assert create_encounter_location_status_code('inactive', 'Inactive Location') == {'code': 'inactive', 'display': 'Inactive Location'}\... | {
"split": "train",
"index": 72307,
"acecode_id": "oss_35528",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function to manage a simple scoring system for a game. Implement a function called `initialize_scores` that initializes the scores for two players, 'left' and 'right', to zero and returns a dictionary containing these scores. The function should h... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert initialize_scores() == {'left_score': 0, 'right_score': 0}\", \"assert initialize_scores()['left_score'] == 0\", \"assert initialize_scores()['right_score'] == 0\", \"assert isinstance(initialize_scores(), dict)\", \"assert len(initialize_scores()) == 2\", \... | {
"split": "train",
"index": 72308,
"acecode_id": "oss_37446",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Write a function `generate_random_number(low: int, high: int) -> int` that returns a random integer between the provided 'low' and 'high' values, inclusive. The function should use a random number generator to select the number. The 'low' value will always be less than or equal... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_random_number(10, 20) in range(10, 21)\", \"assert generate_random_number(1, 5) in range(1, 6)\", \"assert generate_random_number(0, 0) == 0\", \"assert generate_random_number(-5, -1) in range(-5, 0)\", \"assert generate_random_number(100, 200) in r... | {
"split": "train",
"index": 72309,
"acecode_id": "evol_6469",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates launching different applications in a production environment. The function should accept a string argument that represents the name of the application to launch. The valid applications are 'wsgi' and 'celery'. If a valid ap... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert launch_application('wsgi') == 'Launching WSGI server...'\", \"assert launch_application('celery') == 'Launching Celery worker...'\", \"assert launch_application('wsgi') == 'Launching WSGI server...'\", \"assert launch_application('celery') == 'Launching Cele... | {
"split": "train",
"index": 72310,
"acecode_id": "oss_2629",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function `run_local_server(info: str, host: str, port: int, reload: Optional[bool], debugger: Optional[bool], eager_loading: bool, with_threads: bool, extra_files: List[str]) -> str` that simulates running a local development server. The funct... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert run_local_server('MyApp', '127.0.0.1', 5000, True, True, True, False, []) == 'Server running at http://127.0.0.1:5000/'\", \"assert run_local_server('TestApp', 'localhost', 8000, None, None, True, True, ['file1.py']) == 'Server running at http://localhost:80... | {
"split": "train",
"index": 72311,
"acecode_id": "bigcode_python_fns_10421",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing the heights of buildings in a city skyline. Your task is to implement a function that returns the number of distinct skyline views, where a view is considered distinct if it is taller than the previous building in the skyline. A vie... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_distinct_views([5, 5, 5, 5]) == 1\", \"assert count_distinct_views([1, 2, 3, 4, 5]) == 5\", \"assert count_distinct_views([5, 4, 3, 2, 1]) == 1\", \"assert count_distinct_views([1, 2, 1, 3, 2]) == 3\", \"assert count_distinct_views([3, 2, 4, 1, 5]) == ... | {
"split": "train",
"index": 72312,
"acecode_id": "bigcode_python_fns_6356",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "Given a binary truth value input, implement a function that converts the input to a corresponding string: return 'Yes' if the input is True, return 'No' if the input is False, and return 'Not a binary' if the input is neither True nor False.\nPlease reason step by step, then wr... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert binary_to_text(True) == 'Yes'\", \"assert binary_to_text(False) == 'No'\", \"assert binary_to_text(None) == 'Not a binary'\", \"assert binary_to_text(1) == 'Not a binary'\", \"assert binary_to_text(0) == 'Not a binary'\", \"assert binary_to_text('True') == '... | {
"split": "train",
"index": 72313,
"acecode_id": "evol_32048",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that determines whether a given positive integer is divisible by all the numbers in a specified inclusive range. Your function should take three parameters: `num` (the positive integer to be checked), `start` (the starting number o... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_divisible_by_all(20, 2, 6) == False\", \"assert is_divisible_by_all(12, 2, 4) == True\", \"assert is_divisible_by_all(16, 2, 6) == False\", \"assert is_divisible_by_all(50, 5, 10) == False\", \"assert is_divisible_by_all(22, 3, 6) == False\", \"assert is_... | {
"split": "train",
"index": 72314,
"acecode_id": "oss_35073",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "Given a list of session objects, each containing an 'initiatorIP' and 'initiatorName', write a function that extracts and returns a dictionary mapping each unique 'initiatorIP' to its corresponding 'initiatorName'. Each session object is represented as a dictionary within a lis... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_initiator_IP([{'initiatorIP': '192.168.1.1', 'initiatorName': 'Alice'}, {'initiatorIP': '192.168.1.2', 'initiatorName': 'Bob'}]) == {'192.168.1.1': 'Alice', '192.168.1.2': 'Bob'}\", \"assert get_initiator_IP([{'initiatorIP': '192.168.1.1', 'initiatorName... | {
"split": "train",
"index": 72315,
"acecode_id": "bigcode_python_fns_18020",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that logs the time taken for processing a request in a simplified web application scenario. The function should measure the time taken for a request to be processed and log this information, including the request method, path, and respons... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert log_request('GET', '/index', 200, 15) == 'GET /index 200 15ms'\", \"assert log_request('POST', '/submit', 201, 25) == 'POST /submit 201 25ms'\", \"assert log_request('PUT', '/update', 204, 30) == 'PUT /update 204 30ms'\", \"assert log_request('DELETE', '/del... | {
"split": "train",
"index": 72316,
"acecode_id": "oss_17153",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `fibonacci_sequence(boundary: int) -> List[int]` that generates the Fibonacci sequence up to a given numerical boundary. The Fibonacci sequence starts with 0 and 1, and each subsequent number is the sum of the two preceding ones. Your function should return... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert fibonacci_sequence(10) == [0, 1, 1, 2, 3, 5, 8]\", \"assert fibonacci_sequence(1) == [0]\", \"assert fibonacci_sequence(100) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]\", \"assert fibonacci_sequence(50) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\", \"assert fibo... | {
"split": "train",
"index": 72317,
"acecode_id": "evol_18147",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of tokens, where each token is represented as a tuple containing a string and additional information. Your task is to implement a function `extract_token_text(tokens: List[Tuple[str, Any]], index: int) -> str` that returns the text of the token at the speci... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert extract_token_text([('token1', 1), ('token2', 2), ('token3', 3)], 0) == 'token1'\", \"assert extract_token_text([('token1', 1), ('token2', 2), ('token3', 3)], 1) == 'token2'\", \"assert extract_token_text([('apple', 'fruit'), ('carrot', 'vegetable')], 0) == ... | {
"split": "train",
"index": 72318,
"acecode_id": "oss_27556",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a string representing a polymer, which consists of units that can react with each other. When two units of the same type but of opposite polarity (one is upper case and the other is lower case) react, they are both destroyed. Your task is to write a function `reac... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert reacted_units('dabAcCaCBAcCcaDA') == 10\", \"assert reacted_units('aA') == 0\", \"assert reacted_units('abBA') == 0\", \"assert reacted_units('abAB') == 4\", \"assert reacted_units('') == 0\", \"assert reacted_units('xyzXYZ') == 6\", \"assert reacted_units('... | {
"split": "train",
"index": 72319,
"acecode_id": "oss_5604",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function called `transform_data` that takes a string input representing a message and returns a transformed version of that message. The transformation rules are as follows: 1) Convert the message to uppercase. 2) Replace all occurrences of th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert transform_data('This is a test message with data!') == 'THIS IS A TEST MESSAGE WITH INFORMATION'\", \"assert transform_data('Data should be transformed.') == 'INFORMATION SHOULD BE TRANSFORMED'\", \"assert transform_data('Hello, world!') == 'HELLO WORLD'\", ... | {
"split": "train",
"index": 72320,
"acecode_id": "evol_3252",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that allows a user to request a change to their email address. The function should take the current email address and a new email address as input. If the new email address is not the same as the current email address and is valid (contai... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert email_change_request('user@example.com', 'newuser@example.com') == 'Email change request created.'\", \"assert email_change_request('user@example.com', 'user@example.com') == 'Error: The new email address cannot be the same as the current one.'\", \"assert e... | {
"split": "train",
"index": 72321,
"acecode_id": "bigcode_python_fns_13332",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "Given a list of strings, write a function `adjust_strings(lst)` that modifies the list such that all strings have a length of 5 characters. If a string is shorter than 5 characters, pad it with the character 'x' until it reaches the required length. If a string is longer than 5... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert adjust_strings(['hello', 'world', 'python', 'ai']) == ['hello', 'world', 'pytho', 'aixxx']\", \"assert adjust_strings(['123', '4567', '890123', 'abcde']) == ['123xx', '4567x', '89012', 'abcde']\", \"assert adjust_strings(['a', 'bb', 'ccc', 'dddd', 'eeeee', '... | {
"split": "train",
"index": 72322,
"acecode_id": "evol_11460",
"num_tests": 9
} |
acecode | [
{
"role": "user",
"content": "You are given a list of CSV file contents, each represented as a list of strings where each string is a line from the file. The first line of each CSV represents the header and is the same across all files. Your task is to merge these CSV contents into a single list of strings,... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert merge_csv_files([['Header1,Header2', 'Row1,Data1'], ['Header1,Header2', 'Row2,Data2']]) == ['Header1,Header2', 'Row1,Data1', 'Row2,Data2']\", \"assert merge_csv_files([['Header1,Header2', 'Row1,Data1'], ['Header1,Header2', 'Row2,Data2', 'Row3,Data3']]) == ['... | {
"split": "train",
"index": 72323,
"acecode_id": "bigcode_python_fns_11701",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of numerical values, implement a function that returns the product of the absolute values of these numbers, considering only their nearest rounded-down integers. Exclude elements that are divisible by any prime number less than or equal to 5 (i.e., 2, 3, or 5). The... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert multiply_abs_values_v2([3.2, -2.7, 0]) == 0\", \"assert multiply_abs_values_v2([10, 15, 8]) == 0\", \"assert multiply_abs_values_v2([-1, -2, -3]) == 1\", \"assert multiply_abs_values_v2([0, 0, 0]) == 0\", \"assert multiply_abs_values_v2([-1, -2, 7]) == 7\", ... | {
"split": "train",
"index": 72324,
"acecode_id": "evol_14845",
"num_tests": 9
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function to process a list of integers and return the sum of all even numbers in the list. The function, `sum_of_evens(nums)`, takes in a list of integers, `nums`, and should return an integer representing the sum of all even numbers present i... | 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([]) == 0\", \"assert sum_of_evens([1, 3, 5]) == 0\", \"assert sum_of_evens([2, 4, 6, 8]) == 20\", \"assert sum_of_evens([-2, -4, 1, 3]) == -6\", \"as... | {
"split": "train",
"index": 72325,
"acecode_id": "oss_27365",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an array of strings representing the names of various fruits, write a function called `uppercase_fruit_names` that transforms the input array such that each fruit name is converted to uppercase letters. The function should return a new list containing the uppercased fruit... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert uppercase_fruit_names(['apple', 'banana', 'mango']) == ['APPLE', 'BANANA', 'MANGO']\", \"assert uppercase_fruit_names(['orange', 'grape', 'kiwi']) == ['ORANGE', 'GRAPE', 'KIWI']\", \"assert uppercase_fruit_names(['strawberry']) == ['STRAWBERRY']\", \"assert ... | {
"split": "train",
"index": 72326,
"acecode_id": "evol_22823",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `Lucas(n: int) -> int` that computes the nth term of the Lucas sequence. The Lucas sequence is defined as follows: L(0) = 2, L(1) = 1, and L(n) = L(n-1) + L(n-2) for n > 1. Given an integer n, return the nth term of the Lucas sequence.\nPlease reason step b... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert Lucas(0) == 2\", \"assert Lucas(1) == 1\", \"assert Lucas(2) == 3\", \"assert Lucas(3) == 4\", \"assert Lucas(4) == 7\", \"assert Lucas(5) == 11\", \"assert Lucas(6) == 18\", \"assert Lucas(7) == 29\", \"assert Lucas(8) == 47\", \"assert Lucas(9) == 76\", \"... | {
"split": "train",
"index": 72327,
"acecode_id": "evol_24108",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given two vectors, compute the cosine similarity between them. The cosine similarity is defined as the dot product of the two vectors divided by the product of their magnitudes. Implement a function `cosine_similarity(vector1: List[int], vector2: List[int]) -> float` that takes... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert abs(cosine_similarity([1, 2, 3], [4, 5, 6]) - 0.9746318461970762) < 1e-9\", \"assert abs(cosine_similarity([1, 0, 0], [0, 1, 0]) - 0.0) < 1e-9\", \"assert abs(cosine_similarity([1, 1, 1], [1, 1, 1]) - 1.0) < 1e-9\", \"assert abs(cosine_similarity([-1, -1, -1... | {
"split": "train",
"index": 72328,
"acecode_id": "evol_23678",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a function `izloci_gnezdene_podatke(vina)` that takes a list of dictionaries representing wines as input. Each wine dictionary contains keys 'id', 'vonji', and 'okusi', where 'id' is the wine's identifier, 'vonji' is a list of aroma descriptors, and 'okusi' is a l... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert izloci_gnezdene_podatke([{'id': 1, 'vonji': ['apple'], 'okusi': ['sweet']}]) == ([{'vino': 1, 'vonj': 'apple'}], [{'vino': 1, 'okus': 'sweet'}])\", \"assert izloci_gnezdene_podatke([{'id': 1, 'vonji': ['banana', 'mango'], 'okusi': ['sour']}, {'id': 2, 'vonji... | {
"split": "train",
"index": 72329,
"acecode_id": "oss_18460",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of strings representing lines of text in a document. Write a function `is_string_present_in_section(lines: List[str], section: str, search_string: str) -> bool` that checks if a specific `search_string` is present in the section identified by `section`. The... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_string_present_in_section(['Introduction', 'This is the introduction section.', '---', 'Methods', 'This section describes the methods used.', '---', 'Results', 'The results are presented here.'], 'Methods', 'describes') == True\", \"assert is_string_prese... | {
"split": "train",
"index": 72330,
"acecode_id": "bigcode_python_fns_8920",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of log entries, where each entry is a string formatted as 'timestamp: message'. Your task is to implement a function that takes this list of log entries and returns a dictionary containing the count of unique messages and a list of the unique messages sorte... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_log_entries(['2023-01-01 12:00:00: Error Occurred', '2023-01-01 12:00:01: Error Occurred', '2023-01-01 12:00:02: Process Started']) == {'count': 2, 'messages': ['Error Occurred', 'Process Started']}\", \"assert process_log_entries(['2023-01-01 12:00:... | {
"split": "train",
"index": 72331,
"acecode_id": "bigcode_python_fns_48318",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that manages a user's acceptance of a software license agreement. The function should take a boolean parameter `accept` which indicates whether the user accepts the license. If the user accepts the license (i.e., `accept` is `True`), ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert manage_license(True) == 'USER_ACCEPTS_SSPL'\", \"assert manage_license(False) == 'USER_REJECTS_SSPL'\", \"assert manage_license(True) == 'USER_ACCEPTS_SSPL'\", \"assert manage_license(False) == 'USER_REJECTS_SSPL'\", \"assert manage_license(True) == 'USER_AC... | {
"split": "train",
"index": 72332,
"acecode_id": "oss_12596",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a data record class that can hold information about a user. The class should have three fields: 'name' (a string), 'age' (an integer), and 'is_active' (a boolean). Implement a function that initializes this data record with the provided values for e... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert YourDataRecord('Alice', 30, True).field1 == 'Alice'\", \"assert YourDataRecord('Bob', 25, False).field2 == 25\", \"assert YourDataRecord('Charlie', 40, True).field3 == True\", \"assert YourDataRecord('Diana', 22, True).field1 == 'Diana'\", \"assert YourDataR... | {
"split": "train",
"index": 72333,
"acecode_id": "evol_33252",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing the heights of a series of buildings. Your task is to implement a function `max_water_trapped(heights: List[int]) -> int` that calculates the maximum amount of water that can be trapped between the buildings after it rains. The wate... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert max_water_trapped([0,1,0,2,1,0,1,3,2,1,2,1]) == 6\", \"assert max_water_trapped([4,2,0,3,2,5]) == 9\", \"assert max_water_trapped([1,0,2]) == 1\", \"assert max_water_trapped([1,2,3,4,5]) == 0\", \"assert max_water_trapped([5,4,3,2,1]) == 0\", \"assert max_wa... | {
"split": "train",
"index": 72334,
"acecode_id": "bigcode_python_fns_19793",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates a user management system for an application. In this system, each user has a unique username and a role. You need to implement a function called `get_user_role(username: str) -> str` that takes in a username as input and re... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_user_role('example.user') == 'Admin'\", \"assert get_user_role('zope.user') == 'Guest'\", \"assert get_user_role('benutzer') == 'Member'\", \"assert get_user_role('john.doe') == 'User not found'\", \"assert get_user_role('admin.user') == 'User not found'... | {
"split": "train",
"index": 72335,
"acecode_id": "bigcode_python_fns_27318",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that converts a JSON Web Key (JWK) curve parameter to a corresponding KeyAgreementCurveType. The function should take a JSON string representing a JWK and return the appropriate KeyAgreementCurveType based on the \"crv\" parameter in ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert convert_jwk_to_curve_type('{\\\"crv\\\": \\\"X25519\\\", \\\"kty\\\": \\\"OKP\\\"}') == KeyAgreementCurveType.X25519\", \"assert convert_jwk_to_curve_type('{\\\"crv\\\": \\\"P-256\\\", \\\"kty\\\": \\\"EC\\\"}') == KeyAgreementCurveType.P256\", \"assert conv... | {
"split": "train",
"index": 72336,
"acecode_id": "oss_19736",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an input string, encode it using a specific rule where each alphabetic character is replaced by the character that appears two places after it in the ASCII table, wrapping around from 'z' to 'a' and from 'Z' to 'A'. After encoding the string, count how many vowels (both u... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert countVowelsInEncodedString('') == 0\", \"assert countVowelsInEncodedString('12345') == 0\", \"assert countVowelsInEncodedString('!@#$%') == 0\", \"assert countVowelsInEncodedString('Python 3.9') == 1\", \"assert countVowelsInEncodedString('Testing 123') == 2... | {
"split": "train",
"index": 72337,
"acecode_id": "evol_9041",
"num_tests": 5
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that formats a given Python class reference string into a more readable format. The function should take a string representing a fully qualified class name (including its package path) and return a string that only includes the class name... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert format_class_reference('my_package.my_module.MyClass') == 'MyClass'\", \"assert format_class_reference('another_package.AnotherClass') == 'AnotherClass'\", \"assert format_class_reference('com.example.MyClass') == 'MyClass'\", \"assert format_class_reference... | {
"split": "train",
"index": 72338,
"acecode_id": "bigcode_python_fns_28747",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that retrieves the accuracy value from a given round ID in a simulated directory structure. The function should take two parameters: a dictionary representing the directory structure and a round ID. The directory structure is repre... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_accuracy_value({'1': {'accuracy': '0.95'}, '2': {'accuracy': '0.90'}}, '1') == '0.95'\", \"assert get_accuracy_value({'1': {'accuracy': '0.95'}, '2': {'accuracy': '0.90'}}, '2') == '0.90'\", \"assert get_accuracy_value({'1': {'accuracy': '0.95'}, '2': {'... | {
"split": "train",
"index": 72339,
"acecode_id": "oss_20061",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `dirname(path: str) -> str` that takes a file path as input and returns the directory name of the file. The directory name is defined as the portion of the path that comes before the last '/' character. If the path does not contain any '/', return an empty ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert dirname('/usr/local/bin/python') == '/usr/local/bin'\", \"assert dirname('file.txt') == ''\", \"assert dirname('/home/user/') == '/home/user'\", \"assert dirname('folder/subfolder/') == 'folder/subfolder'\", \"assert dirname('/single-directory') == ''\", \"a... | {
"split": "train",
"index": 72340,
"acecode_id": "bigcode_python_fns_49681",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "Given a string, write a function that returns the first half of the string. If the string has an odd number of characters, include the middle character in the output. Do not use any Python libraries or modules in your solution.\nPlease reason step by step, then write a self-con... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert half_string('abcdef') == 'abc'\", \"assert half_string('abcde') == 'abc'\", \"assert half_string('a') == 'a'\", \"assert half_string('') == ''\", \"assert half_string('hello') == 'hel'\", \"assert half_string('python') == 'pyt'\", \"assert half_string('testc... | {
"split": "train",
"index": 72341,
"acecode_id": "evol_22106",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that retrieves a website title from a settings dictionary. The function should take in a key representing the title and a settings dictionary. If the key exists in the dictionary, the function should return the corresponding value; otherw... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_website_title('tm.site_title', {'tm.site_title': 'My Awesome Website'}) == 'My Awesome Website'\", \"assert get_website_title('tm.site_title', {'tm.site_title': 'Another Site'}) == 'Another Site'\", \"assert get_website_title('non_existent_key', {'tm.sit... | {
"split": "train",
"index": 72342,
"acecode_id": "bigcode_python_fns_43389",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers that represents a sequence, write a function `find_next_in_sequence(seq)` that predicts the next number in the sequence based on the assumption that the sequence is an arithmetic progression. If the sequence is not an arithmetic progression, the functio... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_next_in_sequence([1, 3, 5, 7, 9]) == 11\", \"assert find_next_in_sequence([2, 4, 6, 8, 10]) == 12\", \"assert find_next_in_sequence([5, 10, 15, 20]) == 25\", \"assert find_next_in_sequence([1, 2]) == 3\", \"assert find_next_in_sequence([10, 20, 30]) == ... | {
"split": "train",
"index": 72343,
"acecode_id": "evol_26814",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of URL patterns, where each pattern is a string in the format '/path/to/resource'. Your task is to implement a function `count_url_patterns(urlpatterns)` that takes this list and returns a dictionary. The keys of the dictionary should be the unique URL patt... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_url_patterns(['/home', '/about', '/home', '/contact', '/about', '/products', '/home']) == {'/home': 3, '/about': 2, '/contact': 1, '/products': 1}\", \"assert count_url_patterns(['/api/v1/users', '/api/v1/users', '/api/v1/products']) == {'/api/v1/users... | {
"split": "train",
"index": 72344,
"acecode_id": "oss_3972",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a decorator function, `login_exempt`, that marks a given function as exempt from login verification. The `login_exempt` function should take a function as an argument and return a wrapped version of that function. The wrapped function should be able... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert login_exempt(lambda x: x)(1) == 1\", \"assert login_exempt(lambda x, y: x + y)(1, 2) == 3\", \"assert login_exempt(lambda: 'Hello, World!')() == 'Hello, World!'\", \"assert login_exempt(lambda x, y=2: x * y)(3) == 6\", \"assert login_exempt(lambda x=1, y=2: ... | {
"split": "train",
"index": 72345,
"acecode_id": "bigcode_python_fns_19357",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `root_relative_path_list(current_url)` that takes a string `current_url` as input and returns a list of tuples containing the URL and its corresponding name. The function should adhere to the following requirements: If `current_url` is '/', return an empty ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert root_relative_path_list('/blog/post/1') == [('/blog/', 'blog'), ('/blog/post/', 'post'), ('/blog/post/1/', '1')]\", \"assert root_relative_path_list('/') == []\", \"assert root_relative_path_list('/articles') == [('/articles/', 'articles')]\", \"assert root_... | {
"split": "train",
"index": 72346,
"acecode_id": "oss_13543",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a string representation of a Python value, implement a function that formats the string to return just the actual value contained in it. The string representation may include single quotes, Unicode notation, or class type indications. For example, if the input is \"'hello... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert format_param_value(\\\"'hello'\\\") == 'hello'\", \"assert format_param_value(\\\"u'world'\\\") == 'world'\", \"assert format_param_value(\\\"<class 'str'>\\\") == 'str'\", \"assert format_param_value(\\\"'123'\\\") == '123'\", \"assert format_param_value(\\... | {
"split": "train",
"index": 72347,
"acecode_id": "bigcode_python_fns_38010",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that checks whether a provided rules list is valid. The function should take one argument, `rules`, which can be either a list of strings representing rule names or `None`. If `rules` is `None`, the function should raise a `SystemExit` ex... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert validate_rules(['rule1', 'rule2', 'rule3']) == True\", \"assert validate_rules(['']) == False\", \"assert validate_rules([]) == False\", \"assert validate_rules(['rule1']) == True\", \"assert validate_rules(['rule1', 'rule2']) == True\", \"assert validate_ru... | {
"split": "train",
"index": 72348,
"acecode_id": "bigcode_python_fns_5862",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with managing user permissions in a system. Create a function `set_permissions_manager(permissions_manager: str) -> None` that accepts a string `permissions_manager` representing the name of a permissions manager. The function should set this name as the current ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert set_permissions_manager('Admin') == None\", \"assert set_permissions_manager('User') == None\", \"assert set_permissions_manager('Guest') == None\", \"assert set_permissions_manager('SuperAdmin') == None\", \"assert set_permissions_manager('Editor') == None\... | {
"split": "train",
"index": 72349,
"acecode_id": "bigcode_python_fns_18487",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with parsing a search string to extract relevant information about courses offered by an institution. The search string will follow a specific format, which can include the institution name, discipline, and catalog number. The function should return a formatted s... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert parse_course_search('QNS csci 101') == 'Institution: QNS, Discipline: csci, Catalog Number: 101'\", \"assert parse_course_search('* csci 101') == 'Institution: *, Discipline: csci, Catalog Number: 101'\", \"assert parse_course_search('QNS csci-101') == 'Inst... | {
"split": "train",
"index": 72350,
"acecode_id": "bigcode_python_fns_37532",
"num_tests": 7
} |
acecode | [
{
"role": "user",
"content": "Given two strings `s1` and `s2`, write a function `isPalindrome` that returns `True` if either `s1` or `s2` is a palindrome, and `False` otherwise. A palindrome is defined as a string that reads the same forwards and backwards, ignoring spaces and capitalization. The function s... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert isPalindrome('racecar', 'hello') == True\", \"assert isPalindrome('world', 'level') == True\", \"assert isPalindrome('hello', 'world') == False\", \"assert isPalindrome('A man a plan a canal Panama', 'not a palindrome') == True\", \"assert isPalindrome('Was ... | {
"split": "train",
"index": 72351,
"acecode_id": "oss_12741",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that processes a list of integers and computes the sum of all even integers in the list. Your function should be able to handle both positive and negative integers, as well as zero. Implement a function called `sum_even_numbers` th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert sum_even_numbers([1, 2, 3, 4]) == 6\", \"assert sum_even_numbers([-1, -2, -3, -4]) == -6\", \"assert sum_even_numbers([0, 1, 2, 3]) == 2\", \"assert sum_even_numbers([]) == 0\", \"assert sum_even_numbers([5, 7, 9]) == 0\", \"assert sum_even_numbers([2, 4, 6]... | {
"split": "train",
"index": 72352,
"acecode_id": "oss_16621",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing the values of a dataset. Your task is to implement a function `find_outliers(data: List[int]) -> List[int]` that identifies the outliers in the dataset based on the standard deviation method. An outlier is defined as a value that is... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_outliers([10, 12, 12, 13, 12, 14, 10]) == []\", \"assert find_outliers([1, 2, 3, 4, 5, 100]) == [100]\", \"assert find_outliers([-10, -9, -8, -7, -6, 100]) == [100]\", \"assert find_outliers([1, 2, 3, 4, 5, -100]) == [-100]\", \"assert find_outliers([1,... | {
"split": "train",
"index": 72353,
"acecode_id": "bigcode_python_fns_41851",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "Write a Python function that takes a list of integer tuples as input and returns a list of tuples sorted by the first element of each tuple in ascending order. For example, given the input [(2, 5), (3, 1), (1, 7), (4, 3)], the output should be [(1, 7), (2, 5), (3, 1), (4, 3)].\... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert sort_tuples([(2, 5), (3, 1), (1, 7), (4, 3)]) == [(1, 7), (2, 5), (3, 1), (4, 3)]\", \"assert sort_tuples([(5, 2), (1, 3), (2, 1)]) == [(1, 3), (2, 1), (5, 2)]\", \"assert sort_tuples([(10, 1), (2, 3), (0, 4), (1, 5)]) == [(0, 4), (1, 5), (2, 3), (10, 1)]\",... | {
"split": "train",
"index": 72354,
"acecode_id": "evol_2308",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, implement a function that reshapes the list into a new list based on a specified group size. The input consists of a list of integers representing weights and an integer representing the group size. The output should be a new reshaped list where the we... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert reshape_weights([1, 2, 3, 4, 5, 6], 2) == [1, 2, 3, 4, 5, 6]\", \"assert reshape_weights([1, 2, 3, 4, 5], 2) == []\", \"assert reshape_weights([1, 2, 3, 4, 5, 6, 7, 8], 4) == [1, 2, 3, 4, 5, 6, 7, 8]\", \"assert reshape_weights([], 3) == []\", \"assert resha... | {
"split": "train",
"index": 72355,
"acecode_id": "bigcode_python_fns_37284",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `advanced_monotonic(l: list, strict: bool = False, ignore_non_numerical: bool = False) -> bool` that checks if the elements of a list rise or fall monotonically under certain conditions. The function should handle non-numerical elements based on the `ignore... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert advanced_monotonic([1, 2, 3, 4]) == True\", \"assert advanced_monotonic([4, 3, 2, 1]) == True\", \"assert advanced_monotonic([1, 2, 2, 3]) == True\", \"assert advanced_monotonic([1, 1, 1, 1], strict=True) == False\", \"assert advanced_monotonic([1, 2, '3', '... | {
"split": "train",
"index": 72356,
"acecode_id": "evol_27700",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that takes a list of invoices, where each invoice is represented as a list containing the invoice ID, customer name, and amount. Your function should return a CSV formatted string representing these invoices. Each row in the output should... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_invoices_csv([['001', 'Alice', 100.0], ['002', 'Bob', 200.5]]) == '001,Alice,100.0\\\\n002,Bob,200.5\\\\n'\", \"assert generate_invoices_csv([['003', 'Charlie', 300.75]]) == '003,Charlie,300.75\\\\n'\", \"assert generate_invoices_csv([]) == ''\", \"... | {
"split": "train",
"index": 72357,
"acecode_id": "bigcode_python_fns_46208",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a dictionary representing the usage of resources in a storage system. Each resource has attributes for total space, used space, and optional obsolete space. Your task is to implement a function `check_storage_usage(resource: Dict[str, Dict[str, int]], greedy: bool... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert check_storage_usage({'limits': {'MinFreeSpace': 100}, 'attributes': {}, 'usage': [{'source': 'storage', 'total': 500, 'used': 400}]} ) == (0, True)\", \"assert check_storage_usage({'limits': {'MinFreeSpace': 0}, 'attributes': {}, 'usage': [{'source': 'storag... | {
"split": "train",
"index": 72358,
"acecode_id": "bigcode_python_fns_7727",
"num_tests": 7
} |
acecode | [
{
"role": "user",
"content": "You are given a list of words, and your task is to determine the uniqueness of these words in the list. A word is considered unique if it appears only once in the given list. Implement a function `count_unique_words(words: List[str]) -> int` that returns the count of unique wor... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_unique_words(['hello', 'world', 'HELLO', 'WORLD']) == 0\", \"assert count_unique_words(['test', 'Test', 'TEST', 'testing']) == 1\", \"assert count_unique_words(['']) == 1\", \"assert count_unique_words(['repeat', 'repeat', 'repeat']) == 0\", \"assert c... | {
"split": "train",
"index": 72359,
"acecode_id": "bigcode_python_fns_3261",
"num_tests": 9
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that takes a list of products and returns a list of dictionaries representing each product. Each product in the input list is represented as a dictionary with the following keys: 'name' (string), 'price' (float), and 'description' (string... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert serialize_products([{'name': 'Product 1', 'price': 10.99, 'description': 'Description 1'}, {'name': 'Product 2', 'price': 20.49, 'description': 'Description 2'}]) == [{'id': 1, 'name': 'Product 1', 'price': 10.99, 'description': 'Description 1'}, {'id': 2, '... | {
"split": "train",
"index": 72360,
"acecode_id": "oss_17020",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "Implement a function `levenshtein_distance(word1: str, word2: str) -> int` that calculates the Levenshtein distance between two given English words. The Levenshtein distance is defined as the minimum number of single-character edits (insertions, deletions, or substitutions) req... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert levenshtein_distance('cat', 'bat') == 1\", \"assert levenshtein_distance('kitten', 'sitting') == 3\", \"assert levenshtein_distance('flaw', 'lawn') == 2\", \"assert levenshtein_distance('abc', 'abc') == 0\", \"assert levenshtein_distance('abc', '') == 3\", \... | {
"split": "train",
"index": 72361,
"acecode_id": "evol_22259",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates the display of a home screen. The function should take a string input representing the content of the home screen and return a string that includes a message indicating that the home screen is displayed along with the provi... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert display_home_screen('Welcome to the Home Screen!') == 'Displaying Home Screen:\\\\nWelcome to the Home Screen!'\", \"assert display_home_screen('Hello, World!') == 'Displaying Home Screen:\\\\nHello, World!'\", \"assert display_home_screen('This is the main ... | {
"split": "train",
"index": 72362,
"acecode_id": "bigcode_python_fns_21568",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an array of distinct letters and a number, write a function that returns all possible combinations of the specified number of letters from the array. The function should take two parameters: an array of letters and a number indicating how many letters to select. The outpu... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert select_letters(['a', 'b', 'c', 'd', 'e'], 3) == ['abc', 'abd', 'abe', 'acd', 'ace', 'ade', 'bcd', 'bce', 'bde', 'cde']\", \"assert select_letters(['x', 'y', 'z'], 2) == ['xy', 'xz', 'yz']\", \"assert select_letters(['p', 'q', 'r', 's', 't'], 1) == ['p', 'q',... | {
"split": "train",
"index": 72363,
"acecode_id": "evol_36029",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given two page objects, `prev_pg` and `cur_pg`, each with attributes `vol`, `ref_start_page_no`, and `ref_end_page_no`. Your task is to implement a function `is_valid_page_to_edit(prev_pg, cur_pg)` that checks whether the current page can be edited based on the followin... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_valid_page_to_edit({'vol': 1, 'ref_start_page_no': 1, 'ref_end_page_no': 2}, {'vol': 1, 'ref_start_page_no': 1, 'ref_end_page_no': 2}) == True\", \"assert is_valid_page_to_edit({'vol': 1, 'ref_start_page_no': 1, 'ref_end_page_no': 2}, {'vol': 1, 'ref_star... | {
"split": "train",
"index": 72364,
"acecode_id": "bigcode_python_fns_11025",
"num_tests": 9
} |
acecode | [
{
"role": "user",
"content": "You are tasked with processing a list of received codes along with associated special options to determine the files that should be created. Each code corresponds to a file named 'file_<code>'. You are given a list of tuples where each tuple contains a SpecialOptionType and a c... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_codes([3030, 3031, 3032], [(SpecialOptionType.AO, 'Publication_Date')]) == ['file_3030', 'file_3031', 'file_3032']\", \"assert process_codes([1010, 2020, 3030], [(SpecialOptionType.POB, 'Include_Parent_Details')]) == ['file_1010', 'file_2020', 'file_... | {
"split": "train",
"index": 72365,
"acecode_id": "oss_30194",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are tasked with counting the number of Sundays that fall on the first day of the month in the range of years from 1901 to 2000. Write a function `count_sundays()` that returns the total count of such Sundays. The function should consider the leap years and the adjustment of... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_sundays() == 171\", \"assert count_sundays() != 170\", \"assert count_sundays() > 150\", \"assert count_sundays() < 200\", \"assert count_sundays() % 10 == 1\", \"assert count_sundays() % 2 == 1\", \"assert count_sundays() >= 100\", \"assert count_sund... | {
"split": "train",
"index": 72366,
"acecode_id": "oss_25084",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of status effects for a player, each with a name and a duration, implement a function that removes all status effects with a duration of 1 from the list. Additionally, if the player has an 'enhanced' status, add a new status effect called 'enhancement_sickness' wit... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert update_status_effects([['disorient', 1], ['connected', 2], ['poison', 1], ['lag', 1], ['anti_area', 999]], True) == [['connected', 2], ['anti_area', 999], ['enhancement_sickness', 1]]\", \"assert update_status_effects([['disorient', 1], ['connected', 1]], Tr... | {
"split": "train",
"index": 72367,
"acecode_id": "bigcode_python_fns_31065",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are developing a music analysis tool that analyzes various features of audio files. Given a dictionary containing extracted audio features, your task is to complete the dictionary by providing the correct values for any missing or incorrect features. The features to be extr... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert complete_features({'beats_count': '25.0', 'mood_acoustic': 'acoustic', 'mood_party': 'not_party', 'moods_mirex': 'Cluster3', 'lossless': 'True', 'danceability': 'not_danceable', 'mood_aggressive': 'not_aggressive', 'key': 'F# minor', 'gender': 'male', 'chord... | {
"split": "train",
"index": 72368,
"acecode_id": "oss_549",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "Implement a function `quick_sort(arr)` that takes a list of integers and returns a new list containing the same integers sorted in non-decreasing order. The function should use the quicksort algorithm. You may assume that the input list will only contain integers.\nPlease reaso... | 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([3]) == [3]\", \"assert quick_sort([]) == []\", \"assert quick_sort([9, 8, 7, 6, 5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\", \"assert quick_sort([1, 2, 3, 4, 5, 6, 7, 8... | {
"split": "train",
"index": 72369,
"acecode_id": "evol_35863",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a string, write a function that capitalizes every third character in the string and returns the modified string. The string can contain letters, digits, and special characters.\nPlease reason step by step, then write a self-contained Python solution. Give your final progr... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert capitalize_third_char('hello world') == 'heLlo woRld'\", \"assert capitalize_third_char('abcdefg') == 'abCdeFg'\", \"assert capitalize_third_char('') == ''\", \"assert capitalize_third_char('ab') == 'ab'\", \"assert capitalize_third_char('abc') == 'abC'\", \... | {
"split": "train",
"index": 72370,
"acecode_id": "evol_30828",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that inserts an item into a singly linked list at a specified position. The linked list is represented by a list of integers. Your function should take three arguments: `linked_list`, a list of integers representing the current linked... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert insert_item_at_position([1, 2, 3], 4, 1) == [1, 4, 2, 3]\", \"assert insert_item_at_position([1, 2, 3], 0, 0) == [0, 1, 2, 3]\", \"assert insert_item_at_position([], 5, 0) == [5]\", \"assert insert_item_at_position([10, 20], 15, 1) == [10, 15, 20]\", \"asser... | {
"split": "train",
"index": 72371,
"acecode_id": "oss_20888",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of arbitrary objects, write a function that sorts the objects alphanumerically based on their string representation and returns a single string with the sorted results joined by underscores ('_'). The input list can contain any object that has a .__str__() method, ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert alphabetize_concat([3, 'apple', 2.5, 'banana']) == '2.5_3_apple_banana'\", \"assert alphabetize_concat(['banana', 'apple', 'banana', 1.5]) == '1.5_apple_banana_banana'\", \"assert alphabetize_concat(['z', 'a', 'b', 'c']) == 'a_b_c_z'\", \"assert alphabetize_... | {
"split": "train",
"index": 72372,
"acecode_id": "bigcode_python_fns_22221",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates the creation of a directory for storing application data. Implement a function `create_data_directory(app_name: str, app_author: str) -> str` that takes in two parameters: the name of the application and the author's name. ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_data_directory('pda', 'StarrFox') == '/home/user/StarrFox/pda/'\", \"assert create_data_directory('app', 'Author') == '/home/user/Author/app/'\", \"assert create_data_directory('test_app', 'Tester') == '/home/user/Tester/test_app/'\", \"assert create_... | {
"split": "train",
"index": 72373,
"acecode_id": "bigcode_python_fns_4251",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with calculating the total setup rate for different configurations in a network management system. You are given a dictionary called `expected_flow_setup_rate`, which contains two sub-dictionaries: 'policy' and 'nat'. Each sub-dictionary contains flow setup rates... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_total_setup_rate({'policy': {'v1': 20000, 'v2': 28000}, 'nat': {'v1': 15000, 'v2': 21000}}) == {'policy': 48000, 'nat': 36000}\", \"assert calculate_total_setup_rate({'policy': {'v1': 10000}, 'nat': {'v1': 5000}}) == {'policy': 10000, 'nat': 5000}\... | {
"split": "train",
"index": 72374,
"acecode_id": "oss_35536",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates accessing a contact page on a website. The function, `access_contact_page`, will take in two arguments: a configuration dictionary and a browser object. The function should simulate visiting the contact page and verify if t... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert access_contact_page({'urls': ['https://example.com/contact']}, Browser()) == True\", \"assert access_contact_page({'urls': ['https://test.com/contact']}, Browser()) == True\", \"assert access_contact_page({'urls': ['https://mywebsite.com/contact']}, Browser(... | {
"split": "train",
"index": 72375,
"acecode_id": "bigcode_python_fns_4804",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "Given an array of integers and a maximum number of iterations, implement a function `findMaxWithinIterations(arr, max_iterations)` that returns the maximum value found within the specified number of iterations. If the maximum value is not found within the given iterations, retu... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert findMaxWithinIterations([3, 7, 2, 8, 5, 9], 3) == 7\", \"assert findMaxWithinIterations([1, 2, 3, 4, 5], 5) == 5\", \"assert findMaxWithinIterations([-1, -2, -3, -4], 2) == -1\", \"assert findMaxWithinIterations([10, 20, 30, 40], 1) == 10\", \"assert findMax... | {
"split": "train",
"index": 72376,
"acecode_id": "oss_32221",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates a counter with specific minimum and maximum limits. The function should be able to increment and decrement the counter according to the following rules: The counter starts at a specified minimum value and can be increme... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert simulate_counter(0, None, 0, 5, 2, 'location1') == (3, 'location1')\", \"assert simulate_counter(0, 10, 5, 3, 2, 'location2') == (6, 'location2')\", \"assert simulate_counter(0, None, 0, 0, 0, 'location3') == (0, 'location3')\", \"assert simulate_counter(0, ... | {
"split": "train",
"index": 72377,
"acecode_id": "oss_33540",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, write a function `sum_of_squares` that returns the sum of the squares of all the even numbers in the list. If there are no even numbers, the function should return 0. The input list will contain at least one integer, and can be of arbitrary length. The... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert sum_of_squares([1, 2, 3, 4]) == 20\", \"assert sum_of_squares([1, 3, 5, 7]) == 0\", \"assert sum_of_squares([0, 1, 2, 3, 4]) == 20\", \"assert sum_of_squares([-2, -1, 0, 1, 2]) == 8\", \"assert sum_of_squares([10, 15, 20]) == 500\", \"assert sum_of_squares([... | {
"split": "train",
"index": 72378,
"acecode_id": "oss_4181",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that determines if a combination of two strings of parentheses creates a valid sequence. The function should take a list containing exactly two strings, each made up solely of '(' and ')' characters. If the concatenation of the two st... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert check_parentheses(['(', ')']) == 'Valid'\", \"assert check_parentheses(['((', '))']) == 'Valid'\", \"assert check_parentheses(['((', '))(']) == 'Invalid'\", \"assert check_parentheses(['())', '()']) == 'Invalid'\", \"assert check_parentheses(['((', '(']) == ... | {
"split": "train",
"index": 72379,
"acecode_id": "evol_25514",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Write a function that takes a list of strings as input. The list is made of different words. The function should return a dictionary, where the key is the word with the longest length from the list and the value is the frequency count of each character in that word. If there ar... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert longest_word_distinct_chars(['apple', 'banana', 'cherry']) == {'banana': {'b': 1, 'a': 3, 'n': 2}}\", \"assert longest_word_distinct_chars(['dog', 'cat', 'elephant']) == {'elephant': {'e': 2, 'l': 1, 'p': 1, 'h': 1, 'a': 1, 'n': 1, 't': 1}}\", \"assert longe... | {
"split": "train",
"index": 72380,
"acecode_id": "evol_15338",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that calculates the permissions for files and directories in a storage management system. The function should take two optional parameters: `file_permissions` and `directory_permissions`. If `file_permissions` is not provided, it should d... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert set_permissions() == {'file_permissions': 420, 'directory_permissions': 493}\", \"assert set_permissions(0o600) == {'file_permissions': 384, 'directory_permissions': 493}\", \"assert set_permissions(0o644, 0o700) == {'file_permissions': 420, 'directory_permi... | {
"split": "train",
"index": 72381,
"acecode_id": "oss_5641",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a parsed method represented as a dictionary with potential keys: 'type', 'name', 'arguments', 'returns', 'description', 'contracts', and 'body'. Write a function `translate_method(parsed: Dict[str, Union[str, List[str], None]]) -> Dict[str, Union[str, List[str], N... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert translate_method({'type': 'ImplementationSpecificMethod', 'name': 'method1', 'arguments': ['arg1', 'arg2'], 'returns': 'int', 'description': 'This does something', 'contracts': []}) == {'type': 'ImplementationSpecificMethod', 'name': 'method1', 'arguments': ... | {
"split": "train",
"index": 72382,
"acecode_id": "bigcode_python_fns_35177",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "You are given a list of migration operations represented as instances of the `CreateModel` class. Each `CreateModel` operation has a `name` attribute that specifies the name of the model being created. Your task is to implement a function `get_created_models(operations)` that t... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_created_models([CreateModel(name='User'), CreateModel(name='Post')]) == ['User', 'Post']\", \"assert get_created_models([CreateModel(name='Order'), CreateModel(name='Product'), CreateModel(name='Category')]) == ['Order', 'Product', 'Category']\", \"asser... | {
"split": "train",
"index": 72383,
"acecode_id": "oss_9279",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Develop a Python function that retrieves data for a specified quarter of a given year from a simulated marketing data table. The function should accept two parameters: 'quarter' (an integer between 1 and 4) and 'year' (an integer representing the year). The function should retu... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_quarter_dates(1, 2023) == ('2023-01-01', '2023-03-31')\", \"assert get_quarter_dates(2, 2023) == ('2023-04-01', '2023-06-30')\", \"assert get_quarter_dates(3, 2023) == ('2023-07-01', '2023-09-30')\", \"assert get_quarter_dates(4, 2023) == ('2023-10-01', ... | {
"split": "train",
"index": 72384,
"acecode_id": "evol_26238",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a dictionary that represents a configuration file, where each key is a section name and each value is another dictionary containing key-value pairs. Write a function `read_config_value(config, section, key, default)` that retrieves the value associated with the gi... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert read_config_value({'Section1': {'key1': '1.5', 'key2': '2.0'}}, 'Section1', 'key1', 0.0) == 1.5\", \"assert read_config_value({'Section1': {'key1': '1.5', 'key2': '2.0'}}, 'Section1', 'key3', 0.0) == 0.0\", \"assert read_config_value({'Section1': {'key1': 'o... | {
"split": "train",
"index": 72385,
"acecode_id": "bigcode_python_fns_17910",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an integer x, write a function that determines whether x is equal to the number three. The function should return True if x is three, and False otherwise. Your function should be named `is_three` and accept a single integer as an argument.\nPlease reason step by step, the... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_three(3) == True\", \"assert is_three(0) == False\", \"assert is_three(2) == False\", \"assert is_three(4) == False\", \"assert is_three(-1) == False\", \"assert is_three(10) == False\", \"assert is_three('3') == False\", \"assert is_three(None) == False\... | {
"split": "train",
"index": 72386,
"acecode_id": "bigcode_python_fns_21602",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing the weights of various packages. Your task is to implement a function that will determine how many packages can be carried by a truck given a weight limit. The truck can carry a total weight of at most 'limit'. The function should r... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert max_packages([1, 2, 3, 4, 5], 5) == 2\", \"assert max_packages([10, 20, 30], 50) == 2\", \"assert max_packages([1, 2, 3, 4], 10) == 4\", \"assert max_packages([5, 5, 5, 5], 10) == 2\", \"assert max_packages([1, 1, 1, 1], 2) == 2\", \"assert max_packages([3, ... | {
"split": "train",
"index": 72387,
"acecode_id": "bigcode_python_fns_9116",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "You are given a list of transactions where each transaction is represented as a tuple of three integers (sender, receiver, amount). Each transaction indicates that the sender is transferring a certain amount of money to the receiver. Write a function that determines if there is... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert can_balance_transactions([(1, 2, 10), (2, 3, 5), (3, 1, 7)]) == False\", \"assert can_balance_transactions([(1, 2, 10), (2, 1, 10)]) == True\", \"assert can_balance_transactions([(1, 2, 5), (2, 3, 5), (3, 1, 5)]) == True\", \"assert can_balance_transactions(... | {
"split": "train",
"index": 72388,
"acecode_id": "bigcode_python_fns_27483",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function named `reflect_or_create_tables` that takes in a dictionary called `options`. This dictionary contains table names as keys, and their corresponding values can either be a string representing the full table name or None. Your function shou... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert reflect_or_create_tables({'wfdisc': 'my_table', 'lastid': None}) == {'wfdisc': 'my_table', 'lastid': 'default_table'}\", \"assert reflect_or_create_tables({'table1': 'first_table', 'table2': 'second_table'}) == {'table1': 'first_table', 'table2': 'second_tab... | {
"split": "train",
"index": 72389,
"acecode_id": "bigcode_python_fns_6834",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that reverses the order of words in a given sentence. The function should take a single string input representing the sentence, and it should return a new string with the words in reverse order. Words are defined as sequences of character... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert reverse_words('hello world') == 'world hello'\", \"assert reverse_words('The quick brown fox') == 'fox brown quick The'\", \"assert reverse_words('Python is awesome') == 'awesome is Python'\", \"assert reverse_words('OpenAI creates amazing technology') == 't... | {
"split": "train",
"index": 72390,
"acecode_id": "oss_17990",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function to find ranges of consecutive numbers in a given list of integers. A range is defined as a sequence of consecutive numbers where the difference between each pair of adjacent numbers is 1. For example, the list [1, 2, 3, 6, 7, 8, 10] c... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_ranges([1, 2, 3, 6, 7, 8, 10]) == [(1, 3), (6, 8), (10, 10)]\", \"assert find_ranges([5, 6, 7, 10, 11, 12, 15]) == [(5, 7), (10, 12), (15, 15)]\", \"assert find_ranges([1, 3, 5, 7, 9]) == [(1, 1), (3, 3), (5, 5), (7, 7), (9, 9)]\", \"assert find_ranges(... | {
"split": "train",
"index": 72391,
"acecode_id": "oss_34992",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing wallet balances at a specific block height in a blockchain. Your task is to create a function that returns a list of indices of the wallets that have a balance greater than a specified amount. The function should take in three param... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_wallet_indices_over_amount([100, 200, 300, 400], 250, 0) == [2, 3]\", \"assert get_wallet_indices_over_amount([10, 20, 30], 30, 2) == []\", \"assert get_wallet_indices_over_amount([100, 200, 300], 150, 3) == [1, 2]\", \"assert get_wallet_indices_over_amo... | {
"split": "train",
"index": 72392,
"acecode_id": "oss_33686",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "Implement a function that determines if a given array of numbers, which may include positive and negative integers as well as zero, forms a geometric progression. If it does, the function should return the common ratio; otherwise, return None. A geometric progression is a seque... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_geometric_progression([2, 4, 8, 16]) == (True, 2.0)\", \"assert is_geometric_progression([1, 2, 4, 8]) == (True, 2.0)\", \"assert is_geometric_progression([3, 6, 12, 24]) == (True, 2.0)\", \"assert is_geometric_progression([5, 10, 20, 40]) == (True, 2.0)\... | {
"split": "train",
"index": 72393,
"acecode_id": "evol_30320",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of dictionaries representing temperature records, each containing a year and the corresponding minimum temperature for that year, write a function `find_year_with_min_temp(records: List[Dict[str, Any]], temp: float) -> List[int]` that returns a list of years where ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_year_with_min_temp([{'year': 2002, 'temperature_minimum': 5.0}, {'year': 2003, 'temperature_minimum': 5.0}], 5.0) == [2002, 2003]\", \"assert find_year_with_min_temp([{'year': 1999, 'temperature_minimum': 20.0}, {'year': 2000, 'temperature_minimum': 20.... | {
"split": "train",
"index": 72394,
"acecode_id": "bigcode_python_fns_43906",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that modifies the behavior of a text editor's cursor width based on its position. The function will receive a list of cursor position commands, each represented as a tuple. Each command is a tuple with three elements: the first elemen... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_cursor_width([('set', 'insert', '1.0'), ('set', 'insert', '2.1'), ('set', 'insert', '3.0'), ('set', 'insert', '4.2')]) == [3, 2, 3, 2]\", \"assert get_cursor_width([('set', 'insert', '0.0'), ('set', 'insert', '1.5')]) == [3, 2]\", \"assert get_cursor_wid... | {
"split": "train",
"index": 72395,
"acecode_id": "bigcode_python_fns_29851",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of Linux distributions and a boolean flag indicating whether to include the full name of the distribution, implement a function `get_supported_distributions(include_full_name: bool, distributions: List[str]) -> List[str]`. The function should return a list of suppo... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_supported_distributions(True, ['Arch Linux', 'Arch Linux', 'XUbuntu']) == ['Arch Linux']\", \"assert get_supported_distributions(False, ['Arch Linux', 'Arch Linux', 'XUbuntu']) == ['Arch Linux']\", \"assert get_supported_distributions(True, ['CentOS', 'C... | {
"split": "train",
"index": 72396,
"acecode_id": "bigcode_python_fns_16665",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are tasked with writing a function `create_person(name: str, age: int) -> dict` that takes a person's name and age as input and returns a dictionary with keys 'name' and 'age'. The value for 'name' should be the input string and the value for 'age' should be the input integ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_person('Alice', 30) == {'name': 'Alice', 'age': 30}\", \"assert create_person('Bob', 25) == {'name': 'Bob', 'age': 25}\", \"assert create_person('Charlie', 40) == {'name': 'Charlie', 'age': 40}\", \"assert create_person('David', 22) == {'name': 'David... | {
"split": "train",
"index": 72397,
"acecode_id": "evol_4429",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that takes a list of integers and returns a new list containing only the unique integers from the input list in the order they first appeared. Write a function `get_unique_integers(arr: List[int]) -> List[int]` where `arr` is a list of in... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_unique_integers([1, 2, 2, 3, 4, 3, 5]) == [1, 2, 3, 4, 5]\", \"assert get_unique_integers([5, 5, 5, 5]) == [5]\", \"assert get_unique_integers([]) == []\", \"assert get_unique_integers([10, 20, 10, 30, 40]) == [10, 20, 30, 40]\", \"assert get_unique_inte... | {
"split": "train",
"index": 72398,
"acecode_id": "bigcode_python_fns_30242",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Create a function to extract all unique alphabetic characters from a given string, disregarding case sensitivity and ignoring any punctuation or whitespace. The function should return a sorted list of these unique characters. For example, given the string 'Hello, World!', the f... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert collect_unique_alphabets('My name is John! Or is it?') == ['a', 'e', 'h', 'i', 'j', 'm', 'n', 'o', 'r', 's', 't', 'y']\", \"assert collect_unique_alphabets('Hello, World!') == ['d', 'e', 'h', 'l', 'o', 'r', 'w']\", \"assert collect_unique_alphabets('') == []... | {
"split": "train",
"index": 72399,
"acecode_id": "evol_9386",
"num_tests": 15
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.