data_source
large_stringclasses
1 value
prompt
listlengths
1
1
ability
large_stringclasses
1 value
reward_model
dict
extra_info
dict
acecode
[ { "role": "user", "content": "Given four lists of floats representing the open, high, low, and close values of a stock over a period of time, write a function `create_candlestick(open: List[float], high: List[float], low: List[float], close: List[float], direction: str) -> List[Tuple[float, float, float, fl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_candlestick([10], [15], [5], [12], 'increasing') == [(10, 15, 5, 12)]\", \"assert create_candlestick([10], [15], [5], [12], 'decreasing') == []\", \"assert create_candlestick([10], [15], [5], [12], 'both') == [(10, 15, 5, 12)]\", \"assert create_candl...
{ "split": "train", "index": 71500, "acecode_id": "bigcode_python_fns_49995", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are given two lists of integers, seq_1 and seq_2, representing two sequences of reads. Your task is to find the number of unique pairs (x, y) such that x is an element from seq_1 and y is an element from seq_2, and both elements are equal. Implement a function `count_equal_...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_equal_pairs([1, 2, 3], [3, 2, 1]) == 3\", \"assert count_equal_pairs([1, 2, 2, 3], [2, 2, 2, 3]) == 2\", \"assert count_equal_pairs([1, 1, 1], [1, 1, 1]) == 1\", \"assert count_equal_pairs([], [1, 2, 3]) == 0\", \"assert count_equal_pairs([1, 2, 3], []...
{ "split": "train", "index": 71501, "acecode_id": "bigcode_python_fns_47827", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that will take a dictionary representing devices and their features, as well as a list of sensor types. Each sensor type has a specific key that must match one of the device's features for the sensor to be added. Create a function `ad...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_sensors({'sensor1': ['temperature', 'humidity'], 'sensor2': ['light']}, [{'key': 'temperature', 'plugwise_api': 'STICK'}, {'key': 'humidity', 'plugwise_api': 'STICK'}, {'key': 'motion', 'plugwise_api': 'STICK'}]) == ['temperature', 'humidity']\", \"asser...
{ "split": "train", "index": 71502, "acecode_id": "bigcode_python_fns_2650", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of lists of words, and a mapping from words to their corresponding indices, implement a function that transforms the words into their corresponding indices. If a word does not exist in the given mapping, it should be replaced with a special index denoted by 'UNK'. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_words_to_indices([['hello', 'world'], ['foo', 'bar']], {'hello': 1, 'world': 2, 'foo': 3}, 0) == [[1, 2], [3, 0]]\", \"assert transform_words_to_indices([['a', 'b'], ['c', 'd']], {'a': 1, 'b': 2}, -1) == [[1, 2], [-1, -1]]\", \"assert transform_wor...
{ "split": "train", "index": 71503, "acecode_id": "bigcode_python_fns_30771", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the behavior of a simple HTTP request manager. The function should accept an integer offset and a dictionary body as input and return a tuple containing the headers, parameters, and body formatted for an HTTP request. T...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert http_request_manager(0, {'key1': 'value1'}) == ({}, {'offset': 0}, {'key1': 'value1'})\", \"assert http_request_manager(10, {'data': 'test'}) == ({}, {'offset': 10}, {'data': 'test'})\", \"assert http_request_manager(-5, {}) == ({}, {'offset': -5}, {})\", \"...
{ "split": "train", "index": 71504, "acecode_id": "oss_28600", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of coordinate pairs in the format 'x1, y1 -> x2, y2'. Each pair represents two points in a 2D space. Your task is to calculate the distance between each pair of coordinates using the formula: distance = sqrt((x2 - x1)^2 + (y2 - y1)^2). Write a function `cal...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_distances(['1,2 -> 3,4']) == [2.8284271247461903]\", \"assert calculate_distances(['0,0 -> 1,1']) == [1.4142135623730951]\", \"assert calculate_distances(['3,4 -> 7,1']) == [5.0]\", \"assert calculate_distances(['-1,-1 -> -1,-4']) == [3.0]\", \"ass...
{ "split": "train", "index": 71505, "acecode_id": "oss_20623", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers that may include both positive and negative numbers, write a function `comb_sum(candidates, target)` that returns all unique combinations of elements from the list that sum up to a specified target value. Each element in the list can only be used once i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert comb_sum([], 5) == set()\", \"assert comb_sum([1, 2, 3], 6) == {(1, 2, 3)}\", \"assert comb_sum([1, 2, 3, 4], 5) == {(1, 4), (2, 3)}\", \"assert comb_sum([1, 1, 1, 1], 2) == {(1, 1)}\", \"assert comb_sum([10, -10, 5, 3], 0) == {(-10, 10)}\", \"assert comb_su...
{ "split": "train", "index": 71506, "acecode_id": "evol_1471", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Write a function `calculate_mean(data: List[float]) -> Tuple[Optional[float], Optional[float]]` that calculates the mean and the standard deviation of a given list of floating point numbers and integers. The function should return a tuple containing the mean and standard deviat...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_mean([]) == (None, None)\", \"assert calculate_mean([1.0]) == (1.0, 0.0)\", \"assert calculate_mean([1.0, 2.0]) == (1.5, 0.5)\", \"assert calculate_mean([1.0, 2.0, 3.0]) == (2.0, 0.816496580927726)\", \"assert calculate_mean([1.0, 2.0, 3.0, 4.0]) =...
{ "split": "train", "index": 71507, "acecode_id": "evol_14755", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Given a string, implement a function `remove_voids_and_count` that removes leading and trailing whitespace, splits the string into words while removing any surplus whitespace between words, and returns a dictionary containing the count of words and the count of whitespace chara...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_voids_and_count(' One two three ') == {'words': 3, 'whitespaces': 6}\", \"assert remove_voids_and_count(' Hello World ! ') == {'words': 3, 'whitespaces': 6}\", \"assert remove_voids_and_count('SingleWord') == {'words': 1, 'whitespaces'...
{ "split": "train", "index": 71508, "acecode_id": "evol_23795", "num_tests": 5 }
acecode
[ { "role": "user", "content": "Design a function that takes a numerical string and substitutes every nth occurrence of the number '7' with '#', where n is a variable defined by the user. The value of n must be greater than zero and less than or equal to the total number of '7' in the string. If n is zero or ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert substitute_nth_seven('123456789707', 2) == '123456789#07'\", \"assert substitute_nth_seven('777777', 1) == '#77777'\", \"assert substitute_nth_seven('777777', 3) == '77#777'\", \"assert substitute_nth_seven('7777777', 4) == '777#777'\", \"assert substitute_n...
{ "split": "train", "index": 71509, "acecode_id": "evol_14205", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given a dictionary with four key-value pairs, where the keys are of different types (string, integer, float, and boolean) and the values are lists of integers, implement a function that sorts the values in descending order based on the lists associated with each key. The functi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sort_dictionary({'string': [3, 1, 4], 123: [10, 7, 6], 12.5: [5, 2, 8], True: [9, 0, 3]}) == {'string': [4, 3, 1], 123: [10, 7, 6], 12.5: [8, 5, 2], True: [9, 3, 0]}\", \"assert sort_dictionary({'key1': [1, 2, 3], 456: [7, 8, 5], 3.14: [6, 4], False: [10, 9]...
{ "split": "train", "index": 71510, "acecode_id": "evol_19584", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that accepts a variable number of items along with optional attributes for each item. The function should label each item based on the preceding string (if provided) and apply the specified attributes from a dictionary that follows the it...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert debug_items('item1', {'color': 'red'}, 'item2', {'size': 'large'}) == [('item1', {'color': 'red'}), ('item2', {'size': 'large'})]\", \"assert debug_items('label1', {'attr1': 1}, 'label2', 'label3', {'attr2': 2}) == [('label1', {'attr1': 1}), ('label2', {}), ...
{ "split": "train", "index": 71511, "acecode_id": "bigcode_python_fns_3248", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that retrieves a specific party from a predefined list of parties based on its ID. The function should return the party details as a dictionary if found, or an error message as a string if the party with the given ID does not e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_specific_party(1) == ({'id': 1, 'name': 'Party A', 'location': 'Venue A'}, 200)\", \"assert get_specific_party(2) == ({'id': 2, 'name': 'Party B', 'location': 'Venue B'}, 200)\", \"assert get_specific_party(3) == ({'id': 3, 'name': 'Party C', 'location':...
{ "split": "train", "index": 71512, "acecode_id": "oss_3385", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a simple calendar API response. The function should return a predefined calendar object when called. Your function should be named `get_test_calendar` and it should not take any parameters. The calendar object should be rep...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_test_calendar() == {'year': 2023, 'months': {'January': 31, 'February': 28, 'March': 31, 'April': 30, 'May': 31, 'June': 30, 'July': 31, 'August': 31, 'September': 30, 'October': 31, 'November': 30, 'December': 31}}\", \"assert type(get_test_calendar()) ...
{ "split": "train", "index": 71513, "acecode_id": "bigcode_python_fns_13903", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of integers as input. The function should iterate through the list and calculate the sum of all positive integers in the list. If the list contains a negative integer, the function should stop processing the list and ret...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sum_positive_before_negative([1, 2, 3, -1]) == 6\", \"assert sum_positive_before_negative([5, 10, -2, 3]) == 15\", \"assert sum_positive_before_negative([-1, 2, 3]) == 0\", \"assert sum_positive_before_negative([0, 1, 2, 3]) == 6\", \"assert sum_positive_bef...
{ "split": "train", "index": 71514, "acecode_id": "oss_1097", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary representing a scheduling rule and two datetime strings representing the earliest and latest times to schedule. Your task is to implement a function that computes a list of scheduled times based on the given rule. The rule can be in the following form...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compute_schedule({'recurrence': '2 weeks', 'count': 5, 'weekdays': ['SU', 'MO']}, '2023-10-01T00:00:00', '2023-10-30T00:00:00') == ['2023-10-01T00:00:00', '2023-10-15T00:00:00', '2023-10-29T00:00:00']\", \"assert compute_schedule({'count': 1}, '2023-10-01T00...
{ "split": "train", "index": 71515, "acecode_id": "bigcode_python_fns_4171", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Write a function that takes two integers, lower and upper, and returns a list of all prime numbers between these two bounds, inclusive. A prime number is defined as a number greater than 1 that has no positive divisors other than 1 and itself.\nPlease reason step by step, then ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prime_numbers(3, 20) == [3, 5, 7, 11, 13, 17, 19]\", \"assert prime_numbers(1, 10) == [2, 3, 5, 7]\", \"assert prime_numbers(10, 30) == [11, 13, 17, 19, 23, 29]\", \"assert prime_numbers(15, 15) == []\", \"assert prime_numbers(2, 2) == [2]\", \"assert prime_...
{ "split": "train", "index": 71516, "acecode_id": "evol_18658", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function that takes a string as an argument and prints each character of the string one at a time on the console using a loop. The function should not use the built-in print() function directly but should instead create a custom method to display each character. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert print_each_char_with_delay('Hello World!') == None\", \"assert print_each_char_with_delay('Python') == None\", \"assert print_each_char_with_delay('AI Assistant') == None\", \"assert print_each_char_with_delay('LeetCode') == None\", \"assert print_each_char_...
{ "split": "train", "index": 71517, "acecode_id": "evol_18209", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `are_anagrams(str1: str, str2: str) -> bool` that takes two strings as input and returns a Boolean value indicating whether the two strings are anagrams of each other. An anagram is a word or phrase formed by rearranging the letters of a different word or phras...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert are_anagrams('listen', 'silent') == True\", \"assert are_anagrams('triangle', 'integral') == True\", \"assert are_anagrams('apple', 'papel') == True\", \"assert are_anagrams('rat', 'car') == False\", \"assert are_anagrams('evil', 'vile') == True\", \"assert ...
{ "split": "train", "index": 71518, "acecode_id": "evol_33577", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a program that categorizes a person's name based on its length. A short name is defined as having 5 characters or fewer, a long name has 10 characters or more, and a normal name falls in between these two lengths. Implement a function `categorize_na...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert categorize_name('Ana') == 'Bom dia, Ana! Your name is short.'\", \"assert categorize_name('Lucas') == 'Bom dia, Lucas! Your name is short.'\", \"assert categorize_name('Michael') == 'Bom dia, Michael! Your name is normal.'\", \"assert categorize_name('Jonath...
{ "split": "train", "index": 71519, "acecode_id": "oss_4639", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the shutdown process of a reactor in a computing environment. The function `shutdown_reactor` takes an integer parameter `ignored`, which represents the number of processes that have finished their tasks. The function s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert shutdown_reactor(0) == 'Reactor stopped'\", \"assert shutdown_reactor(1) == 'Reactor stopped'\", \"assert shutdown_reactor(10) == 'Reactor stopped'\", \"assert shutdown_reactor(100) == 'Reactor stopped'\", \"assert shutdown_reactor(-1) == 'Reactor stopped'\"...
{ "split": "train", "index": 71520, "acecode_id": "bigcode_python_fns_12170", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of signals represented as integers and a mode that can either be 'deal' or 'dealOpen'. Implement a function `toggle_signals(signals: List[int], mode: str) -> Tuple[List[int], str]` that toggles the signals based on the current mode. If the mode is 'deal', t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert toggle_signals([1, 2, 3], 'deal') == ([1, 2, 3], 'dealOpen')\", \"assert toggle_signals([1, 2, 3], 'dealOpen') == ([2, 4, 6], 'deal')\", \"assert toggle_signals([], 'deal') == ([], 'dealOpen')\", \"assert toggle_signals([0], 'deal') == ([0], 'dealOpen')\", \...
{ "split": "train", "index": 71521, "acecode_id": "bigcode_python_fns_33441", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `product_of_digits(n: int) -> int` that calculates the product of all non-zero digits in a given integer n recursively. If there are no non-zero digits, return 1. For example, if n is 14509, the result should be 20 (since 1 * 4 * 5 = 20).\nPlease reason ste...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert product_of_digits(0) == 1\", \"assert product_of_digits(100) == 1\", \"assert product_of_digits(234) == 24\", \"assert product_of_digits(5003) == 15\", \"assert product_of_digits(7) == 7\", \"assert product_of_digits(12) == 2\", \"assert product_of_digits(45...
{ "split": "train", "index": 71522, "acecode_id": "evol_35605", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of tuples, where each tuple contains a reference genome identifier and its similarity score to a draft genome. Your task is to find the first reference genome that has a similarity score greater than a specified threshold. If no such reference genome exists...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_best_reference([('genome1', 0.85), ('genome2', 0.90)], 0.80) == 'genome1'\", \"assert find_best_reference([('genome1', 0.75), ('genome2', 0.70)], 0.80) == None\", \"assert find_best_reference([('genome1', 0.95), ('genome2', 0.85)], 0.90) == 'genome1'\",...
{ "split": "train", "index": 71523, "acecode_id": "bigcode_python_fns_41721", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two integers `a` and `p`, where `p` is a prime number, implement a function `legendre(a: int, p: int) -> int` that computes the Legendre symbol (a/p). The Legendre symbol is defined as follows: it is 1 if `a` is a quadratic residue modulo `p` (i.e., there exists an intege...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert legendre(1, 7) == 1\", \"assert legendre(2, 7) == 1\", \"assert legendre(3, 7) == -1\", \"assert legendre(4, 7) == 1\", \"assert legendre(5, 7) == -1\", \"assert legendre(6, 7) == -1\", \"assert legendre(0, 7) == 0\", \"assert legendre(9, 11) == 1\", \"asser...
{ "split": "train", "index": 71524, "acecode_id": "bigcode_python_fns_14795", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with modifying a blog application model named `Post`. The `Post` model currently has fields for `title` (string), `content` (string), and `created_at` (datetime). Your goal is to add a new field called `author` to the `Post` model. The `author` field should refer...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert add_author_field_to_post() == {'title': 'string', 'content': 'string', 'created_at': 'datetime', 'author': 'User'}\", \"assert add_author_field_to_post() != {'title': 'string', 'content': 'string', 'created_at': 'datetime'}\", \"assert 'author' in add_author...
{ "split": "train", "index": 71525, "acecode_id": "oss_16421", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing a JSON message that describes an alert. The input is a dictionary containing a 'default' key, which maps to another dictionary representing the alert. This alert dictionary contains a 'record' key and a 'metadata' key. The 'metadata' key itself co...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_alert({'default': {'record': 'some_record', 'metadata': {'rule_name': 'test_rule', 'rule_description': 'This is a test rule', 'log': 'log_info', 'outputs': ['slack:my_channel'], 'type': 'alert', 'source': {'service': 'service_name', 'entity': 'entity...
{ "split": "train", "index": 71526, "acecode_id": "bigcode_python_fns_27079", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `greatest_common_divisor(a: int, b: int) -> int` that returns the greatest common divisor (GCD) of two given non-negative integers 'a' and 'b'. The function should handle the following scenarios: if either 'a' or 'b' is zero, it should return the other numb...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert greatest_common_divisor(3, 5) == 1\", \"assert greatest_common_divisor(25, 15) == 5\", \"assert greatest_common_divisor(0, 5) == 5\", \"assert greatest_common_divisor(0, 0) == 0\", \"assert greatest_common_divisor(5, 0) == 5\", \"assert greatest_common_divis...
{ "split": "train", "index": 71527, "acecode_id": "evol_855", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that checks if a module can be imported given its name. The function `can_import_module(module_name: str) -> bool` should attempt to import a module dynamically based on the provided `module_name`. If the import is successful, the functio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_import_module('math') == True\", \"assert can_import_module('os') == True\", \"assert can_import_module('sys') == True\", \"assert can_import_module('json') == True\", \"assert can_import_module('random') == True\", \"assert can_import_module('datetime')...
{ "split": "train", "index": 71528, "acecode_id": "bigcode_python_fns_19874", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of tuples where each tuple contains three elements: a show ID (an integer), a show date (a string in the format 'YYYY-MM-DD'), and a panelist rank (an integer). Your task is to implement a function that takes this list and returns a list of dictionaries. Ea...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert retrieve_panelist_ranks([(1, '2021-01-01', 2), (2, '2021-01-02', 1)]) == [{'show_id': 1, 'show_date': '2021-01-01', 'rank': 2}, {'show_id': 2, 'show_date': '2021-01-02', 'rank': 1}]\", \"assert retrieve_panelist_ranks([]) == None\", \"assert retrieve_panelis...
{ "split": "train", "index": 71529, "acecode_id": "bigcode_python_fns_24511", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `multiply(a: int, b: int) -> int` that takes two integers as input and returns their product. The function should also maintain a global counter that keeps track of the number of multiplication operations performed. Each time the `mul...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert multiply(2, 100) == 200\", \"assert multiply(2323, 3) == 6969\", \"assert multiply(2, 2) == 4\", \"assert multiply(2, 3414) == 6828\", \"assert multiply(0, 5) == 0\", \"assert multiply(-1, 1) == -1\", \"assert multiply(1, -1) == -1\", \"assert multiply(-2, -...
{ "split": "train", "index": 71530, "acecode_id": "oss_1681", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two floating-point numbers x and y representing Cartesian coordinates, implement a function that converts these coordinates to polar coordinates (r, θ). The polar coordinates should be returned as a tuple where r is the radius (the distance from the origin) and θ is the a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cartesian_to_polar(1, 1) == (1.4142135623730951, 0.7853981633974483)\", \"assert cartesian_to_polar(0, 0) == (0.0, 0.0)\", \"assert cartesian_to_polar(0, 1) == (1.0, 1.5707963267948966)\", \"assert cartesian_to_polar(1, 0) == (1.0, 0.0)\", \"assert cartesian...
{ "split": "train", "index": 71531, "acecode_id": "bigcode_python_fns_31588", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Write a Python function that takes in a list of singular lower-cased English nouns, and returns a new list where the last character of each noun is replaced with its uppercase equivalent. If the noun is empty, it should remain unchanged.\nPlease reason step by step, then write ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_last_to_upper(['apple', 'banana', 'cherry']) == ['applE', 'bananA', 'cherrY']\", \"assert convert_last_to_upper(['dog', 'cat', 'mouse']) == ['doG', 'caT', 'mousE']\", \"assert convert_last_to_upper(['hello', 'world']) == ['hellO', 'worlD']\", \"asser...
{ "split": "train", "index": 71532, "acecode_id": "evol_34898", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two positive whole numbers, along with an optional third number, implement a function to calculate the Least Common Multiple (LCM) of all provided numbers. If the third number is not provided, only consider the first two numbers for the LCM calculation.\nPlease reason ste...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_lcm(15, 10) == 30\", \"assert get_lcm(6, 8) == 24\", \"assert get_lcm(5, 10) == 10\", \"assert get_lcm(7, 3) == 21\", \"assert get_lcm(9, 6) == 18\", \"assert get_lcm(12, 15) == 60\", \"assert get_lcm(14, 28) == 28\", \"assert get_lcm(25, 100) == 100\", ...
{ "split": "train", "index": 71533, "acecode_id": "evol_32396", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a student going to school. The function should take two parameters: a student's name and their school. The function should return a string in the format 'name is going to school at school', where 'name' and 'school' are rep...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert go_to_school('Anna', 'Oxford') == 'Anna is going to school at Oxford'\", \"assert go_to_school('Rolf', 'Harvard') == 'Rolf is going to school at Harvard'\", \"assert go_to_school('John', 'Stanford') == 'John is going to school at Stanford'\", \"assert go_to_...
{ "split": "train", "index": 71534, "acecode_id": "oss_31861", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings that represent file names in a directory. Your task is to implement a function that checks if a specific file name (in this case, 'DESCRIPTION.rst') exists in the list of file names. The function should return True if the file name exists in the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_file_exists(['README.md', 'DESCRIPTION.rst', 'LICENSE'], 'DESCRIPTION.rst') == True\", \"assert check_file_exists(['README.md', 'LICENSE', 'README.txt'], 'DESCRIPTION.rst') == False\", \"assert check_file_exists(['DESCRIPTION.rst', 'notes.txt'], 'DESCR...
{ "split": "train", "index": 71535, "acecode_id": "bigcode_python_fns_5833", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of variable names and their corresponding values, which may either be valid or undefined. Your task is to implement a function that checks if all variables have been initialized with valid values. If any variable is undefined, the function should raise a Va...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert verify_variables(['a', 'b', 'c'], [1, 2, 3]) == True\", \"assert verify_variables(['x', 'y', 'z'], ['hello', 'world', '']) == True\", \"assert verify_variables(['alpha', 'beta'], [5, 10]) == True\", \"assert verify_variables(['one', 'two', 'three'], [1, 2, 3...
{ "split": "train", "index": 71536, "acecode_id": "bigcode_python_fns_49851", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Given an integer range from 'start' to 'end', implement a function `get_primes(start: int, end: int) -> List[int]` that returns a list of all prime numbers within that range. The input range will always be valid with 'start' being less than or equal to 'end'.\nPlease reason ste...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_primes(1, 10) == [2, 3, 5, 7]\", \"assert get_primes(10, 20) == [11, 13, 17, 19]\", \"assert get_primes(20, 30) == [23, 29]\", \"assert get_primes(30, 40) == [31, 37]\", \"assert get_primes(50, 60) == [53, 59]\", \"assert get_primes(1, 1) == []\", \"asse...
{ "split": "train", "index": 71537, "acecode_id": "evol_17262", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of integers, implement a function `reorder_descendant(array)` that rearranges the array in decreasing order without modifying the original array. The function should return a new array containing the elements of the original array sorted in descending order. You ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reorder_descendant([21, 12, 8, 36, 33]) == [36, 33, 21, 12, 8]\", \"assert reorder_descendant([5, 3, 8, 1, 2]) == [8, 5, 3, 2, 1]\", \"assert reorder_descendant([10]) == [10]\", \"assert reorder_descendant([-1, -5, -3, -2]) == [-1, -2, -3, -5]\", \"assert re...
{ "split": "train", "index": 71538, "acecode_id": "evol_34659", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of financial transactions and calculates the total account balance. Write a Python function `calculate_account_balance(transactions: List[str]) -> str` that takes a list of transactions as input and returns th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_account_balance(['100.00 credit', '50.00 debit']) == '50.00'\", \"assert calculate_account_balance(['100.50 credit', '150.10 debit', '50.00 debit']) == '-99.60'\", \"assert calculate_account_balance(['100.75 credit', '100.75 debit']) == '0.00'\", \...
{ "split": "train", "index": 71539, "acecode_id": "oss_32576", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Create a Python function 'typeOfInteger' that takes a number as input and determines whether it is a 'normal' integer, a 'big' integer (a number that exceeds the usual bit size for integers in most programming languages), or 'not an integer'. The function should return 'Normal ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert typeOfInteger(42) == 'Normal Integer'\", \"assert typeOfInteger(2147483647) == 'Normal Integer'\", \"assert typeOfInteger(2147483648) == 'Big Integer'\", \"assert typeOfInteger(-2147483648) == 'Normal Integer'\", \"assert typeOfInteger(-2147483649) == 'Big I...
{ "split": "train", "index": 71540, "acecode_id": "evol_2582", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the heights of buildings. Your task is to implement a function `next_building_index(buildings: List[int], current_index: int) -> int` that takes in the list of building heights and the current index of a building. The function shoul...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert next_building_index([3, 1, 4, 1, 5, 9], 2) == 4\", \"assert next_building_index([1, 2, 3, 4, 5], 0) == 1\", \"assert next_building_index([5, 4, 3, 2, 1], 0) == -1\", \"assert next_building_index([1, 3, 2, 4], 1) == 3\", \"assert next_building_index([1, 2, 1,...
{ "split": "train", "index": 71541, "acecode_id": "bigcode_python_fns_12628", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that validates a provided API key against a predefined list of valid API keys. The function should take a single string parameter, `api_key`, and return the corresponding username if the API key is valid. If the API key is not found in th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert authenticate_key('key1') == 'user1'\", \"assert authenticate_key('key2') == 'user2'\", \"assert authenticate_key('key3') == 'user3'\", \"assert authenticate_key('key4') == 'user4'\", \"assert authenticate_key('key5') == 'user5'\", \"assert authenticate_key('...
{ "split": "train", "index": 71542, "acecode_id": "bigcode_python_fns_44759", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that extracts the indices of specific headers from a given dataset header string. The dataset header is a string containing tab-separated headers. You are also provided with a dictionary called `relevant_headers` where each key is a t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_header_indices('ID\\\\tName\\\\tAge\\\\tGender\\\\tSalary', {'task1': ['Name', 'Age']}, 'task1') == [1, 2]\", \"assert extract_header_indices('Product\\\\tPrice\\\\tStock\\\\tCategory', {'task2': ['Price', 'Category']}, 'task2') == [1, 3]\", \"assert...
{ "split": "train", "index": 71543, "acecode_id": "oss_9951", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that performs a translation operation on a given input array `x` using a specified translation mechanism, represented as a function `translate_func`. Your function should take the input array and return the translated array. Af...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert translate_array([1, 2, 3], lambda x: [i * 2 for i in x], [2, 4, 6]) == True\", \"assert translate_array([1, 2, 3], lambda x: [i + 1 for i in x], [2, 3, 4]) == True\", \"assert translate_array([0], lambda x: [i - 1 for i in x], [-1]) == True\", \"assert trans...
{ "split": "train", "index": 71544, "acecode_id": "oss_4336", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of valid datalogger names and a datalogger name to validate, write a function `validate_logger(lname: str, valid_names: List[str]) -> None` that checks if the provided datalogger name is in the list of valid names. If it is valid, the function should return None. I...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_logger('logger1', ['logger1', 'logger2', 'logger3']) is None\", \"assert validate_logger('logger2', ['logger1', 'logger2', 'logger3']) is None\", \"assert validate_logger('logger3', ['logger1', 'logger2', 'logger3']) is None\", \"assert validate_log...
{ "split": "train", "index": 71545, "acecode_id": "bigcode_python_fns_5907", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to extract structured data from a comment string. The structured data is represented in a JSON-like format and is enclosed within curly braces `{}`. Your function should identify and extract the first valid data island from the commen...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_first_data_island('# This is a comment with data: { \\\"name\\\": \\\"Alice\\\", \\\"age\\\": 25, \\\"city\\\": \\\"San Francisco\\\" }') == { \\\"name\\\": \\\"Alice\\\", \\\"age\\\": 25, \\\"city\\\": \\\"San Francisco\\\" }\", \"assert extract_fir...
{ "split": "train", "index": 71546, "acecode_id": "oss_22923", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a custom function `role_access_check(user_role, is_authenticated, original_submitter, resource_submitter)` that checks if a user has access to a resource based on their role and authentication status. The function should perform the following ch...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert role_access_check('admin', True, 'user1', 'user2') == 'Access granted'\", \"assert role_access_check('editor', True, 'user1', 'user1') == 'Access granted'\", \"assert role_access_check('viewer', False, 'user1', 'user2') == 'Redirect to login'\", \"assert rol...
{ "split": "train", "index": 71547, "acecode_id": "oss_17317", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function that takes a Unix timestamp as input and determines whether the year derived from this timestamp is a leap year or not. If it is a leap year, return the string 'Leap Year'; otherwise, return the string 'Not a Leap Year'. Make sure to handle any potential...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_timestamp_and_check_leap_year(1609459200) == 'Not a Leap Year'\", \"assert convert_timestamp_and_check_leap_year(1612137600) == 'Not a Leap Year'\", \"assert convert_timestamp_and_check_leap_year(1580515200) == 'Leap Year'\", \"assert convert_timesta...
{ "split": "train", "index": 71548, "acecode_id": "evol_1126", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that processes a list of strings representing profiling data. Each string has three components: a label (which can be ignored), memory usage (a float), and a timestamp (a float). Your function should extract the memory usage and timestamp ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_profiling_data(['label1 10.5 1622548800.0', 'label2 12.3 1622548860.0']) == {'data': [10.5, 12.3], 'timestamp': [1622548800.0, 1622548860.0]}\", \"assert get_profiling_data(['label1 5.0 1622548800.0', 'label2 9.0 1622548860.0', '', 'label3 7.5 1622548920...
{ "split": "train", "index": 71549, "acecode_id": "bigcode_python_fns_36084", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of lists, where each inner list represents hourly temperature readings for a day. Some readings may be `None` indicating missing data, and outliers may be present (e.g., values below -50 or above 50). Implement a function `create_heatmap(data)` that process...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_heatmap([[7, 15, None, 22], [2, 7, 23, 1000], [9, 12, 25]]) == [[7, 15, 0, 22], [2, 7, 23, 0], [9, 12, 25]]\", \"assert create_heatmap([[None, None, None], [None, -60, 100]]) == [[0, 0, 0], [0, 0, 0]]\", \"assert create_heatmap([[30, 40, 50], [51, Non...
{ "split": "train", "index": 71550, "acecode_id": "evol_28210", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function called `cocktail_sort` that takes a list of decimals and an optional boolean argument `ascending`. The function should sort the list using the cocktail sort algorithm. If `ascending` is True, sort the list in ascending order; if False, sort it in descending...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cocktail_sort([2.4, 1.7, 3.6, 5.3, 4.1]) == [1.7, 2.4, 3.6, 4.1, 5.3]\", \"assert cocktail_sort([2.4, 1.7, 3.6, 5.3, 4.1], ascending=False) == [5.3, 4.1, 3.6, 2.4, 1.7]\", \"assert cocktail_sort([1.1, 2.2, 3.3]) == [1.1, 2.2, 3.3]\", \"assert cocktail_sort([...
{ "split": "train", "index": 71551, "acecode_id": "evol_18310", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of n distinct non-empty strings, implement a function `compress_words(words: List[str]) -> List[str]` that generates compressed versions for every word according to the following rules: Begin with the first character and then the number of consecutive similar cha...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compress_words(['zzzz', 'zzzzz']) == ['z4', 'z5']\", \"assert compress_words(['quick', 'brown', 'fox']) == ['quick', 'brown', 'fox']\", \"assert compress_words(['a', 'b', 'c']) == ['a', 'b', 'c']\", \"assert compress_words(['same', 'same', 'same']) == ['same...
{ "split": "train", "index": 71552, "acecode_id": "evol_287", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the parsing of command-line options for a program. The function should accept a list of strings representing command-line arguments and return a dictionary containing the processed options. The options that should be recogn...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_options(['--no-backup']) == {'backup': False, 'verbose': False, 'debug': False, 'yes_do_it': False}\", \"assert parse_options([]) == {'backup': True, 'verbose': False, 'debug': False, 'yes_do_it': False}\", \"assert parse_options(['--verbose']) == {'ba...
{ "split": "train", "index": 71553, "acecode_id": "bigcode_python_fns_12101", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of dictionaries where each dictionary represents a geographical feature with properties including its geographic type, coordinates, and whether it is live or not. Your task is to implement a function that processes this list and returns a new list of featur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_geographical_features([{'type': 'LineString', 'geometry': {'type': 'LineString', 'coordinates': [[1, 2], [3, 4]]}, 'properties': {'operator': 'A', 'live': 1}}]) == [{'type': 'Feature', 'geometry': {'type': 'LineString', 'coordinates': [[1, 2], [3, 4]...
{ "split": "train", "index": 71554, "acecode_id": "bigcode_python_fns_31711", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Implement a function `matrixMultiply(X, Y)` that multiplies two 3x3 matrices without using any external libraries such as NumPy. The function should take two 2D lists (matrices) as input and return their product as a new 2D list. If the matrices cannot be multiplied (i.e., thei...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert matrixMultiply([[1, 0, 0], [0, 1, 0], [0, 0, 1]], [[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\", \"assert matrixMultiply([[0, 0, 0], [0, 0, 0], [0, 0, 0]], [[1, 1, 1], [1, 1, 1], [1, 1, 1]]) == [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\",...
{ "split": "train", "index": 71555, "acecode_id": "evol_25930", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are given a list of lists where each inner list contains tuples of gradients and their corresponding variables. Each gradient must correspond to the same variable across all towers. Implement a function that aggregates these gradients by either taking their sum or their mea...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert aggregate_gradients([[(1.0, 'var1'), (1.0, 'var1')], [(2.0, 'var1'), (2.0, 'var1')]], True, False) == ([(1.5, 'var1')], None)\", \"assert aggregate_gradients([[(1.0, 'var1'), (2.0, 'var2')], [(3.0, 'var1'), (4.0, 'var2')]], False, False) == ([(4.0, 'var1'), ...
{ "split": "train", "index": 71556, "acecode_id": "bigcode_python_fns_1824", "num_tests": 10 }
acecode
[ { "role": "user", "content": "Write a function `create_person` that takes three parameters: a string `name`, an integer `age`, and a string `address`. The function should return a dictionary representing a person with the provided properties. The dictionary should have the keys 'name', 'age', and 'address' ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_person('Alice', 30, '123 Main St') == {'name': 'Alice', 'age': 30, 'address': '123 Main St'}\", \"assert create_person('Bob', 25, '456 Elm St') == {'name': 'Bob', 'age': 25, 'address': '456 Elm St'}\", \"assert create_person('Charlie', 40, '789 Oak St...
{ "split": "train", "index": 71557, "acecode_id": "evol_25734", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that processes information about newly created threads in a system. The function should accept a list of thread attributes and a dictionary representing the current state of the system. The thread attributes list consists of four elements...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_thread_state(['worker', 'thread1', '5', '0x200'], {}) == {'threads': {'thread1': {'name': 'thread1', 'kind': 'worker', 'priority': 5, 'stack_size': 512, 'tid': -1, 'affinity': '??'}}}\", \"assert update_thread_state(['worker', 'rDsp123', '3', '0x100']...
{ "split": "train", "index": 71558, "acecode_id": "bigcode_python_fns_23893", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function called `extract_to_files` that takes a string `pkr_path` as input. This function simulates the extraction of data from a file specified by the `pkr_path`. The function should return a tuple containing three elements: a string representing...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_to_files('example.pkr') == ('Sample Title', ['Button1', 'Button2'], 'PNG_DATA')\", \"assert extract_to_files('test.pkr') == ('Sample Title', ['Button1', 'Button2'], 'PNG_DATA')\", \"assert extract_to_files('data.pkr') == ('Sample Title', ['Button1', ...
{ "split": "train", "index": 71559, "acecode_id": "bigcode_python_fns_9531", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of pixel coordinates represented as tuples (y, x) and a transformation function that converts pixel coordinates to world coordinates, implement a function `pix2sky(shape: tuple, pix: List[Tuple[float, float]], safe: bool = True, corner: bool = False) -> List[Tuple[...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert pix2sky((100, 100), [(0, 0), (50, 50), (99, 99)], safe=True, corner=False) == [(0.0, 0.0), (50.0, 50.0), (99.0, 99.0)]\", \"assert pix2sky((200, 200), [(10, 10), (20, 20)], safe=False, corner=True) == [(9.5, 9.5), (19.5, 19.5)]\", \"assert pix2sky((50, 50), ...
{ "split": "train", "index": 71560, "acecode_id": "bigcode_python_fns_21209", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `make_context` that generates a dictionary containing a single key-value pair. The key should be the string 'current_app' and the value should be the string 'FlaskApp'. Your function should return this dictionary. Write the function `make...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert make_context() == {'current_app': 'FlaskApp'}\", \"assert make_context() != {'current_app': 'OtherApp'}\", \"assert isinstance(make_context(), dict)\", \"assert 'current_app' in make_context()\", \"assert make_context()['current_app'] == 'FlaskApp'\", \"asse...
{ "split": "train", "index": 71561, "acecode_id": "bigcode_python_fns_7783", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing a list of processor data represented as a list of dictionaries. Each dictionary contains the following keys: 'date', 'clock', 'name', 'technology', and 'technology_id'. Your function should perform the following operations in sequence: 1. Filter o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_processor_data([{'date': '2022-01-01', 'clock': 3.2, 'name': 'Processor A', 'technology': 'Tech1', 'technology_id': 301}, {'date': '2022-01-02', 'clock': 3.5, 'name': 'Processor B', 'technology': 'Tech2', 'technology_id': 302}]) == [{'date': '2022-01...
{ "split": "train", "index": 71562, "acecode_id": "oss_17971", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates a console output for a simple logging system. The function should take a string message as input and output it to a list, simulating the behavior of a console log. Implement the function `log_message(message: str) -> List[s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert log_message('Hello World') == ['Hello World']\", \"assert log_message('Test Message') == ['Test Message']\", \"assert log_message('Hello') == ['Hello']\", \"assert log_message('Logging') == ['Logging']\", \"assert log_message('Hello World') == ['Hello World'...
{ "split": "train", "index": 71563, "acecode_id": "bigcode_python_fns_48176", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of integers and an integer, implement a function that returns the indices of the start and end of the longest contiguous sequence of the specified integer. If the integer is not found in the array, return a message indicating that the number was not found. Handle...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longest_sequence([1, 2, 3, 3, 3, 4, 5], 3) == [2, 4]\", \"assert longest_sequence([1, 1, 1, 1, 1], 1) == [0, 4]\", \"assert longest_sequence([5, 5, 6, 7, 5, 5, 5, 5], 5) == [4, 7]\", \"assert longest_sequence([1, 2, 2, 2, 3, 3, 2, 2, 2, 2], 2) == [6, 9]\", \...
{ "split": "train", "index": 71564, "acecode_id": "evol_11035", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are given a list of user attributes and a dictionary containing filtered user data. Your task is to create a function `modify_user_attributes(user_attributes: List[str], filtered_data: Dict[str, Any]) -> Dict[str, Any]` that modifies the values of the user attributes with t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert modify_user_attributes(['name', 'email', 'member'], {'name': 'John Doe', 'email': 'john@example.com', 'member': 'group1', 'distinguishedName': 'CN=John Doe'}) == {'name': 'John Doe', 'email': 'john@example.com', 'member': 'group1'}\", \"assert modify_user_at...
{ "split": "train", "index": 71565, "acecode_id": "bigcode_python_fns_46335", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of decimal numbers, write a function that sorts the numbers in descending order. The function should also handle invalid input scenarios by removing any non-numerical strings or null values before sorting. Your function should be efficient enough to handle large li...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sort_numbers([3.5, 2.1, None, 'text', 4.8, -1]) == [4.8, 3.5, 2.1, -1]\", \"assert sort_numbers(['invalid', 0, 1.5, 2.5, None]) == [2.5, 1.5, 0]\", \"assert sort_numbers([-3.0, -1.2, -5, None]) == [-1.2, -3.0, -5]\", \"assert sort_numbers([]) == []\", \"asse...
{ "split": "train", "index": 71566, "acecode_id": "evol_2548", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple file processing system that allows for applying a specific processing strategy to a given file name. The processing strategy will be represented as a function that takes a file name as input and returns a string indicating the result of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_file('example.txt', lambda x: f'Processing {x}') == 'Processing example.txt'\", \"assert process_file('test.doc', lambda x: f'File {x} processed') == 'File test.doc processed'\", \"assert process_file('report.pdf', lambda x: f'Report {x} completed') ...
{ "split": "train", "index": 71567, "acecode_id": "oss_29397", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that prints a Tic Tac Toe board to the console. The function should take a 2D list representing the board as input, where each element can be either 'X', 'O', or an empty string representing an empty cell. The function should format the b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert display_board([['X', 'O', 'X'], ['O', '', 'X'], ['', 'X', 'O']]) == None\", \"assert display_board([['', '', ''], ['', '', ''], ['', '', '']]) == None\", \"assert display_board([['X', 'X', 'X'], ['O', 'O', ''], ['', 'X', 'O']]) == None\", \"assert display_bo...
{ "split": "train", "index": 71568, "acecode_id": "bigcode_python_fns_23134", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates changing a user's password. The function should take three string inputs: 'old_password', 'new_password1', and 'new_password2'. The function should check if the 'old_password' matches a predefined password. If it does, ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert change_password('old_pass', 'new_pass', 'new_pass') == 'Your password is updated successfully!'\", \"assert change_password('old_pass', 'new_pass', 'new_pass') == 'Your password is updated successfully!'\", \"assert change_password('old_pass', 'new_pass', 'n...
{ "split": "train", "index": 71569, "acecode_id": "bigcode_python_fns_42166", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function that returns the sum of all the elements in the list. The function should handle both positive and negative integers, as well as an empty list.\nPlease reason step by step, then write a self-contained Python solution. Give your fin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert array_sum([1, 2, 3]) == 6\", \"assert array_sum([-1, -2, -3]) == -6\", \"assert array_sum([1, -1, 2, -2]) == 0\", \"assert array_sum([0, 0, 0]) == 0\", \"assert array_sum([]) == 0\", \"assert array_sum([5]) == 5\", \"assert array_sum([-5]) == -5\", \"assert ...
{ "split": "train", "index": 71570, "acecode_id": "evol_27131", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of integers and returns a new list containing only the unique integers from the original list, preserving the order of their first appearance. The function should ignore any duplicate integers. Implement the function `un...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_integers([1, 2, 3, 2, 1]) == [1, 2, 3]\", \"assert unique_integers([4, 5, 4, 6, 7]) == [4, 5, 6, 7]\", \"assert unique_integers([1, 1, 1, 1]) == [1]\", \"assert unique_integers([]) == []\", \"assert unique_integers([-1, -2, -1, -3, -2]) == [-1, -2, -3...
{ "split": "train", "index": 71571, "acecode_id": "oss_10785", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of migration operation tuples and extracts specific information from them. Each migration operation is represented as a tuple where the first element is a string indicating the type of operation (for example, ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_model_and_field([('migrations.AlterField', {'model_name': 'product', 'name': 'price'})]) == [('product', 'price')]\", \"assert extract_model_and_field([('migrations.AlterField', {'model_name': 'order', 'name': 'status'})]) == [('order', 'status')]\",...
{ "split": "train", "index": 71572, "acecode_id": "oss_27565", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an integer `ea`, return the type information associated with it. You can assume that the type information is represented as a dictionary with keys 'type_id' and 'type_description'. If the integer `ea` is even, return a dictionary with 'type_id' as `ea // 2` and 'type_desc...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_type_info(4) == {'type_id': 2, 'type_description': 'Even type'}\", \"assert get_type_info(7) == {'type_id': 3, 'type_description': 'Odd type'}\", \"assert get_type_info(-1) == None\", \"assert get_type_info(0) == {'type_id': 0, 'type_description': 'Even ...
{ "split": "train", "index": 71573, "acecode_id": "bigcode_python_fns_41471", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the precision, recall, and F1 score of a binary classification model given two lists: the actual labels and the predicted labels. The function should take two lists of integers (0s and 1s) as input and return a tuple containing three floatin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_model([1, 0, 0, 1, 1], [1, 0, 1, 0, 0]) == (0.5, 0.3333333333333333, 0.4)\", \"assert evaluate_model([1, 1, 1, 1], [1, 1, 1, 1]) == (1.0, 1.0, 1.0)\", \"assert evaluate_model([0, 0, 0, 0], [0, 0, 0, 0]) == (0.0, 0.0, 0.0)\", \"assert evaluate_model(...
{ "split": "train", "index": 71574, "acecode_id": "evol_30889", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a logging system for a software repository management tool. The system should log various actions performed on repositories, such as creating, updating, and deleting repositories. However, due to privacy concerns, the tool should skip logging th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_log_message('create', 'Repo1') == 'create repository: Repo1'\", \"assert generate_log_message('update', 'Repo2') == 'update repository: Repo2'\", \"assert generate_log_message('delete', 'Repo3') == 'Skipping delete.'\", \"assert generate_log_message...
{ "split": "train", "index": 71575, "acecode_id": "oss_22048", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with calculating the total duration of operations in a factory setting based on a predefined set of operation durations. Implement a function `calculate_total_duration(operations)` that takes a list of operations as input and returns the total duration required t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_total_duration(['lookupDB', 'wrap', 'moveRobot']) == 45\", \"assert calculate_total_duration(['wait', 'loadMachine']) == 30\", \"assert calculate_total_duration(['wrap', 'wrap', 'moveRobot']) == 50\", \"assert calculate_total_duration(['lookupDB', ...
{ "split": "train", "index": 71576, "acecode_id": "oss_15979", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function that converts a given time from 24-hour format (HH:MM) to 12-hour format (HH:MM AM/PM). The input time will be a string in the format 'HH:MM', where HH is between 00 and 23, and MM is between 00 and 59. Your function should return the converted time as a string...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_time('00:00') == '12:00 AM'\", \"assert convert_time('01:00') == '01:00 AM'\", \"assert convert_time('12:00') == '12:00 PM'\", \"assert convert_time('13:00') == '01:00 PM'\", \"assert convert_time('15:30') == '03:30 PM'\", \"assert convert_time('18:4...
{ "split": "train", "index": 71577, "acecode_id": "evol_28117", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string `text` that contains HTML content, implement a function `remove_html_tags(text: str, which_ones: tuple = (), keep: tuple = None) -> str` that removes HTML tags based on the following rules: \n\n- If `which_ones` is not empty, remove all tags specified in `which_o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_html_tags('<div><p><b>This is a link:</b> <a href=\\\"http://www.example.com\\\">example</a></p></div>') == 'This is a link: example'\", \"assert remove_html_tags('<div><p><b>This is a link:</b> <a href=\\\"http://www.example.com\\\">example</a></p></...
{ "split": "train", "index": 71578, "acecode_id": "bigcode_python_fns_1", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with creating a registration system that associates various system components with their corresponding strategies. Implement a function `register_and_get_strategy(operations)` where `operations` is a list of tuples. Each tuple contains a string representing the c...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert register_and_get_strategy([('cacher', 'CacheStrategy'), ('driller_core', 'DrillerStrategy'), ('loop_seer', 'LoopStrategy')]) == ['CacheStrategy', 'DrillerStrategy', 'LoopStrategy']\", \"assert register_and_get_strategy([('explorer', 'ExplorerStrategy')]) == ...
{ "split": "train", "index": 71579, "acecode_id": "oss_1593", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that simulates a simple TCP echo server using the `selectors` module. Your function should be named `create_echo_server` and accept a single argument, `port`, which is an integer representing the port number on which the server...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_echo_server(8080)('stop') is None\", \"assert create_echo_server(9090)('stop') is None\", \"assert create_echo_server(5000)('stop') is None\", \"assert create_echo_server(6000)('stop') is None\", \"assert create_echo_server(7000)('stop') is None\", \"...
{ "split": "train", "index": 71580, "acecode_id": "oss_9110", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that updates the position of an actor in a 2D game environment. The actor's position is represented by its X and Y coordinates. The function should take the current position of the actor and new coordinates, then return the updated po...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_position(0, 0, 5, 5) == (5, 5)\", \"assert update_position(10, 10, 20, 20) == (20, 20)\", \"assert update_position(-1, -1, 0, 0) == (0, 0)\", \"assert update_position(5, 5, 5, 5) == (5, 5)\", \"assert update_position(100, 200, 150, 250) == (150, 250)\...
{ "split": "train", "index": 71581, "acecode_id": "oss_9255", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a logging utility that enhances the functionality of a standard logger by adding extra context and a specific key. Your goal is to implement a function `custom_log(logger, extra, key, level, message)` that takes the following parameters: \n\n- `logg...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert custom_log(logging.getLogger('test_logger'), {'user_id': 123}, 'custom_key', logging.INFO, 'Test message') is None\", \"assert custom_log(logging.getLogger('test_logger'), {'session_id': 'abc'}, 'session_key', logging.DEBUG, 'Debugging info') is None\", \"as...
{ "split": "train", "index": 71582, "acecode_id": "oss_24785", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that modifies an existing function by updating its global variables to point to a new module. The input to your function will be two parameters: 'old_func' which is a reference to the original function, and 'updated_module' which is a mod...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert copy_function(lambda x: x + 1, updated_module).__module__ == 'updated_module'\", \"assert copy_function(lambda x: x + 1, updated_module).__code__.co_varnames == ('x',)\", \"assert copy_function(lambda x: x + 1, updated_module)(5) == 6\", \"assert copy_functi...
{ "split": "train", "index": 71583, "acecode_id": "bigcode_python_fns_2749", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Implement a function `calculate_physical_address(segment: int, offset: int) -> int` that calculates the physical address in a 16-bit Intel 8086 processor given the segment and offset registers. The physical address is calculated using the formula: physical_address = (segment <<...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_physical_address(0, 0) == 0\", \"assert calculate_physical_address(1, 15) == 16 + 15\", \"assert calculate_physical_address(65535, 0) == 65535 << 4\", \"assert calculate_physical_address(0, 65535) == 65535\", \"assert calculate_physical_address(327...
{ "split": "train", "index": 71584, "acecode_id": "evol_1703", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks the operational status of a network port based on its link status. The function should accept two parameters: a boolean `link_status_up` which indicates whether the link is active or not, and a string `port_id` which is th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_port_status(True, 'port1') == 'ACTIVE'\", \"assert check_port_status(False, 'port1') == 'DOWN'\", \"assert check_port_status(True, 'port2') == 'ACTIVE'\", \"assert check_port_status(False, 'port2') == 'DOWN'\", \"assert check_port_status(True, 'port3')...
{ "split": "train", "index": 71585, "acecode_id": "bigcode_python_fns_21769", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `roll_heptagon_dice()` that simulates rolling a seven-sided die. Each face of the die is numbered from 1 to 7. The function should return a random integer representing the result of the roll.\nPlease reason step by step, then write a self-contained Python s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert 1 <= roll_heptagon_dice() <= 7\", \"assert 1 <= roll_heptagon_dice() <= 7\", \"assert 1 <= roll_heptagon_dice() <= 7\", \"assert 1 <= roll_heptagon_dice() <= 7\", \"assert 1 <= roll_heptagon_dice() <= 7\", \"assert 1 <= roll_heptagon_dice() <= 7\", \"assert ...
{ "split": "train", "index": 71586, "acecode_id": "evol_14946", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `get_blog_titles(blog_posts: List[Dict[str, Any]]) -> List[str]` that takes a list of blog post dictionaries and returns a list of titles of the blog posts. Each blog post dictionary contains keys 'title' and 'content'.\nPlease reason step by step, then wri...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_blog_titles([{'title': 'First Post', 'content': 'This is the content of the first post.'}, {'title': 'Second Post', 'content': 'This is the content of the second post.'}]) == ['First Post', 'Second Post']\", \"assert get_blog_titles([{'title': 'Only Post...
{ "split": "train", "index": 71587, "acecode_id": "evol_15082", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an integer year, write a function called `is_leap_year(year)` that determines if the given year is a leap year. A leap year is defined as a year that is evenly divisible by 4, except for end-of-century years, which must be divisible by 400 to be considered a leap year. Yo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_leap_year(2000) == True\", \"assert is_leap_year(1900) == False\", \"assert is_leap_year(2024) == True\", \"assert is_leap_year(2021) == False\", \"assert is_leap_year(2004) == True\", \"assert is_leap_year(2100) == False\", \"assert is_leap_year(1600) ==...
{ "split": "train", "index": 71588, "acecode_id": "oss_20779", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a configuration dictionary that defines a tracking system for components and cards in a home automation system. The configuration will have a key `track` that can either be `None`, `['cards']`, `['components']`, or `['cards', 'components']`. Implement a function `...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert setup_tracking({'track': None}) == ['check_all', 'update_all', 'upgrade_single_card', 'upgrade_single_component']\", \"assert setup_tracking({'track': ['cards']}) == ['check_all', 'update_all', 'upgrade_single_card']\", \"assert setup_tracking({'track': ['ca...
{ "split": "train", "index": 71589, "acecode_id": "bigcode_python_fns_25454", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given an integer `points`, write a function `update_points` that takes `points` as input and returns a string representation of the maximum points. The function should ensure that the points are always non-negative. If the input is negative, return '0'.\nPlease reason step by s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_points(10) == '10'\", \"assert update_points(0) == '0'\", \"assert update_points(-5) == '0'\", \"assert update_points(100) == '100'\", \"assert update_points(50) == '50'\", \"assert update_points(-1) == '0'\", \"assert update_points(25) == '25'\", \"a...
{ "split": "train", "index": 71590, "acecode_id": "bigcode_python_fns_31041", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the number of training iterations required for different stages of a machine learning model. Your task is to implement a function `total_training_iterations(iterations: List[int]) -> int` that calculates the total number of training...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert total_training_iterations([10, 20, 30]) == 60\", \"assert total_training_iterations([0, 0, 0]) == 0\", \"assert total_training_iterations([100, 200, 300, 400]) == 1000\", \"assert total_training_iterations([1, 1, 1, 1, 1]) == 5\", \"assert total_training_ite...
{ "split": "train", "index": 71591, "acecode_id": "bigcode_python_fns_22961", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to manage ticket purchases for a movie theater. Your function should take details of a movie ticket and return a message indicating whether the ticket details were successfully processed. Implement a function named `process_ticket` th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_ticket('Inception', '19:00', 'A1') == 'Ticket for Inception at 19:00 in seat A1 has been processed successfully.'\", \"assert process_ticket('Titanic', '21:30', 'B5') == 'Ticket for Titanic at 21:30 in seat B5 has been processed successfully.'\", \"a...
{ "split": "train", "index": 71592, "acecode_id": "oss_12883", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an array of positive integers, implement a function that returns a sorted list of unique elements that have even digit sums and do not occur more than once in the input list. The final output list must be arranged in ascending order.\nPlease reason step by step, then writ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_even_digit_sum_elements([21, 22, 23, 24, 25]) == [22, 24]\", \"assert unique_even_digit_sum_elements([0, 2, 4, 6, 8]) == [0, 2, 4, 6, 8]\", \"assert unique_even_digit_sum_elements([27, 28, 29]) == [28]\", \"assert unique_even_digit_sum_elements([111, ...
{ "split": "train", "index": 71593, "acecode_id": "evol_18577", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a string `text` which may contain various characters. Your task is to implement a function `filter_string(text: str) -> str` that removes the first character of the string if it is not an alphabetic character and is not one of the following special characters: '/'...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_string('123abc') == '23abc'\", \"assert filter_string('@hello') == '@hello'\", \"assert filter_string('!world') == '!world'\", \"assert filter_string('#Python') == '#Python'\", \"assert filter_string('abc') == 'abc'\", \"assert filter_string('') == ''...
{ "split": "train", "index": 71594, "acecode_id": "bigcode_python_fns_19959", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of strings representing arguments, and a string representing an action, generate a set of constraints based on the action type. If the action is 'ButtonPressed', the first argument should correspond to a button constraint with ID 'done'. If the action is anything e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_constraints(['button1'], 'ButtonPressed') == frozenset({('id', 'button1', 'done')})\", \"assert generate_constraints(['input1', 'value1'], 'OtherAction') == frozenset({('contentEditable', 'input1', True), ('value', 'value1', '?foa1'), ('is_not_empty...
{ "split": "train", "index": 71595, "acecode_id": "bigcode_python_fns_2038", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that generates an output file name based on a given source name. The function should take the source name as an argument and return the corresponding output file name based on the following mapping rules:\n\n- If the source name is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_output_file_name('tmk_cnt') == 'players_contract'\", \"assert generate_output_file_name('tmk_psm') == 'players_performance'\", \"assert generate_output_file_name('unknown_name') == 'unknown_source'\", \"assert generate_output_file_name('tmk_cnt') ==...
{ "split": "train", "index": 71596, "acecode_id": "oss_32348", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers representing node values in a binary tree, implement a function that returns the node with the smallest even value using pre-order tree traversal. In the case of a tie (multiple nodes with the same smallest even value), return the node that was visited ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_smallest_even_node([4, 2, 3, 2]) == [2]\", \"assert find_smallest_even_node([1, 3, 5, 7]) == []\", \"assert find_smallest_even_node([]) == []\", \"assert find_smallest_even_node([10, 20, 30, 40]) == [10]\", \"assert find_smallest_even_node([1, 2, 4, 2])...
{ "split": "train", "index": 71597, "acecode_id": "evol_1690", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of segments represented by their start and end points. Each segment is defined as a pair of integers [start, end] where start <= end. Your task is to implement a function that merges all intersecting segments and returns a list of merged segments. Intersect...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_intersecting_segments([[1, 3], [2, 4], [5, 7], [6, 8]]) == [[1, 4], [5, 8]]\", \"assert merge_intersecting_segments([[1, 2], [2, 3], [3, 4]]) == [[1, 4]]\", \"assert merge_intersecting_segments([[1, 5], [2, 3], [4, 6]]) == [[1, 6]]\", \"assert merge_in...
{ "split": "train", "index": 71598, "acecode_id": "bigcode_python_fns_150", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a color gradient representation based on a range of values. Write a function `generate_color_gradient(min_value: float, max_value: float, num_steps: int) -> List[str]` that generates a list of hex color codes representing a color gradient from blue ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_color_gradient(1, 5, 3) == ['#0000FF', '#7F007F', '#FF0000']\", \"assert generate_color_gradient(0, 1, 1) == ['#0000FF']\", \"assert generate_color_gradient(0, 1, 0) == []\", \"assert generate_color_gradient(-10, 10, 2) == ['#0000FF', '#FF0000']\", ...
{ "split": "train", "index": 71599, "acecode_id": "bigcode_python_fns_47660", "num_tests": 10 }