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 given a list of integers representing the status of instances. Each integer can be either 0 (inactive) or 1 (active). Write a function `count_active_instances(statuses: List[int]) -> int` that counts and returns the number of active instances (i.e., the number of 1s in ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_active_instances([1, 0, 1, 1, 0]) == 3\", \"assert count_active_instances([0, 0, 0, 0]) == 0\", \"assert count_active_instances([1, 1, 1, 1]) == 4\", \"assert count_active_instances([0, 1, 0, 1, 0, 1]) == 3\", \"assert count_active_instances([]) == 0\"...
{ "split": "train", "index": 70200, "acecode_id": "bigcode_python_fns_48453", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a list of integers and returns a new list containing only the unique elements from the original list, preserving the order of their first appearance. The input list may contain duplicates, and the output list should not contain any duplicates. Wr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_unique_elements([1, 2, 2, 3, 4]) == [1, 2, 3, 4]\", \"assert extract_unique_elements([5, 5, 5, 5, 5]) == [5]\", \"assert extract_unique_elements([]) == []\", \"assert extract_unique_elements([10, 20, 10, 30, 20]) == [10, 20, 30]\", \"assert extract_u...
{ "split": "train", "index": 70201, "acecode_id": "evol_19215", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with managing a simple bank account. Your goal is to implement a function that simulates depositing and withdrawing funds from the account. The function should take a list of operations, where each operation is represented as a tuple. The first element of the tup...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_bank_account([('deposit', 100.00), ('withdraw', 50.00)]) == 50.00\", \"assert manage_bank_account([('deposit', 200.00), ('withdraw', 300.00)]) == 200.00\", \"assert manage_bank_account([('deposit', 150.00), ('withdraw', 150.00), ('withdraw', 10.00)]) ...
{ "split": "train", "index": 70202, "acecode_id": "oss_35288", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of filenames that follow a specific naming convention. Each filename is a string that may represent output files in the format 'varname_AER_freq_expname_dates.nc'. Your task is to implement a function that filters this list of filenames based on optional cr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_filenames(['var1_AER_fx_exp1_202101.nc', 'var1_AER_fx_exp2_202102.nc', 'var2_AER_fx_exp1_202103.nc'], 'exp1', 'var1', 'fx') == ['var1_AER_fx_exp1_202101.nc']\", \"assert filter_filenames(['var1_AER_fx_exp1_202101.nc', 'var1_AER_fx_exp2_202102.nc', 'va...
{ "split": "train", "index": 70203, "acecode_id": "bigcode_python_fns_34640", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of floating-point numbers, create a function that returns a dictionary mapping each number to its multiplicative inverse. The multiplicative inverse of a number x is defined as 1/x. The input list will not contain zero, and all numbers are guaranteed to be valid fl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_inverse_mapping([1.0, 2.0, 3.0]) == {1.0: 1.0, 2.0: 0.5, 3.0: 0.3333333333333333}\", \"assert create_inverse_mapping([4.5, 5.5, 6.5]) == {4.5: 0.2222222222222222, 5.5: 0.18181818181818182, 6.5: 0.15384615384615385}\", \"assert create_inverse_mapping([...
{ "split": "train", "index": 70204, "acecode_id": "evol_31220", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that maps a list of table column values to a list of corresponding hex colors. The function should accept the following parameters: a string `table_column` representing the name of the table column, a list `table_column_values` containing...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert map_colors('ColorColumn', [1, 2], ['#FF0000', '#00FF00'], 'd', '#FFFFFF') == 'Success'\", \"assert map_colors('ColorColumn', [1, 2, 3], ['#FF0000', '#00FF00'], 'd') == 'ValueError'\", \"assert map_colors('ColorColumn', [1, 2], ['#FF0000', '#00FF00'], 'c') ==...
{ "split": "train", "index": 70205, "acecode_id": "bigcode_python_fns_3463", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string of text, determine if it contains any flamboyant or excessively illustrative expressions. You should define a list of specific flamboyant terms. If any of these terms are found in the text, return 'Present'; otherwise, return 'Absent'. Write a function `analyze_t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert analyze_text('The female figure elegantly ambled into the charming, diminutive coffee shop, her gaze shimmering akin to a dew-baptized dawn.') == 'Present'\", \"assert analyze_text('The sun set over the horizon, casting a warm glow.') == 'Absent'\", \"assert...
{ "split": "train", "index": 70206, "acecode_id": "evol_23334", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You need to implement a function `check_failed_builds(build_ids: List[int], build_states: List[str]) -> bool` that checks if any module build from the `build_ids` list is in a failed state. The function should return `True` if at least one of the builds is in a failed state, an...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_failed_builds([1, 2, 3], ['successful', 'successful', 'successful']) == False\", \"assert check_failed_builds([4, 5, 6], ['failed', 'successful', 'successful']) == True\", \"assert check_failed_builds([7, 8, 9], ['successful', 'failed', 'successful']) ...
{ "split": "train", "index": 70207, "acecode_id": "bigcode_python_fns_27367", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that logs a simulated client request. The request is represented as a dictionary containing the following keys: 'url' (a string representing the request URL), 'method' (a string representing the HTTP method, e.g., 'GET', 'POST'), 'headers...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert log_request({'url': 'http://example.com', 'method': 'GET', 'headers': {}, 'body': 'Test body'}) == None\", \"assert log_request({'url': 'http://example.com', 'method': 'POST', 'headers': {'Content-Type': 'application/json'}, 'body': 'Sample body'}) == None\"...
{ "split": "train", "index": 70208, "acecode_id": "bigcode_python_fns_9931", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing location data points represented as dictionaries with keys 'latitude' and 'longitude'. Your goal is to implement a function that accepts a list of such location data points and returns the average latitude and longitude as a dictionary. The averag...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_average_location([]) == None\", \"assert calculate_average_location([{'latitude': 10, 'longitude': 20}, {'latitude': 30, 'longitude': 40}]) == {'latitude': 20.0, 'longitude': 30.0}\", \"assert calculate_average_location([{'latitude': 0, 'longitude'...
{ "split": "train", "index": 70209, "acecode_id": "oss_19934", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function called `manage_inventory` that takes the following parameters: `player_id` (string): The unique identifier of the player whose inventory needs to be managed. `action` (string): The action to be performed on the player's inventory. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_inventory('player123', 'add', 'sword') == \\\"Item 'sword' added to player123's inventory.\\\"\", \"assert manage_inventory('player456', 'add', 'shield') == \\\"Item 'shield' added to player456's inventory.\\\"\", \"assert manage_inventory('player789'...
{ "split": "train", "index": 70210, "acecode_id": "oss_37411", "num_tests": 6 }
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 even numbers from the original list. The function should maintain the order of the even numbers as they appeared in the original list. Implement the function `filter...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_even_numbers([1, 2, 3, 4, 5]) == [2, 4]\", \"assert filter_even_numbers([2, 4, 6, 8]) == [2, 4, 6, 8]\", \"assert filter_even_numbers([1, 3, 5, 7]) == []\", \"assert filter_even_numbers([]) == []\", \"assert filter_even_numbers([-2, -1, 0, 1, 2]) == [...
{ "split": "train", "index": 70211, "acecode_id": "oss_17019", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of available addons, where each addon is represented as a dictionary with a 'short_name' key. Write a function that takes a string `addon_short_name` as input and returns the corresponding addon dictionary if it exists in the list. If the addon with the giv...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_addon_by_name('addon1', [{'short_name': 'addon1', 'name': 'Addon One'}, {'short_name': 'addon2', 'name': 'Addon Two'}]) == {'short_name': 'addon1', 'name': 'Addon One'}\", \"assert get_addon_by_name('addon3', [{'short_name': 'addon1', 'name': 'Addon One'...
{ "split": "train", "index": 70212, "acecode_id": "bigcode_python_fns_8324", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a custom `max_value` function that mimics the behavior of the built-in `max` function in Python. The `max_value` function should accept a variable number of arguments and return the largest argument passed to it. If no arguments are provided, th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_value(1, 2, 3) == 3\", \"assert max_value(-1, -2, -3) == -1\", \"assert max_value(5, 5, 5) == 5\", \"assert max_value(100, 20, 30) == 100\", \"assert max_value(3.5, 2.1, 4.8) == 4.8\", \"assert max_value(-10, 0, 10) == 10\", \"assert max_value(0) == 0\",...
{ "split": "train", "index": 70213, "acecode_id": "oss_19636", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a type annotation decorator that can enforce type checks on a function's input arguments and its return value. The decorator should accept one to three types as arguments. The last type specifies the return type of the function, while the preceding ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert typed(int, str)(lambda x: str(x))(5) == '5'\", \"assert typed(str)(lambda: 42)() == '42'\", \"assert typed(float, float)(lambda x, y: x + y)(1, 2) == 3.0\", \"assert typed(int, int, float)(lambda x, y: x / y)(5, 2) == 2.5\", \"assert typed(int)(lambda x: x)(...
{ "split": "train", "index": 70214, "acecode_id": "bigcode_python_fns_40681", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of sorted sublists, implement a function `merge_sorted_sublists(sublists: List[List[int]]) -> List[int]` that merges these sublists into a single sorted list. Each sublist is sorted in ascending order, and the function should return a new sorted list containing all...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_sorted_sublists([[1, 4, 7], [2, 5, 8], [3, 6, 9]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\", \"assert merge_sorted_sublists([[1, 3, 5], [2, 4, 6]]) == [1, 2, 3, 4, 5, 6]\", \"assert merge_sorted_sublists([[10, 20], [15, 25, 35], [5, 30]]) == [5, 10, 15, 20, 25...
{ "split": "train", "index": 70215, "acecode_id": "bigcode_python_fns_18372", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an integer n, write a function to return a list of all prime factors of n in ascending order. A prime factor is a prime number that divides n without leaving a remainder. If n is less than 2, return an empty list.\nPlease reason step by step, then write a self-contained P...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prime_factors(30) == [2, 3, 5]\", \"assert prime_factors(1) == []\", \"assert prime_factors(2) == [2]\", \"assert prime_factors(3) == [3]\", \"assert prime_factors(97) == [97]\", \"assert prime_factors(7) == [7]\"]}" }
{ "split": "train", "index": 70216, "acecode_id": "evol_2669", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Implement a function `pluck(arr, cond_fn)` that filters a list of integers based on a given condition function `cond_fn`. The function should only include values in the output list that are integers and satisfy the condition defined in `cond_fn`. The condition function should i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert pluck([2, 3, 4, 5, 11, 13, 17, 19], lambda x: is_prime(x) and x > 10) == [11, 13, 17, 19]\", \"assert pluck([1, 2, 3, 4, 5, 6], lambda x: is_prime(x) and x > 10) == []\", \"assert pluck([11, 12, 13, 14, 15], lambda x: is_prime(x) and x > 10) == [11, 13]\", \...
{ "split": "train", "index": 70217, "acecode_id": "evol_2099", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a Trie data structure that supports the following operations: adding a word, searching for a word, checking if any words start with a given prefix, and deleting a word. The Trie should efficiently manage and retrieve string data using a dictionary. Your Trie should su...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert trie.search_word('hello') == False\", \"assert trie.add_word('hello') == None\", \"assert trie.starts_with('helloo') == []\", \"assert trie.search_word('hello') == False\", \"assert trie.add_word('hi') == None\", \"assert trie.search_word('hi') == False\", \...
{ "split": "train", "index": 70218, "acecode_id": "evol_34465", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the highest common factor (HCF) of two non-negative integers 'a' and 'b'. The function should handle cases where either or both integers are zero, returning the non-zero integer if one of them is zero. If both integers are zero, the function...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert highest_common_factor(3, 5) == 1\", \"assert highest_common_factor(25, 15) == 5\", \"assert highest_common_factor(0, 0) == 0\", \"assert highest_common_factor(0, 10) == 10\", \"assert highest_common_factor(10, 0) == 10\", \"assert highest_common_factor(12, 1...
{ "split": "train", "index": 70219, "acecode_id": "evol_18459", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a reservation system for a hotel. Each reservation has a unique identifier, a start time, and a finish time. Your function should take a list of reservations and return a list of strings that represent each reservation in the following format: '...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_reservations([(1, datetime(2023, 5, 15, 10, 30), datetime(2023, 5, 15, 12, 30))]) == ['\\u0411\\u0440\\u043e\\u043d\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435 \\u21161 (c 15.05.23 10:30 \\u043f\\u043e 15.05.23 12:30)']\", \"assert format_...
{ "split": "train", "index": 70220, "acecode_id": "oss_1324", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given a list of nodes represented as dictionaries, write a function `filter_ucs_nodes(nodes: List[Dict[str, Any]]) -> List[Dict[str, Any]]` that filters out nodes with the service 'ucs-obm-service' from their 'obms' list. Each node is represented as a dictionary with at least t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_ucs_nodes([{ 'obms': [{'service': 'ucs-obm-service'}] }, { 'obms': [{'service': 'other-service'}] }]) == [{ 'obms': [{'service': 'ucs-obm-service'}] }]\", \"assert filter_ucs_nodes([{ 'obms': [] }, { 'obms': [{'service': 'other-service'}] }]) == []\",...
{ "split": "train", "index": 70221, "acecode_id": "bigcode_python_fns_40029", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You need to compute the weighted average of all numbers stored in an array, where the weights are stored in another array of the same length. Implement a function `weighted_average(arr, weights)` that takes two lists of equal length as input and returns the weighted average of ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert weighted_average([10, 20, 30], [1, 1, 1]) == 20.0\", \"assert weighted_average([0, 0, 0], [1, 2, 3]) == 0.0\", \"assert weighted_average([5], [1]) == 5.0\", \"assert weighted_average([1, 3, 2], [1, 1, 1]) == 2.0\", \"assert weighted_average([1, 2, 3, 4, 5], ...
{ "split": "train", "index": 70222, "acecode_id": "evol_3305", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given a list of execution times for 16 CUDA kernels, where each entry in the list contains a tuple of the kernel index (0 to 15) and its corresponding execution time in milliseconds. Your task is to calculate the average execution time for each kernel and return a list ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_average_execution_times([(0, 10), (1, 20), (0, 30), (1, 40), (2, 50)]) == [(0, 20.0), (1, 30.0), (2, 50.0)]\", \"assert calculate_average_execution_times([(0, 5), (0, 15), (0, 10), (1, 25)]) == [(0, 10.0), (1, 25.0)]\", \"assert calculate_average_e...
{ "split": "train", "index": 70223, "acecode_id": "oss_37018", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an integer `hour_angle_sunrise` that represents the hour angle of sunrise in degrees, write a function `sunlight_duration(hour_angle_sunrise)` that returns the duration of sunlight in minutes. The duration of sunlight is calculated as 8 times the `hour_angle_sunrise`. The...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sunlight_duration(-180) == -1440\", \"assert sunlight_duration(-120) == -960\", \"assert sunlight_duration(-90) == -720\", \"assert sunlight_duration(-60) == -480\", \"assert sunlight_duration(-30) == -240\", \"assert sunlight_duration(0) == 0\", \"assert su...
{ "split": "train", "index": 70224, "acecode_id": "bigcode_python_fns_637", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that initializes a list of signals. The function should take a list of signal names as input and return a list of initialized signals. Each signal name in the input list should be prefixed with 'SIG' to represent its initialized state. Fo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert init_signals(['TERM', 'INT']) == ['SIGTERM', 'SIGINT']\", \"assert init_signals(['USR1', 'USR2']) == ['SIGUSR1', 'SIGUSR2']\", \"assert init_signals(['ABRT']) == ['SIGABRT']\", \"assert init_signals([]) == []\", \"assert init_signals(['KILL', 'STOP']) == ['S...
{ "split": "train", "index": 70225, "acecode_id": "bigcode_python_fns_2205", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that simulates the retrieval of data from a remote server using provided credentials. The function should take in the user's `user_name`, `password`, and `url` as input parameters. For the purpose of this problem, you will simulate...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fetch_data('admin', 'admin123', 'example.com') == 'Data retrieved successfully from example.com'\", \"assert fetch_data('user', 'pass', 'example.com') == 'Access denied for user at example.com'\", \"assert fetch_data('admin', 'wrongpass', 'example.com') == '...
{ "split": "train", "index": 70226, "acecode_id": "oss_35090", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with simulating the deployment of a token contract in a blockchain environment. Write a function `simulate_token_deployment` that takes the following parameters: a string `project_name` representing the name of the project, a string `blockchain_type` representing...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simulate_token_deployment('MyToken', 'Ethereum', ['0x123', '0x456'], '0x789') == {'project_name': 'MyToken', 'blockchain_type': 'Ethereum', 'deployed_address': '0x789', 'accounts': ['0x123', '0x456']}\", \"assert simulate_token_deployment('TestToken', 'Binan...
{ "split": "train", "index": 70227, "acecode_id": "bigcode_python_fns_7860", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the values of coins and a target value. Your task is to determine the number of distinct combinations of coins that sum up to the target value using each coin an unlimited number of times. Write a function `count_coin_combinations(c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_coin_combinations([2, 5, 3, 6], 10) == 5\", \"assert count_coin_combinations([1], 0) == 1\", \"assert count_coin_combinations([1, 2], 2) == 2\", \"assert count_coin_combinations([1, 2, 5], 5) == 4\", \"assert count_coin_combinations([2, 3, 7], 7) == 2\...
{ "split": "train", "index": 70228, "acecode_id": "oss_6848", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are given a list of integers. Your task is to implement a function that returns a new list containing only the even integers from the original list, in the order they appeared in the original list. Write a function `filter_even_numbers(nums: List[int]) -> List[int]` where `...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_even_numbers([1, 2, 3, 4, 5]) == [2, 4]\", \"assert filter_even_numbers([10, 15, 20, 25]) == [10, 20]\", \"assert filter_even_numbers([1, 3, 5, 7]) == []\", \"assert filter_even_numbers([]) == []\", \"assert filter_even_numbers([2, 4, 6, 8]) == [2, 4,...
{ "split": "train", "index": 70229, "acecode_id": "bigcode_python_fns_9153", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function that determines if all elements in the list are unique. The function should return True if all elements are unique and False if there are any repeating numbers.\nPlease reason step by step, then write a self-contained Python soluti...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_unique([1, 2, 3, 4, 5]) == True\", \"assert check_unique([1, 1, 2, 3]) == False\", \"assert check_unique([]) == True\", \"assert check_unique([7]) == True\", \"assert check_unique([1, 2, 2, 3, 4]) == False\", \"assert check_unique([10, 20, 30, 40, 50])...
{ "split": "train", "index": 70230, "acecode_id": "evol_21355", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing file sizes in bytes. Your task is to implement a function that computes the total size of all the files. If the list is empty, the total size should be zero. Write a function `calculate_total_size(sizes: List[int]) -> int` that take...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_total_size([100, 200, 300]) == 600\", \"assert calculate_total_size([0, 0, 0]) == 0\", \"assert calculate_total_size([]) == 0\", \"assert calculate_total_size([-100, -200, -300]) == -600\", \"assert calculate_total_size([50, -50, 100]) == 100\", \"...
{ "split": "train", "index": 70231, "acecode_id": "bigcode_python_fns_6309", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that simulates the behavior of processing configuration details based on provided arguments. The function should accept two dictionaries: one containing various configuration settings and another containing server authentication de...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_config({'tpw': 'target_pw', 'spw': 'source_pw', 'cmdtype': 'run', 'cmd': 'execute', 'tuser': 'target_user', 'suser': 'source_user', 'nodelist': 'nodes.txt'}, {'user': 'server_user', 'authtoken': 'auth_token'}) == \\\"Config: {'tpw': 'target_pw', 'spw...
{ "split": "train", "index": 70232, "acecode_id": "oss_14348", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are given a string representing a URL. Your task is to implement a function that checks if the URL is valid according to standard URL format. A valid URL must start with 'http://', 'https://', or 'ftp://', and must contain at least one '.' after the protocol part. If the UR...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_valid_url('http://example.com') == True\", \"assert is_valid_url('https://example.org') == True\", \"assert is_valid_url('ftp://ftp.example.com') == True\", \"assert is_valid_url('http://example') == False\", \"assert is_valid_url('example.com') == False\...
{ "split": "train", "index": 70233, "acecode_id": "bigcode_python_fns_10049", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that retrieves a unique nonce value from a list of documents represented as dictionaries. Each document has a unique 'id' and a 'nonce' value. However, there may be cases where multiple documents have the same 'id', indicating a corru...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_unique_nonce_from_documents([{'id': 1, 'nonce': 'abc'}, {'id': 2, 'nonce': 'def'}], 1) == 'abc'\", \"assert get_unique_nonce_from_documents([{'id': 4, 'nonce': 'ghi'}], 4) == 'ghi'\", \"assert get_unique_nonce_from_documents([{'id': 6, 'nonce': 'nop'}], ...
{ "split": "train", "index": 70234, "acecode_id": "oss_15603", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are given a string representing a playblast format. Your task is to implement a function `get_playblast_compressions(playblast_format: str) -> List[str]` that returns a list of supported compression types for the given playblast format. The supported compressions for differ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_playblast_compressions('Maya') == ['H.264', 'JPEG', 'PNG']\", \"assert get_playblast_compressions('houdini') == ['H.264', 'JPEG']\", \"assert get_playblast_compressions('Blender') == ['H.264', 'JPEG', 'FFV1']\", \"assert get_playblast_compressions('MAYA'...
{ "split": "train", "index": 70235, "acecode_id": "bigcode_python_fns_39600", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that determines if a given string can be rearranged to form a palindrome. A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward as forward. For a string to be rearranged into a palindrom...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_form_palindrome('civic') == True\", \"assert can_form_palindrome('ivicc') == True\", \"assert can_form_palindrome('hello') == False\", \"assert can_form_palindrome('racecar') == True\", \"assert can_form_palindrome('aabb') == True\", \"assert can_form_pa...
{ "split": "train", "index": 70236, "acecode_id": "bigcode_python_fns_12714", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `triangle_area(a, h)` that computes the area of a triangle given its base length `a` and height `h`. The function should return the area as a float. If either of the inputs is not a number or is less than or equal to zero, the function should return an error me...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert triangle_area(5, 3) == 7.5\", \"assert triangle_area(10, 0) == 'Error: Both inputs must be positive numbers and numeric.'\", \"assert triangle_area(-5, 3) == 'Error: Both inputs must be positive numbers and numeric.'\", \"assert triangle_area(5, -3) == 'Erro...
{ "split": "train", "index": 70237, "acecode_id": "evol_10596", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `convert_to_title_case(input_str: str) -> str` that converts a given string into title case, where the first letter of each word is capitalized unless the word is a preposition. The prepositions to consider are: 'on', 'in', 'at', 'over', 'beneath', 'under',...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_to_title_case('this is a Title') == 'This Is A Title'\", \"assert convert_to_title_case('under the bed') == 'Under The Bed'\", \"assert convert_to_title_case('over the rainbow') == 'Over The Rainbow'\", \"assert convert_to_title_case('it is a sunny d...
{ "split": "train", "index": 70238, "acecode_id": "evol_18392", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Write a function `findURLs(string)` that takes a string as input and uses a regular expression to extract all valid internet URLs (both HTTP and HTTPS) from the string. The URLs should be in the format of 'http://', 'https://', or simply the domain name without the protocol. Th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert findURLs('Visit us at http://example.com and https://secure.example.com') == ['http://example.com', 'https://secure.example.com']\", \"assert findURLs('Check out www.google.com and http://example.org') == ['www.google.com', 'http://example.org']\", \"assert ...
{ "split": "train", "index": 70239, "acecode_id": "evol_23847", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a list of p-values, implement a function to calculate the false discovery rate (FDR) multiple comparisons correction threshold using the method of Benjamini-Hochberg. The function should take in a list of p-values and an optional alpha value (default is 0.05). The functio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_fdr_thresh([0.03, 0.02, 0.01]) == 0.03\", \"assert get_fdr_thresh([0.9, 0.8, 0.7]) == None\", \"assert get_fdr_thresh([]) == None\", \"assert get_fdr_thresh([0.05]) == 0.05\", \"assert get_fdr_thresh([0.01, 0.02, float('nan'), 0.04]) == 0.02\"]}" }
{ "split": "train", "index": 70240, "acecode_id": "bigcode_python_fns_8537", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string represents a migration's old configuration key. Your task is to implement a function that counts how many of these keys start with a given prefix. Write a function `count_keys_with_prefix(migration_keys: List[str], prefix: str)...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_keys_with_prefix(['migration_one', 'migration_two', 'old_migration'], 'migration') == 2\", \"assert count_keys_with_prefix(['config_change', 'config_update', 'old_config'], 'config') == 2\", \"assert count_keys_with_prefix(['test1', 'test2', 'example_t...
{ "split": "train", "index": 70241, "acecode_id": "bigcode_python_fns_28529", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a 2D list `f1` representing a binary image. Each element in the list is either 0 or 1, where 1 represents a white pixel and 0 represents a black pixel. Your task is to write a function that takes this 2D list as input and returns the coordinates of the bounding bo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_bounding_box([[0, 0], [0, 0]]) == ((-1, -1), (-1, -1))\", \"assert find_bounding_box([[1]]) == ((0, 0), (0, 0))\", \"assert find_bounding_box([[1, 0], [0, 1]]) == ((0, 0), (1, 1))\", \"assert find_bounding_box([[1, 1, 0], [1, 1, 0], [0, 0, 0]]) == ((0, ...
{ "split": "train", "index": 70242, "acecode_id": "oss_23219", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string `columnTitle` that represents the column title as it appears in an Excel sheet, and an integer `offset` that represents the offset to be added to the column number, write a function `titleToNumber(columnTitle: str, offset: int) -> int` to return the corresponding...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert titleToNumber('A', 3) == 4\", \"assert titleToNumber('B', 0) == 2\", \"assert titleToNumber('C', 10) == 13\", \"assert titleToNumber('AA', 2) == 29\", \"assert titleToNumber('AB', 0) == 28\", \"assert titleToNumber('ZY', 10) == 711\", \"assert titleToNumber(...
{ "split": "train", "index": 70243, "acecode_id": "evol_33225", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of average brightness values of candidate aneurysm centers and an integer that specifies the maximum allowed number of aneurysms per patient. Your task is to return a list containing the average brightness values of the brightest candidate aneurysm centers,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reduce_false_positives([10, 20, 30, 40], 1) == [40]\", \"assert reduce_false_positives([], 5) == []\", \"assert reduce_false_positives([0, 0, 0], 2) == [0, 0]\", \"assert reduce_false_positives([100, 50], 1) == [100]\", \"assert reduce_false_positives([100, ...
{ "split": "train", "index": 70244, "acecode_id": "bigcode_python_fns_18455", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are given a list of strings representing file paths. Your task is to create a function that takes this list as input and returns a new list containing only the file paths that have the extension '.json'. Each file path in the output list should retain its original order fro...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_json_files(['data/file1.txt', 'config/settings.json', 'images/photo.png']) == ['config/settings.json']\", \"assert filter_json_files(['report.pdf', 'summary.docx', 'data.json', 'notes.json']) == ['data.json', 'notes.json']\", \"assert filter_json_file...
{ "split": "train", "index": 70245, "acecode_id": "bigcode_python_fns_45090", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a start date, an end date, a duration for each time span, and a step size, implement a function that generates a sequence of time span tuples. Each tuple should contain a start date and an end date, where the end date is calculated by adding the specified duration to the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert date_sequence('2023-03-01', '2023-03-10', '5 days', '3 days') == [('2023-03-01', '2023-03-06'), ('2023-03-04', '2023-03-09')]\", \"assert date_sequence('2023-01-01', '2023-01-20', '10 days', '5 days') == [('2023-01-01', '2023-01-11'), ('2023-01-06', '2023-01...
{ "split": "train", "index": 70246, "acecode_id": "bigcode_python_fns_4334", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a utility that determines the version of a configuration file based on user input. Create a function `determine_version` that takes two parameters: `custom_version` (a string) and `default_version` (a string). If `custom_version` is not an empty...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert determine_version('', '1.0.0') == '1.0.0'\", \"assert determine_version('2.0.0', '1.0.0') == '2.0.0'\", \"assert determine_version('3.1.4', '1.0.0') == '3.1.4'\", \"assert determine_version('0.9.5', '1.0.0') == '0.9.5'\", \"assert determine_version('1.0.1', ...
{ "split": "train", "index": 70247, "acecode_id": "oss_22410", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with extracting user profile information from a paginated dataset. You are given a list of dictionaries, where each dictionary represents a page of user profile data. Each dictionary contains a 'profiles' key, which is a list of user profiles, and a 'next' key, w...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_profiles([{'profiles': [{'id': 1, 'name': 'Alice'}], 'next': 'page2'}, {'profiles': [{'id': 2, 'name': 'Bob'}], 'next': None}]) == [{'id': 1, 'name': 'Alice'}, {'id': 2, 'name': 'Bob'}]\", \"assert extract_profiles([{'profiles': [{'id': 1, 'name': 'A...
{ "split": "train", "index": 70248, "acecode_id": "bigcode_python_fns_29536", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of float values, implement a function that returns the second smallest non-zero value in the list. If there are not at least two non-zero values, the function should return the string 'Not enough non-zero values'.\nPlease reason step by step, then write a self-cont...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert second_smallest_no_zero([3.2, 0.5, 0.0, 2.3, 3.2, 0.0, 7.2]) == 2.3\", \"assert second_smallest_no_zero([1.1, 0.0, 0.2, 0.0, 0.3]) == 0.3\", \"assert second_smallest_no_zero([2.0, 0.0, 0.0, 0.0, 1.0]) == 2.0\", \"assert second_smallest_no_zero([0.0, 0.0, 0.0...
{ "split": "train", "index": 70249, "acecode_id": "evol_13742", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are given a list of volunteer requests, each with a unique ID, priority level, event ID, incident ID, purpose, site ID, date, and date required. Your task is to implement a function 'filter_requests' that takes a list of these requests and a priority level. The function sho...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_requests([{'id': 1, 'priority': 5, 'event_id': 101, 'incident_id': 201, 'purpose': 'Help with setup', 'site_id': 301, 'date': '2023-10-01', 'date_required': '2023-10-01'}, {'id': 2, 'priority': 3, 'event_id': 102, 'incident_id': 202, 'purpose': 'Assis...
{ "split": "train", "index": 70250, "acecode_id": "bigcode_python_fns_48127", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Write a function `slugify_string(value: str, allow_unicode: bool) -> str` that converts the input string `value` into a 'slug' format. The slug format should be a lowercase string where: 1. All spaces and repeated dashes are replaced by a single dash. 2. All characters that are...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert slugify_string('Hello, World!', False) == 'hello-world'\", \"assert slugify_string(' This is a Test! ', False) == 'this-is-a-test'\", \"assert slugify_string('Python-Programming', False) == 'python-programming'\", \"assert slugify_string('Multiple Space...
{ "split": "train", "index": 70251, "acecode_id": "bigcode_python_fns_42553", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple parser for a custom markup language. The parser should be able to handle opening and closing tags, as well as nested tags. Each tag is represented by a pair of angle brackets, with the tag name enclosed within the brackets. Your task is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_well_formed_markup('<b>Hello</b>') == True\", \"assert is_well_formed_markup('<i><b>Hello</b></i>') == True\", \"assert is_well_formed_markup('<b><i>Hello</b></i>') == False\", \"assert is_well_formed_markup('<a><b></b></a>') == True\", \"assert is_well_f...
{ "split": "train", "index": 70252, "acecode_id": "oss_6793", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that manages a user's permissions in a system. Each permission is represented by a name and can have multiple actions associated with it. You need to implement a function `manage_permissions(operations: List[Tuple[str, str]]) -> List[...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_permissions([('add', 'create'), ('add', 'read'), ('add', 'update'), ('remove', 'read')]) == ['create', 'update']\", \"assert manage_permissions([('add', 'read'), ('add', 'write'), ('remove', 'write'), ('remove', 'execute')]) == ['read']\", \"assert ma...
{ "split": "train", "index": 70253, "acecode_id": "oss_22254", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a two-dimensional list of non-negative integers. Write a function that transforms this list by multiplying each integer in the sub-lists by its 1-based position index in the sub-list and then by the factor of 5. Return the transformed two-dimensional list. For exa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_array([[2, 3], [1, 4]]) == [[10, 30], [5, 40]]\", \"assert transform_array([[0, 0], [0, 0]]) == [[0, 0], [0, 0]]\", \"assert transform_array([[10]]) == [[50]]\", \"assert transform_array([[1, 1, 1]]) == [[5, 10, 15]]\", \"assert transform_array([[5...
{ "split": "train", "index": 70254, "acecode_id": "evol_23814", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given lists of individuals' names, their associated dates of birth, and cities of birth, construct a hash map linking each individual's name to their respective date and place of birth. Handle any potential missing elements or mismatched list lengths. Implement a function `crea...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_hash_map(['John', 'Mary'], ['1992-12-24', '1979-05-17'], ['New York', 'Los Angeles']) == {'John': ('1992-12-24', 'New York'), 'Mary': ('1979-05-17', 'Los Angeles')}\", \"assert create_hash_map(['John'], [], ['New York']) == {'John': (None, 'New York')...
{ "split": "train", "index": 70255, "acecode_id": "evol_15811", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string that may contain the punctuation symbols (! . , ?), implement a function that replaces each punctuation symbol with its corresponding verbal phrase: '.' with ' dot ', ',' with ' comma ', '?' with ' question mark ', and '!' with ' exclamation mark '. The function ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transmute_punctuation('Hello, world!') == 'Hello comma world exclamation mark '\", \"assert transmute_punctuation('What is this?') == 'What is this question mark '\", \"assert transmute_punctuation('This is great. Do you agree?') == 'This is great dot Do y...
{ "split": "train", "index": 70256, "acecode_id": "evol_7169", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of boolean values, implement a function that checks if the length of the list is exactly 5. The function should return True if the length is 5, and False otherwise. You can assume that the input list will only contain boolean values (True or False).\nPlease reason ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_boolean_list_length([True, False, True, False, True]) == True\", \"assert check_boolean_list_length([True, True, True, True]) == False\", \"assert check_boolean_list_length([False, False, False, False, False]) == True\", \"assert check_boolean_list_len...
{ "split": "train", "index": 70257, "acecode_id": "bigcode_python_fns_30423", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given information about stars, dark matter, and gas in a galaxy. Each entity (star, dark matter, gas) has mass, position (x, y, z), and velocity (vx, vy, vz). Write a function `calculate_total_mass` that takes three lists: `stars`, `dark_matter`, and `gas`. Each list co...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_total_mass([(1, 0, 0, 0, 0, 0, 0)], [(1, 0, 0, 0, 0, 0, 0)], [(1, 0, 0, 0, 0, 0, 0)]) == 3\", \"assert calculate_total_mass([(2, 1, 1, 1, 1, 1, 1)], [(3, 2, 2, 2, 2, 2, 2)], [(4, 3, 3, 3, 3, 3, 3)]) == 9\", \"assert calculate_total_mass([(0, 0, 0, ...
{ "split": "train", "index": 70258, "acecode_id": "bigcode_python_fns_10748", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the discovery of network devices using a simplified approach. Your function should take two inputs: a list of discovered devices and a source type. The function should return a dictionary containing the results of the disco...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert discover_devices([{'ip': '192.168.1.10', 'id': '0x000000000015243f', 'model': 'ModelA'}, {'ip': '192.168.1.11', 'id': '0x000000000015243g', 'model': 'ModelB'}], 'dhcp') == {'type': 'create_entry', 'data': {'ip': '192.168.1.10', 'id': '0x000000000015243f', 'm...
{ "split": "train", "index": 70259, "acecode_id": "bigcode_python_fns_15720", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the lengths of several trials. You need to implement a function that calculates the absolute length of all trials after applying a padding operation. The padding can be specified in three ways: 1) a specific integer indicating the d...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_padding(10, [5, 5, 5]) == 10\", \"assert process_padding('nextpow2', [5, 7, 9]) == 16\", \"assert process_padding(None, [5, 5, 5]) == 5\", \"assert process_padding(8, [4, 6, 8]) == 8\", \"assert process_padding('nextpow2', [10, 12, 14]) == 16\", \"as...
{ "split": "train", "index": 70260, "acecode_id": "bigcode_python_fns_37973", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the checksum of a given string in a case-insensitive manner using a user-defined base. The base should be an integer between 2 and 32. The checksum is calculated by summing the ASCII values of each character in the string (after converting t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert checksum('Python', 5) == 4\", \"assert checksum('TestString', 3) == 1\", \"assert checksum('AI', 2) == 0\", \"assert checksum('HelloWorld', 2) == 0\", \"assert checksum('Checksum', 2) == 1\", \"assert checksum('12345', 10) == 5\", \"assert checksum('AllLower...
{ "split": "train", "index": 70261, "acecode_id": "evol_13202", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Implement a function that applies a Caesar cipher to a given lowercase string by shifting its letters by a specified number of positions. The function should take two parameters: a string 'txt' consisting of lowercase letters and a non-negative integer 'rot' representing the nu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simple_caesar('abc', 1) == 'bcd'\", \"assert simple_caesar('xyz', 2) == 'zab'\", \"assert simple_caesar('hello', 3) == 'khoor'\", \"assert simple_caesar('world', 5) == 'btwqi'\", \"assert simple_caesar('abcdef', 0) == 'abcdef'\", \"assert simple_caesar('abcd...
{ "split": "train", "index": 70262, "acecode_id": "bigcode_python_fns_2155", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given an array of integers `nums` and an integer `val`. Write a function `removeElement` to modify the array in-place such that all instances of `val` are removed. The function should return the new length of the modified array. Note that it is not necessary to maintain...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert removeElement([3, 2, 2, 3], 3) == 2\", \"assert removeElement([0, 1, 2, 2, 3, 0, 4, 2], 2) == 5\", \"assert removeElement([1, 1, 1, 1], 1) == 0\", \"assert removeElement([1, 2, 3, 4, 5], 6) == 5\", \"assert removeElement([], 1) == 0\", \"assert removeElement...
{ "split": "train", "index": 70263, "acecode_id": "oss_34375", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that processes a job based on its type. The function `process_job(job_type: str) -> str` should take a string argument `job_type`, which can either be 'process' or 'analyze'. If the job type is 'process', the function should return 'Job i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_job('process') == 'Job is being processed.'\", \"assert process_job('analyze') == 'Job is being analyzed.'\", \"assert process_job('invalid') == 'Invalid job type.'\", \"assert process_job('') == 'Invalid job type.'\", \"assert process_job('PROCESS')...
{ "split": "train", "index": 70264, "acecode_id": "bigcode_python_fns_38379", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes in a lexical sequence (a string containing alphanumeric characters and symbols), an individual alphabetic symbol, and a digit. The function should return True if the alphabetic symbol appears in the lexical sequence an exact number of times match...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert alpha_finder('abcABC123!', 'A', 2) == True\", \"assert alpha_finder('abcABC123!', 'a', 0) == False\", \"assert alpha_finder('abcABC123!', 'x', 0) == True\", \"assert alpha_finder('!', '!', 1) == True\", \"assert alpha_finder('!', '!', 0) == False\", \"assert...
{ "split": "train", "index": 70265, "acecode_id": "evol_19391", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of asset performances represented as floating-point numbers. Your task is to implement a function `analyze_assets(performance_list)` that evaluates each asset's performance and returns a list of actions based on the following criteria: If the performance is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert analyze_assets([0.1, -0.1, 0.03]) == ['buy', 'sell', 'hold']\", \"assert analyze_assets([0.0, 0.05, -0.05]) == ['hold', 'hold', 'hold']\", \"assert analyze_assets([0.06, 0.0, -0.06]) == ['buy', 'hold', 'sell']\", \"assert analyze_assets([-0.1, -0.06, 0.04]) ...
{ "split": "train", "index": 70266, "acecode_id": "oss_31785", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with optimizing an indexing process for user profiles in a system. Your goal is to create a function named `optimize_indexing` that takes a single parameter: `batch_size`, which is an integer representing the number of user profiles to be processed in each batch....
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert optimize_indexing(10) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58...
{ "split": "train", "index": 70267, "acecode_id": "oss_29726", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that processes a list of tagged users from a message and performs a specific custom action for each user. The function should take a message as input, which is represented as a dictionary containing a 'content' key (a string representing ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_tagged_users({'content': 'Hello @Alice!', 'tagged_users': ['Alice']}) == ['Alice has been tagged in the message: Hello @Alice!']\", \"assert process_tagged_users({'content': 'Good morning @Bob @Charlie!', 'tagged_users': ['Bob', 'Charlie']}) == ['Bob...
{ "split": "train", "index": 70268, "acecode_id": "oss_5412", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string representing a YAML document. Your task is to parse this string and extract the top-level keys and their associated values, returning them as a dictionary. If a key has a nested structure, include only the top-level key in the output, ignoring any nested ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_yaml('') == {}\", \"assert parse_yaml('key1: value1') == {'key1': 'value1'}\", \"assert parse_yaml('key1: value1\\\\nkey2: value2') == {'key1': 'value1', 'key2': 'value2'}\", \"assert parse_yaml('key1: value1\\\\nkey2: value2\\\\nkey3: value3\\\\n') ==...
{ "split": "train", "index": 70269, "acecode_id": "bigcode_python_fns_49287", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Implement a function `hex_to_dec(matrix_data)` that takes a list of strings, where each string represents a hexadecimal number (prefixed with '0x'), and returns a list of their corresponding decimal values. For example, the input `['0x1', '0xA', '0xF']` should return `[1, 10, 1...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert hex_to_dec(['0x1', '0xA', '0xF']) == [1, 10, 15]\", \"assert hex_to_dec(['0x0', '0x10', '0xFF']) == [0, 16, 255]\", \"assert hex_to_dec(['0x2', '0xB', '0x1C']) == [2, 11, 28]\", \"assert hex_to_dec(['0x3E8', '0xFA', '0x64']) == [1000, 250, 100]\", \"assert h...
{ "split": "train", "index": 70270, "acecode_id": "evol_8474", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a string as input and returns the string in reversed order. The function should remove any leading or trailing whitespace from the input string before reversing it. If the input string is empty, the function should return an em...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_string('hello') == 'olleh'\", \"assert reverse_string(' world ') == 'dlrow'\", \"assert reverse_string(' ') == ''\", \"assert reverse_string('Python') == 'nohtyP'\", \"assert reverse_string('') == ''\", \"assert reverse_string('racecar') == 'race...
{ "split": "train", "index": 70271, "acecode_id": "bigcode_python_fns_12505", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with filtering job information from a job queue based on specific attributes. Implement a function that takes a list of job dictionaries and filters them according to the provided options. The function should filter jobs based on the following criteria: if a list...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_job_queue([{'job_name': 'job1', 'status': 'completed'}, {'job_name': 'job2', 'status': 'running'}], job_name=['job1'], columns=['job_name', 'status']) == [{'job_name': 'job1', 'status': 'completed'}]\", \"assert process_job_queue([{'job_name': 'job1'...
{ "split": "train", "index": 70272, "acecode_id": "oss_30065", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string is an NCName (non-colonized name) that adheres to XML naming conventions. Your task is to implement a function that checks if all strings in the list have a length of exactly 6 characters. The function should return True if all...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert all_ncname_length_six(['abcdef', 'ghijkl', 'mnopqr']) == True\", \"assert all_ncname_length_six(['abcde', 'ghijkl', 'mnopqr']) == False\", \"assert all_ncname_length_six(['abcdef', 'ghijklm', 'mnopqr']) == False\", \"assert all_ncname_length_six(['abcdef', '...
{ "split": "train", "index": 70273, "acecode_id": "bigcode_python_fns_10719", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes data from a given dictionary and returns the average value of the numerical data associated with each unique category. The dictionary contains three keys: 'categories', 'data', and 'color'. The 'categories' key holds a ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_average({'categories': ['A', 'B', 'A', 'C'], 'data': [1, 2, 3, 4], 'color': 'blue'}) == {'A': 2.0, 'B': 2.0, 'C': 4.0}\", \"assert calculate_average({'categories': ['X', 'Y', 'X', 'Y', 'Z'], 'data': [10, 20, 30, 40, 50], 'color': 'red'}) == {'X': 2...
{ "split": "train", "index": 70274, "acecode_id": "oss_2419", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are working on a project that involves processing a series of satellite images. Your task is to implement a function that processes a given list of image properties and returns a list of export tasks for each processed image. Each image is processed through an atmospheric c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_images([{'properties': {'system:footprint': 'footprint1'}}, {'properties': {'system:footprint': 'footprint2'}}]) == ['Export_Image_0', 'Export_Image_1']\", \"assert process_images([]) == []\", \"assert process_images([{'properties': {'system:footprin...
{ "split": "train", "index": 70275, "acecode_id": "oss_17018", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of positive integers, implement a function 'array_gcd' that computes the Greatest Common Divisor (GCD) of the numbers in the list using an efficient algorithm. The function should take a single argument, which is the list of integers, and return the GCD as an integ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert array_gcd([12, 18, 24]) == 6\", \"assert array_gcd([14, 21, 28]) == 7\", \"assert array_gcd([25, 50, 75]) == 25\", \"assert array_gcd([11, 22, 33]) == 11\", \"assert array_gcd([15, 45, 90]) == 15\", \"assert array_gcd([1]) == 1\", \"assert array_gcd([2, 4, 8...
{ "split": "train", "index": 70276, "acecode_id": "evol_10180", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates opening a file at a given path with a specified mode. The function should attempt to open the file up to a maximum of 100 times. If a PermissionError occurs during any of these attempts, it should continue trying until succ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert open_file('valid_file.txt', 'a') is not None\", \"assert open_file('example.txt', 'w') is not None\", \"assert open_file('temp_file.txt', 'w') is not None\", \"assert open_file('another_valid_file.txt', 'a') is not None\", \"assert open_file('log_file.log', ...
{ "split": "train", "index": 70277, "acecode_id": "bigcode_python_fns_10274", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are given a list of documents, where each document is represented as a dictionary containing key-value pairs. Your task is to implement a function `find_first_matching_document(query_document: dict, documents: List[dict]) -> Union[dict, None]` that returns the first documen...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_first_matching_document({'name': 'Alice'}, [{'name': 'Alice', 'age': 30}, {'name': 'Bob', 'age': 25}]) == {'name': 'Alice', 'age': 30}\", \"assert find_first_matching_document({'age': 25}, [{'name': 'Alice', 'age': 30}, {'name': 'Bob', 'age': 25}]) == {...
{ "split": "train", "index": 70278, "acecode_id": "bigcode_python_fns_31446", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the movement of a view between different containers. The function should take an initial container and a series of operations where a view can be added to or removed from a container. At the end of the operations, the f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert move_views(['view1', 'view2'], [('add', 'view3'), ('remove', 'view1'), ('add', 'view4')]) == ['view2', 'view3', 'view4']\", \"assert move_views([], [('add', 'view1'), ('remove', 'view2')]) == ['view1']\", \"assert move_views(['view1'], [('remove', 'view1'), ...
{ "split": "train", "index": 70279, "acecode_id": "bigcode_python_fns_10420", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string `codebook` which represents the filename of a parsed CPS codebook. Write a function called `import_codebook` that simulates the import of this codebook. The function should return a list of dictionaries, where each dictionary represents a row in the codeb...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert import_codebook('Header1\\\\tHeader2\\\\nValue1\\\\tValue2') == [{'Header1': 'Value1', 'Header2': 'Value2'}]\", \"assert import_codebook('Header1\\\\tHeader2\\\\nValue1\\\\t\\\\nValue3\\\\tValue4') == [{'Header1': 'Value3', 'Header2': 'Value4'}]\", \"assert ...
{ "split": "train", "index": 70280, "acecode_id": "bigcode_python_fns_6105", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Write a function that calculates the frequency of a specific word in a given sentence, ignoring case sensitivity. The function should take two parameters: a string 'sentence' and a string 'word'. It should return an integer representing the number of times 'word' appears in 'se...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert word_frequency('The quick brown fox jumped over the lazy dog.', 'quick') == 1\", \"assert word_frequency('The quick brown fox jumped over the lazy dog.', 'lazy') == 1\", \"assert word_frequency('The quick brown fox jumped over the lazy dog.', 'fox') == 1\", ...
{ "split": "train", "index": 70281, "acecode_id": "evol_35088", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Given the length of a side of a triangle (c) and the angle (in degrees) opposite to that side, implement a function `find_altitude(c: float, angle: float) -> float` that calculates the altitude of the triangle from the specified side using the formula h = c * sin(angle). The an...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert abs(find_altitude(10, 30) - 5.0) < 1e-9\", \"assert abs(find_altitude(5, 45) - 3.5355339059327378) < 1e-9\", \"assert abs(find_altitude(7, 60) - 6.06217782649107) < 1e-9\", \"assert abs(find_altitude(12, 90) - 12.0) < 1e-9\", \"assert abs(find_altitude(8, 0)...
{ "split": "train", "index": 70282, "acecode_id": "evol_22229", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a five-digit number, the number in the ten-thousands place is four times the number in the thousands place, the number in the thousands place is three times the number in the hundreds place, and the number in the hundreds place is twice the number in the tens place, and t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_number() != 12345\", \"assert find_number() != 54321\", \"assert find_number() != 98765\", \"assert find_number() != 67890\", \"assert find_number() != 24680\", \"assert find_number() != 13579\", \"assert find_number() != 10234\", \"assert find_number()...
{ "split": "train", "index": 70283, "acecode_id": "evol_10778", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two polynomials represented as lists of terms, where each term is a pair of integers [coefficient, power], write a function `add_poly(poly1: List[List[int]], poly2: List[List[int]]) -> List[List[int]]` that returns the sum of the two polynomials in the same format. The ou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_poly([[1,1]], [[1,0]]) == [[1,1],[1,0]]\", \"assert add_poly([[2,2],[4,1],[3,0]], [[3,2],[-4,1],[-1,0]]) == [[5,2],[2,0]]\", \"assert add_poly([[1,2]], [[-1,2]]) == []\", \"assert add_poly([[0,2],[1,1]], [[0,2],[0,1]]) == [[1,1]]\", \"assert add_poly([[3...
{ "split": "train", "index": 70284, "acecode_id": "evol_20761", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two strings, `email_subject` and `email_body`, write a function `format_email` that formats an email body to include the application ID at the top and replaces new line characters with HTML line breaks. The function should return the formatted email body. The formatted em...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_email('app123', 'Hello World') == '(Sent from app123)\\\\n\\\\nHello World'\", \"assert format_email('app456', 'Line 1\\\\nLine 2') == '(Sent from app456)\\\\n\\\\nLine 1<br/>Line 2'\", \"assert format_email('app789', 'First line\\\\nSecond line\\\\nT...
{ "split": "train", "index": 70285, "acecode_id": "bigcode_python_fns_2914", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple image processing function registry. Your goal is to create a function called `image_processing_system` that allows users to register image processing functions and execute them on a given input image. The function should follow these sp...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert image_processing_system([lambda img: img + ' processed', lambda img: img + ' enhanced'], 0, 'image') == 'image processed'\", \"assert image_processing_system([lambda img: img + ' processed', lambda img: img + ' enhanced'], 1, 'image') == 'image enhanced'\", ...
{ "split": "train", "index": 70286, "acecode_id": "oss_36757", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes an integer score and returns the corresponding academic grade based on the following criteria: a score of 90 or above should return 'A', a score of 80 to 89 should return 'B', a score of 70 to 79 should return 'C', a score of 60 to 69 should retu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert determine_academic_grade(95) == 'A'\", \"assert determine_academic_grade(90) == 'A'\", \"assert determine_academic_grade(89) == 'B'\", \"assert determine_academic_grade(85) == 'B'\", \"assert determine_academic_grade(80) == 'B'\", \"assert determine_academic...
{ "split": "train", "index": 70287, "acecode_id": "evol_10919", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lists of floating-point numbers `arr1` and `arr2`, write a function `calculate_distance(arr1, arr2, unsigned=True)` that calculates the element-wise correlation euclidean distance between the two lists. The distance `D` for each corresponding pair of elements is compu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_distance([1.0, 2.0, 3.0], [4.0, 5.0, 6.0]) == [2.1213203435596424, 2.1213203435596424, 2.1213203435596424]\", \"assert calculate_distance([0.0], [0.0]) == [0.0]\", \"assert calculate_distance([7.0], [1.0], unsigned=False) == [-4.242640687119285]\",...
{ "split": "train", "index": 70288, "acecode_id": "bigcode_python_fns_48895", "num_tests": 5 }
acecode
[ { "role": "user", "content": "Implement a generator function `descending_evens(start)` that yields even numbers in descending order, starting from a specified positive integer and ending at 0. If the provided starting point is not a positive integer, the function should raise a `ValueError` with the message...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert list(descending_evens(10)) == [10, 8, 6, 4, 2, 0]\", \"assert list(descending_evens(15)) == [14, 12, 10, 8, 6, 4, 2, 0]\", \"assert list(descending_evens(1)) == [0]\", \"assert list(descending_evens(2)) == [2, 0]\", \"assert list(descending_evens(20)) == [20...
{ "split": "train", "index": 70289, "acecode_id": "evol_17072", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are a network engineer tasked with processing the output of a 'show version' command from a Cisco IOS device. You have a Python dictionary named 'sh_ver_ios' that contains various details about the device. Your goal is to write a Python function 'process_ios_output(sh_ver_i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_ios_output({}) == None\", \"assert process_ios_output({'hostname': 'Router1'}) == None\", \"assert process_ios_output({'hostname': 'Router1', 'ios_version': '15.6(2)T1'}) == None\", \"assert process_ios_output({'hostname': 'Router1', 'ios_version': '...
{ "split": "train", "index": 70290, "acecode_id": "oss_8695", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates an HTTP request handler for a web server. The function `http_request_handler` should take a dictionary representing the request and return a dictionary representing the response. The request dictionary will contain the foll...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert http_request_handler({'method': 'GET', 'url': 'http://example.com', 'params': {'key': 'value'}, 'data': None, 'headers': {}}) == {'status': 200, 'reason': 'OK', 'headers': {}, 'data': {}}\", \"assert http_request_handler({'method': 'POST', 'url': 'http://exa...
{ "split": "train", "index": 70291, "acecode_id": "bigcode_python_fns_32617", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that formats a given string into a standard phone number format. The input string may contain various characters such as spaces, hyphens, parentheses, and numbers. Your task is to remove any non-numeric characters and format the remai...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_phone_number('123-456-7890') == '123-456-7890'\", \"assert format_phone_number('(123) 456-7890') == '123-456-7890'\", \"assert format_phone_number('123 456 7890') == '123-456-7890'\", \"assert format_phone_number('1234567890') == '123-456-7890'\", \"a...
{ "split": "train", "index": 70292, "acecode_id": "oss_7029", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with managing connection details for a database. Create a Python function called `get_connection_details` that takes the following parameters: `database` (a string), `host` (a string), `port` (an integer), `collection` (a string), and `credentials` (a dictionary ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_connection_details('test_db', 'localhost', 27017, 'test_collection', {'username': 'user', 'password': 'pass'}) == {'database': 'test_db', 'host': 'localhost', 'port': 27017, 'collection': 'test_collection'}\", \"assert get_connection_details('prod_db', '...
{ "split": "train", "index": 70293, "acecode_id": "oss_36881", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that processes a list of group messages and determines how many messages each group has received. Each message is represented by a dictionary containing the group ID and the content of the message. Your function should take a list of thes...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_group_messages([]) == {}\", \"assert count_group_messages([{'group_id': 1, 'content': 'Hello'}, {'group_id': 2, 'content': 'Hi'}]) == {1: 1, 2: 1}\", \"assert count_group_messages([{'group_id': 1, 'content': 'Hello'}, {'group_id': 1, 'content': 'World'...
{ "split": "train", "index": 70294, "acecode_id": "bigcode_python_fns_23404", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Develop a function that takes a string representing time in the format 'hh:mm:ss' and converts it into the total number of seconds. The function should be named `convert_to_seconds` and take a single parameter, `time_string`. For example, if the input is '01:10:30', the functio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_to_seconds('00:00:00') == 0\", \"assert convert_to_seconds('00:01:00') == 60\", \"assert convert_to_seconds('00:10:00') == 600\", \"assert convert_to_seconds('01:00:00') == 3600\", \"assert convert_to_seconds('01:30:00') == 5400\", \"assert convert_t...
{ "split": "train", "index": 70295, "acecode_id": "evol_18409", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string representing the name of a flatten layer, implement a function `flatten(name: str) -> str` that returns the name of the flatten layer prefixed with 'Flatten Layer: '. The function should not perform any other operations or return any additional information. For e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert flatten('my_layer') == 'Flatten Layer: my_layer'\", \"assert flatten('input_layer') == 'Flatten Layer: input_layer'\", \"assert flatten('output_layer') == 'Flatten Layer: output_layer'\", \"assert flatten('layer1') == 'Flatten Layer: layer1'\", \"assert flat...
{ "split": "train", "index": 70296, "acecode_id": "bigcode_python_fns_39101", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a simple function that formats user information. Write a function `format_user_info(username: str, usertype: str) -> str` that takes in a username and a user type, and returns a formatted string in the format 'usertype: username'. The user type is a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_user_info('john_doe', 'USERNAME') == 'USERNAME: john_doe'\", \"assert format_user_info('alice', 'ADMIN') == 'ADMIN: alice'\", \"assert format_user_info('bob', 'USER') == 'USER: bob'\", \"assert format_user_info('charlie', 'GUEST') == 'GUEST: charlie'\...
{ "split": "train", "index": 70297, "acecode_id": "oss_28881", "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 the squares of the original integers. The function should maintain the same order as the input list. Implement the function `square_numbers(nums)` that takes a list of intege...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert square_numbers([1, 2, 3]) == [1, 4, 9]\", \"assert square_numbers([-1, -2, -3]) == [1, 4, 9]\", \"assert square_numbers([0, 0, 0]) == [0, 0, 0]\", \"assert square_numbers([]) == []\", \"assert square_numbers([-1, 0, 1]) == [1, 0, 1]\", \"assert square_number...
{ "split": "train", "index": 70298, "acecode_id": "oss_3960", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a function `register_user` that takes in a dictionary containing user details (id, username, email, password, provider) and simulates the registration of a new user in a chat-based messaging app. The function should return a success message if the registration is success...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert register_user({'id': '1', 'username': 'john_doe', 'email': 'john@example.com', 'password': 'password123', 'provider': 'google'}, []) == 'User registered successfully.'\", \"assert register_user({'id': '2', 'username': 'jane_doe', 'email': 'jane@example.com',...
{ "split": "train", "index": 70299, "acecode_id": "evol_3898", "num_tests": 10 }