data_source
large_stringclasses
1 value
prompt
listlengths
1
1
ability
large_stringclasses
1 value
reward_model
dict
extra_info
dict
acecode
[ { "role": "user", "content": "You are tasked with creating a function that constructs a notification message when a new answer is posted to a challenge. The function should take in three parameters: `answer_exists` (a boolean indicating whether the answer exists), `post_exists` (a boolean indicating whether...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_notification_message(False, True, True) == 'A new unavailable answer has been posted.'\", \"assert create_notification_message(False, False, True) == 'A new unavailable answer has been posted.'\", \"assert create_notification_message(False, True, Fals...
{ "split": "train", "index": 81000, "acecode_id": "bigcode_python_fns_48406", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the heights of a series of buildings. Your task is to implement a function that returns the maximum area of a rectangle that can be formed in a skyline formed by these buildings. The rectangle must be completely contained within the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_rectangle_area([2,1,5,6,2,3]) == 10\", \"assert max_rectangle_area([1,2,3,4,5]) == 9\", \"assert max_rectangle_area([5,4,3,2,1]) == 9\", \"assert max_rectangle_area([0,2,0,2]) == 2\", \"assert max_rectangle_area([1]) == 1\", \"assert max_rectangle_area([...
{ "split": "train", "index": 81001, "acecode_id": "bigcode_python_fns_1357", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that simulates the behavior of an authentication token management system for a web application. The function should take a list of tokens, where each token is represented as a dictionary with the following keys: 'user_id', 'created...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_ordered_tokens([{'user_id': 1, 'created': '2023-10-01T12:00:00', 'updated': '2023-10-01T12:05:00'}, {'user_id': 2, 'created': '2023-10-01T12:01:00', 'updated': '2023-10-01T12:04:00'}, {'user_id': 3, 'created': '2023-10-01T12:00:00', 'updated': '2023-10-0...
{ "split": "train", "index": 81002, "acecode_id": "oss_34331", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Implement a function `average(nums)` that takes a list of numbers as input and returns the average of the numbers. If the input list is empty, the function should return None. Additionally, if the list contains any non-numeric elements, the function should also return None.\nPl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert average([1, 2, 3]) == 2.0\", \"assert average([10, 20, 30, 40]) == 25.0\", \"assert average([]) == None\", \"assert average([1, 2, 'three']) == None\", \"assert average([1.5, 2.5, 3.5]) == 2.5\", \"assert average([1, 2, 3, 4, 5, 6]) == 3.5\", \"assert averag...
{ "split": "train", "index": 81003, "acecode_id": "evol_22838", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string `qbert_url` that represents a base URL in the format 'http://example.com/api/v1/' and a string `project_id` that represents a project identifier, write a function `get_qbert_v3_url(qbert_url: str, project_id: str) -> str` that constructs and returns a new string ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_qbert_v3_url('http://example.com/api/v1/', '123') == 'http://example.com/api/v3/123'\", \"assert get_qbert_v3_url('http://example.com/api/v1/', 'test_project') == 'http://example.com/api/v3/test_project'\", \"assert get_qbert_v3_url('http://example.com/a...
{ "split": "train", "index": 81004, "acecode_id": "bigcode_python_fns_3045", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Given a list of non-negative integers, implement a function that generates the largest possible number by concatenating the integers in the optimal order. For example, given the input [3, 30, 34, 5, 9], the function should return '9534330'.\nPlease reason step by step, then wri...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_num([0, 0, 0]) == '0'\", \"assert max_num([1, 10, 100]) == '110100'\", \"assert max_num([6, 60, 601]) == '660601'\", \"assert max_num([7, 77, 777]) == '777777'\", \"assert max_num([3, 303]) == '3303'\", \"assert max_num([12, 121]) == '12121'\"]}" }
{ "split": "train", "index": 81005, "acecode_id": "evol_12379", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Given a list of elements, implement a function that returns a new list containing all the elements from the original list in reverse order without using the inbuilt reverse function. The function should be able to handle lists of variable lengths, including empty lists. Define ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_list(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']) == ['h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']\", \"assert reverse_list([1, 2, 3, 4, 5]) == [5, 4, 3, 2, 1]\", \"assert reverse_list(['apple', 'banana', 'cherry']) == ['cherry', 'banana', 'apple']\", \"asse...
{ "split": "train", "index": 81006, "acecode_id": "evol_23345", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that formats statistical data for display. The function should take a dictionary of statistical values and a string representing a name, and return a new dictionary with the statistical values formatted according to specific rules. Sp...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_stats({'A_std': '10.5', 'B_std': '7.2'}, 'B') == {'A_std': '10.5', 'B_std': '7.2', 'B_std_formatted': '+- 7.2'}\", \"assert format_stats({'A_std': '10.5', 'B_std': '7.2', 'C_std': ''}, 'C') == {'A_std': '10.5', 'B_std': '7.2', 'C_std': '', 'C_std_form...
{ "split": "train", "index": 81007, "acecode_id": "oss_13260", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with constructing a simplified neural network model using a sequence of layers based on a given configuration. Write a function `construct_model` that accepts the following parameters: \n1. `cfg` (List[int]): A list of integers representing the number of output f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert construct_model([64, 32, 0, 16], ['fc1', 'fc2', 'dropout1', 'fc3'], 128) == ['fc1(64)', 'fc2(32)', 'Dropout', 'fc3(16)']\", \"assert construct_model([128, 64, 0, 32, 0], ['layer1', 'layer2', 'layer3', 'layer4', 'layer5'], 256) == ['layer1(128)', 'layer2(64)'...
{ "split": "train", "index": 81008, "acecode_id": "bigcode_python_fns_30344", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of exactly seven integers, write a function `find_two_smallest(numbers)` that returns the two smallest integers from the list in ascending order. The input list will always contain exactly seven integers.\nPlease reason step by step, then write a self-contained Pyt...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_two_smallest([5, 3, 8, 1, 2, 7, 4]) == (1, 2)\", \"assert find_two_smallest([10, 20, 30, 40, 50, 60, 70]) == (10, 20)\", \"assert find_two_smallest([-1, -3, -2, -5, -4, -6, -7]) == (-7, -6)\", \"assert find_two_smallest([1, 2, 0, 3, 4, 5, 6]) == (0, 1)\...
{ "split": "train", "index": 81009, "acecode_id": "evol_20568", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `allocate(n: int) -> List[Optional[Any]]` that allocates memory for an array of size `n`. The function should return a list containing `n` elements, all initialized to `None`. If `n` is `0`, the function should return `None`. Your task is to implement this ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert allocate(0) is None\", \"assert allocate(1) == [None]\", \"assert allocate(2) == [None, None]\", \"assert allocate(3) == [None, None, None]\", \"assert allocate(4) == [None, None, None, None]\", \"assert allocate(5) == [None, None, None, None, None]\", \"ass...
{ "split": "train", "index": 81010, "acecode_id": "bigcode_python_fns_45882", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `validate_email(email: str) -> bool` that checks if the provided email address is valid according to standard email specifications. The email must have the following format: it should start with alphanumeric characters, followed by optional periods, plus si...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_email('test@example.com') == True\", \"assert validate_email('user@domain.com') == True\", \"assert validate_email('user@domain') == False\", \"assert validate_email('user@.com') == False\", \"assert validate_email('@example.com') == False\", \"asse...
{ "split": "train", "index": 81011, "acecode_id": "evol_8261", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that takes two tuples as input and identifies the dissimilar elements between them, counting the occurrences of these dissimilar elements in each tuple. The function should return a dictionary where each key is a dissimilar element, and the value is either a tu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_dissimilar((1, 2, 3), (3, 4, 5)) == {1: (1, 'tuple1'), 2: (1, 'tuple1'), 4: (1, 'tuple2'), 5: (1, 'tuple2'), 3: ([1, 1], 'both')}\", \"assert find_dissimilar(('a', 'b', 'c'), ('c', 'd', 'e')) == {'a': (1, 'tuple1'), 'b': (1, 'tuple1'), 'd': (1, 'tuple2'...
{ "split": "train", "index": 81012, "acecode_id": "evol_2922", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with converting a time duration given in seconds into a human-readable format. Write a function `convert_seconds_to_readable_format(time_duration: int) -> str` that takes an integer representing the time duration in seconds and returns a string representing that ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_seconds_to_readable_format(3665) == '1 hour, 1 minute, 5 seconds'\", \"assert convert_seconds_to_readable_format(3600) == '1 hour'\", \"assert convert_seconds_to_readable_format(60) == '1 minute'\", \"assert convert_seconds_to_readable_format(59) == ...
{ "split": "train", "index": 81013, "acecode_id": "oss_30819", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that manages resources and their associated attributes. Your task is to write a function `manage_resources(operations)` that takes a list of operations and returns the results of the `get_attribute` operations. The operations can be o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_resources([('add_resource', 'resource1'), ('add_attribute', 'resource1', 'attr1', 'value1'), ('get_attribute', 'resource1', 'attr1')]) == ['value1']\", \"assert manage_resources([('add_resource', 'resource1'), ('add_attribute', 'resource1', 'attr1', '...
{ "split": "train", "index": 81014, "acecode_id": "oss_17770", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `do_algebra` that takes in two lists: `operators` and `operands`. The `operators` list contains primitive arithmetic operators (like +, -, *, //, **) and the `operands` list contains non-negative integers. The length of the `operators` list is always one le...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert do_algebra(['*', '+'], [1, 2, 3]) == 5\", \"assert do_algebra(['+'], [1, 2]) == 3\", \"assert do_algebra(['*', '-'], [4, 5, 3]) == 17\", \"assert do_algebra(['+'], [0, 5]) == 5\", \"assert do_algebra(['*'], [7, 3]) == 21\", \"assert do_algebra(['+', '+'], [2...
{ "split": "train", "index": 81015, "acecode_id": "evol_34388", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a string containing the metadata and dependencies of a Python project formatted in a specific way. The input string will represent the contents of a hypothetical setup file, where each section is clearly defined. You...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_setup_content(\\\"\\\"\\\"Programming Language :: Python :: 2.7\\\\nProgramming Language :: Python :: 3.4\\\\nkeywords='zstandard zstd compression'\\\\npackages=['zstandard']\\\"\\\"\\\") == {'python_versions': ['2.7', '3.4'], 'keywords': ['zstandard',...
{ "split": "train", "index": 81016, "acecode_id": "oss_30681", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings where each string contains a student's name followed by their test scores, separated by a comma. Your task is to implement a function that calculates the average test score for each student and returns a dictionary where the keys are the student'...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert average_student_scores(['Alice,90', 'Bob,80', 'Alice,100', 'Bob,70']) == {'Alice': 95.0, 'Bob': 75.0}\", \"assert average_student_scores(['Charlie,85', 'Charlie,95', 'Charlie,90']) == {'Charlie': 90.0}\", \"assert average_student_scores(['David,70', 'David,8...
{ "split": "train", "index": 81017, "acecode_id": "oss_21920", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of intervals, where each interval is represented as a list of two integers [start, end]. Your task is to implement a function that merges all overlapping intervals and returns a new list of intervals. An interval [start1, end1] overlaps with another interva...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_intervals([[1,3],[2,6],[8,10],[15,18]]) == [[1,6],[8,10],[15,18]]\", \"assert merge_intervals([[1,4],[4,5]]) == [[1,5]]\", \"assert merge_intervals([[1,2],[3,4],[5,6]]) == [[1,2],[3,4],[5,6]]\", \"assert merge_intervals([[3,5],[2,4],[1,2]]) == [[1,5]]\...
{ "split": "train", "index": 81018, "acecode_id": "evol_31878", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with calculating the average yield for various crop types on a farm. You are given a list of tuples, where each tuple represents a crop and contains the following elements: crop type (string), crop ID (string), field ID (string), total yield (float), acreage (flo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_average_yield([('corn', '0x49:1', 'm4_21', 30.0, 0.030, 'm4', False), ('corn', '0x49:2', 'm4_22', 60.0, 0.060, 'm4', False)]) == {'corn': 1000.0}\", \"assert calculate_average_yield([('sweetberry', '0x47:1', 'j3_14', 5.0, 0.010, 'j3', False), ('swe...
{ "split": "train", "index": 81019, "acecode_id": "oss_10032", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function to return the result of the logical AND operation between two given boolean variables, along with the binary representation of their AND operation. The return type must be a tuple.\nPlease reason step by step, then write a self-contained Python solution. Give y...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert binary_and(True, True) == (True, '1')\", \"assert binary_and(True, False) == (False, '0')\", \"assert binary_and(False, True) == (False, '0')\", \"assert binary_and(False, False) == (False, '0')\", \"assert binary_and(True, True) == (True, '1')\", \"assert b...
{ "split": "train", "index": 81020, "acecode_id": "evol_34460", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a graph represented as an adjacency list. Your task is to implement a function that checks if the given graph is a connected graph. A graph is considered connected if there is a path between every pair of vertices. The graph is represented as a dictionary where th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_connected({'A': ['B'], 'B': ['A']}) == True\", \"assert is_connected({'A': ['B', 'C'], 'B': ['A'], 'C': ['A']}) == True\", \"assert is_connected({'A': ['B'], 'B': ['A'], 'C': []}) == False\", \"assert is_connected({'A': ['B', 'C'], 'B': ['A'], 'C': ['A']}...
{ "split": "train", "index": 81021, "acecode_id": "oss_32550", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given two feature vectors represented as lists of integers, and a list of metric types, return a list of distances between the two feature vectors computed using the specified metrics. The metrics can include 'euclidean' and 'manhattan'. If any of the feature vectors is None, r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_final_feature([1, 2], [4, 6], ['euclidean']) == [5.0]\", \"assert get_final_feature([1, 2], [4, 6], ['manhattan']) == [7.0]\", \"assert get_final_feature([1, 2], [4, 6], None) == [3, 4]\", \"assert get_final_feature([1, 2, 3], [4, 5, 6], ['euclidean', 'm...
{ "split": "train", "index": 81022, "acecode_id": "bigcode_python_fns_44904", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to normalize a URL scheme. The URL scheme should be converted to lowercase and any trailing colon (':') should be removed. The function should return the normalized URL scheme. If the URL does not start with 'http://', 'https://', or ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert normalize_scheme('HTTP:') == 'http'\", \"assert normalize_scheme('fTp:') == 'ftp'\", \"assert normalize_scheme('HTTPS:') == 'https'\", \"assert normalize_scheme('http://example.com') == 'http'\", \"assert normalize_scheme('ftp://example.com') == 'ftp'\", \"a...
{ "split": "train", "index": 81023, "acecode_id": "oss_35407", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `car_age(model: str, year: int) -> int` that takes the model of a car as a string and its year of manufacture as an integer. The function should return the age of the car based on the current year. You can assume that the current year is 2023 for this problem.\...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert car_age('Toyota Camry', 2010) == 13\", \"assert car_age('Honda Accord', 2015) == 8\", \"assert car_age('Ford Mustang', 2020) == 3\", \"assert car_age('Chevrolet Impala', 2005) == 18\", \"assert car_age('Nissan Altima', 2018) == 5\", \"assert car_age('BMW X5'...
{ "split": "train", "index": 81024, "acecode_id": "evol_25706", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an integer `days`, return a string that represents a color based on the following rules: if `days` is greater than or equal to 28, return 'orange'; if `days` is greater than 0 but less than 28, return 'red'; if `days` is less than -28, return 'green'; otherwise, return 'y...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert dbl_colour(30) == 'orange'\", \"assert dbl_colour(28) == 'orange'\", \"assert dbl_colour(10) == 'red'\", \"assert dbl_colour(1) == 'red'\", \"assert dbl_colour(0) == 'yellow'\", \"assert dbl_colour(-1) == 'yellow'\", \"assert dbl_colour(-10) == 'yellow'\", \...
{ "split": "train", "index": 81025, "acecode_id": "bigcode_python_fns_24348", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `get_group_type_by_name(name: str) -> dict`. This function takes a string `name` as input, which represents the name of a group type. If the `name` is valid and corresponds to a predefined group type, the function should return a dict...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_group_type_by_name('admin') == {'id': 1, 'description': 'Administrator group'}\", \"assert get_group_type_by_name('user') == {'id': 2, 'description': 'Regular user group'}\", \"assert get_group_type_by_name('guest') == {'id': 3, 'description': 'Guest gro...
{ "split": "train", "index": 81026, "acecode_id": "bigcode_python_fns_8317", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that accepts an array of strings containing a mix of alphabets and numerals. The function should return the alphanumeric character that appears most frequently across all input strings. If there are multiple characters with the same frequency, return the on...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_frequent(['abcAB', 'bbcCD', 'bccdeEF']) == 'b'\", \"assert find_frequent(['Hello', 'world']) == 'l'\", \"assert find_frequent(['123', '456', '789']) == '1'\", \"assert find_frequent(['aaa', 'bbb', 'ccc']) == 'a'\", \"assert find_frequent(['Z1z', 'Y2y'])...
{ "split": "train", "index": 81027, "acecode_id": "evol_24094", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with parsing a list of purchase records represented as dictionaries. Each record contains various fields including 'Nro', 'Tipo Doc', 'RUT Proveedor', 'Razon Social', 'Monto Total', and others. Your goal is to extract specific fields from each record while removi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_purchase_records([{'Nro': 1, 'Tipo Doc': 'A', 'RUT Proveedor': '12345678-9', 'Razon Social': 'Company A', 'Monto Total': 1000}, {'Nro': 2, 'Tipo Doc': 'B', 'RUT Proveedor': '98765432-1', 'Razon Social': 'Company B', 'Monto Total': 2000}]) == [{'RUT Pro...
{ "split": "train", "index": 81028, "acecode_id": "bigcode_python_fns_48506", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes trade events for a financial trading system. Each trade event is represented as a tuple containing the trade price and quantity. Your function should receive a list of trade events and calculate the total profit from th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_total_profit([(0, 10), (0, 5)]) == 0\", \"assert calculate_total_profit([(20, 5)]) == 100\", \"assert calculate_total_profit([(100, 0), (200, 0)]) == 0\", \"assert calculate_total_profit([]) == 0\", \"assert calculate_total_profit([(30, 1)]) == 30\...
{ "split": "train", "index": 81029, "acecode_id": "oss_14489", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a list of annual net cash inflows and a total investment amount, calculate the payback period for an investment using unequal annual net cash inflows. The payback period is defined as the time (in years) it takes for the cumulative cash inflows to equal the total investme...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_payback_period(5000, [1000, 1000, 1000, 1000, 1000]) == 5.0\", \"assert calculate_payback_period(1500, [100, 200, 300]) == -1\", \"assert calculate_payback_period(1200, [400, 400, 400]) == 3.0\", \"assert calculate_payback_period(2500, [500, 500, 5...
{ "split": "train", "index": 81030, "acecode_id": "bigcode_python_fns_35343", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that extracts the name of a package from a given string representation of a `setup()` function call. The `setup()` function is used in Python projects to define metadata about the project, and the name of the package is specified a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_package_name(\\\"setup(name='iwag', version='1.0')\\\") == 'iwag'\", \"assert extract_package_name(\\\"setup(name= 'example-package', version='2.0')\\\") == 'example-package'\", \"assert extract_package_name(\\\"setup(name='my_package', description='...
{ "split": "train", "index": 81031, "acecode_id": "oss_25603", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a simple command interface for a user management system. Implement a function `user_management_interface(actions: List[str]) -> List[str]` that takes a list of strings representing user actions. The actions can be 'enroll', 'login', and 'exit'. The ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert user_management_interface(['enroll', 'login', 'exit']) == ['User enrolled.', 'User logged in.', 'Exiting...']\", \"assert user_management_interface(['login', 'enroll']) == ['User logged in.', 'User enrolled.']\", \"assert user_management_interface(['exit', '...
{ "split": "train", "index": 81032, "acecode_id": "bigcode_python_fns_5347", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a complete binary tree where each node has a value and a priority. Your task is to implement a function `insert_into_complete_binary_tree(root: TreeNode, v: int, p: int) -> int` that inserts a new node with value `v` and priority `p` into the tree while maintainin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert insert_into_complete_binary_tree(TreeNode(1, 1), 2, 2) == 1\", \"assert insert_into_complete_binary_tree(TreeNode(1, 1), 3, 3) == 1\", \"assert insert_into_complete_binary_tree(TreeNode(1, 1), 6, 1) == 1\", \"assert insert_into_complete_binary_tree(TreeNode(...
{ "split": "train", "index": 81033, "acecode_id": "evol_14098", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that extracts the first key name from a dictionary based on specific criteria. The function should take a list of dictionaries as input and return the first key name that meets the following conditions: the key name must end with eith...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_key_name([{'item': 'Book', 'price[key]': 15.99, 'stock': 5}]) == 'price[key]'\", \"assert extract_key_name([{'user[key]': 'Bob', 'status': 'active'}]) == 'user[key]'\", \"assert extract_key_name([{'product.id': 500, 'description': 'A cool item'}]) ==...
{ "split": "train", "index": 81034, "acecode_id": "oss_25141", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a sorted two-dimensional matrix and a target value, implement a function that checks if the target exists in the matrix. The matrix has the following properties: Integers in each row are sorted in ascending order from left to right, and the first integer of each row is gr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert searchMatrix([[1, 3, 5], [7, 9, 11], [13, 15, 17]], 3) == True\", \"assert searchMatrix([[1, 3, 5], [7, 9, 11], [13, 15, 17]], 10) == False\", \"assert searchMatrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 5) == True\", \"assert searchMatrix([[1, 2, 3], [4, 5, 6],...
{ "split": "train", "index": 81035, "acecode_id": "evol_8011", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary representing a building's energy consumption and temperature records. The dictionary has the following structure: `{ 'times': [...], 'kwhs': [...], 'temps': [...] }`, where `times` is a list of timestamps, `kwhs` is a list of energy consumption values...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_data({'times': ['2021-01-01', '2021-01-02', '2021-01-03'], 'kwhs': [1.0, 2.0, 3.0], 'temps': [30.0, 31.0, 32.0]}, 0, 2) == ([1.0, 2.0, 3.0], [30.0, 31.0, 32.0], ['2021-01-01', '2021-01-02', '2021-01-03'])\", \"assert extract_data({'times': ['2021-01-...
{ "split": "train", "index": 81036, "acecode_id": "bigcode_python_fns_43506", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function called `radix_sort` that takes a list of non-negative integers and returns a new list containing the integers sorted in ascending order using the Radix Sort algorithm. The input list will only contain non-negative integers and can be of arbitrary length. En...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert radix_sort([170, 45, 75, 90, 802, 24, 2, 66]) == [2, 24, 45, 66, 75, 90, 170, 802]\", \"assert radix_sort([3, 1, 4, 1, 5, 9, 2, 6]) == [1, 1, 2, 3, 4, 5, 6, 9]\", \"assert radix_sort([0, 0, 0, 0]) == [0, 0, 0, 0]\", \"assert radix_sort([10, 1, 100, 11]) == [...
{ "split": "train", "index": 81037, "acecode_id": "evol_24245", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that validates a list of URLs. The function should accept a list of strings representing URLs and return a boolean indicating whether all URLs in the list are valid. A URL is considered valid if it has either the 'http' or 'https' scheme ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_urls(['http://example.com', 'https://example.org', 'http://test.com']) == True\", \"assert validate_urls(['http://example.com', 'https://example.org', 'ftp://example.com']) == False\", \"assert validate_urls(['http://example.com', 'https://', 'http:...
{ "split": "train", "index": 81038, "acecode_id": "oss_29262", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function called `create_json_obj` that takes a list as input and returns a JSON-formatted string representation of that list. The function should handle lists containing various data types including integers, strings, and nested lists.\nPlease reason step by step, then ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_json_obj([1, 2, 3]) == '[1, 2, 3]'\", \"assert create_json_obj(['apple', 'banana', 'cherry']) == '[\\\"apple\\\", \\\"banana\\\", \\\"cherry\\\"]'\", \"assert create_json_obj([1, 'two', 3.0]) == '[1, \\\"two\\\", 3.0]'\", \"assert create_json_obj([]) ...
{ "split": "train", "index": 81039, "acecode_id": "evol_11762", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a registration token for a user, implement a function `cancel_registration_with_token(token: str) -> str` that checks if the token contains an email claim. If the token does not contain an email claim, the function should return 'Invalid token: email claim missing'. Other...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cancel_registration_with_token('valid_token_with_email_claim') == 'Registration canceled successfully'\", \"assert cancel_registration_with_token('another_valid_token_with_email_claim') == 'Registration canceled successfully'\", \"assert cancel_registration_...
{ "split": "train", "index": 81040, "acecode_id": "bigcode_python_fns_20720", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string that represents a range request in the format 'unit=start-end'. The 'unit' is a lowercase alphabetic string, while 'start' and 'end' are non-negative integers that may be omitted. Your task is to implement a function `parse_range_string(range_str: str) ->...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_range_string('bytes=0-100') == ('bytes', 0, 100)\", \"assert parse_range_string('bytes=10-') == ('bytes', 10, None)\", \"assert parse_range_string('bytes=-50') == ('bytes', None, 50)\", \"assert parse_range_string('characters=5-15') == ('characters', 5...
{ "split": "train", "index": 81041, "acecode_id": "bigcode_python_fns_39897", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You need to create a function called `room` that simulates the creation of a Room instance. The Room should have dimensions represented by a dictionary with keys 'x', 'y', and 'z', all set to the value of 4. The Room instance should not be savable. The function does not take an...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert room() == {'x': 4, 'y': 4, 'z': 4, 'savable': False}\", \"assert room() != {'x': 3, 'y': 4, 'z': 4, 'savable': False}\", \"assert room()['x'] == 4\", \"assert room()['y'] == 4\", \"assert room()['z'] == 4\", \"assert room()['savable'] == False\", \"assert ro...
{ "split": "train", "index": 81042, "acecode_id": "bigcode_python_fns_6031", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two unique sequences of Unicode characters, implement a function that returns the Unicode point of the character that appears most frequently in the sequence with the smallest number of unique characters. If both sequences have the same number of unique characters, return...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert solve_problem('abc', 'def') == 97\", \"assert solve_problem('12345', '67890') == 49\", \"assert solve_problem('A', 'B') == 65\", \"assert solve_problem('z', 'x') == 122\", \"assert solve_problem('!', '@') == 33\", \"assert solve_problem('Aloha', 'MundO!') ==...
{ "split": "train", "index": 81043, "acecode_id": "evol_16630", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given a string `S` of lowercase letters and an integer `K`, implement a function `remove_duplicates(S: str, K: int) -> str` that removes all adjacent duplicates of length `K` in the string `S`. This process is repeated until no more adjacent duplicates of length `K` exist. Retu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates('deeedbbcccbdaa', 3) == 'aa'\", \"assert remove_duplicates('pbbcggttciiippooaais', 2) == 'ps'\", \"assert remove_duplicates('abcd', 2) == 'abcd'\", \"assert remove_duplicates('aabbcc', 2) == ''\", \"assert remove_duplicates('aabbccddeeff', ...
{ "split": "train", "index": 81044, "acecode_id": "evol_191", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a tuple of mixed data types, write a function that removes all occurrences of a specified value from the tuple and returns a new tuple. The function should maintain the order of the remaining elements in the original tuple.\nPlease reason step by step, then write a self-c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert expunge_tup((1, 2, 3, 4, 5), 3) == (1, 2, 4, 5)\", \"assert expunge_tup((1, 2, 2, 3, 4), 2) == (1, 3, 4)\", \"assert expunge_tup(('a', 'b', 'c', 'a'), 'a') == ('b', 'c')\", \"assert expunge_tup((1.1, 2.2, 3.3, 4.4), 2.2) == (1.1, 3.3, 4.4)\", \"assert expung...
{ "split": "train", "index": 81045, "acecode_id": "evol_12236", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that counts the number of items in two different lists: one representing users and the other representing staff members. Your function should take two parameters: `user_list`, which is a list of user objects, and `staff_list`, which is a ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_user_staff_count(['user1', 'user2'], ['staff1']) == {'user_count': 2, 'staff_count': 1}\", \"assert get_user_staff_count([], []) == {'user_count': 0, 'staff_count': 0}\", \"assert get_user_staff_count(['user1'], ['staff1', 'staff2']) == {'user_count': 1,...
{ "split": "train", "index": 81046, "acecode_id": "oss_16326", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of non-negative integers representing the amount of money in each house along a street. Each house has a certain amount of money, and you cannot rob two adjacent houses due to security systems that will trigger alarms. Your task is to implement a function `...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_robbery([2, 7, 9, 3, 1]) == 12\", \"assert max_robbery([1, 2, 3, 1]) == 4\", \"assert max_robbery([0]) == 0\", \"assert max_robbery([50, 1, 1, 50]) == 100\", \"assert max_robbery([5, 4, 3, 2, 1]) == 9\", \"assert max_robbery([1, 1, 1, 1, 1]) == 3\", \"as...
{ "split": "train", "index": 81047, "acecode_id": "bigcode_python_fns_3206", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates sending an email. The function should take in three parameters: `recipient` (a string representing the recipient's email address), `subject` (a string representing the subject of the email), and `body` (a string represe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert send_email('recipient@example.com', 'Test Email', 'This is a test email.') == 'Success'\", \"assert send_email('example1@example.com', 'Subject 1', 'Body 1') == 'Success'\", \"assert send_email('example2@example.com', 'Subject 2', 'Body 2') == 'Success'\", \...
{ "split": "train", "index": 81048, "acecode_id": "oss_18794", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given two strings: 'ring', which symbolizes the code inscribed on the outer ring, and 'key', which symbolizes the keyword that needs to be spelled. Your task is to determine the least number of steps required to spell all the characters in the keyword. You must rotate t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert findRotateSteps('godding', 'gd') == 4\", \"assert findRotateSteps('abcde', 'ade') == 6\", \"assert findRotateSteps('hello', 'ho') == 3\", \"assert findRotateSteps('a', 'a') == 1\", \"assert findRotateSteps('xyz', 'zyx') == 6\", \"assert findRotateSteps('abcd...
{ "split": "train", "index": 81049, "acecode_id": "evol_18130", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that updates a voting ticket's stake-lock duration based on the given parameters. The function should take in five parameters: `ticket_id` (a string representing the identifier of the voting ticket), `target` (a string that indicates ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_ticket('1.18.xxx', 'lock_forever', 1000, 'account1') == 'Voting ticket updated successfully.'\", \"assert update_ticket('1.18.yyy', 'liquid', 500, 'account2') == 'Voting ticket updated successfully.'\", \"assert update_ticket('1.18.xxx', '180', 300, '...
{ "split": "train", "index": 81050, "acecode_id": "bigcode_python_fns_4215", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that takes in a list of integers and returns a new list containing only the even numbers from the original list, in the same order they appeared. Your function should not modify the original list and should handle cases with negati...
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([-2, -3, -4, -5]) == [-2, -4]\", \"assert filter_even_numbers([0, 1, 2, 3, 4]) == [0, 2, 4]\", \"assert filter_even_n...
{ "split": "train", "index": 81051, "acecode_id": "oss_7330", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that ensures a given URL is fully qualified. The function should follow these rules: 1. If the URL starts with '//' (indicating a protocol-relative URL), it should prepend 'https:' to the URL. 2. If the URL starts with '/' (indicating a re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert make_fully_qualified_url('//example.com') == 'https://example.com'\", \"assert make_fully_qualified_url('/wiki/Page') == 'https://en.wikipedia.org/wiki/Page'\", \"assert make_fully_qualified_url('http://example.com') == 'http://example.com'\", \"assert make_...
{ "split": "train", "index": 81052, "acecode_id": "bigcode_python_fns_43804", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function called `count_characters` that takes a list of strings as input and returns a dictionary. The keys of the dictionary should be the unique strings from the input list, and the values should be the number of characters in each corresponding string.\nPlease...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_characters(['apple', 'banana', 'cherry']) == {'apple': 5, 'banana': 6, 'cherry': 6}\", \"assert count_characters(['cat', 'dog', 'fish']) == {'cat': 3, 'dog': 3, 'fish': 4}\", \"assert count_characters(['hello', 'world']) == {'hello': 5, 'world': 5}\", ...
{ "split": "train", "index": 81053, "acecode_id": "evol_12423", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string may contain words separated by underscores ('_'). Your task is to create a new string by splitting each original string by the underscores and then joining all the resulting words together with a single underscore. Additionally...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_strings(['hello_world', 'this_is', 'a_test']) == ('hello_world_this_is_a_test', 6)\", \"assert transform_strings(['apple', 'banana', 'cherry']) == ('apple_banana_cherry', 3)\", \"assert transform_strings(['one_two_three', 'four_five']) == ('one_two...
{ "split": "train", "index": 81054, "acecode_id": "bigcode_python_fns_4045", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with creating a program that identifies the language of a given text. You need to implement a function `identify_language(text: str) -> str` that takes a string `text` as input and returns the identified language of the text. The identified languages can be 'Engl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert identify_language('Hello world') == 'English'\", \"assert identify_language('Hola mundo') == 'Spanish'\", \"assert identify_language('Bonjour le monde') == 'French'\", \"assert identify_language('Hallo Welt') == 'German'\", \"assert identify_language('The qu...
{ "split": "train", "index": 81055, "acecode_id": "oss_28514", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Construct a multifaceted bank account class following OOP paradigms. Initialize with zero balance, handle transactions (deposits, withdrawals, floating point numbers), safeguard against negative deposits and overdrafts. Include a discretionary overdraft allowance mechanism and ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert BankAccount().transaction([1, 2, 3]) == True\", \"assert BankAccount().transaction([1, 2, -3.5, 10001]) == False\", \"assert BankAccount().transaction([-10000]) == False\", \"assert BankAccount().transaction([0, 0, 0]) == True\", \"assert BankAccount().trans...
{ "split": "train", "index": 81056, "acecode_id": "evol_19915", "num_tests": 5 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function called `list_sum` that returns the sum of all the integers in the list. The function should handle both positive and negative integers as well as zero.\nPlease reason step by step, then write a self-contained Python solution. Give ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert list_sum([1, 2, 3]) == 6\", \"assert list_sum([-1, -2, -3]) == -6\", \"assert list_sum([0, 0, 0]) == 0\", \"assert list_sum([1, -1, 1, -1]) == 0\", \"assert list_sum([100, 200, 300]) == 600\", \"assert list_sum([-5, 5]) == 0\", \"assert list_sum([10]) == 10\...
{ "split": "train", "index": 81057, "acecode_id": "evol_16489", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that processes a list of document contents and filters them based on specific content criteria. Your function should take a list of strings (representing raw document contents) and return a new list containing only those docume...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_documents(['Nothing to see here.', 'Another random document.']) == []\", \"assert filter_documents([]) == []\", \"assert filter_documents(['This document is not relevant.']) == []\", \"assert filter_documents(['Only relevant content.']) == []\", \"ass...
{ "split": "train", "index": 81058, "acecode_id": "oss_21762", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Implement a function `validate_login(username: str, password: str, user_data: List[Dict[str, str]]) -> str` that checks if the provided username and password match any user in the given user data. The user data is a list of dictionaries, where each dictionary contains 'username...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_login('user1', 'pass1', [{'username': 'user1', 'password': 'pass1'}, {'username': 'user2', 'password': 'pass2'}]) == 'Login successful'\", \"assert validate_login('user2', 'wrongpass', [{'username': 'user1', 'password': 'pass1'}, {'username': 'user2...
{ "split": "train", "index": 81059, "acecode_id": "evol_11426", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `aggregate_even_squares(data)` that takes a list of integers as input and returns the sum of the squares of all even integers in the list. The function should ignore any odd integers in the given list. For example, given the input list `data = [2, 3, 4, 5]`...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert aggregate_even_squares([2, 3, 4, 5]) == 20\", \"assert aggregate_even_squares([1, 3, 5]) == 0\", \"assert aggregate_even_squares([2, 4, 6, 8]) == 120\", \"assert aggregate_even_squares([]) == 0\", \"assert aggregate_even_squares([-2, -3, -4, -5]) == 20\", \"...
{ "split": "train", "index": 81060, "acecode_id": "evol_25668", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with calculating the new position of a particle in a 2D space after a specified time interval. The particle's position updates based on its initial position, initial velocity, acceleration, and time interval. You are given the following inputs: the initial positi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_position(0, 0, 0, 0, 0, 0, 1) == (0.0, 0.0)\", \"assert update_position(2, 3, 1, 2, 0, 0, 2) == (4.0, 7.0)\", \"assert update_position(5, 5, -1, -1, 0, 0, 4) == (1.0, 1.0)\", \"assert update_position(10, 10, 0, 0, 0, 0, 5) == (10.0, 10.0)\", \"assert ...
{ "split": "train", "index": 81061, "acecode_id": "oss_26118", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `show_table` that takes this list and displays its elements in a tabular format where each element is displayed in its own cell. The function should accept optional parameters to control the alignment of the text in the cells: 'left', ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert show_table([1, 2, 3], alignment='left') == '1|2|3\\\\n'\", \"assert show_table([100], alignment='left') == '100\\\\n'\", \"assert show_table([1, 2, 3, 4, 5], alignment='left') == '1|2|3|4|5\\\\n'\", \"assert show_table(['a', 'b', 'c'], alignment='left') == '...
{ "split": "train", "index": 81062, "acecode_id": "bigcode_python_fns_5800", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Implement a function that takes in a student's name, age, grade level, and major as parameters and returns a dictionary representation of the student with those attributes. The keys of the dictionary should be 'name', 'age', 'grade_level', and 'major'.\nPlease reason step by st...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert student_info('Alice', 20, 'Sophomore', 'Computer Science') == {'name': 'Alice', 'age': 20, 'grade_level': 'Sophomore', 'major': 'Computer Science'}\", \"assert student_info('Bob', 21, 'Junior', 'Mathematics') == {'name': 'Bob', 'age': 21, 'grade_level': 'Jun...
{ "split": "train", "index": 81063, "acecode_id": "evol_34117", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with simulating the movement of a player in a 2D game environment. Write a function `calculate_new_position(player_y, held_keys, time_dt)` that takes the following parameters: \n- `player_y`: an integer representing the current vertical position of the player. \n...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_new_position(10, {'s': 1}, 1.0) == 4\", \"assert calculate_new_position(0, {'s': 1}, 2.0) == -12\", \"assert calculate_new_position(5, {'s': 0}, 1.0) == 5\", \"assert calculate_new_position(-3, {'s': 1}, 0.5) == -6\", \"assert calculate_new_positio...
{ "split": "train", "index": 81064, "acecode_id": "oss_35942", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given a string representing a request. Your task is to transform the request by replacing any occurrence of the word 'magic' with the word 'wonder'. After transforming the request, return the modified string. You can assume that the input string will only contain alphab...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_request('Where the magic happens') == 'Where the wonder happens'\", \"assert transform_request('This is a magic trick') == 'This is a wonder trick'\", \"assert transform_request('No magic, just science') == 'No wonder, just science'\", \"assert tra...
{ "split": "train", "index": 81065, "acecode_id": "bigcode_python_fns_28386", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Implement a function called `weather_advisory` that takes in two parameters: `temp` (an integer representing the temperature in degrees Celsius) and `humid` (an integer representing the humidity percentage). The function should classify the day based on the following conditions...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert weather_advisory(10, 25) == 'Cold and Dry'\", \"assert weather_advisory(10, 40) == 'Cold and Normal'\", \"assert weather_advisory(10, 70) == 'Cold and Humid'\", \"assert weather_advisory(20, 25) == 'Lovely and Dry'\", \"assert weather_advisory(20, 40) == 'Lo...
{ "split": "train", "index": 81066, "acecode_id": "evol_34002", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with simulating a simple physics experiment setup using a mock library. You need to create a function that initializes two devices: a `MockClock` and a `MockDevice`. The function should return a dictionary that contains the names of the devices and their correspo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert setup_experiment() == {'mock_clock': {'type': 'MockClock', 'frequency': 1.0}, 'mock_device': {'type': 'MockDevice', 'state': 'active'}}\", \"assert setup_experiment()['mock_clock']['type'] == 'MockClock'\", \"assert setup_experiment()['mock_clock']['frequenc...
{ "split": "train", "index": 81067, "acecode_id": "oss_8564", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are conducting a research project that involves collecting data from experimental subjects. You need to analyze the data to determine the average accuracy percentage of the subjects and identify which subject has the highest number of responses. Implement a function `analyz...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert analyze_subject_data([100.0, 99.5, 98.0], [200, 150, 100], ['SubjectA', 'SubjectB', 'SubjectC']) == (99.17, 'SubjectA')\", \"assert analyze_subject_data([50.0, 60.0, 70.0], [10, 20, 30], ['S1', 'S2', 'S3']) == (60.0, 'S3')\", \"assert analyze_subject_data([0...
{ "split": "train", "index": 81068, "acecode_id": "oss_24185", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are given two undirected graphs represented as adjacency lists. The first graph, `graph_augmented`, contains additional edges connecting odd degree nodes to ensure that it has an Eulerian circuit, while the second graph, `graph_original`, is the original graph without these...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert eulerian_circuit({1: [(2, 1)], 2: [(1, 1), (3, 1)], 3: [(2, 1)]}, {1: [(2, 1)], 2: [(1, 1), (3, 1)], 3: [(2, 1)]}) == []\", \"assert eulerian_circuit({1: [(2, 3)], 2: [(1, 3), (3, 4)], 3: [(2, 4)], 4: []}, {1: [(2, 3)], 2: [(1, 3), (3, 4)], 3: [(2, 4)], 4: [...
{ "split": "train", "index": 81069, "acecode_id": "bigcode_python_fns_35646", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Given a list of integers, return a new list where each element is the difference between the current element and the previous element in the input list. For the first element, simply return it as it is. If the list is empty, return an empty list. Write a function `calculate_dif...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_differences([5, 7, 2, 10]) == [5, 2, -5, 8]\", \"assert calculate_differences([10]) == [10]\", \"assert calculate_differences([]) == []\", \"assert calculate_differences([1, 1, 1, 1]) == [1, 0, 0, 0]\", \"assert calculate_differences([3, -1, 4, 1])...
{ "split": "train", "index": 81070, "acecode_id": "bigcode_python_fns_8633", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a password validation function for a user registration system. The function should validate the following criteria: \n1. Check if two passwords match. \n2. Ensure that the password is at least 8 characters long and contains at least one uppercase le...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_registration('Password1!', 'Password1!', 'John Doe', 'http://example.com', '+1234567890', 'john@example.com') == 'Registration details are valid'\", \"assert validate_registration('Password1!', 'Password2!', 'John Doe', 'http://example.com', '+12345...
{ "split": "train", "index": 81071, "acecode_id": "oss_13414", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given a list of axis-aligned spheres defined by their centers and radii, implement a function that calculates the combined volume of the spheres, accounting for any overlaps. Each sphere is defined by a tuple (x0, y0, z0, r) where (x0, y0, z0) are the coordinates of the center ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert abs(combined_volume([ (0, 0, 0, 1), (0, 0, 0, 1) ]) - (4/3 * 3.141592653589793 * 1**3)) < 1e-9\", \"assert abs(combined_volume([ (0, 0, 0, 1), (2, 0, 0, 1) ]) - (4/3 * 3.141592653589793 * 1**3) * 2) < 1e-9\", \"assert abs(combined_volume([ (0, 0, 0, 1), (0, ...
{ "split": "train", "index": 81072, "acecode_id": "evol_23408", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a web scraper that iterates through multiple pages of a library of books. Each page contains information about various books, including their titles, authors, and narrators. Write a function `scrape_books` that takes a list of pages, where each ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert scrape_books([[{'title': 'Book A', 'authors': ['Author 1'], 'narrators': ['Narrator 1']}], [{'title': 'Book B', 'authors': ['Author 2'], 'narrators': ['Narrator 2']}]]) == [{'title': 'Book A', 'author': ['Author 1'], 'narrator': ['Narrator 1']}, {'title': 'B...
{ "split": "train", "index": 81073, "acecode_id": "evol_33062", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Given two integer arrays, implement a Python function that performs a dot product operation on the two arrays. If the sizes of the two arrays are not identical, the function should return an error message indicating the arrays' lengths are different. The function signature shou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert dot_product([1, 2, 3], [4, 5, 6]) == 32\", \"assert dot_product([1, 0, -1], [0, 1, 2]) == -2\", \"assert dot_product([], []) == 0\", \"assert dot_product([1, 2], [3, 4]) == 11\", \"assert dot_product([2], [3]) == 6\", \"assert dot_product([0, 0], [0, 0]) == ...
{ "split": "train", "index": 81074, "acecode_id": "evol_33140", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement the Quick Sort algorithm to sort a given list of integers in ascending order. The function should take a single parameter, a list of integers, and return a new list that contains the sorted integers. Do not modify the original list.\nPlease reason step by step, then w...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert qsort([10, 20, 30, 50, 70, 10, 40, 60, 90, 80, 0]) == [0, 10, 10, 20, 30, 40, 50, 60, 70, 80, 90]\", \"assert qsort([5, 3, 8, 6, 2, 7, 4, 1]) == [1, 2, 3, 4, 5, 6, 7, 8]\", \"assert qsort([]) == []\", \"assert qsort([1]) == [1]\", \"assert qsort([2, 1]) == [...
{ "split": "train", "index": 81075, "acecode_id": "evol_12981", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a user authentication system that allows you to create new user accounts and authenticate existing users. Each user account will have a username and a password. The password must adhere to the following requirements: it must be at least 8 characters...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert user_authentication('user1', 'Password123', 'create') == 'User created'\", \"assert user_authentication('user1', 'wrongpassword', 'authenticate') == 'Authentication failed'\", \"assert user_authentication('user2', 'NewPass1', 'create') == 'User created'\", \...
{ "split": "train", "index": 81076, "acecode_id": "oss_4780", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of integers and returns the maximum sum of any non-adjacent elements in the list. Non-adjacent elements are defined as elements that are not directly next to each other in the list. For example, given the list [3, 2, 5, ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_non_adjacent_sum([]) == 0\", \"assert max_non_adjacent_sum([5]) == 5\", \"assert max_non_adjacent_sum([1, 2, 3, 4, 5]) == 9\", \"assert max_non_adjacent_sum([5, 1, 1, 5]) == 10\", \"assert max_non_adjacent_sum([3, 2, 7, 10]) == 13\", \"assert max_non_adj...
{ "split": "train", "index": 81077, "acecode_id": "oss_9703", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of lists, where each inner list represents the probabilistic predictions of different states for a set of instances. Your task is to implement a function that aggregates these predictions. For each instance, if the maximum probability exceeds a specified th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert aggregate_predictions([[0.8, 0.2, 0.5], [0.1, 0.9, 0.7]], 0.75) == ['state0', 'state1']\", \"assert aggregate_predictions([[0.3, 0.3, 0.3], [0.9, 0.1, 0.0]], 0.5) == [None, 'state0']\", \"assert aggregate_predictions([[1.0, 0.5, 0.7], [0.8, 0.9, 0.2]], 0.6) ...
{ "split": "train", "index": 81078, "acecode_id": "bigcode_python_fns_4417", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with processing a list of event records for natural disasters. Each event is represented as a dictionary containing the following keys: 'eventID' (string), 'Identifier' (string), and 'rake' (float). Your goal is to filter out events that belong to a specific loca...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_events([{'eventID': 'peru123', 'Identifier': 'ID1', 'rake': 2.5}, {'eventID': 'chile456', 'Identifier': 'ID2', 'rake': 3.0}]) == [{'eventID': 'peru123', 'Identifier': 'ID1', 'rake': 2.5}]\", \"assert process_events([{'eventID': 'peru789', 'Identifier...
{ "split": "train", "index": 81079, "acecode_id": "bigcode_python_fns_48260", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that takes a list of integers and returns a new list containing only the even integers from the original list. The function should maintain the order of the even integers as they appeared in the original list. Your function should ...
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([7, 9, 11]) == []\", \"assert filter_even_numbers([]) == []\", \"assert filter_even_numbers([2, 4, 6, 8]) == [2, 4, 6...
{ "split": "train", "index": 81080, "acecode_id": "oss_26092", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a file export operation from a cloud storage service. The function will take in three parameters: `file_id` (a string representing the ID of the file to be exported), `export_format` (a string representing the format in...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert file_export('12345', 'PDF', '/user/documents/exported_file.pdf') == 'File 12345 exported as PDF to /user/documents/exported_file.pdf'\", \"assert file_export('67890', 'CSV', '/user/downloads/data.csv') == 'File 67890 exported as CSV to /user/downloads/data.c...
{ "split": "train", "index": 81081, "acecode_id": "oss_10532", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the update of a pipeline's metadata. The function should take three parameters: an integer `pipeline_id`, a string `name`, and a string `description`. The function should return a dictionary representing the updated pip...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_pipeline(1, 'Pipeline A', 'This is a description for Pipeline A.') == {'pipeline_id': 1, 'name': 'Pipeline A', 'description': 'This is a description for Pipeline A.'}\", \"assert update_pipeline(2, 'Pipeline B', 'Description for Pipeline B.') == {'pip...
{ "split": "train", "index": 81082, "acecode_id": "bigcode_python_fns_34434", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given two lists of integers, `output` and `target`, representing the predicted and actual labels of items respectively. Each label is a positive integer starting from 1. Your task is to compute the Dice similarity coefficient between the two lists. The Dice similarity c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert dice_similarity([1, 2, 3], [2, 3, 4]) == 0.6666666666666666\", \"assert dice_similarity([1, 1, 1], [1, 1, 1]) == 1.0\", \"assert dice_similarity([1, 2], [3, 4]) == 0.0\", \"assert dice_similarity([10, 20, 30], [30, 20, 10]) == 1.0\", \"assert dice_similarity...
{ "split": "train", "index": 81083, "acecode_id": "bigcode_python_fns_18484", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are tasked with simulating the effect of administering multiple drugs on a patient with a viral infection. The simulation will focus on how the virus population changes over time based on the timing of drug administration. Given a list of integers representing the virus pop...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simulate_drug_administration([10, 20, 30, 40], 0) == [10, 20, 30, 40]\", \"assert simulate_drug_administration([10, 20, 30, 40], 1) == [10, 10, 20, 30]\", \"assert simulate_drug_administration([5, 15, 25, 35, 45], 2) == [5, 15, 5, 15, 25]\", \"assert simulat...
{ "split": "train", "index": 81084, "acecode_id": "bigcode_python_fns_47648", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of strings representing months in the format '--MM', where 'MM' is a two-digit representation of the month (01 for January, 02 for February, and so on), you need to implement a function that returns a list of these months sorted in ascending order. For example, the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sort_months(['--03', '--01', '--12', '--05']) == ['--01', '--03', '--05', '--12']\", \"assert sort_months(['--07', '--04', '--10', '--02', '--01']) == ['--01', '--02', '--04', '--07', '--10']\", \"assert sort_months(['--11', '--11', '--08', '--10']) == ['--0...
{ "split": "train", "index": 81085, "acecode_id": "bigcode_python_fns_12128", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a string input representing a URL path and returns a boolean indicating whether the path is a valid path for a Django application. A valid Django URL path must start with a forward slash '/' and can contain alphanumeric charact...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_valid_django_path('/') == True\", \"assert is_valid_django_path('/home') == True\", \"assert is_valid_django_path('/about-us') == True\", \"assert is_valid_django_path('/contact_us') == True\", \"assert is_valid_django_path('home') == False\", \"assert is...
{ "split": "train", "index": 81086, "acecode_id": "oss_7269", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that organizes a list of tables into a JSON-like structure based on their categories. Each category has a name and a list of tables, where each table has an id, title, and type. The function should take a list of dictionaries representing ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fetch_tables() == [{'tab': 'animeTables', 'name': 'Anime', 'tables': [{'id': 'englishAnimeSites', 'title': 'English Streaming Sites', 'type': 'anime'}, {'id': 'foreignAnimeSites', 'title': 'Foreign Streaming Sites', 'type': 'anime'}, {'id': 'downloadSites', ...
{ "split": "train", "index": 81087, "acecode_id": "bigcode_python_fns_6053", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python decorator that measures the execution time of a function and returns the elapsed time in milliseconds without printing it. The decorator should be applied to any function and should not modify the behavior of the original function. Impl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert timer_decorator(lambda: time.sleep(0.1))() > 100.0\", \"assert isinstance(timer_decorator(lambda: 1)(), float)\", \"assert timer_decorator(lambda: sum(range(100000)))() > 0.0\", \"assert timer_decorator(lambda: [x * 2 for x in range(10000)])() > 0.0\", \"ass...
{ "split": "train", "index": 81088, "acecode_id": "oss_13873", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given five distinct integers, implement a function to determine the median value without using sorting, comparison, or conditional algorithms. The function should take five integers as input and return the median integer.\nPlease reason step by step, then write a self-contained...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_median(1, 2, 3, 4, 5) == 3\", \"assert find_median(10, 20, 30, 40, 50) == 30\", \"assert find_median(-1, -2, -3, -4, -5) == -3\", \"assert find_median(7, 8, 9, 10, 11) == 9\", \"assert find_median(15, 25, 35, 45, 55) == 35\", \"assert find_median(100, 2...
{ "split": "train", "index": 81089, "acecode_id": "evol_18156", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function called `detect_extended_type` that can identify the type of a given input value. The function should check if the input value is a valid IP address, a valid MAC address, or a valid email address. The function should return one of the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert detect_extended_type('192.168.1.1') == 'IPAddress'\", \"assert detect_extended_type('255.255.255.255') == 'IPAddress'\", \"assert detect_extended_type('0.0.0.0') == 'IPAddress'\", \"assert detect_extended_type('example@domain.com') == 'Email'\", \"assert det...
{ "split": "train", "index": 81090, "acecode_id": "oss_28878", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes user data. Write a function `process_user_data` that takes in a single parameter: `user_data` (dictionary). The function should perform the following tasks: 1. Check if the `user_data` contains the key 'username' and...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_user_data({'username': 'john_doe'}) == 'Valid user data'\", \"assert process_user_data({'username': ''}) == 'Invalid user data'\", \"assert process_user_data({'username': None}) == 'Invalid user data'\", \"assert process_user_data({'email': 'john.doe...
{ "split": "train", "index": 81091, "acecode_id": "oss_25402", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a debugging utility function that generates a debug message. Implement a function `debug_message(msg: str, always: bool = False, icon: str = '🐞') -> str` that takes in three parameters: a message `msg` of type string, a boolean `always` indicating ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert debug_message('Test message', True) == '\\ud83d\\udc1e DEBUG: Test message'\", \"assert debug_message('Another test', False) == '\\ud83d\\udc1e INFO: Another test'\", \"assert debug_message('Hello, World!', True) == '\\ud83d\\udc1e DEBUG: Hello, World!'\", \...
{ "split": "train", "index": 81092, "acecode_id": "bigcode_python_fns_35298", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `filter_negative_and_sort` that takes a list of integers as input and returns a new list containing only the negative integers from the input list. The output list should exclude any repeated values and should be sorted in descending order without using bui...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_negative_and_sort([1, -2, 4, -5, -6]) == [-2, -5, -6]\", \"assert filter_negative_and_sort([-5, -3, 5, -2, 3, -3, -9, 0, -123, -1, 10]) == [-1, -2, -3, -5, -9, -123]\", \"assert filter_negative_and_sort([-1, -1, -1]) == [-1]\", \"assert filter_negativ...
{ "split": "train", "index": 81093, "acecode_id": "evol_31977", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary representing the installation state of a software item. The dictionary can contain the following keys: 'softwareupdatename', 'installs', and 'receipts'. Your task is to implement a function that checks the installation status of the software item base...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert installedState({'softwareupdatename': 'ExampleApp', 'installs': []}) == 1\", \"assert installedState({'installs': ['2.0'], 'receipts': ['1.9']}) == 2\", \"assert installedState({'receipts': ['1.0'], 'softwareupdatename': 'NonExistentApp'}) == 1\", \"assert i...
{ "split": "train", "index": 81094, "acecode_id": "bigcode_python_fns_11728", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a standard error message as a dictionary. The function should take in a title, a description, and an optional parameter indicating whether to include an author. If the title is not provided, it should default to 'Error:'. T...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_error_message('', 'An unexpected error occurred.') == {'title': 'Error:', 'description': 'An unexpected error occurred.', 'color': 'red', 'author': True}\", \"assert generate_error_message('Validation Error', 'Input does not match the required forma...
{ "split": "train", "index": 81095, "acecode_id": "bigcode_python_fns_12922", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a list of process IDs (PIDs) and returns a list of statuses for each PID. The statuses should indicate whether each process is 'running', 'terminated', or 'not found'. You can assume that you have access to a function `chec...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_process_statuses([1, 2, 3]) == ['running', 'terminated', 'not_found']\", \"assert get_process_statuses([10, 20, 30]) == ['not_found', 'not_found', 'not_found']\", \"assert get_process_statuses([0]) == ['not_found']\", \"assert get_process_statuses([]) ==...
{ "split": "train", "index": 81096, "acecode_id": "bigcode_python_fns_31852", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that adds a query parameter to a given URL. Write a function `add_query_param_to_url(url, param_name, param_value)` that takes three parameters: - `url` (string): The original URL to which the parameter needs to be added. - `param_nam...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_query_param_to_url('/example/path', 'key', 'value') == '/example/path?key=value'\", \"assert add_query_param_to_url('/example/path?existing=param', 'key', 'value') == '/example/path?existing=param&key=value'\", \"assert add_query_param_to_url('/home', 'u...
{ "split": "train", "index": 81097, "acecode_id": "oss_12481", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of legal citations in the format (title, 'CFR', part). Your task is to extract the external citations from this list, ignoring any citations that match the specified title and part being parsed. Implement a function that receives this list of citations alon...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_external_citations([('Title1', 'CFR', 'Part1'), ('Title2', 'CFR', 'Part2')], 'Title1', 'Part1') == [('Title2', 'CFR', 'Part2')]\", \"assert extract_external_citations([('Title1', 'CFR', 'Part1'), ('Title1', 'CFR', 'Part1')], 'Title1', 'Part1') == []\...
{ "split": "train", "index": 81098, "acecode_id": "oss_4712", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string representing the name of an instance and another string representing the name of a field. Write a function that returns the value of the specified field from the instance. Assume that the function can access predefined instances and their fields directly....
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_instance_field('InstanceA', 'field1') == 'value1'\", \"assert get_instance_field('InstanceA', 'field2') == 'value2'\", \"assert get_instance_field('InstanceB', 'field1') == 'value3'\", \"assert get_instance_field('InstanceB', 'field3') == 'value4'\", \"a...
{ "split": "train", "index": 81099, "acecode_id": "bigcode_python_fns_36510", "num_tests": 16 }