data_source large_stringclasses 1
value | prompt listlengths 1 1 | ability large_stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that processes feature importances and calculates the average importance for each feature from a list of dictionaries. Each dictionary represents a feature and its corresponding importances across different models. Your task is to ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_average_importance([{'feature': 'feature1', 'model1': 0.8, 'model2': 0.6, 'model3': 0.7}, {'feature': 'feature2', 'model1': 0.5, 'model2': 0.4, 'model3': 0.6}, {'feature': 'feature3', 'model1': 0.3, 'model2': 0.2, 'model3': 0.4}]) == [{'feature': '... | {
"split": "train",
"index": 64400,
"acecode_id": "oss_27938",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a custom data structure called `NonEmptyList` in Python. This data structure should behave like a regular list, but it must always contain at least one element. Implement a function `create_non_empty_list(elements: List[Any]) -> NonEmptyList` th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_non_empty_list([1]) is not None\", \"assert create_non_empty_list(['a', 'b']) is not None\", \"assert create_non_empty_list([1, 2, 3]).to_set() == {1, 2, 3}\", \"assert create_non_empty_list(['x', 'y']).to_dict() == {'x': 'y'}\", \"assert create_non_e... | {
"split": "train",
"index": 64401,
"acecode_id": "oss_27869",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing inter-arrival times of events. Your task is to implement a function that computes the actual arrival times of these events. The first event is assumed to arrive at time 0. The arrival time for each event is the cumulative sum of the... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_arrival_times([2, 3, 5]) == [0, 2, 5, 10]\", \"assert get_arrival_times([1, 1, 1, 1]) == [0, 1, 2, 3, 4]\", \"assert get_arrival_times([0, 0, 0]) == [0, 0, 0, 0]\", \"assert get_arrival_times([4, 2, 6]) == [0, 4, 6, 12]\", \"assert get_arrival_times([10]... | {
"split": "train",
"index": 64402,
"acecode_id": "bigcode_python_fns_31317",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with calculating the duration of an event based on its start and end times. Write a function `calculate_event_duration(start_time: str, end_time: str) -> str` that takes two strings representing the start and end times of an event in the format 'YYYY-MM-DD HH:MM:... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_event_duration('2023-10-01 10:00:00', '2023-10-01 12:30:00') == '2 hours, 30 minutes, 0 seconds'\", \"assert calculate_event_duration('2023-10-01 10:00:00', '2023-10-01 10:00:00') == '0 hours, 0 minutes, 0 seconds'\", \"assert calculate_event_durat... | {
"split": "train",
"index": 64403,
"acecode_id": "oss_25277",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with writing a Python function that takes a list of audio file paths and a list of corresponding text transcripts, then returns a list of tuples where each tuple contains an audio file path and its corresponding transcript. The function should also ensure that th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_audio_transcript_pairs(['audio1.wav', 'audio2.wav', 'audio3.wav'], ['transcript1', 'transcript2', 'transcript3']) == [('audio1.wav', 'transcript1'), ('audio2.wav', 'transcript2'), ('audio3.wav', 'transcript3')]\", \"assert generate_audio_transcript_... | {
"split": "train",
"index": 64404,
"acecode_id": "oss_8891",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given two integer arrays A and B, your task is to implement a function that returns the maximum number of uncrossed lines that can be drawn between the two arrays. A line can be drawn between A[i] and B[j] if A[i] == B[j], and the lines must not intersect. Each number from both... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert maxUncrossedLines([1,4,2], [1,2,4]) == 2\", \"assert maxUncrossedLines([2,5,1,2,5], [10,5,2,1,5,2]) == 3\", \"assert maxUncrossedLines([1,3,7,1,7,5], [1,9,2,5,1]) == 2\", \"assert maxUncrossedLines([1,1,1], [1,1,1]) == 3\", \"assert maxUncrossedLines([1,2,3]... | {
"split": "train",
"index": 64405,
"acecode_id": "evol_18715",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that extracts package metadata from a given code snippet. The metadata includes the maintainer's name, email, the package's URL, license type, version, and classifiers. Write a function `parse_metadata` that takes a string `code` as input... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert parse_metadata('''MAINTAINER = \\\"Alice Smith\\\"\\nMAINTAINER_EMAIL = \\\"alice.smith@example.com\\\"\\nURL = \\\"https://example.com/package\\\"\\nLICENSE = \\\"Apache-2.0\\\"\\nVERSION = \\\"2.1\\\"\\nclassifiers = ['Development Status :: 4 - Beta']''') ... | {
"split": "train",
"index": 64406,
"acecode_id": "oss_8826",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers. Your task is to write a function that takes this list as input and returns a new list containing only the unique integers from the original list, maintaining the order of their first appearance. For example, if the input list is [1, 2, 2, 3, 4,... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert unique_integers([1, 2, 2, 3, 4, 3]) == [1, 2, 3, 4]\", \"assert unique_integers([5, 5, 5, 5]) == [5]\", \"assert unique_integers([7, 8, 9, 7, 8]) == [7, 8, 9]\", \"assert unique_integers([]) == []\", \"assert unique_integers([10, 20, 30, 10, 20]) == [10, 20,... | {
"split": "train",
"index": 64407,
"acecode_id": "bigcode_python_fns_9730",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a string representing the name of a product. Your task is to implement a function that returns a list of unique identifiers (ids) associated with that product. For simplicity, you can assume that the ids for each product are predefined in a dictionary. The functio... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert fetch_ids('ProductA') == ['ID1', 'ID2', 'ID3']\", \"assert fetch_ids('ProductB') == ['ID4']\", \"assert fetch_ids('ProductG') == []\", \"assert fetch_ids('ProductA') == ['ID1', 'ID2', 'ID3']\", \"assert fetch_ids('ProductK') == []\", \"assert fetch_ids('Prod... | {
"split": "train",
"index": 64408,
"acecode_id": "bigcode_python_fns_49039",
"num_tests": 8
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that checks if a given name exists in a predefined registry of names. The registry contains a fixed set of names as keys with associated integer values. Your function should take a string input 'name' and return a boolean indicating wheth... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert has_name('alice') == True\", \"assert has_name('bob') == True\", \"assert has_name('charlie') == True\", \"assert has_name('dave') == True\", \"assert has_name('eve') == True\", \"assert has_name('frank') == False\", \"assert has_name('grace') == False\", \"... | {
"split": "train",
"index": 64409,
"acecode_id": "bigcode_python_fns_26771",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, return the maximum sum of any contiguous subarray of the list. You may assume that the input list is non-empty. Implement a function `max_subarray_sum(arr: List[int]) -> int` where `arr` is the input list of integers and return the maximum sum of a con... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert max_subarray_sum([-2, -3, -1]) == -1\", \"assert max_subarray_sum([5, 4, -1, 7, 8]) == 23\", \"assert max_subarray_sum([1]) == 1\", \"assert max_subarray_sum([-1, -2, -3, -4]) == -1\", \"assert max_subarray_sum([2, 1, -3, 4, -1, 2, 1, -5, 4]) == 6\", \"asser... | {
"split": "train",
"index": 64410,
"acecode_id": "bigcode_python_fns_33697",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that accepts a dictionary representing configuration settings for a system. The function should validate the settings according to specific rules. The input dictionary can contain the following keys: 'max_connections', 'task_cleanup', 'ta... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert validate_settings({'max_connections': 50, 'task_cleanup': True, 'task_retention': 30, 'event_cleanup': True, 'event_retention': 30}) == True\", \"assert validate_settings({'max_connections': 100, 'task_cleanup': False, 'task_retention': 30}) == True\", \"ass... | {
"split": "train",
"index": 64411,
"acecode_id": "bigcode_python_fns_17586",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function `custom_import` that simulates the import of specified items from a module. The function should take a string representing the module name and a list of strings representing the item names to import. The function should return a dicti... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert custom_import('non_existent_module', ['function1', 'Class2']) == {}\", \"assert custom_import('example_module', []) == {}\", \"assert custom_import('example_module', ['function4']) == {}\", \"assert custom_import('example_module', ['non_existent_function']) ... | {
"split": "train",
"index": 64412,
"acecode_id": "oss_25588",
"num_tests": 5
} |
acecode | [
{
"role": "user",
"content": "Implement a function `format_address(house_number: str, street_name: str, city: str, state: str, zip_code: str) -> str` that takes a house number, street name, city, state, and zip code as input and returns the full address formatted as 'house_number, street_name, city, state, ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert format_address('123', 'Main St', 'Springfield', 'IL', '62701') == '123, Main St, Springfield, IL, 62701'\", \"assert format_address('456', 'Elm St', 'Metropolis', 'NY', '10001') == '456, Elm St, Metropolis, NY, 10001'\", \"assert format_address('789', 'Oak A... | {
"split": "train",
"index": 64413,
"acecode_id": "evol_27921",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that accepts a dictionary representing the data of a new component, including its name and description. The function should validate the input data and return a message indicating whether the component data is valid or not. The com... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert validate_component_data({'name': 'NewComponent', 'description': 'This is a new component'}) == 'Component data is valid.'\", \"assert validate_component_data({'name': '', 'description': 'This is a new component'}) == 'Error: Invalid name.'\", \"assert valida... | {
"split": "train",
"index": 64414,
"acecode_id": "oss_12539",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing raw data. Your task is to implement a function that processes this list by removing all duplicate values and returning a new list containing only the unique values in ascending order. Write a function `process_data(data: List[int]) ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_data([1, 2, 2, 3, 4, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert process_data([5, 3, 3, 2, 1, 1]) == [1, 2, 3, 5]\", \"assert process_data([10, 9, 10, 8, 9, 7]) == [7, 8, 9, 10]\", \"assert process_data([1, 1, 1, 1, 1]) == [1]\", \"assert process_data([]) ... | {
"split": "train",
"index": 64415,
"acecode_id": "bigcode_python_fns_14495",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `dig_and_sum(dictionary: dict) -> int` that takes a dictionary which may contain nested dictionaries and integer values. The function should return the sum of all the integer values found within the dictionary, regardless of their depth in the nested struct... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert dig_and_sum({'a': 1, 'b': 2}) == 3\", \"assert dig_and_sum({'a': {'b': 1, 'c': 2}}) == 3\", \"assert dig_and_sum({'a': {'b': {'c': 1}}}) == 1\", \"assert dig_and_sum({'a': 1, 'b': {'c': 2, 'd': 3}}) == 6\", \"assert dig_and_sum({'a': {'b': {'c': 1}, 'd': 4}}... | {
"split": "train",
"index": 64416,
"acecode_id": "evol_10849",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given an integer `register`, a starting bit position `index`, and a length `length`. Your task is to create a function `get_bits(register: int, index: int, length: int) -> Union[int, bool]` that extracts `length` bits from the `register` starting from the `index` positi... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_bits(0b11001100, 0, 1) == False\", \"assert get_bits(0b11001100, 3, 1) == True\", \"assert get_bits(0b11001100, 5, 1) == False\", \"assert get_bits(0b11001100, 6, 1) == True\", \"assert get_bits(0b11001100, 7, 1) == True\", \"assert get_bits(0b11001100, ... | {
"split": "train",
"index": 64417,
"acecode_id": "bigcode_python_fns_33082",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "You are tasked with writing a function that generates a parameters file from a given dictionary of data. The function should take a dictionary containing configuration parameters and a string representing the directory where the parameters file should be saved. The function sho... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_parameters_file({'param1': 'value1', 'param2': 2, 'param3': True}, 'dir') == 'param1: value1\\\\nparam2: 2\\\\nparam3: True'\", \"assert generate_parameters_file({}, 'dir') == ''\", \"assert generate_parameters_file({'key': 'value'}, 'dir') == 'key:... | {
"split": "train",
"index": 64418,
"acecode_id": "bigcode_python_fns_27087",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `validate_url(url: str) -> bool` that checks if the provided string is a valid Uniform Resource Locator (URL). A URL is considered valid if it has both a scheme (like 'http' or 'https') and a network location (like 'www.example.com'). The function should re... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert validate_url('http://www.example.com') == True\", \"assert validate_url('https://example.com') == True\", \"assert validate_url('http://example.com/path/to/resource') == True\", \"assert validate_url('https://subdomain.example.com') == True\", \"assert valid... | {
"split": "train",
"index": 64419,
"acecode_id": "evol_4572",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that logs an error message and simulates exiting the program. Write a function `log_error(msg: str) -> None` that takes a string `msg` as input, logs the message with a prefix 'Error: ', and returns a formatted string representing the log... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert log_error('File not found') == 'Error: File not found'\", \"assert log_error('Invalid input') == 'Error: Invalid input'\", \"assert log_error('Connection lost') == 'Error: Connection lost'\", \"assert log_error('Unauthorized access') == 'Error: Unauthorized ... | {
"split": "train",
"index": 64420,
"acecode_id": "bigcode_python_fns_38074",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of records where each record represents a computer part with properties such as name, brand, price, and other information, write a function `search_record(name: str) -> Union[Dict[str, Any], str]` that searches for a computer part by its name. If the part is found,... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert search_record('Processor') == {'name': 'Processor', 'brand': 'Intel', 'price': 300, 'other_info': 'i9 10th Gen'}\", \"assert search_record('Graphic Card') == {'name': 'Graphic Card', 'brand': 'Nvidia', 'price': 1200, 'other_info': 'RTX 3080'}\", \"assert sea... | {
"split": "train",
"index": 64421,
"acecode_id": "evol_18633",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given two values, value1 and value2, and a mathematical operator represented as a function, implement a function that performs the specified operation on the values. If either value1 or value2 is None or not a number, replace it with a default value before performing the operat... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert call_math_operator(2, 3, lambda x, y: x + y, 0) == 5\", \"assert call_math_operator(None, 4, lambda x, y: x * y, 1) == 4\", \"assert call_math_operator(10, None, lambda x, y: x - y, 2) == 8\", \"assert call_math_operator('5', '10', lambda x, y: x / y, 1) == ... | {
"split": "train",
"index": 64422,
"acecode_id": "bigcode_python_fns_31935",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Write a Python function called `convert_hex_to_dec` that takes a list of strings representing hexadecimal numbers (with the '0x' prefix) and converts each hexadecimal number to its decimal equivalent. The function should return a new list containing the decimal values. For exam... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert convert_hex_to_dec(['0x1', '0xA', '0xF']) == [1, 10, 15]\", \"assert convert_hex_to_dec(['0x0', '0xB', '0xC']) == [0, 11, 12]\", \"assert convert_hex_to_dec(['0x10', '0x1F', '0x2A']) == [16, 31, 42]\", \"assert convert_hex_to_dec(['0x2', '0x4', '0x8']) == [2... | {
"split": "train",
"index": 64423,
"acecode_id": "evol_27498",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `generate_primes(low: int, high: int) -> List[int]` that generates a list of prime numbers between the given range `low` and `high` (inclusive) using the Sieve of Eratosthenes algorithm. Assume that `low` and `high` are non-negative integers where `low` <= ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_primes(10, 30) == [11, 13, 17, 19, 23, 29]\", \"assert generate_primes(1, 10) == [2, 3, 5, 7]\", \"assert generate_primes(0, 1) == []\", \"assert generate_primes(2, 2) == [2]\", \"assert generate_primes(15, 15) == []\", \"assert generate_primes(20, ... | {
"split": "train",
"index": 64424,
"acecode_id": "evol_22126",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of numerical values representing a time series data, a positive integer representing a scaling factor, and a positive integer representing the size of the sliding window. Your task is to implement a Python function `find_min_state_size(x, k, window_size)` t... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_min_state_size([1, 1, 1, 1], 10, 3) == 0.0\", \"assert find_min_state_size([5, 5, 5, 5, 5], 3, 4) == 0.0\", \"assert find_min_state_size([1, 2, 3, 4, 5, 6], 0, 5) == 0.0\", \"assert find_min_state_size([0, 0, 0, 0, 0], 1, 2) == 0.0\", \"assert find_min_... | {
"split": "train",
"index": 64425,
"acecode_id": "oss_14162",
"num_tests": 8
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that manages a simple knowledge base (KB) of entities. Each entity has a unique identifier, a frequency count, and a corresponding vector that represents certain attributes of the entity. The function should allow you to add an entity... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert add_entity('Q1', 19, [1, 2, 3], 3) is None\", \"assert add_entity('Q2', 5, [2, 3], 2) is None\", \"assert add_entity('Q3', 10, [1], 1) is None\", \"assert add_entity('Q4', 0, [0, 0, 0], 3) is None\", \"assert add_entity('Q5', 1000, [7, 8, 9, 10], 4) is None\... | {
"split": "train",
"index": 64426,
"acecode_id": "bigcode_python_fns_24081",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function to manage subscription status for users of a web application. The function should determine the appropriate message to display to the user based on their login status and subscription expiration date. Implement a function that takes the c... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert subscription_status(datetime(2023, 10, 1, 12, 0), datetime(2023, 10, 10, 12, 0), True) is None\", \"assert subscription_status(datetime(2023, 10, 11, 12, 0), datetime(2023, 10, 10, 12, 0), True) == 'You must have a paid-up subscription to view updates.'\", \... | {
"split": "train",
"index": 64427,
"acecode_id": "oss_28247",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates a database query. The function `query_database` takes three parameters: a string `db_url`, a string `db_index`, and a string `record_id`. The function constructs a query that checks for the existence of a record with the sp... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert query_database('http://example.com/', 'my_index', '123') == (1, '123')\", \"assert query_database('http://example.com', 'my_index', '123') == (1, '123')\", \"assert query_database('http://localhost:9200/', 'test_index', 'abc') == (1, 'abc')\", \"assert query... | {
"split": "train",
"index": 64428,
"acecode_id": "bigcode_python_fns_27612",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "Define a function `D(n)` that returns the n-th positive integer such that the sum of its individual digits is a prime number. For example, `D(1)` should return the first positive integer with a prime digit sum, which is 2, and `D(5)` should return 11, as the digit sum of 11 is ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert D(1) == 2\", \"assert D(2) == 3\", \"assert D(3) == 5\", \"assert D(4) == 7\", \"assert D(5) == 11\"]}"
} | {
"split": "train",
"index": 64429,
"acecode_id": "evol_14379",
"num_tests": 5
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, write a function `apply_transformation` that applies a specific transformation to each element of the list. The transformation is defined as follows: for each integer in the list, if the integer is even, multiply it by 2; if the integer is odd, subtrac... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert apply_transformation([1, 2, 3, 4]) == [0, 4, 2, 8]\", \"assert apply_transformation([-1, -2, -3, -4]) == [-2, -4, -4, -8]\", \"assert apply_transformation([0, 1, 2, 3]) == [0, 0, 4, 2]\", \"assert apply_transformation([5, 7, 9]) == [4, 6, 8]\", \"assert appl... | {
"split": "train",
"index": 64430,
"acecode_id": "bigcode_python_fns_28300",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a URL routing system for a web application. Given a URL path, your function should return the corresponding view function name associated with that path based on predefined URL patterns. If the path does not match any of the defined patterns, the fu... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_view_function('') == 'icecream_list'\", \"assert find_view_function('123/') == 'icecream_detail'\", \"assert find_view_function('john/unfollow/') == 'profile_unfollow'\", \"assert find_view_function('john/follow/') == 'profile_follow'\", \"assert find_v... | {
"split": "train",
"index": 64431,
"acecode_id": "oss_10285",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that models the information of a family member. The function should take the last name, eye color, and number of toys as parameters and return a formatted string that displays the last name, eye color, and number of toys for a child. Impl... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert show_child_info('Smith', 'Brown', 10) == 'Last Name: Smith, Eye Color: Brown, Number of Toys: 10'\", \"assert show_child_info('Johnson', 'Blue', 5) == 'Last Name: Johnson, Eye Color: Blue, Number of Toys: 5'\", \"assert show_child_info('Williams', 'Green', 2... | {
"split": "train",
"index": 64432,
"acecode_id": "oss_29904",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that takes in details of a property listing and returns a semicolon-separated string representation of the property's details. The function should accept five parameters: `address`, `name`, `owner`, `kind`, and `note`. Your function s... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert format_property_listing('123 Main St', 'Cozy Cottage', 'John Doe', 'House', 'Near the lake') == '123 Main St;Cozy Cottage;John Doe;House;Near the lake'\", \"assert format_property_listing('456 Elm St', 'Modern Apartment', 'Jane Smith', 'Apartment', 'City cen... | {
"split": "train",
"index": 64433,
"acecode_id": "oss_13271",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of strings, where each string represents a line of data. Your task is to implement a function that takes this list of strings and writes the data to a specified output format. The output format can be one of the following: 'plain', 'csv', or 'tsv'. The func... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert format_data(['name,age,city', 'Alice,30,New York', 'Bob,25,Los Angeles'], 'plain') == 'name,age,city\\\\nAlice,30,New York\\\\nBob,25,Los Angeles'\", \"assert format_data(['name,age,city', 'Alice,30,New York', 'Bob,25,Los Angeles'], 'csv') == 'name,age,city\... | {
"split": "train",
"index": 64434,
"acecode_id": "bigcode_python_fns_9264",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that manages the initialization and deinitialization of a hypothetical color management system called 'Colorama'. The function should take variable arguments for initialization and keyword arguments for configuration. The function should ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert manage_colorama('arg1', key1='value1') == True\", \"assert manage_colorama('arg2', key2='value2') == True\", \"assert manage_colorama('arg3', key3='value3') == True\", \"assert manage_colorama('arg4', key4='value4') == True\", \"assert manage_colorama('arg5'... | {
"split": "train",
"index": 64435,
"acecode_id": "bigcode_python_fns_17974",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates the registration of multiple post-processing scripts in a custom framework. The function `register_post_scripts()` should take a list of script names and return a dictionary that counts how many times each script has been r... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert register_post_scripts([]) == {}\", \"assert register_post_scripts(['script_1']) == {'script_1': 1}\", \"assert register_post_scripts(['script_1', 'script_2']) == {'script_1': 1, 'script_2': 1}\", \"assert register_post_scripts(['script_1', 'script_1']) == {'... | {
"split": "train",
"index": 64436,
"acecode_id": "oss_31112",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates a password validation system. The function should ensure that a password meets specific criteria: it must be at least 8 characters long, contain at least one uppercase letter, one lowercase letter, one digit, and one specia... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_valid_password('Password1!') == True\", \"assert is_valid_password('password') == False\", \"assert is_valid_password('PASSWORD') == False\", \"assert is_valid_password('Pass1') == False\", \"assert is_valid_password('12345678') == False\", \"assert is_va... | {
"split": "train",
"index": 64437,
"acecode_id": "oss_29158",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with writing a function `create_lstm_model(letters: List[str], max_length: int) -> str` that simulates the creation of an LSTM model configuration. The function will take two parameters: a list of strings `letters` representing the letters used in the model and a... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_lstm_model(['a', 'b', 'c'], 10) == 'Model created with input_dim=3, max_length=10, layers=[LSTM(8), Dropout(0.2), LSTM(8), Dropout(0.2), Dense(2, activation=\\\"softmax\\\")]'\", \"assert create_lstm_model(['x', 'y'], 5) == 'Model created with input_d... | {
"split": "train",
"index": 64438,
"acecode_id": "bigcode_python_fns_49708",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `nested_loop_factorial(n: int, m: int) -> int` that calculates the sum of the factorials of all products of pairs of integers formed by iterating through the range of `n` and `m`. Your function should handle exceptions for invalid input types. If the input ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert nested_loop_factorial(0, 0) == 0\", \"assert nested_loop_factorial(2.5, 3) == 'Error: Parameters must be integers'\", \"assert nested_loop_factorial(3, '3') == 'Error: Parameters must be integers'\", \"assert nested_loop_factorial(0, 3) == 0\", \"assert nest... | {
"split": "train",
"index": 64439,
"acecode_id": "evol_16058",
"num_tests": 7
} |
acecode | [
{
"role": "user",
"content": "You are given an XML document containing information about a bookstore inventory. The XML includes details such as the book's title, author, price, date of publication, and genre. Write a function that takes a string representing the XML content as input and returns a list of d... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert parse_xml_to_dict('<bookstore><book genre=\\\"Fantasy\\\"><title>A Game of Thrones</title><author birth_date=\\\"1948-09-20\\\" nationality=\\\"American\\\">George R. R. Martin</author><price>9.99</price><publish_date>1996-08-01</publish_date></book></bookst... | {
"split": "train",
"index": 64440,
"acecode_id": "evol_32716",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Write a Python function named `odd_numbers` that takes a list which may contain integers, nested lists, and dictionaries containing integers as values, and returns a list of odd integers in descending order. The function should handle exceptions for non-integer inputs and retur... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert odd_numbers([1, 2, 3, 4, 5]) == [5, 3, 1]\", \"assert odd_numbers([[1, 2], [3, 4], [5]]) == [5, 3, 1]\", \"assert odd_numbers([{'a': 1, 'b': 2}, {'c': 3, 'd': 4}]) == [3, 1]\", \"assert odd_numbers([1, {'a': [3, 5], 'b': 2}, [7, 8]]) == [7, 5, 3, 1]\", \"ass... | {
"split": "train",
"index": 64441,
"acecode_id": "evol_10458",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a simple game environment where the environment's state is represented as a single integer. The environment starts in a given initial state and can transition to a new state based on an action taken. The state is updated according to the followi... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert step('increment', 0) == (1, 1, False)\", \"assert step('increment', 5) == (6, 1, False)\", \"assert step('decrement', 5) == (4, -1, False)\", \"assert step('reset', 5) == (0, 1, False)\", \"assert step('reset', 10) == (0, 1, False)\", \"assert step('incremen... | {
"split": "train",
"index": 64442,
"acecode_id": "oss_15741",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with simulating a USB bulk transfer process in Python. Write a function `simulate_bulk_transfer` that takes the following parameters: \n- `handle`: An integer representing the USB device handle. \n- `endpoint_in`: An integer representing the input endpoint for th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert simulate_bulk_transfer(-1, 1, bytearray(b'\\\\x00' * 64), 64) == 'Invalid handle'\", \"assert simulate_bulk_transfer(123, 0, bytearray(b'\\\\x00' * 64), 64) == 'Invalid endpoint'\", \"assert simulate_bulk_transfer(123, 6, bytearray(b'\\\\x00' * 64), 64) == '... | {
"split": "train",
"index": 64443,
"acecode_id": "oss_34104",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with simulating the functionality of smart blinds in a smart home environment. Your goal is to implement a function `smart_blinds_client(initial_position, commands)` that takes an initial position of the blinds (a float between 0 and 100, where 0 represents fully... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert smart_blinds_client(50, ['open']) == 100.0\", \"assert smart_blinds_client(0, ['close']) == 0.0\", \"assert smart_blinds_client(50, ['set_position 75']) == 75.0\", \"assert smart_blinds_client(50, ['set_position 110']) == 50.0\", \"assert smart_blinds_client... | {
"split": "train",
"index": 64444,
"acecode_id": "oss_32015",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Write a python function `remove_kth_element(list_input: List[int], k: int) -> List[int]` that takes a list of integers and an integer k. The function should return a list with the same elements, but the k'th element removed. If k is greater than or equal to the length of the li... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert remove_kth_element([1, 2, 3, 4, 5], 2) == [1, 2, 4, 5]\", \"assert remove_kth_element([10, 20, 30], 5) == [30, 20, 10]\", \"assert remove_kth_element([1], 0) == []\", \"assert remove_kth_element([], 3) == [3]\", \"assert remove_kth_element([5, 6, 7], -1) == ... | {
"split": "train",
"index": 64445,
"acecode_id": "evol_2564",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, write a function `percentage_change` that calculates the percentage change between the current and the previous element in the list. The percentage change is defined as: (current value - previous value) / |previous value| * 100. The first element will ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert percentage_change([100, 200, 300]) == [None, 100.0, 50.0]\", \"assert percentage_change([100, 0, 200]) == [None, -100.0, None]\", \"assert percentage_change([50, 75, 100, 50]) == [None, 50.0, 33.33333333333333, -50.0]\", \"assert percentage_change([]) == []\... | {
"split": "train",
"index": 64446,
"acecode_id": "bigcode_python_fns_29228",
"num_tests": 13
} |
acecode | [
{
"role": "user",
"content": "Implement a function `find_coprime_max_sum(array: List[int]) -> int` that calculates the maximum sum of non-adjacent elements in the given list of integers, where no two selected elements share a common divisor greater than one. The function should return this maximum sum. The ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_coprime_max_sum([8, 4, 6, 15, 5]) == 23\", \"assert find_coprime_max_sum([1, 1, 1, 1, 1]) == 3\", \"assert find_coprime_max_sum([0, 0, 0]) == 0\", \"assert find_coprime_max_sum([5, 7, 10, 12, 15]) == 22\", \"assert find_coprime_max_sum([8]) == 8\", \"as... | {
"split": "train",
"index": 64447,
"acecode_id": "evol_5893",
"num_tests": 6
} |
acecode | [
{
"role": "user",
"content": "Write a function in Python that finds the maximum number in a list of integers without using the built-in max function or any other sorting functions. Your function should be able to handle both positive and negative integers as well as zero. Implement the function `find_maximu... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_maximum([15, 32, 76, 48, -90, 22]) == 76\", \"assert find_maximum([0, -32, -76, -48, -90, -22]) == 0\", \"assert find_maximum([-5, -1, -3, -4]) == -1\", \"assert find_maximum([1, 2, 3, 4, 5]) == 5\", \"assert find_maximum([10]) == 10\", \"assert find_ma... | {
"split": "train",
"index": 64448,
"acecode_id": "evol_26745",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates a simple inventory management system. Your function should accept a list of operations where each operation is represented as a tuple. The first element of the tuple indicates the operation type ('add', 'remove', 'updat... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert inventory_management([('add', 'apple', 10), ('check', 'apple')]) == ['apple is available with quantity 10']\", \"assert inventory_management([('add', 'banana', 15), ('check', 'banana')]) == ['banana is available with quantity 15']\", \"assert inventory_manag... | {
"split": "train",
"index": 64449,
"acecode_id": "oss_32269",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given the coefficients of a quadratic equation in the form ax^2 + bx + c, implement a function that calculates the roots of the equation using the Quadratic Formula. The function should handle cases where the roots are real and distinct, real and equal, or complex. If the equat... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert quadratic_formula(1, 2, 1) == ('-1.0', '-1.0')\", \"assert quadratic_formula(1, 0, -4) == ('2.0', '-2.0')\", \"assert quadratic_formula(1, -3, 2) == ('2.0', '1.0')\", \"assert quadratic_formula(2, 4, 2) == ('-1.0', '-1.0')\", \"assert quadratic_formula(1, 0,... | {
"split": "train",
"index": 64450,
"acecode_id": "evol_7446",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that reloads API settings based on a specific setting name and its new value. Your function should be named `reload_api_settings`. It takes four parameters: a string `setting` representing the name of the setting to be changed, a valu... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert reload_api_settings('REST_KNOX', 'new_value', {'key1': 'default1'}, {'import1': 'import_value1'}) == {'key1': 'default1', 'REST_KNOX': 'new_value'}\", \"assert reload_api_settings('OTHER_SETTING', 'new_value', {'key1': 'default1'}, {'import1': 'import_value1... | {
"split": "train",
"index": 64451,
"acecode_id": "oss_6212",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given an undirected graph represented as an adjacency list. Your task is to implement a function `find_connected_components(graph: List[List[int]]) -> List[List[int]]` that returns a list of connected components in the graph. A connected component is a subset of vertice... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_connected_components([[1],[0],[3],[2],[5],[4]]) == [[0, 1], [2, 3], [4, 5]]\", \"assert find_connected_components([[], []]) == [[0], [1]]\", \"assert find_connected_components([[1], [0, 2], [1, 3], [2], [], []]) == [[0, 1, 2, 3], [4], [5]]\", \"assert f... | {
"split": "train",
"index": 64452,
"acecode_id": "bigcode_python_fns_8672",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are given a list of user status changes represented as tuples, where each tuple contains a user's email and their activation status (True or False). Implement a function `send_approved_mail(users: List[Tuple[str, bool]]) -> List[str]` that returns a list of email addresses ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert send_approved_mail([('user1@example.com', False), ('user2@example.com', True), ('user3@example.com', False)]) == ['user2@example.com']\", \"assert send_approved_mail([('user1@example.com', False), ('user2@example.com', False), ('user3@example.com', True)]) =... | {
"split": "train",
"index": 64453,
"acecode_id": "bigcode_python_fns_9613",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that processes a given response dictionary and extracts specific feature names from it. The response is structured with two keys: 'code' and 'data'. The 'data' key contains a list of features, where each feature is represented as a di... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert extract_features({'code': 200, 'data': [{'name': 'feature1'}, {'name': 'feature2'}]}) == ['feature1', 'feature2']\", \"assert extract_features({'code': 200, 'data': [{'name': 'feature1'}, {'name': 'feature1'}]}) == ['feature1']\", \"assert extract_features({... | {
"split": "train",
"index": 64454,
"acecode_id": "oss_3224",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "Write a Python function that merges two strings together and returns the resulting string. The function should take two strings as input and concatenate them sequentially. Do not use any built-in Python string methods for concatenation.\nPlease reason step by step, then write a... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert merge_strings('hello', 'world') == 'helloworld'\", \"assert merge_strings('Python', 'Programming') == 'PythonProgramming'\", \"assert merge_strings('', 'empty') == 'empty'\", \"assert merge_strings('123', '456') == '123456'\", \"assert merge_strings('abc', '... | {
"split": "train",
"index": 64455,
"acecode_id": "evol_9123",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function to calculate the average intensity of red, green, and blue color channels from a given list of RGB values. Each RGB value is represented as a tuple of three integers, where each integer is between 0 and 255 (inclusive). Your function ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_average_intensity([(255, 0, 0), (0, 255, 0), (0, 0, 255)]) == (85, 85, 85)\", \"assert calculate_average_intensity([(0, 0, 0), (0, 0, 0), (0, 0, 0)]) == (0, 0, 0)\", \"assert calculate_average_intensity([(255, 255, 255), (255, 255, 255)]) == (255, ... | {
"split": "train",
"index": 64456,
"acecode_id": "oss_9712",
"num_tests": 13
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers and a predetermined target product, implement a function that identifies all unique combinations of four integers from the list that, when multiplied together, equal the target product. You should return a list of these unique combinations, where each c... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert solve_problem([2, 3, 4, 5, 6], 120) == [(2, 3, 4, 5)]\", \"assert solve_problem([0, 0, 0, 0], 0) == [(0, 0, 0, 0)]\", \"assert solve_problem([-1, -1, -1, -1], -1) == []\", \"assert solve_problem([0, 1, 2, 3], 0) == [(0, 1, 2, 3)]\", \"assert solve_problem([4... | {
"split": "train",
"index": 64457,
"acecode_id": "evol_32196",
"num_tests": 6
} |
acecode | [
{
"role": "user",
"content": "Write a Python function to find the mode from a list that contains only integers and floating-point numbers. If there are multiple modes, return them all in a list. If the list is empty or if all elements are unique, return 'No mode found'.\nPlease reason step by step, then wri... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_mode([1.5, 2.5, 2.5, 3.0, 1.5]) == [1.5, 2.5]\", \"assert find_mode([]) == 'No mode found'\", \"assert find_mode([1, 1, 2, 2, 3, 3]) == [1, 2, 3]\", \"assert find_mode([1.1, 2.2, 2.2, 3.3, 1.1]) == [1.1, 2.2]\", \"assert find_mode([3.5, 3.5, 3.5, 4.0, 4... | {
"split": "train",
"index": 64458,
"acecode_id": "evol_15135",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a SoQL-formatted query as a string, extract the domain, the API endpoint, and return the original query without the FROM statement. The domain is represented as 'subdomain.domain.tld', where 'subdomain' and 'domain' can be any alphanumeric string, and 'tld' is a two to th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_endpoint('SELECT Name FROM subdomain.example.com WHERE Age > 30') == ('subdomain.example.com', None, 'SELECT Name WHERE Age > 30')\", \"assert get_endpoint('SELECT * FROM api.example.com/endpoint/1234-5678.json WHERE Status = \\\"active\\\"') == ('api.e... | {
"split": "train",
"index": 64459,
"acecode_id": "bigcode_python_fns_16659",
"num_tests": 6
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that takes a dictionary as input and returns a string representation of the length of the dictionary, followed by an arrow ('-->'), and then the sum of its values. The function should format the output as described. Write a function `... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_and_return({'a': 1, 'b': 2, 'c': 3}) == '3 --> 6'\", \"assert process_and_return({'x': 5, 'y': 10}) == '2 --> 15'\", \"assert process_and_return({}) == '0 --> 0'\", \"assert process_and_return({'one': 1}) == '1 --> 1'\", \"assert process_and_return({... | {
"split": "train",
"index": 64460,
"acecode_id": "oss_5498",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates a simple data storage system. The function, named `store_and_retrieve`, should take a list of integers as input and return the last integer in the list. If the list is empty, the function should return None. Your functi... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert store_and_retrieve([10, 20, 30]) == 30\", \"assert store_and_retrieve([1]) == 1\", \"assert store_and_retrieve([]) == None\", \"assert store_and_retrieve([5, 10, 15, 20]) == 20\", \"assert store_and_retrieve([-1, -2, -3]) == -3\", \"assert store_and_retrieve... | {
"split": "train",
"index": 64461,
"acecode_id": "oss_16950",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with generating a specific sequence of strings based on the following rules. Write a function that takes an integer input `n` and outputs a string according to these rules: If `n` is divisible by 3, output 'bizz'. If `n` is divisible by 5, output 'fuzz'. If `n` i... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_sequence_string(1) == '1'\", \"assert generate_sequence_string(2) == '2'\", \"assert generate_sequence_string(3) == 'bizz'\", \"assert generate_sequence_string(4) == '4'\", \"assert generate_sequence_string(5) == 'fuzz'\", \"assert generate_sequence... | {
"split": "train",
"index": 64462,
"acecode_id": "oss_23768",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that retrieves the default connection options for a PostgreSQL database. Implement a function `get_postgres_options` that takes no arguments and returns a dictionary of default connection options (host, database, user, password). I... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_postgres_options() == {'host': 'localhost', 'database': 'mydb', 'user': 'myuser', 'password': 'mypassword'}\", \"assert get_postgres_options() != {}\", \"assert isinstance(get_postgres_options(), dict)\", \"assert 'host' in get_postgres_options()\", \"as... | {
"split": "train",
"index": 64463,
"acecode_id": "oss_29264",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `binary_search(nums: List[int], target: int) -> Tuple[Optional[int], int]` that performs a binary search on a sorted list of integers and returns the index of the target integer along with the number of steps taken to find it. If the target integer is not f... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert binary_search([], 1) == (None, 0)\", \"assert binary_search([1], 1) == (0, 1)\", \"assert binary_search([1, 2, 3, 4, 5], 6) == (None, 3)\", \"assert binary_search([1, 2, 3, 4, 5], 5) == (4, 3)\", \"assert binary_search([1, 1, 1, 2], 2) == (3, 3)\", \"assert ... | {
"split": "train",
"index": 64464,
"acecode_id": "evol_33638",
"num_tests": 8
} |
acecode | [
{
"role": "user",
"content": "Given a multidimensional array of integers, implement a function that returns the sum of all the prime numbers found in the matrix. The prime number summation should include all prime numbers from the provided matrix.\nPlease reason step by step, then write a self-contained Pyt... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert sum_of_prime([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == 17\", \"assert sum_of_prime([[10, 11, 12], [13, 14, 15], [16, 17, 18]]) == 41\", \"assert sum_of_prime([[4, 6, 8], [10, 12, 14]]) == 0\", \"assert sum_of_prime([[2, 3, 5], [7, 11, 13]]) == 41\", \"assert sum... | {
"split": "train",
"index": 64465,
"acecode_id": "evol_32279",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a secure configuration file for a Django web application. The configuration file contains sensitive information and settings that need to be protected. Your goal is to write a Python function `generate_secure_settings()` that takes no arguments and ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_secure_settings().startswith('# Secure Django settings file')\", \"assert 'SECRET_KEY =' in generate_secure_settings()\", \"assert 'DEBUG = False' in generate_secure_settings()\", \"assert generate_secure_settings().count('SECRET_KEY') == 1\", \"ass... | {
"split": "train",
"index": 64466,
"acecode_id": "oss_34635",
"num_tests": 5
} |
acecode | [
{
"role": "user",
"content": "You are given two lists of integers, `q_encoding` and `m_last`. Your task is to implement a function that combines these two lists into a single output list of scores based on the following rules: If the length of `q_encoding` is equal to the length of `m_last`, sum the corresp... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert combine_scores([1, 2, 3], [4, 5, 6]) == [5, 7, 9]\", \"assert combine_scores([10, 20], [1, 2]) == [11, 22]\", \"assert combine_scores([1], [2]) == [3]\", \"assert combine_scores([1, 2], [2]) == []\", \"assert combine_scores([], []) == []\", \"assert combine_... | {
"split": "train",
"index": 64467,
"acecode_id": "bigcode_python_fns_18761",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with generating a unique email signature for users. The email signature should include the user's name and a version number for a package. Write a function called `generate_email_signature` that takes two parameters: a string `user_name` representing the user's n... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_email_signature('Alice Smith', '1.0.0') == 'Email Signature for Alice Smith - Version 1.0.0'\", \"assert generate_email_signature('Bob Johnson', '2.5.1') == 'Email Signature for Bob Johnson - Version 2.5.1'\", \"assert generate_email_signature('Char... | {
"split": "train",
"index": 64468,
"acecode_id": "oss_12029",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given two lists of integers, implement a function called `exchange(lst1, lst2)` that returns 'YES' if the number of odd integers in `lst1` is equal to the number of even integers in `lst2`. Otherwise, return 'NO'.\nPlease reason step by step, then write a self-contained Python ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert exchange([1, 2, 3, 4], [2, 4, 6, 8]) == 'NO'\", \"assert exchange([1, 3, 5], [2, 4, 6]) == 'YES'\", \"assert exchange([1, 1, 1], [2, 2, 2]) == 'YES'\", \"assert exchange([], [2, 4, 6]) == 'NO'\", \"assert exchange([1, 2, 3], [2, 4, 6]) == 'NO'\", \"assert ex... | {
"split": "train",
"index": 64469,
"acecode_id": "evol_21698",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing events. You need to implement a function `get_last_event_id(events: List[int], auto_id: bool) -> int` that returns the last event identifier based on the following rules: If `auto_id` is True, the function should return the count of... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_last_event_id([1, 2, 3, 4], True) == 4\", \"assert get_last_event_id([1, 2, 2, 3, 4], True) == 4\", \"assert get_last_event_id([5, 5, 5, 5], True) == 1\", \"assert get_last_event_id([1], False) == 1\", \"assert get_last_event_id([1, 2], False) == 1\", \"... | {
"split": "train",
"index": 64470,
"acecode_id": "bigcode_python_fns_22216",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an array of integers, write a function that returns the two elements that contribute to the maximal combined numerical value. If there are multiple pairs with the maximum sum, return any pair. The function should have a time complexity of O(n log n) or better.\nPlease rea... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_max_combo([2, 8, 3, 5, 10, 1]) == [10, 8]\", \"assert find_max_combo([0, 0, 0, 0]) == [0, 0]\", \"assert find_max_combo([5, 5, 5, 5, 5]) == [5, 5]\", \"assert find_max_combo([1, 3, 3, 3]) == [3, 3]\", \"assert find_max_combo([10, 10, 20, 20]) == [20, 20... | {
"split": "train",
"index": 64471,
"acecode_id": "evol_27259",
"num_tests": 9
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates a job update and rollback system. The function `simulate_job_update` takes two inputs: a list of job update events and a boolean indicating whether to rollback the update. The function should return a dictionary contain... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert simulate_job_update(['event1', 'event2', 'event3'], False) == {'event_count': 3, 'rollback_status': 'No rollback'}\", \"assert simulate_job_update(['update1', 'update2'], True) == {'event_count': 2, 'rollback_status': 'Rollback completed'}\", \"assert simula... | {
"split": "train",
"index": 64472,
"acecode_id": "bigcode_python_fns_27381",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `calculate_cubes(start: int, end: int) -> List[Tuple[int, int]]` that takes two integers representing a numeric interval [start, end] (inclusive) and returns a list of tuples where each tuple contains a whole number from the interval and its corresponding c... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_cubes(1, 5) == [(1, 1), (2, 8), (3, 27), (4, 64), (5, 125)]\", \"assert calculate_cubes(0, 3) == [(0, 0), (1, 1), (2, 8), (3, 27)]\", \"assert calculate_cubes(-3, 1) == [(-3, -27), (-2, -8), (-1, -1), (0, 0), (1, 1)]\", \"assert calculate_cubes(5, ... | {
"split": "train",
"index": 64473,
"acecode_id": "evol_11191",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function called `lake_analysis` that will be used to analyze data related to lakes. The function should take two parameters: a list of lake names and a corresponding list of their areas in square kilometers. The lake names will be unique, and ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert lake_analysis([], []) == {}\", \"assert lake_analysis(['Lake A'], [100]) == {'lake_area': {'Lake A': 100}, 'largest_lake': 'Lake A', 'smallest_lake': 'Lake A', 'average_area': 100.0}\", \"assert lake_analysis(['Lake A', 'Lake B'], [200, 150]) == {'lake_area'... | {
"split": "train",
"index": 64474,
"acecode_id": "oss_34759",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "Develop a function to calculate the total cost of procuring a fixed number of items, each having a distinct price. You need to implement a function `calculate_total_cost()` that takes in a list of prices and returns the sum of these prices. The list will always contain exactly ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_total_cost([5.00, 5.00, 5.00, 5.00, 5.00, 5.00]) == 30.00\", \"assert calculate_total_cost([10.00, 20.00, 30.00, 40.00, 50.00, 60.00]) == 210.00\", \"assert calculate_total_cost([1.00, 2.00, 3.00, 4.00, 5.00, 6.00]) == 21.00\", \"assert calculate_t... | {
"split": "train",
"index": 64475,
"acecode_id": "evol_29807",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are given a list of commands and a dictionary of pending changes for an application. Each command consists of a name and a list of fields. Your task is to implement a function that returns a list of recommended commands based on the pending changes. A command is recommended... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_recommendations([['cmd1', ['f1', 'f2']], ['cmd2', ['prop']]], {'f2': {'field': 'f2', 'user': 'api', 'updated': '00:00'}}) == [{'command': 'cmd1', 'field': 'f2', 'updated': '00:00', 'user': 'api'}]\", \"assert get_recommendations([['cmd1', ['f1']], ['cmd2... | {
"split": "train",
"index": 64476,
"acecode_id": "bigcode_python_fns_32015",
"num_tests": 13
} |
acecode | [
{
"role": "user",
"content": "Implement a generator function `pentagonal_gen(n)` that yields the first `n` pentagonal numbers. A pentagonal number for a given integer `n` is defined by the formula: P(n) = n(3n - 1) / 2. Your function should yield pentagonal numbers starting from n=1 up to n. For example, if... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert list(pentagonal_gen(1)) == [1]\", \"assert list(pentagonal_gen(2)) == [1, 5]\", \"assert list(pentagonal_gen(3)) == [1, 5, 12]\", \"assert list(pentagonal_gen(4)) == [1, 5, 12, 22]\", \"assert list(pentagonal_gen(5)) == [1, 5, 12, 22, 35]\", \"assert list(pe... | {
"split": "train",
"index": 64477,
"acecode_id": "evol_12500",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that processes datetime strings and calculates the time difference between two datetime strings. Implement a function `process_datetimes(date_str1: str, date_str2: str, format_: str = None) -> timedelta` that takes two strings representin... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_datetimes('2022-01-01T12:00:00Z', '2022-01-01T13:00:00Z', '%Y-%m-%dT%H:%M:%SZ') == timedelta(hours=1)\", \"assert process_datetimes('2022-01-01T12:00:00Z', '2022-01-01T12:00:00Z', '%Y-%m-%dT%H:%M:%SZ') == timedelta(0)\", \"assert process_datetimes('2... | {
"split": "train",
"index": 64478,
"acecode_id": "oss_10103",
"num_tests": 9
} |
acecode | [
{
"role": "user",
"content": "You are given an input that can be a list of integers, a single integer, a float, or None. Your task is to implement a function `convert_to_array(arr)` that converts the input into a list of floats. If the input is None, the function should return None. If the input is a single... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert convert_to_array(None) is None\", \"assert convert_to_array(5) == [5.0]\", \"assert convert_to_array(3.14) == [3.14]\", \"assert convert_to_array([1, 2, 3]) == [1.0, 2.0, 3.0]\", \"assert convert_to_array([1.1, 2.2, 3.3]) == [1.1, 2.2, 3.3]\", \"assert conve... | {
"split": "train",
"index": 64479,
"acecode_id": "bigcode_python_fns_45024",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that converts a given string to uppercase. Write a function `string_to_uppercase` that takes a string as input and returns the string with all its characters converted to uppercase. The input string can contain any characters, incl... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert string_to_uppercase('hello') == 'HELLO'\", \"assert string_to_uppercase('Hello, World!') == 'HELLO, WORLD!'\", \"assert string_to_uppercase('123abc') == '123ABC'\", \"assert string_to_uppercase('!@#$%^&*()') == '!@#$%^&*()'\", \"assert string_to_uppercase('p... | {
"split": "train",
"index": 64480,
"acecode_id": "oss_30971",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of deposit and withdrawal operations represented as integers and/or floating-point numbers, implement a function `below_zero(operations: List[Union[int, float]], handle_float: bool = False, balance_limit: Union[int, float] = 10) -> bool` that determines if the bank... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert below_zero([1, 2, -5], True, 5) == True\", \"assert below_zero([1, 2, -3.5], True) == True\", \"assert below_zero([5, -3, -3], True) == True\", \"assert below_zero([0, 0, 0], True) == False\", \"assert below_zero([-1, -1, -1], True, 2) == True\", \"assert be... | {
"split": "train",
"index": 64481,
"acecode_id": "evol_7156",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing the scores of students in a class. Write a function `calculate_average(scores: List[int]) -> float` that calculates the average score of the students. The average score should be computed as the sum of all scores divided by the numb... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_average([]) == 0.0\", \"assert calculate_average([100, 90, 80]) == 90.0\", \"assert calculate_average([50, 50, 50, 50]) == 50.0\", \"assert calculate_average([-10, 0, 10]) == 0.0\", \"assert calculate_average([-100, 0, 100]) == 0.0\", \"assert calc... | {
"split": "train",
"index": 64482,
"acecode_id": "bigcode_python_fns_18125",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function that generates the Fibonacci sequence values for a given range of numbers from `start` to `end` (inclusive). The function should discard any Fibonacci number that is not divisible by 3 and return a list of the remaining Fibonacci numbers. If no such Fibonac... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert fibonacci_in_range(0, 5) == [0, 3]\", \"assert fibonacci_in_range(1, 1) == []\", \"assert fibonacci_in_range(10, 15) == []\", \"assert fibonacci_in_range(5, 5) == []\", \"assert fibonacci_in_range(6, 10) == []\", \"assert fibonacci_in_range(10, 10) == []\", ... | {
"split": "train",
"index": 64483,
"acecode_id": "evol_35670",
"num_tests": 7
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates the installation of an action for a cloud function platform. The function will take in a dictionary of environment variable names mapped to their corresponding parameter values, a string representing the action name, and a ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert install_action('fetch_aws_keys', {'fetch_aws_keys': 'value1'}, False) == 'Action fetch_aws_keys has been installed.'\", \"assert install_action('fetch_aws_keys', {'fetch_aws_keys': 'value1'}, True) == 'No installation took place.'\", \"assert install_action(... | {
"split": "train",
"index": 64484,
"acecode_id": "bigcode_python_fns_42390",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Write a Python function `find_smallest_prime(arr)` that takes a 2D array of integers and returns the smallest prime number found in the array. If there are no prime numbers, return None. You should also implement a helper function to check if a number is prime without using bui... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_smallest_prime([[5, 10, 2], [14, 11, 17], [10, 18, 6]]) == 2\", \"assert find_smallest_prime([[4, 6, 8], [9, 10, 12], [14, 15, 16]]) == None\", \"assert find_smallest_prime([[3, 4, 5], [6, 7, 8], [9, 10, 11]]) == 3\", \"assert find_smallest_prime([[12, ... | {
"split": "train",
"index": 64485,
"acecode_id": "evol_29563",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a string `structure_slug` and a string `ticket_id`, implement a function `generate_ticket_message_url(structure_slug: str, ticket_id: str) -> str` that generates a URL for redirecting to add a ticket message based on the user's role. The user's type is determined by the f... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_ticket_message_url('A123', 'TICKET001') == 'uni_ticket:admin_ticket_message/A123/TICKET001'\", \"assert generate_ticket_message_url('U456', 'TICKET002') == 'uni_ticket:user_ticket_message/U456/TICKET002'\", \"assert generate_ticket_message_url('G789... | {
"split": "train",
"index": 64486,
"acecode_id": "bigcode_python_fns_5403",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers `numbers` and an integer `delimiter`, write a function `intersperse(numbers: List[int], delimiter: int) -> List[int]` that inserts the `delimiter` between each pair of consecutive elements in the `numbers` list. If the `delimiter` is negative, it should... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert intersperse([], 4) == []\", \"assert intersperse([1, 2, 3], 4) == [1, 4, 2, 4, 3]\", \"assert intersperse([1, 2], 0) == [1, 0, 2]\", \"assert intersperse([7], 3) == [7]\", \"assert intersperse([1, 2, 3, 4], 5) == [1, 5, 2, 5, 3, 5, 4]\", \"assert intersperse... | {
"split": "train",
"index": 64487,
"acecode_id": "evol_1558",
"num_tests": 13
} |
acecode | [
{
"role": "user",
"content": "Implement a function `calculate_expression(operations, numbers)` that evaluates a mathematical expression given a list of operations and a list of numbers. The operations include: Power ( ** ), Floor division ( // ), Bitwise AND ( & ), Bitwise OR ( | ), Bitwise XOR ( ^ ). The f... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_expression(['**', '//', '|'], [3, 2, 5, 3]) == 3\", \"assert calculate_expression(['&'], [8, 4]) == 0\", \"assert calculate_expression(['|'], [5, 3]) == 7\", \"assert calculate_expression(['**'], [2, 3]) == 8\", \"assert calculate_expression(['//',... | {
"split": "train",
"index": 64488,
"acecode_id": "evol_15708",
"num_tests": 7
} |
acecode | [
{
"role": "user",
"content": "You are given a list of timestamps corresponding to events and two lists representing the firing rates of two types of neurons: trajectory (trj) and non-trajectory (ntrj). Your task is to calculate the average firing rate for each type of neuron over a specified time interval. ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_firing_rates([0.0, 1.0, 2.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0.0, 2.0) == (0.0, 0.0)\", \"assert calculate_firing_rates([2.0, 3.0, 4.0], [1.0, 1.0, 1.0], [0.5, 0.5, 0.5], 1.0, 4.0) == (1.0, 0.5)\", \"assert calculate_firing_rates([0.0, 0.5, 1.0]... | {
"split": "train",
"index": 64489,
"acecode_id": "bigcode_python_fns_47135",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "You need to create a Python function that generates a random string of a specified length. The function should take an integer `length` as input and return a random string consisting of uppercase letters, lowercase letters, and digits. Ensure that the generated string contains ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert len(generate_random_string(5)) == 5 and generate_random_string(5).isalnum()\", \"assert len(generate_random_string(10)) == 10 and generate_random_string(10).isalnum()\", \"assert len(generate_random_string(15)) == 15 and generate_random_string(15).isalnum()\... | {
"split": "train",
"index": 64490,
"acecode_id": "oss_10871",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a Python function that processes a dictionary of input data and performs specific operations based on the mode of an agent. The agent can operate in two modes: A2C and PPO. If the agent is in training mode and operating in A2C mode, the function... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_input_and_train({'data1': [1, 2, 3]}, True, Agent(ACMode.A2C, {'n_epochs': 5})) == 'A2C agent training with combined input'\", \"assert process_input_and_train({'data1': [1]}, True, Agent(ACMode.A2C, {'n_epochs': 5})) == 'A2C agent training with comb... | {
"split": "train",
"index": 64491,
"acecode_id": "oss_20693",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Create a function `store_and_retrieve(dictionary: dict, key: str) -> str` that takes a dictionary and a key as input. If the key exists in the dictionary, return the corresponding value. If the key does not exist, return 'Key not found'.\nPlease reason step by step, then write ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert store_and_retrieve({'a': 'apple', 'b': 'banana'}, 'a') == 'apple'\", \"assert store_and_retrieve({'x': 'xray', 'y': 'yankee'}, 'y') == 'yankee'\", \"assert store_and_retrieve({'1': 'one', '2': 'two'}, '3') == 'Key not found'\", \"assert store_and_retrieve({'... | {
"split": "train",
"index": 64492,
"acecode_id": "evol_9860",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates basic banking operations on a bank account. Your function should take a list of operations and return the final balance of the account after performing these operations. The operations will be represented as tuples wher... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert bank_operations([('deposit', 100), ('withdraw', 50), ('get_balance', 0)]) == 50\", \"assert bank_operations([('deposit', 200), ('withdraw', 300), ('get_balance', 0)]) == 200\", \"assert bank_operations([('deposit', 100), ('withdraw', 100), ('get_balance', 0)... | {
"split": "train",
"index": 64493,
"acecode_id": "oss_18475",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of column names in a DataFrame and a list of columns that should be retained. Your task is to write a function that determines which columns should be dropped, based on whether they are included in the list of columns to retain. Implement a function called ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert drop_columns(['A', 'B', 'C', 'D'], ['A', 'C']) == ['B', 'D']\", \"assert drop_columns(['A', 'B'], ['A']) == ['B']\", \"assert drop_columns(['X', 'Y', 'Z'], ['Y']) == ['X', 'Z']\", \"assert drop_columns(['Column1', 'Column2', 'Column3'], ['Column1', 'Column3'... | {
"split": "train",
"index": 64494,
"acecode_id": "bigcode_python_fns_39661",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given two integers `rent` and `admin_fee`, return their sum as the target variable `y`. Implement a function that takes two parameters: `rent` (an integer) and `admin_fee` (an integer), and returns the computed target variable `y`. The function should perform the operation `y =... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert add_target_variable(1000, 200) == 1200\", \"assert add_target_variable(0, 0) == 0\", \"assert add_target_variable(-100, -50) == -150\", \"assert add_target_variable(500, 150) == 650\", \"assert add_target_variable(10000, 5000) == 15000\", \"assert add_target... | {
"split": "train",
"index": 64495,
"acecode_id": "bigcode_python_fns_11247",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with validating a registration object. This object is given to you as a dictionary with specific attributes. Your goal is to create a function called `validate_registration` that takes in a registration dictionary and checks for the following criteria: \n\n1. The... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert validate_registration({'registration_id': 200000009, 'registration_num': 'REG123', 'registration_type_cd': 'DT', 'financing_id': 12345, 'json': {'changeType': 'DT', 'addDebtors': ['Debtor1'], 'deleteDebtors': ['Debtor2']}}) == True\", \"assert validate_regis... | {
"split": "train",
"index": 64496,
"acecode_id": "bigcode_python_fns_33060",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, implement a function that returns a list of integers which appear more than twice in the input list. The order of integers in the output list should be the same as their first appearance in the input list.\nPlease reason step by step, then write a self... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_multiples([1, 2, 3, 4, 5, 2, 3, 1, 6, 3]) == [3]\", \"assert find_multiples([1, 2, 2, 3, 3, 3]) == [3]\", \"assert find_multiples([1, 1, 1, 2, 2, 3]) == [1]\", \"assert find_multiples([4, 5, 6, 7, 8, 4, 4]) == [4]\", \"assert find_multiples([9, 9, 9, 8,... | {
"split": "train",
"index": 64497,
"acecode_id": "evol_23023",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that takes a dictionary `data` as input and returns a new dictionary containing only the key-value pairs where the value is a list of integers. If the value associated with a key is not a list of integers, it should be excluded from t... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert filter_integer_lists({'a': [1, 2, 3], 'b': [4, 5], 'c': 'hello', 'd': [6, 'world'], 'e': 7, 'f': [8, 9, 10]}) == {'a': [1, 2, 3], 'b': [4, 5], 'f': [8, 9, 10]}\", \"assert filter_integer_lists({'x': [1, 2], 'y': 'test', 'z': [3, 4, 5]}) == {'x': [1, 2], 'z':... | {
"split": "train",
"index": 64498,
"acecode_id": "oss_14592",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that generates a dictionary representation of an 'Issue' model. The function should accept three parameters: 'title' (a string), 'description' (a string), and 'created_at' (a datetime object). The output should be a dictionary with the fo... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_issue('UI improvement', 'Improve button visibility', datetime(2022, 1, 1, 12, 0)) == {'title': 'UI improvement', 'description': 'Improve button visibility', 'created_at': datetime(2022, 1, 1, 12, 0)}\", \"assert create_issue('Performance issue', 'Redu... | {
"split": "train",
"index": 64499,
"acecode_id": "oss_29314",
"num_tests": 7
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.