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 generates a URL for a given entity name in the Wikidata format. The function should take a string as input, representing the name of the Wikidata instance, and return a string that represents the URL in the format 'https://www.wikida...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_wikidata_url('Python Programming Language') == 'https://www.wikidata.org/wiki/Python_Programming_Language'\", \"assert generate_wikidata_url('Artificial Intelligence') == 'https://www.wikidata.org/wiki/Artificial_Intelligence'\", \"assert generate_w...
{ "split": "train", "index": 63200, "acecode_id": "oss_2141", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the binomial coefficient C(n, m) for given non-negative integers n and m where m <= n. The function should efficiently handle large inputs using memoization techniques to optimize execution time. Additionally, ensure that the function can ma...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert binomial_coefficient(5, 2) == 10\", \"assert binomial_coefficient(10, 0) == 1\", \"assert binomial_coefficient(0, 0) == 1\", \"assert binomial_coefficient(10, 10) == 1\", \"assert binomial_coefficient(7, 3) == 35\", \"assert binomial_coefficient(20, 10) == 1...
{ "split": "train", "index": 63201, "acecode_id": "evol_29586", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the movement of a fleet of aliens in a game. The fleet moves horizontally across a screen and needs to check for collisions with a spaceship. If an alien collides with the spaceship, the collision should be registered. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_aliens([{'x': 10, 'y': 20}, {'x': 30, 'y': 40}], 25, 100) == False\", \"assert update_aliens([{'x': 10, 'y': 20}, {'x': 30, 'y': 25}], 25, 100) == True\", \"assert update_aliens([], 25, 100) == False\", \"assert update_aliens([{'x': 10, 'y': 50}], 25,...
{ "split": "train", "index": 63202, "acecode_id": "bigcode_python_fns_28014", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of numerical values, implement a function `generate_frequency_table(data: List[int]) -> Dict[int, int]` that returns a frequency distribution table as a dictionary where the keys are the unique numbers from the array and the values are their respective counts in ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_frequency_table([1, 1, 1, 2, 2, 3, 3, 3]) == {1: 3, 2: 2, 3: 3}\", \"assert generate_frequency_table([4, 5, 4, 6, 7, 5, 5]) == {4: 2, 5: 3, 6: 1, 7: 1}\", \"assert generate_frequency_table([]) == {}\", \"assert generate_frequency_table([10]) == {10:...
{ "split": "train", "index": 63203, "acecode_id": "evol_16555", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of project details as key-value pairs. Your task is to implement a function `extract_project_details` that takes a dictionary representing these project details and returns a tuple containing the following fields in this specific order: (cell, company, emai...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_project_details({'project_id': '1', 'names': 'Alice', 'cell': '123-456-7890', 'email': 'alice@example.com', 'website': 'example.com', 'company': 'Tech Corp', 'project_title': 'Build a Website', 'project_description': 'Create a responsive website.', '...
{ "split": "train", "index": 63204, "acecode_id": "bigcode_python_fns_41637", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `check_order_access(orders, user_id)` that determines whether a user has access to view their orders based on the user ID associated with each order. The function should return a list of booleans where each boolean value indicates whet...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_order_access([(1, 1), (2, 2), (3, 1)], 1) == [True, False, True]\", \"assert check_order_access([(4, 3), (5, 3), (6, 2)], 2) == [False, False, True]\", \"assert check_order_access([(7, 5), (8, 5), (9, 5)], 5) == [True, True, True]\", \"assert check_ord...
{ "split": "train", "index": 63205, "acecode_id": "bigcode_python_fns_25706", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the loading of a configuration interface based on its name and a set of parameters. The function, `load_interface`, takes in a string `interface_name` and a dictionary `data`. Your goal is to return a simple message indicat...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert load_interface('User', {}) == 'Interface Loaded'\", \"assert load_interface('Admin', {}) == 'Interface Loaded'\", \"assert load_interface('Guest', {}) == 'Interface Loaded'\", \"assert load_interface('SuperUser', {}) == 'Unknown Interface'\", \"assert load_i...
{ "split": "train", "index": 63206, "acecode_id": "bigcode_python_fns_20754", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `reverse_tree(root: Node) -> Node` that takes the root of a binary tree as input and returns the root of the tree after reversing it. A reversed binary tree is defined as a tree where the left and right children of all nodes are swapped. The binary tree is ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_tree(Node(1)).val == 1\", \"assert reverse_tree(Node(1)).left == None\", \"assert reverse_tree(Node(1)).right == None\", \"assert reverse_tree(Node(1, Node(2), Node(3))).left.val == 3\", \"assert reverse_tree(Node(1, Node(2), Node(3))).right.val == 2...
{ "split": "train", "index": 63207, "acecode_id": "evol_25236", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of migration operations, where each operation is represented as a tuple containing the model name, field name, and the new field definition. Your task is to implement a function `get_altered_fields(migrations)` that processes this list and returns a list of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_altered_fields([('payment', 'day_paid', 'DateTimeField(null=True)'), ('user', 'email', 'EmailField(max_length=100)'), ('product', 'price', 'DecimalField(max_digits=10, decimal_places=2)')]) == [('payment', 'day_paid'), ('user', 'email'), ('product', 'pri...
{ "split": "train", "index": 63208, "acecode_id": "oss_35834", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary `codon_protein` that maps RNA codons to the corresponding amino acids. Each codon is a sequence of three nucleotides, and each amino acid is represented by a string. Your task is to write a function `translate_rna` that translates a given RNA sequence...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert translate_rna('AUGUAA') == ['Methionine']\", \"assert translate_rna('AUGUAAUAA') == ['Methionine']\", \"assert translate_rna('AUGUUUUGA') == ['Methionine', 'Phenylalanine']\", \"assert translate_rna('AUGUUAUAA') == ['Methionine', 'Leucine']\", \"assert trans...
{ "split": "train", "index": 63209, "acecode_id": "oss_33073", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of test requirements and returns a dictionary containing the count of each unique test requirement. Each test requirement is represented as a string, and the function should ignore any leading or trailing whit...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_test_requirements(['unit test', 'integration test', 'unit test']) == {'unit test': 2, 'integration test': 1}\", \"assert count_test_requirements([' performance test ', 'performance test']) == {'performance test': 2}\", \"assert count_test_requirement...
{ "split": "train", "index": 63210, "acecode_id": "oss_20725", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string with unique characters, write a function that generates all possible permutations of the string. The function should disregard capitalization, meaning that 'A' and 'a' are considered the same character. Return a list of all distinct permutations in lexicographica...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_permutations('abc') == ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']\", \"assert generate_permutations('A') == ['a']\", \"assert generate_permutations('Ab') == ['ab', 'ba']\", \"assert generate_permutations('') == ['']\", \"assert generate_permutations...
{ "split": "train", "index": 63211, "acecode_id": "evol_27352", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with analyzing a collection of statistics related to a caching system. The input is a list of strings where each string represents a line of output from a statistics command. Each line contains two or three space-separated values: a command (string), a key (strin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_statistics(['STAT curr_items 10', 'STAT bytes 2048']) == (2048, 10)\", \"assert extract_statistics(['STAT bytes 512', 'STAT curr_items 5']) == (512, 5)\", \"assert extract_statistics(['STAT curr_items 0', 'STAT bytes 1024']) == (1024, 0)\", \"assert ...
{ "split": "train", "index": 63212, "acecode_id": "bigcode_python_fns_7394", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes a list of strings representing branch names in a version control system. The function should extract the branch names and return a new list containing only the branch names that meet the following criteria: 1. The branc...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_branch_names(['feature/123', 'bugfix/abc', 'feature/new', 'feature/xyz123']) == ['feature/new', 'feature/xyz123']\", \"assert filter_branch_names(['feature/abc', 'feature/1', 'feature/xyz']) == ['feature/abc', 'feature/xyz']\", \"assert filter_branch_...
{ "split": "train", "index": 63213, "acecode_id": "oss_30342", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string represents a document containing medical text. Your task is to process each document and extract medical concepts while ensuring that the processed documents do not exceed a character limit of 5000. If a document exceeds this l...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_medical_texts(['This is a short medical document.']) == [{'text': 'This is a short medical document.', 'sents': [{'sent_id': 0, 'content': 'This is a short medical document.'}]}]\", \"assert process_medical_texts(['Document 1. It contains several sen...
{ "split": "train", "index": 63214, "acecode_id": "bigcode_python_fns_12205", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given a list of words, implement a function that converts the list into a dictionary where each word is the key and the value is a sub-dictionary. The sub-dictionary should contain each vowel as the key and its frequency in the word as the value. Write a function `convert_words...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_words_to_vowel_counts(['sky', 'fly']) == {'sky': {}, 'fly': {}}\", \"assert convert_words_to_vowel_counts(['banana', 'apple', 'grape']) == {'banana': {'a': 3}, 'apple': {'a': 1, 'e': 1}, 'grape': {'a': 1, 'e': 1}}\", \"assert convert_words_to_vowel_c...
{ "split": "train", "index": 63215, "acecode_id": "evol_231", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Given a list of previous weight values, implement a function that generates a new list of weights with the same length as the input list, where each weight is a random float between 0 and 1. The function should return the new list of weights. The input list will be non-empty an...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_weights([0.1, 0.5, 0.8]) != [0.1, 0.5, 0.8]\", \"assert len(generate_weights([0.0, 0.0, 0.0])) == 3\", \"assert all(0 <= weight < 1 for weight in generate_weights([0.5, 0.2, 0.9]))\", \"assert generate_weights([1.0, 0.0]) != [1.0, 0.0]\", \"assert g...
{ "split": "train", "index": 63216, "acecode_id": "bigcode_python_fns_16390", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Construct a function that verifies whether two input strings containing words and spaces have identical unique word phrases, taking into account word repetition. The function should validate input string formats, ensuring they consist only of words and spaces. If the input stri...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compare_phrase_sets('apple banana', 'banana apple') == True\", \"assert compare_phrase_sets('banana apple apple', 'apple banana apple') == True\", \"assert compare_phrase_sets('apple banana orange', 'orange banana apple') == True\", \"assert compare_phrase_s...
{ "split": "train", "index": 63217, "acecode_id": "evol_6960", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given an array of integers, write a function `find_maximum_sum` that computes the highest sum of non-adjacent elements in the array, under the condition that no two selected elements share a common divisor greater than 1. The function should return the maximum sum possible base...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_maximum_sum([8, 4, 6, 15, 5]) == 23\", \"assert find_maximum_sum([5, 10, 15, 20, 25]) == 25\", \"assert find_maximum_sum([1, 3, 5, 7]) == 16\", \"assert find_maximum_sum([13, 17, 19, 23]) == 72\", \"assert find_maximum_sum([18, 27, 36, 45]) == 45\", \"a...
{ "split": "train", "index": 63218, "acecode_id": "evol_10872", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are given a list of strings representing clothing items. Each string can either be 'clean' or 'dirty'. Your task is to implement a function that clears the cache of dirty items and returns a list of only the clean items. Write a function `clean_clothes(clothes: List[str]) -...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert clean_clothes(['clean', 'dirty', 'clean', 'dirty']) == ['clean', 'clean']\", \"assert clean_clothes(['dirty', 'dirty', 'dirty']) == []\", \"assert clean_clothes(['clean']) == ['clean']\", \"assert clean_clothes(['clean', 'clean', 'clean']) == ['clean', 'clea...
{ "split": "train", "index": 63219, "acecode_id": "bigcode_python_fns_6710", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers representing the scores of a game, write a function `maxNonAdjacentScore` that calculates the highest possible score by selecting a subset of scores such that no two selected scores are adjacent in the original list. The function should return the maxim...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert maxNonAdjacentScore([2, 4, 6, 8, 10]) == 18\", \"assert maxNonAdjacentScore([5, 1, 1, 5]) == 10\", \"assert maxNonAdjacentScore([3, 2, 7, 10]) == 13\", \"assert maxNonAdjacentScore([1, 2, 3, 1]) == 4\", \"assert maxNonAdjacentScore([2, 7, 9, 3, 1]) == 12\", ...
{ "split": "train", "index": 63220, "acecode_id": "oss_1590", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a user profile based on the provided information. The function should take the following parameters: `username`, `first_name`, `last_name`, `email`, and `password`. The function should return a dictionary representing the u...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_user_profile('kimpilot', 'Kim', 'Pilot', 'kim@example.com', 'secret') == {'username': 'kimpilot', 'first_name': 'Kim', 'last_name': 'Pilot', 'email': 'kim@example.com', 'password': 'secret'}\", \"assert create_user_profile('john_doe', 'John', 'Doe', '...
{ "split": "train", "index": 63221, "acecode_id": "bigcode_python_fns_7320", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function `process_data(data)` that processes the input list by performing the following operations: 1. Remove any duplicate elements from the input list. 2. Sort the list in ascending order. 3. Return the modified list. The input list may c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_data([1, 2, 2, 3, 4]) == [1, 2, 3, 4]\", \"assert process_data([4, 3, 2, 1]) == [1, 2, 3, 4]\", \"assert process_data([1, 1, 1, 1]) == [1]\", \"assert process_data([]) == []\", \"assert process_data([-1, -2, -2, -3, -4]) == [-4, -3, -2, -1]\", \"asse...
{ "split": "train", "index": 63222, "acecode_id": "oss_17651", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two integers dy and dx, implement a function that calculates the angle in radians between the positive x-axis and the line to the point (dx, dy). The angle should be returned in the range [0, 2π). You can assume that dx and dy are both integers and that dx is not equal to...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert abs(angle_from_axis(1, 1) - 0.7853981633974483) < 1e-9\", \"assert abs(angle_from_axis(0, 1) - 0.0) < 1e-9\", \"assert abs(angle_from_axis(1, 0) - 1.5707963267948966) < 1e-9\", \"assert abs(angle_from_axis(0, -1) - 3.141592653589793) < 1e-9\", \"assert abs(a...
{ "split": "train", "index": 63223, "acecode_id": "bigcode_python_fns_4010", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given an N-dimensional matrix (where N > 0), write a function that traverses it in a zigzag pattern. The function should take two arguments: the matrix and a list representing the dimensions of the matrix. The result should be a list of the elements in the order they were trave...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert zigzagTraversal([[1, 2, 3], [4, 5, 6]], [2, 3]) == [[1, 2, 3], [6, 5, 4]]\", \"assert zigzagTraversal([[1]], [1]) == [[1]]\", \"assert zigzagTraversal([[[1], [2]], [[3], [4]]], [2, 2, 1]) == [[[1], [2]], [[4], [3]]]\", \"assert zigzagTraversal([[[1, 2], [3, ...
{ "split": "train", "index": 63224, "acecode_id": "evol_35439", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `scale_list` that takes three parameters: `numbers`, `scale_diag`, and `scale_identity_multiplier`. The function should return a new list where each element in `numbers` is scaled by `scale_diag` if `scale_diag` is provided. If `scale_...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert scale_list([1, 2, 3], 2, 1) == [3, 5, 7]\", \"assert scale_list([4, 5, 6], 3, None) == [12, 15, 18]\", \"assert scale_list([], 1, 2) == []\", \"assert scale_list([0, 0, 0], 1, 1) == [1, 1, 1]\", \"assert scale_list([1, 2, 3], 0, 1) == []\", \"assert scale_li...
{ "split": "train", "index": 63225, "acecode_id": "bigcode_python_fns_49715", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing an access control system for a bot application. The given code snippet defines the access controls for various bot commands. Each command is associated with a set of allowed users or groups. The `ACCESS_CONTROLS` dictionary maps each command to ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_access('restart', 'admin1') == True\", \"assert check_access('restart', 'user123') == False\", \"assert check_access('shutdown', 'admin1') == False\", \"assert check_access('shutdown', 'user123') == False\", \"assert check_access('status', 'admin1') ==...
{ "split": "train", "index": 63226, "acecode_id": "oss_14542", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes a list of integers representing signal data. Your goal is to double each value in the list. Write a function called `process_signal_data(signal_data)` that takes a list of integers as input and returns a new list contai...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_signal_data([1, 2, 3]) == [2, 4, 6]\", \"assert process_signal_data([0, 0, 0]) == [0, 0, 0]\", \"assert process_signal_data([-1, -2, -3]) == [-2, -4, -6]\", \"assert process_signal_data([10, 20, 30]) == [20, 40, 60]\", \"assert process_signal_data([1...
{ "split": "train", "index": 63227, "acecode_id": "oss_526", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a custom validation function for submitted form data. Your function, `validate_form_data`, takes a dictionary representing the form data and checks if it meets certain validation criteria. The criteria are as follows: \n1. The form must contain...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_form_data({'username': 'john_doe', 'age': 20, 'email': 'john@example.com'}) == 'Validation Successful'\", \"assert validate_form_data({'username': '', 'age': 20, 'email': 'john@example.com'}) == 'Validation failed: username must be a non-empty strin...
{ "split": "train", "index": 63228, "acecode_id": "oss_9777", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with finding the path of a device named 'ftDuino' in a list of devices. Implement a function that takes a string `name` as input and returns the path of the ftDuino device with the specified `name`. If no device with the given name is found, return None. The func...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert ftduino_find_by_name('ftDuino1') == '/dev/ftDuino1'\", \"assert ftduino_find_by_name('ftDuino2') == '/dev/ftDuino2'\", \"assert ftduino_find_by_name('unknownDevice') == None\", \"assert ftduino_find_by_name('ftDuino11') == None\", \"assert ftduino_find_by_na...
{ "split": "train", "index": 63229, "acecode_id": "bigcode_python_fns_4827", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are presented with a challenge titled: The Labyrinth Navigator. The problem is described as follows: You are initially situated at the first index of a two-dimensional array `maze` that is populated with integers. In a single stride, you can transition from cell `(i, j)` to...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert LabyrinthNavigator([[7]]) == 0\", \"assert LabyrinthNavigator([[1,2],[3,4]]) == 2\", \"assert LabyrinthNavigator([[1,1],[1,1]]) == 1\", \"assert LabyrinthNavigator([[3,2,1],[2,1,0],[1,0,0]]) == 4\", \"assert LabyrinthNavigator([[1,2,3],[4,5,6],[7,8,9]]) == 4...
{ "split": "train", "index": 63230, "acecode_id": "evol_27381", "num_tests": 7 }
acecode
[ { "role": "user", "content": "You are given a list of n integers representing the heights of n buildings. You need to implement a function `max_building_view(heights: List[int]) -> int` that returns the maximum height of a building that can see the sunset. A building can see the sunset if all buildings to i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_building_view([1, 2, 3, 2, 1]) == 3\", \"assert max_building_view([5, 3, 4, 2, 1]) == 5\", \"assert max_building_view([1, 2, 3, 4, 5]) == 5\", \"assert max_building_view([5, 4, 3, 2, 1]) == 5\", \"assert max_building_view([2, 2, 2, 2, 2]) == 2\", \"asser...
{ "split": "train", "index": 63231, "acecode_id": "bigcode_python_fns_26446", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the heights of several buildings in a straight line. Your task is to implement a function that determines the maximum height difference between any two buildings. The height difference is defined as the absolute difference between t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_height_difference([3, 1, 4, 1, 5, 9]) == 8\", \"assert max_height_difference([1, 2, 3]) == 2\", \"assert max_height_difference([7, 1, 3, 9, 5]) == 8\", \"assert max_height_difference([10]) == 0\", \"assert max_height_difference([10, 10, 10]) == 0\", \"as...
{ "split": "train", "index": 63232, "acecode_id": "bigcode_python_fns_38291", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `get_image_details(image_type: str) -> List[Union[str, Any]]` that returns a list containing an auxiliary treatment instruction and a message chain for different types of images. The function should take a string `image_type` as input, wh...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_image_details('setu') == ['None', 'Image from animate R-15']\", \"assert get_image_details('setu18') == ['flash', 'Image from animate R-18']\", \"assert get_image_details('real') == ['None', 'Image from real person R-15']\", \"assert get_image_details('b...
{ "split": "train", "index": 63233, "acecode_id": "bigcode_python_fns_48459", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of chromosome sizes and two absolute positions, `start_pos` and `end_pos`. Your task is to convert these absolute coordinates to genomic coordinates. The genomic coordinates consist of a chromosome index, a start position relative to that chromosome, and th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert abs2genomic([['chr1', 100], ['chr2', 200]], 50, 150) == [(0, 50, 100), (1, 0, 200)]\", \"assert abs2genomic([['chr1', 100], ['chr2', 200]], 0, 100) == [(0, 0, 100)]\", \"assert abs2genomic([['chr1', 100], ['chr2', 200], ['chr3', 300]], 90, 190) == [(0, 90, 1...
{ "split": "train", "index": 63234, "acecode_id": "bigcode_python_fns_18645", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `is_sorted_2d(arr)` that takes a two-dimensional array of integers and returns `True` if every row and every column is sorted in ascending order. Otherwise, return `False`. The function should handle empty arrays correctly.\nPlease reason step by step, then...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_sorted_2d([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == True\", \"assert is_sorted_2d([[1, 2, 3], [5, 5, 6], [7, 8, 9]]) == True\", \"assert is_sorted_2d([[1, 2, 3], [4, 3, 6], [7, 8, 9]]) == False\", \"assert is_sorted_2d([[1, 2], [2, 2], [3, 4]]) == True\", \"a...
{ "split": "train", "index": 63235, "acecode_id": "evol_4198", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the behavior of a PCIe (Peripheral Component Interconnect Express) device information retrieval system. The function `get_pcie_info(check: bool, verbose: bool) -> str` takes two boolean parameters: `check` and `verbose`. If...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_pcie_info(True, True) == 'Running PCIe check command...'\", \"assert get_pcie_info(True, False) == 'Running PCIe check command...'\", \"assert get_pcie_info(False, True) == 'Running PCIe show command...'\", \"assert get_pcie_info(False, False) == 'Runnin...
{ "split": "train", "index": 63236, "acecode_id": "bigcode_python_fns_45042", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of edges in the form of tuples where each tuple represents an edge between two nodes and an associated value for that edge. Your task is to implement a function that calculates the average of the edge values for a given list of edges. If there are no edges ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert average_edge_values([(1, 2, 3.0), (2, 3, 4.0), (3, 4, 5.0)]) == 4.0\", \"assert average_edge_values([(1, 2, 10.0), (2, 3, 20.0)]) == 15.0\", \"assert average_edge_values([(1, 2, -5.0), (2, 3, 5.0)]) == 0.0\", \"assert average_edge_values([(1, 2, 0.0), (2, 3,...
{ "split": "train", "index": 63237, "acecode_id": "bigcode_python_fns_20661", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of dictionaries containing model names and lists of corresponding seed data. The function should combine the data into a single data structure and return the combined data. Each dictionary in the input list ha...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_seed_data([{'model_name': 'teams.player', 'data': [{'id': 1, 'name': 'Lionel Messi'}]}]) == {'teams.player': [{'id': 1, 'name': 'Lionel Messi'}]}\", \"assert process_seed_data([]) == {}\", \"assert process_seed_data([{'model_name': 'teams.league', 'd...
{ "split": "train", "index": 63238, "acecode_id": "oss_14839", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function `find_compiler(compiler_names: List[str], env_var: str) -> str` that takes a list of compiler names and an environment variable name as input. The function should return the first compiler name from the list that is found in the given envi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_compiler(['gfortran', 'clang', 'nvcc'], 'gcc,clang,pgfortran') == 'clang'\", \"assert find_compiler(['pgfortran', 'gcc', 'gfortran'], 'pgfortran,clang,gcc') == 'pgfortran'\", \"assert find_compiler(['icc', 'gfortran', 'pgf90'], 'pgfortran,ic,icc') == 'i...
{ "split": "train", "index": 63239, "acecode_id": "bigcode_python_fns_29770", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Implement a function that identifies the length of the longest contiguous substring of identical characters in a given text string, ignoring punctuation, whitespace, and case sensitivity. The function should return the length of this substring. For example, given the input 'aaa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longest_contiguous_identical('aaabbbcccAAA') == 3\", \"assert longest_contiguous_identical('aaaabbbcccc') == 4\", \"assert longest_contiguous_identical('123344455') == 3\", \"assert longest_contiguous_identical('AABCCDEEE') == 3\", \"assert longest_contiguou...
{ "split": "train", "index": 63240, "acecode_id": "evol_33085", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `initialize_data_structure(levels)` that takes a list of unique strings `levels` as input and returns a dictionary `data_structure`. Each key in this dictionary should be a string from the input list, and the corresponding value should be...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert initialize_data_structure(['A', 'B', 'C']) == {'A': {'lsPosition': {}, 'dictNodes': {}, 'dictLinks': {}, 'distMax': {}}, 'B': {'lsPosition': {}, 'dictNodes': {}, 'dictLinks': {}, 'distMax': {}}, 'C': {'lsPosition': {}, 'dictNodes': {}, 'dictLinks': {}, 'dist...
{ "split": "train", "index": 63241, "acecode_id": "oss_18103", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the creation of a user in a system. The function will receive a dictionary containing user data, including a 'username' key, and will return a success message if the user is created successfully. If the username already...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_user({'username': 'charlie'}) == 'User created successfully.'\", \"assert create_user({'username': 'alice'}) == 'Username already exists.'\", \"assert create_user({'username': 'david'}) == 'User created successfully.'\", \"assert create_user({'usernam...
{ "split": "train", "index": 63242, "acecode_id": "bigcode_python_fns_27943", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a simple car dashboard interface. The function should handle button events and convert units for speed and distance. Your task is to create a function called `car_dashboard` with the following specifications: 1. It should t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert car_dashboard('start', 10.0) == ('start', 36.0, 1.0)\", \"assert car_dashboard('stop', 0.0) == ('stop', 0.0, 1.0)\", \"assert car_dashboard('accelerate', 5.0) == ('accelerate', 18.0, 1.0)\", \"assert car_dashboard('brake', 20.0) == ('brake', 72.0, 1.0)\", \"...
{ "split": "train", "index": 63243, "acecode_id": "oss_7978", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to check if a user has exceeded their API rate limits based on specified limits for both users and API keys. The function will take three parameters: the number of requests made by a user (`user_requests`), the number of requests made...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_rate_limit(5, 10, {'user_limit': 10, 'api_key_limit': 15}) == 'Limits not exceeded'\", \"assert check_rate_limit(11, 10, {'user_limit': 10, 'api_key_limit': 15}) == 'User rate limit exceeded'\", \"assert check_rate_limit(5, 16, {'user_limit': 10, 'api_...
{ "split": "train", "index": 63244, "acecode_id": "bigcode_python_fns_38328", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that checks if a given integer is within the inclusive range of 5 to 10. The function should return True if the integer is within the range, and False otherwise.\nPlease reason step by step, then write a self-contained Python solution. Give your final progr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_number(5) == True\", \"assert check_number(6) == True\", \"assert check_number(7) == True\", \"assert check_number(8) == True\", \"assert check_number(9) == True\", \"assert check_number(10) == True\", \"assert check_number(4) == False\", \"assert chec...
{ "split": "train", "index": 63245, "acecode_id": "evol_25316", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an SVG string, write a function that changes the color of all the paths in the SVG to a specified new color. The SVG string will be provided as the first argument, and the new color will be provided as the second argument. You need to return the modified SVG string with t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert change_svg_color('<svg><path fill=\\\"#212121\\\"/></svg>', '#FFFFFF') == '<svg><path fill=\\\"#FFFFFF\\\"/></svg>'\", \"assert change_svg_color('<svg><path fill=\\\"#000000\\\"/><path fill=\\\"#000000\\\"/></svg>', '#FF0000') == '<svg><path fill=\\\"#FF0000...
{ "split": "train", "index": 63246, "acecode_id": "evol_33842", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function in Python that returns the first n numbers in the Fibonacci series as a list. The Fibonacci series is defined as follows: F(0) = 0, F(1) = 1, and F(n) = F(n-1) + F(n-2) for n > 1. Your function should take an integer n as input and return a list containing the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fibonacci_series(0) == []\", \"assert fibonacci_series(1) == [0]\", \"assert fibonacci_series(2) == [0, 1]\", \"assert fibonacci_series(3) == [0, 1, 1]\", \"assert fibonacci_series(4) == [0, 1, 1, 2]\", \"assert fibonacci_series(5) == [0, 1, 1, 2, 3]\", \"as...
{ "split": "train", "index": 63247, "acecode_id": "evol_13153", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of dictionaries representing network policies. Each dictionary contains the following keys: 'queue', 'class_rate', 'class_pkts', 'class_bytes', 'out_bytes', 'out_pkts', 'drop_bytes', 'drop_pkts', 'wred_pkts', and 'wred_bytes'. Your task is to create a funct...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_queues([{'queue': 'q1', 'class_rate': 10, 'class_pkts': 100, 'class_bytes': 1000, 'out_bytes': 5000, 'out_pkts': 50, 'drop_bytes': 0, 'drop_pkts': 0, 'wred_pkts': 0, 'wred_bytes': 0}]) == [('q1', 10, 100, 1000, 5000, 50, 0, 0, 0, 0)]\", \"assert extr...
{ "split": "train", "index": 63248, "acecode_id": "bigcode_python_fns_49882", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that constructs a `Model` instance from a given dictionary. The `Model` class has two attributes: `name` (a string) and `age` (an integer). Implement a function `create_model_instance(data: dict) -> Model` that takes a dictionary as input...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_model_instance({'name': 'Alice', 'age': 25}).name == 'Alice'\", \"assert create_model_instance({'name': 'Bob', 'age': 30}).age == 30\", \"assert create_model_instance({'name': 'Charlie', 'age': 20}).name == 'Charlie'\", \"assert create_model_instance(...
{ "split": "train", "index": 63249, "acecode_id": "oss_33484", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `transform_date_time(date_time: str) -> str` that takes a date and time in the ISO 8601 standard format (e.g., '2021-10-31T23:45Z') and transforms it into a more human-readable format, such as 'October 31, 2021 at 11:45 PM UTC'.\nPlease reason step by step,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_date_time('2021-10-31T23:45Z') == 'October 31, 2021 at 11:45 PM UTC'\", \"assert transform_date_time('2020-01-01T00:00Z') == 'January 01, 2020 at 12:00 AM UTC'\", \"assert transform_date_time('1999-12-31T23:59Z') == 'December 31, 1999 at 11:59 PM U...
{ "split": "train", "index": 63250, "acecode_id": "evol_27667", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `increment_counter(n: int) -> List[int]` that takes an integer `n` as input and returns a list of integers representing the values of a counter as it is incremented from 1 to `n`. The counter starts at 0 and increases by 1 with each call. The output should ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert increment_counter(0) == [0]\", \"assert increment_counter(1) == [0, 1]\", \"assert increment_counter(2) == [0, 1, 2]\", \"assert increment_counter(3) == [0, 1, 2, 3]\", \"assert increment_counter(4) == [0, 1, 2, 3, 4]\", \"assert increment_counter(5) == [0, ...
{ "split": "train", "index": 63251, "acecode_id": "evol_11321", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function `get_challenge_topics(account_name: str, challenge_name: str) -> List[str]` that retrieves the topics associated with a specific coding challenge from a user's account. The function takes two parameters: `account_name`, which is the name o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_challenge_topics('user1', 'challenge1') == ['topic1', 'topic2', 'topic3']\", \"assert get_challenge_topics('user2', 'challenge2') == ['topicA', 'topicB']\", \"assert get_challenge_topics('user3', 'non_existent_challenge') == []\", \"assert get_challenge_...
{ "split": "train", "index": 63252, "acecode_id": "bigcode_python_fns_32527", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Implement a function called `generate_welcome_message` that takes a name as input and returns a welcome message string in the format 'Welcome, {name}!' where {name} is the input parameter. If the input name is an empty string, the function should return 'Welcome, Guest!'.\nPlea...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_welcome_message('Alice') == 'Welcome, Alice!'\", \"assert generate_welcome_message('Bob') == 'Welcome, Bob!'\", \"assert generate_welcome_message('') == 'Welcome, Guest!'\", \"assert generate_welcome_message('Charlie') == 'Welcome, Charlie!'\", \"as...
{ "split": "train", "index": 63253, "acecode_id": "evol_6325", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a positive integer `n`, you can apply one of the following operations: If `n` is even, replace `n` with `n / 2`. If `n` is odd, replace `n` with either `n + 1`, `n - 1`, or `n * 2`. Write a function `minOperations(n: int) -> int` that returns the minimum number of operati...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert minOperations(1) == 0\", \"assert minOperations(2) == 1\", \"assert minOperations(3) == 2\", \"assert minOperations(4) == 2\", \"assert minOperations(6) == 3\", \"assert minOperations(7) == 4\", \"assert minOperations(8) == 3\", \"assert minOperations(16) ==...
{ "split": "train", "index": 63254, "acecode_id": "evol_16564", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Implement a function `create_user(username: str, birthdate: str, email: str) -> dict` that takes in three parameters: a username, a birthdate in the format 'YYYY-MM-DD', and an email conforming to standard email protocol. The function should return a dictionary with the keys 'u...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_user('john_doe', '2000-01-01', 'john_doe@example.com') == {'username': 'john_doe', 'birthdate': '2000-01-01', 'email': 'john_doe@example.com'}\", \"assert create_user('alice_smith', '1995-05-15', 'alice.smith@example.com') == {'username': 'alice_smith...
{ "split": "train", "index": 63255, "acecode_id": "evol_10045", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the sum of all numerical elements in a given list, which may include nested lists up to a specified depth. The function should handle potential errors, such as non-numeric elements or depth values that are negative. If the depth is zero, the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert deep_count_sum([1, 2, [3, 4], 5], 2) == 15\", \"assert deep_count_sum([1, [2, [3, 'a']], 5], 2) == 8\", \"assert deep_count_sum([[1, 2], [3, 4], 5], 0) == 0\", \"assert deep_count_sum([1, 2.5, [3, 4.5], 5], 2) == 16\", \"assert deep_count_sum([], 1) == 0\", ...
{ "split": "train", "index": 63256, "acecode_id": "evol_33443", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function to calculate the impact score of opponents in a game scenario. The impact score is determined based on the size and position of both the player and the opponents. The function `compute_opponent_impact` takes in four parameters: `our_size`...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compute_opponent_impact(7, 7, (2, 2), (5, 5)) == 0\", \"assert compute_opponent_impact(8, 5, (3, 3), (1, 1)) == 12\", \"assert compute_opponent_impact(1, 1, (0, 0), (1, 1)) == 0\", \"assert compute_opponent_impact(3, 3, (0, 0), (0, 0)) == 0\", \"assert compu...
{ "split": "train", "index": 63257, "acecode_id": "oss_12373", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string consists solely of parentheses '(', ')', square brackets '[', ']', and curly brackets '{', '}'. Write a function `match_brackets(lst)` that determines if it is possible to arrange the strings in such a way that they form a corr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert match_brackets(['(', ')()', '[[', ']]', '{{', '}}']) == 'Yes'\", \"assert match_brackets([')', ')', '(', '(', '{{', ']']) == 'No'\", \"assert match_brackets(['{{', '}}']) == 'Yes'\", \"assert match_brackets(['[', ']', '{', '}', '(', ')']) == 'Yes'\", \"asser...
{ "split": "train", "index": 63258, "acecode_id": "evol_29244", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to encode and decode network packets based on their type. Each packet has a header and a payload. The packet can be of two types: \"DATA\" or \"CONTROL\". For \"DATA\" packets, the payload should be encoded and decoded as a base64 str...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert packet_codec('DATA:Hello World') == (b'DATA:SGVsbG8gV29ybGQ=', 0)\", \"assert packet_codec('CONTROL:Test Control') == (b'CONTROL:Test Control', 0)\", \"assert packet_codec('DATA:') == (b'DATA:', 0)\", \"assert packet_codec('CONTROL:') == (b'CONTROL:', 0)\", ...
{ "split": "train", "index": 63259, "acecode_id": "oss_19380", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers and a threshold value. Your task is to implement a function that counts how many integers in the list are greater than the given threshold. Write a function named `count_greater_than_threshold(nums: List[int], threshold: int) -> int` that takes ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_greater_than_threshold([1, 2, 3, 4, 5], 3) == 2\", \"assert count_greater_than_threshold([5, 4, 3, 2, 1], 0) == 5\", \"assert count_greater_than_threshold([-1, -2, -3, -4, -5], -3) == 2\", \"assert count_greater_than_threshold([10, 20, 30, 40, 50], 25)...
{ "split": "train", "index": 63260, "acecode_id": "bigcode_python_fns_4305", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `vowel_counter(sentence: str) -> Dict[str, int]` that takes a sentence as input and returns a dictionary with the count of each distinct vowel (a, e, i, o, u) in the sentence. The keys of the dictionary should be the vowels, and the values should be the res...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert vowel_counter('') == {'a': 0, 'e': 0, 'i': 0, 'o': 0, 'u': 0}\", \"assert vowel_counter('Umbrella') == {'a': 1, 'e': 1, 'i': 0, 'o': 0, 'u': 1}\", \"assert vowel_counter('Aaa Eee Iii Ooo Uuu') == {'a': 3, 'e': 3, 'i': 3, 'o': 3, 'u': 3}\", \"assert vowel_cou...
{ "split": "train", "index": 63261, "acecode_id": "evol_31467", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that allows users to add their rental experiences, which should include a title, description, latitude, and longitude. The function should take the title, description, latitude, and longitude as parameters and return a dictionary repr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_experience('Cozy Apartment', 'A lovely stay in the heart of the city.', 40.7128, -74.0060) == {'title': 'Cozy Apartment', 'description': 'A lovely stay in the heart of the city.', 'latitude': 40.7128, 'longitude': -74.0060}\", \"assert add_experience('Be...
{ "split": "train", "index": 63262, "acecode_id": "evol_5168", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `generate_sequence()` that generates a list of 15 randomly generated integers, each ranging from 50 to 100, inclusive. The integers should be randomly selected and returned as a list.\nPlease reason step by step, then write a self-contained Python solution. Giv...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert len(generate_sequence()) == 15\", \"assert all(50 <= num <= 100 for num in generate_sequence())\", \"assert isinstance(generate_sequence(), list)\", \"assert all(isinstance(num, int) for num in generate_sequence())\", \"assert generate_sequence() != generate...
{ "split": "train", "index": 63263, "acecode_id": "evol_34959", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function to manage the disk storage policy profiles for virtual machines (VMs) in a cloud computing environment. Each VM can have a specific disk storage policy profile associated with it, which dictates the storage characteristics and behavior of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert setDiskStoragePolicyProfile('VM1', 'SSD', 3, 'Write-Back') == 'VM: VM1, Storage Type: SSD, Replication Factor: 3, Caching Settings: Write-Back'\", \"assert setDiskStoragePolicyProfile('VM2', 'HDD', 2, 'Write-Through') == 'VM: VM2, Storage Type: HDD, Replicat...
{ "split": "train", "index": 63264, "acecode_id": "oss_35362", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a Python list, implement a function that converts all of its numeric elements (both integers and floats) to strings. If an element is not a number, it should remain unchanged in the new list. The function should return this new list.\nPlease reason step by step, then writ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert correct_convert([1, 2, 3, 4]) == ['1', '2', '3', '4']\", \"assert correct_convert([1.1, 2.2, 3.3]) == ['1.1', '2.2', '3.3']\", \"assert correct_convert([1, 'two', 3.0, None]) == ['1', 'two', '3.0', None]\", \"assert correct_convert(['a', 'b', 'c']) == ['a', ...
{ "split": "train", "index": 63265, "acecode_id": "evol_9982", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with converting decimal numbers to ternary (base 3) representation for all numbers in a given range. Write a function `dec_to_ternary(start, end)` that takes two parameters, `start` and `end`, which are non-negative integers. The function should return a list of ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert dec_to_ternary(0, 0) == ['0']\", \"assert dec_to_ternary(1, 1) == ['1']\", \"assert dec_to_ternary(2, 2) == ['2']\", \"assert dec_to_ternary(3, 3) == ['10']\", \"assert dec_to_ternary(4, 4) == ['11']\", \"assert dec_to_ternary(5, 5) == ['12']\", \"assert dec...
{ "split": "train", "index": 63266, "acecode_id": "evol_35067", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of bin depths (non-negative integers) and a depth range (an integer or a list of two integers representing a minimum and maximum depth), return a new list of depths that fall within the specified range. If the depth range is a single integer, include all depths gre...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cut_bin_depths([10, 20, 30, 40, 50], 20) == [20, 30, 40, 50]\", \"assert cut_bin_depths([10, 20, 30, 40, 50], [20, 40]) == [20, 30, 40]\", \"assert cut_bin_depths([10, 20, 30, 40, 50], 50) == [50]\", \"assert cut_bin_depths([10, 20, 30, 40, 50], [15, 35]) ==...
{ "split": "train", "index": 63267, "acecode_id": "bigcode_python_fns_10699", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks if a specific configuration entry for a smart home device is already configured. The function should take in a list of existing configuration entries and a new configuration entry as inputs. If the new configuration entry ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_configuration([{'host': '1.2.3.4', 'port': '80', 'api_key': 'API_KEY', 'serial': 'BRIDGEID'}], {'host': '1.2.3.4', 'port': '80', 'api_key': 'API_KEY', 'serial': 'BRIDGEID'}) == 'Configuration already configured'\", \"assert check_configuration([{'host'...
{ "split": "train", "index": 63268, "acecode_id": "bigcode_python_fns_8675", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a string, implement a function that identifies the alphabetic character with the minimum occurrence in the string. The function should ignore case differences and non-alphabetic characters. If there are multiple characters with the same minimum occurrence, return any one ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_min_occurrence('Hello World!') == 'h'\", \"assert find_min_occurrence('abcdefg') == 'a'\", \"assert find_min_occurrence('aabbcc') == 'a'\", \"assert find_min_occurrence('The rain in Spain stays mainly in the plain') == 'r'\", \"assert find_min_occurrenc...
{ "split": "train", "index": 63269, "acecode_id": "evol_33319", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Given an array of integers, implement a function that calculates the average value and median of all unique elements in the array. The function should return both values as a tuple. If there are no unique elements, return (0, 0).\nPlease reason step by step, then write a self-c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_average_and_median([2, 2, 3, 4]) == (3.0, 3)\", \"assert find_average_and_median([]) == (0, 0)\", \"assert find_average_and_median([1, 2, 2, 3, 4, 4, 5]) == (3.0, 3)\", \"assert find_average_and_median([6, 7, 8, 9, 10]) == (8.0, 8)\", \"assert find_aver...
{ "split": "train", "index": 63270, "acecode_id": "evol_5819", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Write a function `fibonacci_upto_n(n: int) -> List[int]` that returns a list containing the Fibonacci sequence up to a specified number n, inclusive. The Fibonacci sequence starts with 0 and 1, and each subsequent number is the sum of the two preceding ones. If n is less than 0...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fibonacci_upto_n(0) == [0]\", \"assert fibonacci_upto_n(2) == [0, 1, 1, 2]\", \"assert fibonacci_upto_n(3) == [0, 1, 1, 2, 3]\", \"assert fibonacci_upto_n(4) == [0, 1, 1, 2, 3]\", \"assert fibonacci_upto_n(5) == [0, 1, 1, 2, 3, 5]\", \"assert fibonacci_upto_...
{ "split": "train", "index": 63271, "acecode_id": "evol_26444", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a user data registry system in Python. The user data registry will allow developers to define custom user data types and register them with the registry. Each user data type will have a unique type name and a method to retrieve user data. Your t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_user_data([{'type': 'test', 'get_user_data': lambda user, request: {'test': 'value'}}], 'user1', 'test') == {'test': 'value'}\", \"assert get_user_data([{'type': 'example', 'get_user_data': lambda user, request: {'example': user}}], 'user1', 'example') =...
{ "split": "train", "index": 63272, "acecode_id": "oss_22244", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of integers and returns a dictionary summarizing the count of each unique integer in the list. The function should have the following requirements:\n\n- The input will be a list of integers.\n- The output should be a dic...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_unique_integers([1, 2, 2, 3]) == {1: 1, 2: 2, 3: 1}\", \"assert count_unique_integers([4, 4, 4, 5, 5, 6]) == {4: 3, 5: 2, 6: 1}\", \"assert count_unique_integers([]) == {}\", \"assert count_unique_integers([10]) == {10: 1}\", \"assert count_unique_inte...
{ "split": "train", "index": 63273, "acecode_id": "oss_23030", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `transformer(input_vocab_size: int, target_vocab_size: int, max_length: int, model_dim: int = 512, num_heads: int = 8, num_layers: int = 6, dff: int = 2048, rate: float = 0.1) -> str` that constructs a transformer model architecture. The function should ret...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transformer(1000, 2000, 50) == 'Transformer Model Configuration: Input Vocab Size: 1000, Target Vocab Size: 2000, Max Length: 50, Model Dim: 512, Num Heads: 8, Num Layers: 6, Feed-Forward Dim: 2048, Dropout Rate: 0.1'\", \"assert transformer(500, 300, 60, mo...
{ "split": "train", "index": 63274, "acecode_id": "evol_10975", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that performs a binary search on a sorted list of integers. The function should return the index of the specified number if it exists in the list, and -1 if it does not. Please implement the following function: `def binary_search(data...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert binary_search([1, 2, 3, 4, 5], 3) == 2\", \"assert binary_search([10, 20, 30, 40, 50], 10) == 0\", \"assert binary_search([1, 3, 5, 7, 9], 5) == 2\", \"assert binary_search([1, 3, 5, 7, 9], 9) == 4\", \"assert binary_search([1, 3, 5, 7, 9], 1) == 0\", \"asse...
{ "split": "train", "index": 63275, "acecode_id": "evol_35938", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a brightness adjustment function that modifies an image represented as a 2D list of pixel values ranging from 0 to 255. Your task is to implement a function `adjust_brightness(image: List[List[int]], delta: Union[int, float, List[float]]) -> List[List[int]]` that ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert adjust_brightness([[100, 150], [200, 250]], 0) == [[100, 150], [200, 250]]\", \"assert adjust_brightness([[100, 150], [200, 250]], 10) == [[110, 160], [210, 255]]\", \"assert adjust_brightness([[0, 0], [0, 0]], -1) == [[0, 0], [0, 0]]\", \"assert adjust_brig...
{ "split": "train", "index": 63276, "acecode_id": "bigcode_python_fns_15297", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with simulating a simple messaging system between two processes using lists in Python. The messaging system consists of a writer process that sends messages and a reader process that receives and prints those messages. Your task is to implement a function `messag...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert message_system(['Hello', 'World', 'This', 'Is', 'A', 'Test']) == ['Hello', 'World', 'This', 'Is', 'A', 'Test']\", \"assert message_system(['Python', 'is', 'fun']) == ['Python', 'is', 'fun']\", \"assert message_system(['Single message']) == ['Single message']...
{ "split": "train", "index": 63277, "acecode_id": "oss_11675", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of 2D blocks, where each block is represented as a list of coordinates (x, y), calculate the maximum width and maximum height of each block. The width of a block is defined as the maximum difference in x-coordinates, and the height is defined as the maximum differe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert max_dimensions([[(0, 0), (1, 0)], [(0, 0), (0, 1)], [(2, 2), (5, 2)], [(1, 1), (1, 4), (3, 1)]]) == ([1, 0, 3, 2], [0, 1, 0, 3])\", \"assert max_dimensions([[(0, 0), (0, 0)], [(1, 1), (1, 1)], [(2, 2), (2, 2)]]) == ([0, 0, 0], [0, 0, 0])\", \"assert max_dime...
{ "split": "train", "index": 63278, "acecode_id": "bigcode_python_fns_21853", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a positive integer n, generate the iterative sequence defined as follows: if n is even, transform it to n/2; if n is odd, transform it to 3n + 1. Write a function `longest_chain(n)` that returns the length of the sequence starting from n until it reaches 1, inclusive of b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longest_chain(1) == 1\", \"assert longest_chain(2) == 2\", \"assert longest_chain(4) == 3\", \"assert longest_chain(5) == 6\", \"assert longest_chain(8) == 4\", \"assert longest_chain(9) == 20\", \"assert longest_chain(10) == 7\", \"assert longest_chain(11) ...
{ "split": "train", "index": 63279, "acecode_id": "evol_23672", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Implement a function `generate_fixed_string()` that generates a random string consisting of exactly eight characters. The characters must include alphanumeric letters (both uppercase and lowercase) and numerals (0-9). The function should return the generated string.\nPlease rea...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert len(generate_fixed_string()) == 8\", \"assert all(c.isalnum() for c in generate_fixed_string())\", \"assert any(c.islower() for c in generate_fixed_string())\", \"assert any(c.isupper() for c in generate_fixed_string())\", \"assert generate_fixed_string() !=...
{ "split": "train", "index": 63280, "acecode_id": "evol_16774", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that validates the uniqueness of a user-ticket combination in a ticketing system. The combination of 'user' and 'ticket' must be unique. Your function, `validate_unique_user_ticket`, should take two parameters: a string `user` represe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_unique_user_ticket('Alice', 'TICKET999') == True\", \"assert validate_unique_user_ticket('Alice', 'TICKET123') == False\", \"assert validate_unique_user_ticket('Bob', 'TICKET456') == False\", \"assert validate_unique_user_ticket('Bob', 'TICKET999') ...
{ "split": "train", "index": 63281, "acecode_id": "oss_15402", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary that represents a configuration of a system with some variables already populated. Your task is to implement a function `deduce_final_configuration(fetched_config)` that takes this dictionary as input and fills in the missing configuration variables f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert deduce_final_configuration({'base_url': 'http://localhost'}) == {'base_url': 'http://localhost', 'THRIFT_SERVER_URL': 'http://localhost:9090', 'HIVE_SERVER_URL': 'http://localhost:10000'}\", \"assert deduce_final_configuration({'base_url': 'https://example.c...
{ "split": "train", "index": 63282, "acecode_id": "bigcode_python_fns_28750", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a square matrix of integers, write a function `unroll_upper_triangle(matrix)` that extracts the elements from the upper triangular part of the matrix (excluding the diagonal) and returns them as a list. The input will be a 2D list where each sublist represents a row of th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unroll_upper_triangle([[1, 2], [3, 4]]) == [2]\", \"assert unroll_upper_triangle([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == [2, 3, 6]\", \"assert unroll_upper_triangle([[1, 10, 100], [20, 30, 40], [50, 60, 70]]) == [10, 100, 40]\", \"assert unroll_upper_triangle(...
{ "split": "train", "index": 63283, "acecode_id": "bigcode_python_fns_17082", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Given a list of integers representing the heights of bars in a histogram, write a function `largest_rectangle_area(heights)` that calculates the area of the largest rectangle that can be formed in the histogram. The function should take a list of integers where each integer rep...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert largest_rectangle_area([2,1,5,6,2,3]) == 10\", \"assert largest_rectangle_area([1,1,1,1]) == 4\", \"assert largest_rectangle_area([5,2,1,3,4,5]) == 9\", \"assert largest_rectangle_area([0,2,0]) == 2\", \"assert largest_rectangle_area([4,2,0,3,2,5]) == 6\", \...
{ "split": "train", "index": 63284, "acecode_id": "bigcode_python_fns_1565", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a program that analyzes architecture-specific breakpoint opcodes and instructions. Implement a function `get_architecture_info(architecture)` that takes a string `architecture` as input and returns a tuple containing the breakpoint opcodes and instr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_architecture_info('x86_64') == (['int3'], ['mov', 'addl', 'ret'])\", \"assert get_architecture_info('i386') == (['int3'], ['mov', 'addl', 'ret'])\", \"assert get_architecture_info('') == 'Unsupported architecture'\", \"assert get_architecture_info('mips'...
{ "split": "train", "index": 63285, "acecode_id": "oss_26172", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Create a function that takes two alphanumeric strings as input and verifies if all letters (case-insensitive) from the second string are contained in the same order within the first string. Implement a function named `contains_ordered(sub: str, main: str) -> bool` that returns ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert contains_ordered('loWd', 'HelloWorld123') == True\", \"assert contains_ordered('abc', 'a1b2c3') == True\", \"assert contains_ordered('xyz', '123xyz456') == True\", \"assert contains_ordered('abc', '123456') == False\", \"assert contains_ordered('hello', 'Hel...
{ "split": "train", "index": 63286, "acecode_id": "evol_7046", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that processes a list of task configurations represented as dictionaries. Each dictionary contains the following keys: 'name', 'text', 'labels', 'description', 'model_name', 'direction', and 'mapper'. Your function should extract the 'nam...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert task_configuration([{'name': 'Task1', 'text': 'Process data', 'labels': ['data'], 'description': 'Data processing task', 'model_name': 'ModelA', 'direction': 'forward', 'mapper': 'map1'}, {'name': 'Task2', 'text': 'Analyze results', 'labels': ['results'], 'd...
{ "split": "train", "index": 63287, "acecode_id": "bigcode_python_fns_37702", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that validates a given URL. The URL must start with 'http://' or 'https://', followed by a domain name and can optionally include a path. If the URL does not meet these criteria, the function should raise a ValidationError. Implement ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_url('http://example.com') is None\", \"assert validate_url('https://example.com/path') is None\", \"assert validate_url('http://subdomain.example.com') is None\", \"assert validate_url('https://example.com/path/to/resource') is None\", \"assert vali...
{ "split": "train", "index": 63288, "acecode_id": "bigcode_python_fns_25946", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are working on a Python project that requires you to manage a directory structure. The project has a main directory containing a file named `main.py` and a subdirectory named `package`, which contains three files: `library.py`, `parse_api.py`, and `system.py`. Each of these...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_import_statements() == ['from package import library', 'from package import parse_api', 'from package import system']\", \"assert len(get_import_statements()) == 3\", \"assert 'library' in get_import_statements()[0]\", \"assert 'parse_api' in get_import_...
{ "split": "train", "index": 63289, "acecode_id": "oss_24211", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that retrieves all assignments for a specific course from a provided course content dictionary. The function should accept a dictionary where the keys are course names and the values are lists of assignments, as well as a course name as i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_assignments({'Math': ['Homework 1', 'Homework 2', 'Quiz 1']}, 'Math') == ['Homework 1', 'Homework 2', 'Quiz 1']\", \"assert get_assignments({'Math': ['Homework 1', 'Homework 2', 'Quiz 1']}, 'Science') == []\", \"assert get_assignments({'Science': ['Lab R...
{ "split": "train", "index": 63290, "acecode_id": "oss_10906", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Develop a Python function to replace all instances of three or more consecutive spaces in a provided text string with a single space. The function should take a single string parameter and return the modified string. Example text string is str = 'Hello there, how are yo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert replace_consecutive_spaces('Hello there, how are you?') == 'Hello there, how are you?'\", \"assert replace_consecutive_spaces('This is an example.') == 'This is an example.'\", \"assert replace_consecutive_spaces('No spaces here.') == 'No s...
{ "split": "train", "index": 63291, "acecode_id": "evol_5253", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the behavior of a deprecated method in a text processing application. Your function, `get_text_range_start`, takes a single string argument, 'builder', which represents a text input. The function should return a new str...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_text_range_start('Hello, World!') == 'H'\", \"assert get_text_range_start('Python') == 'P'\", \"assert get_text_range_start('') == ''\", \"assert get_text_range_start('OpenAI') == 'O'\", \"assert get_text_range_start('LeetCode') == 'L'\", \"assert get_te...
{ "split": "train", "index": 63292, "acecode_id": "bigcode_python_fns_45245", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string containing parentheses. Your task is to implement a function that separates valid groups of parentheses from the input string and returns them along with a message indicating how many groups were separated and if there were any unbalanced groups ignored. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert separate_paren_groups('() () ()', True) == (['()', '()', '()'], 'Total groups separated: 3')\", \"assert separate_paren_groups('((()))', True) == (['((()))'], 'Total groups separated: 1')\", \"assert separate_paren_groups('((((()))))', True) == (['((((()))))...
{ "split": "train", "index": 63293, "acecode_id": "evol_4736", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are given a function that determines whether a user-supplied list is a custom list or a default watchlist. Implement a function `get_list(user_list: str, persistent_attributes: dict) -> Tuple[str, bool]` that checks the following conditions:\n\n1. If the `user_list` is not ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_list('MyCustomList', {}) == ('MyCustomList', True)\", \"assert get_list(None, {}) == ('watchlist', False)\", \"assert get_list('watchlist', {}) == ('watchlist', False)\", \"assert get_list('watch list', {}) == ('watchlist', False)\", \"assert get_list(No...
{ "split": "train", "index": 63294, "acecode_id": "bigcode_python_fns_24275", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given an array of integers and a specific action, either 'store' or 'extract'. If the action is 'store', you will receive an integer which you need to append to the end of the array. If the action is 'extract', you need to remove the last integer from the array and retu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert modify_array([1, 2, 3], 4, 'store') == None\", \"assert modify_array([1, 2, 3], None, 'extract') == 3\", \"assert modify_array([], 5, 'store') == None\", \"assert modify_array([1], None, 'extract') == 1\", \"assert modify_array([1, 2, 3], None, 'extract') ==...
{ "split": "train", "index": 63295, "acecode_id": "bigcode_python_fns_49124", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function named `add_kwargs` that accepts two parameters: `builder` (a string) and `kwargs` (a dictionary). The function should return a string that combines the `builder` with the key-value pairs from `kwargs`. The format of the output string shou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_kwargs('MyBuilder', {'arg1': 'value1', 'arg2': 'value2'}) == 'Builder: MyBuilder, Arguments: arg1=value1, arg2=value2'\", \"assert add_kwargs('TestBuilder', {}) == 'Builder: TestBuilder, Arguments: None'\", \"assert add_kwargs('SimpleBuilder', {'key1': '...
{ "split": "train", "index": 63296, "acecode_id": "bigcode_python_fns_8524", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary representing a directed graph where keys are nodes and values are sets of nodes that the key node points to (i.e., its dependencies). Your task is to implement a function that returns a list of strongly connected components (SCCs) of the graph, where ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_strongly_connected_components({'X': {'Y'}, 'Y': {'Z'}, 'Z': {'X'}}) == [frozenset({'X', 'Y', 'Z'})]\", \"assert find_strongly_connected_components({'A': {'A'}}) == [frozenset({'A'})]\", \"assert find_strongly_connected_components({'A': {'B', 'C'}, 'B': ...
{ "split": "train", "index": 63297, "acecode_id": "bigcode_python_fns_1524", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that generates a formatted string for a rent request. The function should take two parameters: `property_name` (a string representing the name of the property) and `request_date` (a string representing the date of the request). The fu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_rent_request_feed('Cozy Apartment', '2023-10-01') == 'Rent request for Cozy Apartment - 2023-10-01'\", \"assert generate_rent_request_feed('Luxury Villa', '2023-09-15') == 'Rent request for Luxury Villa - 2023-09-15'\", \"assert generate_rent_reques...
{ "split": "train", "index": 63298, "acecode_id": "oss_23313", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of integers, implement a function that returns a list of integers that appear an odd number of times in the array. The output list should contain the unpaired integers in the order of their first appearance. If there are no unpaired integers, return an empty list...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_unpaired([-1, 0, 1, 2, 3]) == [-1, 0, 1, 2, 3]\", \"assert find_unpaired([1, 2, 3, 1, 2, 3, 2]) == [2]\", \"assert find_unpaired([4, 5, 4, 5, 6, 6, 6]) == [6]\", \"assert find_unpaired([0, 0, 1, 2, 1, 2, 3]) == [3]\", \"assert find_unpaired([]) == []\",...
{ "split": "train", "index": 63299, "acecode_id": "evol_31014", "num_tests": 16 }