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 a string containing a filename, implement a function `load_fixture(filename: str) -> str` that simulates loading the content of a file from a predetermined directory called 'fixtures'. The function should return the content of the file as a string. You can assume that the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert load_fixture('example.txt') == 'This is an example file.'\", \"assert load_fixture('data.txt') == 'Data file content here.'\", \"assert load_fixture('config.txt') == 'Configuration settings.'\", \"assert load_fixture('nonexistent.txt') == 'File not found.'\"...
{ "split": "train", "index": 71900, "acecode_id": "bigcode_python_fns_43250", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of commands, each represented as a string. Your task is to implement a function `execute_commands(commands: List[str]) -> List[str]` that processes the commands and returns a list of their outputs. The commands are as follows: \n1. 'hash': Return the string...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert execute_commands(['hash']) == ['hash command executed']\", \"assert execute_commands(['install']) == ['install command executed']\", \"assert execute_commands(['port']) == ['port command executed']\", \"assert execute_commands(['hash', 'install', 'port']) ==...
{ "split": "train", "index": 71901, "acecode_id": "bigcode_python_fns_36646", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `move_boat(x: int, y: int, speed: int, direction: int, time: int) -> List[int]` that calculates the new coordinates of a boat after moving for a specified amount of time. The boat starts at coordinates (x, y), moves with a given speed (in units per time), a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert move_boat(0, 0, 10, 0, 1) == [10, 0]\", \"assert move_boat(1, 1, 5, 90, 2) == [1, 11]\", \"assert move_boat(5, 5, 10, 180, 1) == [-5, 5]\", \"assert move_boat(3, 3, 10, 270, 3) == [3, -27]\", \"assert move_boat(0, 0, 7, 360, 2) == [14, 0]\", \"assert move_bo...
{ "split": "train", "index": 71902, "acecode_id": "evol_5269", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given a positive integer n, implement a function that returns a list of tuples. Each tuple should contain a divisor of n and a boolean indicating whether the divisor is a prime number. The list should be sorted in ascending order of the divisors. For example, if n is 100, the o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_divisors_with_prime_check(1) == [(1, False)]\", \"assert find_divisors_with_prime_check(2) == [(1, False), (2, True)]\", \"assert find_divisors_with_prime_check(3) == [(1, False), (3, True)]\", \"assert find_divisors_with_prime_check(4) == [(1, False), ...
{ "split": "train", "index": 71903, "acecode_id": "evol_1103", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `is_regex(obj)` that checks if the given object is a regular expression pattern. A regular expression pattern is defined as an object that has both a 'match' method and a 'pattern' attribute. The function should return True if the object meets these criteria, a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_regex('not a regex') == False\", \"assert is_regex(123) == False\", \"assert is_regex(None) == False\", \"assert is_regex({'key': 'value'}) == False\", \"assert is_regex(lambda x: x) == False\", \"assert is_regex(object()) == False\", \"assert is_regex('r...
{ "split": "train", "index": 71904, "acecode_id": "bigcode_python_fns_14455", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a string S, write a function that returns the length of the longest palindromic subsequence in S. A palindromic subsequence is a sequence that appears in the same order forward and backward. You must implement a function named `longest_palindromic_subsequence(S: str) -> i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longest_palindromic_subsequence('babad') == 3\", \"assert longest_palindromic_subsequence('cbbd') == 2\", \"assert longest_palindromic_subsequence('a') == 1\", \"assert longest_palindromic_subsequence('ab') == 1\", \"assert longest_palindromic_subsequence('r...
{ "split": "train", "index": 71905, "acecode_id": "bigcode_python_fns_41534", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Given two strings str1 and str2, implement a function to find the number of longest common subsequences between the two strings. The length of the strings will not exceed 1000 characters.\nPlease reason step by step, then write a self-contained Python solution. Give your final ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert lcs_count('AGGTAB', 'GXTXAYB') == 2\", \"assert lcs_count('ABC', 'AC') == 1\", \"assert lcs_count('ABC', 'ABC') == 1\", \"assert lcs_count('A', 'A') == 1\", \"assert lcs_count('AGGTAB', 'GXTXAYB') == 2\", \"assert lcs_count('abcdef', 'abcdef') == 1\", \"asse...
{ "split": "train", "index": 71906, "acecode_id": "evol_32833", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Create a function `convert_grade(number, F=60, D=70, C=80, B=90, A=100)` that converts a numeric evaluation range between 1 and 100 into their corresponding alphabetic grading representation based on customizable grade cut-offs. If the input number is out of range (less than 0 ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert(convert_grade(100) == 'A')\", \"assert(convert_grade(120) == 'Error: input out of range')\", \"assert(convert_grade(10) == 'F')\", \"assert(convert_grade(50) == 'F')\", \"assert(convert_grade(70) == 'D')\", \"assert(convert_grade(80) == 'C')\", \"assert(conv...
{ "split": "train", "index": 71907, "acecode_id": "evol_26759", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Implement a function `median(lst)` that returns the median of a list of numbers. The input list can contain both integers and floating-point numbers. If the list has an odd number of elements, the median is the middle element. If the list has an even number of elements, the med...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert median([1, 2, 3]) == 2\", \"assert median([1, 3]) == 2.0\", \"assert median([1, 2, 3, 4]) == 2.5\", \"assert median([5, 3, 1, 4, 2]) == 3\", \"assert median([1]) == 1\", \"assert median([]) == None\", \"assert median([1, 2, 3, 4, 5, 6]) == 3.5\", \"assert me...
{ "split": "train", "index": 71908, "acecode_id": "evol_3763", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a string representation of a 'Standin' file with specified attributes. The function should take a variable number of keyword arguments representing the attributes of the Standin file. Each attribute should be formatted as '...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert export_standin() == ''\", \"assert export_standin(name='John Doe') == 'name: John Doe'\", \"assert export_standin(age=30) == 'age: 30'\", \"assert export_standin(name='Jane Doe', age=25) == 'name: Jane Doe, age: 25'\", \"assert export_standin(city='New York'...
{ "split": "train", "index": 71909, "acecode_id": "bigcode_python_fns_43328", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a dictionary representing a link with potential history data, implement a function that merges this link with an existing link dictionary parsed from a specified directory. The function should ensure that the merged link retains all existing history data while updating an...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_links({'url': 'http://example.com', 'history': {'date': '2023-01-01', 'event': 'visited'}}, {'url': 'http://example.com', 'history': {'date': '2023-01-02', 'event': 'updated'}}) == {'url': 'http://example.com', 'history': {'date': '2023-01-02', 'event'...
{ "split": "train", "index": 71910, "acecode_id": "bigcode_python_fns_43262", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are given a string representing a license field in an ebuild file. The license field may contain various license types separated by whitespace, but it should not include any commas or semicolons. Your task is to implement a function that takes this string as input and retur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_license_field('GPL MIT') == ['GPL', 'MIT']\", \"assert parse_license_field('Apache 2.0') == ['Apache', '2.0']\", \"assert parse_license_field('AGPL LGPL') == ['AGPL', 'LGPL']\", \"assert parse_license_field('Creative Commons') == ['Creative', 'Commons'...
{ "split": "train", "index": 71911, "acecode_id": "bigcode_python_fns_43261", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with generating Python version classifiers based on package requirements provided in a list. Each element of the list represents a package requirement in the format 'package_name==version', 'package_name>=version', or 'package_name<=version'. Your task is to extr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_classifiers(['package1==1.0.0', 'package2==2.3.1']) == ['Programming Language :: Python :: 1.0', 'Programming Language :: Python :: 2.3']\", \"assert generate_classifiers(['package3>=3.6.0', 'package4<=3.6.2']) == ['Programming Language :: Python ::...
{ "split": "train", "index": 71912, "acecode_id": "oss_29836", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that performs a fused multiply-add operation on three floating-point numbers. The function should take three parameters: two multiplicands `x` and `y`, and an addend `z`. It should compute the result of the operation `x * y + z` and r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert fused_multiply_add(1.0, 2.0, 3.0) == 5.0\", \"assert fused_multiply_add(0.0, 3.0, 5.0) == 5.0\", \"assert fused_multiply_add(1.5, 4.0, 2.5) == 8.5\", \"assert fused_multiply_add(-1.0, 5.0, 2.0) == -3.0\", \"assert fused_multiply_add(3.0, 2.0, 1.0) == 7.0\", ...
{ "split": "train", "index": 71913, "acecode_id": "bigcode_python_fns_43039", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates sending a push notification to a Windows Phone device using the MPNS (Microsoft Push Notification Service) protocol. Your function should take two parameters: a string `connection_alias` which indicates the environment ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_mpns_url('production', 'https://push.services.microsoft.com/device/uri') == 'https://mpns.windowsphone.com/production/notifications'\", \"assert get_mpns_url('sandbox', 'https://push.services.microsoft.com/device/uri') == 'https://mpns.windowsphone.com/s...
{ "split": "train", "index": 71914, "acecode_id": "oss_25198", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are given a list of layers in a machine learning model, represented as a list of boolean values, where `True` indicates that a layer is trainable and `False` indicates that it is not. Your task is to implement a function `set_layers_to_non_trainable(layers: List[bool], indi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert set_layers_to_non_trainable([True, True, True, True], [0, 2]) == [False, True, False, True]\", \"assert set_layers_to_non_trainable([True, False, True], [1]) == [True, False, True]\", \"assert set_layers_to_non_trainable([False, False, True, True], [0, 3]) =...
{ "split": "train", "index": 71915, "acecode_id": "bigcode_python_fns_12337", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a string as input and returns the string with its characters in reverse order. For example, if the input string is 'Hello World!', the output should be '!dlroW olleH'.\nPlease reason step by step, then write a self-contained Python solution. Give...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_string('Hello World!') == '!dlroW olleH'\", \"assert reverse_string('Python') == 'nohtyP'\", \"assert reverse_string('') == ''\", \"assert reverse_string('A') == 'A'\", \"assert reverse_string('12345') == '54321'\", \"assert reverse_string('abcdefg')...
{ "split": "train", "index": 71916, "acecode_id": "evol_24209", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes two lists of integers, list1 and list2, and returns a tuple containing four lists. The first list should contain the intersection of the two lists, including duplicates. The second list should contain the squares of the elements in the intersecti...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert intersection([3, 3, 6, 9, 12], [2, 4, 3, 3, 5, 6, 8, 9]) == ([3, 3, 6, 9], [9, 9, 36, 81], [12], [2, 4, 5, 8])\", \"assert intersection([1, 2, 3, 4], [3, 4, 5, 6]) == ([3, 4], [9, 16], [1, 2], [5, 6])\", \"assert intersection([], [1, 2, 3]) == ([], [], [], [...
{ "split": "train", "index": 71917, "acecode_id": "evol_13129", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Given a date string, implement a function `match_date(date)` that checks if the date matches common date formats. The formats include dd/mm/yyyy, dd-mm-yyyy, yyyy/mm/dd, yyyy-mm-dd, d/m/yyyy, and d-m-yyyy, where both the day and month can be either one or two digits. The functi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert match_date('1/1/2020') == True\", \"assert match_date('12-05-2021') == True\", \"assert match_date('01-01-2020') == True\", \"assert match_date('5-5-2020') == True\", \"assert match_date('15-04-2021') == True\", \"assert match_date('1/12/2022') == True\", \"...
{ "split": "train", "index": 71918, "acecode_id": "evol_8587", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `generate_summary(numbers: List[int]) -> str` that generates a summary string containing the count of positive numbers, count of negative numbers, and the count of zeros in the list. The summary string should be formatted as 'Positive:...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_summary([1, 2, 3, -1, -2, 0]) == 'Positive: 3, Negative: 2, Zero: 1'\", \"assert generate_summary([-1, -2, -3]) == 'Positive: 0, Negative: 3, Zero: 0'\", \"assert generate_summary([0, 0, 0]) == 'Positive: 0, Negative: 0, Zero: 3'\", \"assert generat...
{ "split": "train", "index": 71919, "acecode_id": "bigcode_python_fns_32362", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string representing a configuration file for a bioinformatics pipeline. The configuration string contains lines that define individual steps in the pipeline using a specific format. Each line follows the format `D.step('step_name', outfile='output_file', propnam...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_pipeline_config(\\\"D.step('step1', outfile='output1.csv', propname='property1', delay=False)\\\\nD.step('step2', outfile=None, propname='property2', delay=True)\\\\nD.step('step3', outfile='output3.csv', propname=None, delay=False)\\\") == {'step1': {...
{ "split": "train", "index": 71920, "acecode_id": "oss_23885", "num_tests": 11 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string represents a line of text. Your task is to create a function that processes these lines and returns a dictionary. The keys of the dictionary should be the first word of each line, and the values should be lists containing the r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_lines(['apple banana orange', 'cat dog', 'elephant giraffe zebra']) == {'apple': ['banana', 'orange'], 'cat': ['dog'], 'elephant': ['giraffe', 'zebra']}\", \"assert process_lines(['']) == {}\", \"assert process_lines(['singleword', 'another single wo...
{ "split": "train", "index": 71921, "acecode_id": "bigcode_python_fns_6657", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a list of dictionaries representing students, where each dictionary contains the keys 'id', 'uuid', and 'first_name', write a function that takes a specific student's identifier and returns a new dictionary with the student's information. If the student's 'uuid' is None, ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_student_info([{'id': 'stu1', 'uuid': '123', 'first_name': 'Buffy'}, {'id': 'stu2', 'uuid': None, 'first_name': 'Willow'}], 'stu2') == {'id': 'stu2', 'uuid': 'NULL', 'first_name': 'Willow'}\", \"assert get_student_info([{'id': 'stu1', 'uuid': '123', 'firs...
{ "split": "train", "index": 71922, "acecode_id": "bigcode_python_fns_21658", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that simulates the launching of processes on multiple remote nodes. Write a function `launch_processes` that takes the following parameters: \n- `nodes` (a list of strings representing the names of the nodes), \n- `jobs_per_node` (an in...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert launch_processes(['node1', 'node2'], 3, 'run_job') == ['Execute run_job on node1 with 3 jobs', 'Execute run_job on node2 with 3 jobs']\", \"assert launch_processes(['nodeA', 'nodeB', 'nodeC'], 5, 'start_process') == ['Execute start_process on nodeA with 5 jo...
{ "split": "train", "index": 71923, "acecode_id": "bigcode_python_fns_41278", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `is_python_version_newer_than_3_6()` that checks if the current Python version is newer than 3.6. The function should return `True` if the version is newer than 3.6, otherwise it should return `False`. You may assume that the function will be called in an envir...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_python_version_newer_than_3_6() == True\", \"assert is_python_version_newer_than_3_6() == True\", \"assert is_python_version_newer_than_3_6() == True\", \"assert is_python_version_newer_than_3_6() == True\", \"assert is_python_version_newer_than_3_6() == ...
{ "split": "train", "index": 71924, "acecode_id": "bigcode_python_fns_10829", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a user's input string and detects the emotion conveyed in the input. Based on the detected emotion, the function should recommend a suitable course. The function should return the recommended course. The following emotions ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert recommend_course_based_on_emotion('I am feeling very happy today!') == 'Introduction to Positive Psychology'\", \"assert recommend_course_based_on_emotion('I feel sad and down') == 'Coping with Depression'\", \"assert recommend_course_based_on_emotion('I am ...
{ "split": "train", "index": 71925, "acecode_id": "oss_15047", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a non-negative integer n, write a function to find the largest digit in the integer. The function should only return the largest digit found in the integer. For example, if the input is 12345, the output should be 5. If the input is 1001, the output should be 1. You may a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_largest_digit(0) == 0\", \"assert find_largest_digit(1) == 1\", \"assert find_largest_digit(10) == 1\", \"assert find_largest_digit(25) == 5\", \"assert find_largest_digit(999) == 9\", \"assert find_largest_digit(123456789) == 9\", \"assert find_largest...
{ "split": "train", "index": 71926, "acecode_id": "bigcode_python_fns_45142", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a mixed list that can contain strings, integers, floating point numbers, and nested sublists at any level, implement a function that counts the number of unique elements in the list. The function should be able to handle duplicate values and should treat elements of diffe...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_unique_elements([1, 2, 3, 4, 5]) == 5\", \"assert count_unique_elements(['a', 'b', 'a', 'c', ['a', 'b', ['c', 'd']]]) == 4\", \"assert count_unique_elements([]) == 0\", \"assert count_unique_elements([[1, 2], [2, 3], [3, 4]]) == 4\", \"assert count_uni...
{ "split": "train", "index": 71927, "acecode_id": "evol_4346", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that parses command-line arguments for a simple application. The function should accept a list of strings representing command-line arguments and return a dictionary containing the parsed arguments. The accepted arguments are: \n\n1. An o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_args(['-d']) == {'loglevel': 'DEBUG', 'version': 2, 'config_file': 'ladim2.yaml'}\", \"assert parse_args(['-s']) == {'loglevel': 'WARNING', 'version': 2, 'config_file': 'ladim2.yaml'}\", \"assert parse_args(['--debug']) == {'loglevel': 'DEBUG', 'versio...
{ "split": "train", "index": 71928, "acecode_id": "bigcode_python_fns_8906", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that calculates the median price of a list of sold items represented as a list of dictionaries. Each dictionary contains two keys: 'price' (a float representing the cost of the item) and 'category' (a string representing the category of t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert median_price([]) is None\", \"assert median_price([{'price': 10.0, 'category': 'A'}]) == 10.0\", \"assert median_price([{'price': 10.0, 'category': 'A'}, {'price': 20.0, 'category': 'B'}]) == 15.0\", \"assert median_price([{'price': 10.0, 'category': 'A'}, {...
{ "split": "train", "index": 71929, "acecode_id": "evol_28467", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given the roots of two binary trees, return true if the leaf value sequence of both trees is the same. The leaf value sequence is the list of values of the leaf nodes collected from left to right. Implement a function `leafSimilar(root1: TreeNode, root2: TreeNode) -> bool` to d...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert leafSimilar(root1, root2) == True\", \"assert leafSimilar(root1, root2) == True\", \"assert leafSimilar(root1, root2) == True\", \"assert leafSimilar(root1, root2) == True\", \"assert leafSimilar(root1, root2) == True\", \"assert leafSimilar(root1, root2) ==...
{ "split": "train", "index": 71930, "acecode_id": "evol_15574", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given two strings s and t, implement a function that returns the length of the longest common subsequence between the two strings. A subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining element...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longestCommonSubsequence('abcde', 'acfgh') == 2\", \"assert longestCommonSubsequence('abc', 'abc') == 3\", \"assert longestCommonSubsequence('abc', 'def') == 0\", \"assert longestCommonSubsequence('', 'abc') == 0\", \"assert longestCommonSubsequence('abc', '...
{ "split": "train", "index": 71931, "acecode_id": "evol_26471", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that accepts a positive integer no greater than 1000 and returns a list of its unique prime factors in ascending order. For example, given the input 28, the output should be [2, 7].\nPlease reason step by step, then write a self-contained Python solution. G...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prime_factors(17) == [17]\", \"assert prime_factors(28) == [2, 7]\", \"assert prime_factors(30) == [2, 3, 5]\", \"assert prime_factors(1) == []\", \"assert prime_factors(63) == [3, 7]\", \"assert prime_factors(91) == [7, 13]\", \"assert prime_factors(97) == ...
{ "split": "train", "index": 71932, "acecode_id": "evol_6734", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a floating-point number `fbest` representing the value of a function at a certain point, and a list `stop` containing three elements: `stop[0]` (a relative error tolerance), `stop[1]` (a known global minimum function value), and `stop[2]` (a threshold for when the absolut...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_tolerance(0.11, [0.01, 0.0, 0.0001]) == 1\", \"assert check_tolerance(0.03, [0.02, 0.01, 0.0005]) == 1\", \"assert check_tolerance(0.001, [0.1, 0.01, 0.0001]) == 0\", \"assert check_tolerance(0.2, [0.1, 0.01, 0.0001]) == 1\", \"assert check_tolerance(0...
{ "split": "train", "index": 71933, "acecode_id": "bigcode_python_fns_15097", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are given a configuration dictionary for a Google Analytics tap, which contains various settings for data collection. Your task is to implement a function that takes in this configuration dictionary and returns the number of valid settings present in the configuration. A va...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_valid_settings(None) == 0\", \"assert count_valid_settings({}) == 0\", \"assert count_valid_settings({'setting1': '', 'setting2': 'value2'}) == 1\", \"assert count_valid_settings({'setting1': 'value1', 'setting2': 'value2'}) == 2\", \"assert count_vali...
{ "split": "train", "index": 71934, "acecode_id": "bigcode_python_fns_12107", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary of keyword arguments that are used to configure a message unpacking process. Your task is to implement a function `sanitize_msgpack_unpack_kwargs` that takes in a dictionary of keyword arguments and returns a sanitized version of this dictionary based...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sanitize_msgpack_unpack_kwargs({'strict_map_key': True, 'use_bin_type': True, 'encoding': 'utf-8'}) == {'strict_map_key': False, 'use_bin_type': True, 'encoding': None}\", \"assert sanitize_msgpack_unpack_kwargs({'strict_map_key': False, 'use_bin_type': Fals...
{ "split": "train", "index": 71935, "acecode_id": "bigcode_python_fns_40426", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a Python function called `construct_url` that takes two parameters: `base_url` (string) and `path` (string). The function should return the complete URL by concatenating the base URL and the path, ensuring that there are no duplicate slashes ('/') between them. If the `ba...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert construct_url('https://www.example.com', 'api/v1/users') == 'https://www.example.com/api/v1/users'\", \"assert construct_url('https://www.example.com/', 'api/v1/users') == 'https://www.example.com/api/v1/users'\", \"assert construct_url('https://www.example....
{ "split": "train", "index": 71936, "acecode_id": "oss_6385", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that processes a list of integers. The function should take an input list and return a new list that contains only the unique elements from the input list, maintaining the order in which they first appeared. The input list may ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert removeDuplicates([1, 2, 2, 3, 4, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert removeDuplicates([1, 1, 1, 1, 1]) == [1]\", \"assert removeDuplicates([3, 3, 3, 3]) == [3]\", \"assert removeDuplicates([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert removeDuplicates([]...
{ "split": "train", "index": 71937, "acecode_id": "oss_31023", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a simple authentication system. Write a function `is_authenticated(user_id: int) -> str` that checks if a user is authenticated based on their user ID. If the user ID is even, return 'Authenticated', otherwise return 'Not Authenticated'.\nPlease rea...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_authenticated(2) == 'Authenticated'\", \"assert is_authenticated(4) == 'Authenticated'\", \"assert is_authenticated(6) == 'Authenticated'\", \"assert is_authenticated(1) == 'Not Authenticated'\", \"assert is_authenticated(3) == 'Not Authenticated'\", \"as...
{ "split": "train", "index": 71938, "acecode_id": "bigcode_python_fns_14313", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an integer number, write a function that determines whether the number is a palindrome. A palindrome is a number that remains the same when its digits are reversed. The function should return a string indicating if the number is a palindrome or not. \n\nFor example, for t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert palindrome(121) == 'Given Number 121 is palindrome'\", \"assert palindrome(123) == 'Given Number 123 is not palindrome'\", \"assert palindrome(0) == 'Given Number 0 is palindrome'\", \"assert palindrome(-121) == 'Given Number -121 is not palindrome'\", \"ass...
{ "split": "train", "index": 71939, "acecode_id": "bigcode_python_fns_7492", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a Python function that performs a shift operation on a list by a specified number of positions and arranges the remaining segment of the list in a specific order. The function should handle various data types, including integers, floats, strings, complex numbers, nested ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert shift_and_sort([], 2) == []\", \"assert shift_and_sort([1], 1) == [1]\", \"assert shift_and_sort([1, 2, 3], 0) == [1, 2, 3]\", \"assert shift_and_sort([1, 2, 3], 3) == [1, 2, 3]\", \"assert shift_and_sort([1, 2, 3], 5) == [1, 2, 3]\", \"assert shift_and_sort...
{ "split": "train", "index": 71940, "acecode_id": "evol_25530", "num_tests": 8 }
acecode
[ { "role": "user", "content": "You are given a list of user interactions in a co-editing application, where each interaction is represented as a tuple containing two users and the number of pages they co-edited. Your task is to implement a function that takes this list of interactions and returns a dictionar...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert build_coedit_data([('Alice', 'Bob', 3), ('Alice', 'Charlie', 5), ('Bob', 'Charlie', 2)]) == {'Alice': [('Bob', 3), ('Charlie', 5)], 'Bob': [('Charlie', 2)], 'Charlie': []}\", \"assert build_coedit_data([('User1', 'User2', 1), ('User1', 'User3', 2), ('User2',...
{ "split": "train", "index": 71941, "acecode_id": "bigcode_python_fns_44490", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing a list of numerical scores to determine the average score and identify the highest score from the given data. Write a function `process_scores(scores: List[int]) -> Tuple[float, int]` that takes a list of integers representing scores and returns a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_scores([90, 80, 70, 60, 50]) == (70.0, 90)\", \"assert process_scores([100, 90, 80]) == (90.0, 100)\", \"assert process_scores([10, 20, 30, 40, 50]) == (30.0, 50)\", \"assert process_scores([5]) == (5.0, 5)\", \"assert process_scores([]) == (0.0, 0)\...
{ "split": "train", "index": 71942, "acecode_id": "oss_17296", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a key-value store. This function should allow users to set values associated with specific keys and retrieve those values. Additionally, if a key has not been explicitly set, the function should return a default value f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert key_value_store([('set', 'key1', 10), ('get', 'key1', None)], 'default') == [10]\", \"assert key_value_store([('set', 'key2', 'value'), ('get', 'key2', None)], 'default') == ['value']\", \"assert key_value_store([('get', 'non_existing_key', None)], 'default'...
{ "split": "train", "index": 71943, "acecode_id": "oss_1271", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string representing an environment variable name. Your task is to implement a function that determines if this environment variable is considered 'enabled'. An environment variable is considered 'enabled' if its name (case insensitive) matches any of the followi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_enabled('true') == True\", \"assert is_enabled('yes') == True\", \"assert is_enabled('enabled') == True\", \"assert is_enabled('on') == True\", \"assert is_enabled('FALSE') == False\", \"assert is_enabled('off') == False\", \"assert is_enabled('disabled')...
{ "split": "train", "index": 71944, "acecode_id": "bigcode_python_fns_38436", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given an integer n representing the number of metropolises and an array of highways where each highway is represented as a list of two integers [ai, bi] indicating a two-way highway between metropolis ai and metropolis bi. Your task is to implement a function that retur...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert maxNetworkRank(4, [[0,1],[0,3],[1,2],[1,3]]) == 4\", \"assert maxNetworkRank(5, [[0,1],[0,3],[1,2],[1,3],[2,3],[2,4]]) == 5\", \"assert maxNetworkRank(8, [[0,1],[1,2],[2,3],[2,4],[5,6],[5,7]]) == 5\", \"assert maxNetworkRank(2, [[0,1]]) == 1\", \"assert maxN...
{ "split": "train", "index": 71945, "acecode_id": "evol_29976", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing program execution times in seconds. Your task is to implement a function that calculates the average execution time of the programs that took less than a specified threshold time. If no program meets the criteria, return 0. Write a ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert average_execution_time([5, 10, 15, 20, 25], 15) == 7.5\", \"assert average_execution_time([1, 2, 3, 4, 5], 10) == 3.0\", \"assert average_execution_time([10, 20, 30], 5) == 0.0\", \"assert average_execution_time([], 5) == 0.0\", \"assert average_execution_ti...
{ "split": "train", "index": 71946, "acecode_id": "bigcode_python_fns_46138", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of dictionaries representing a schema in a simplified format, convert it into a list of tuples where each tuple contains the field name and its corresponding type. The input schema is a list of dictionaries where each dictionary has keys 'name' and 'type'. Your fun...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_schema([{'name': 'id', 'type': 'INTEGER'}, {'name': 'name', 'type': 'STRING'}, {'name': 'age', 'type': 'INTEGER'}]) == [('id', 'INTEGER'), ('name', 'STRING'), ('age', 'INTEGER')]\", \"assert convert_schema([{'name': 'is_active', 'type': 'BOOLEAN'}, {...
{ "split": "train", "index": 71947, "acecode_id": "bigcode_python_fns_49814", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes a list of raw matches and constructs a list of dictionary objects based on certain conditions. Each raw match is represented by a dictionary containing two keys: 'external_references', which is a list of dictionaries wi...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_raw_matches([{'external_references': [{'source_name': 'mitre-attack', 'external_id': 'T1001'}], 'kill_chain_phases': [{'kill_chain_name': 'mitre-attack'}]}]) == [{'score': 1, 'description': 'Technique T1001 description'}]\", \"assert process_raw_matc...
{ "split": "train", "index": 71948, "acecode_id": "oss_14734", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Write a function that determines if it's possible to sort an array of N integers in non-decreasing order using at most two swaps involving exactly two elements, along with any number of right shifts. The function should return True if the array can be sorted and False otherwise...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert rearrange_two_elements([]) == True\", \"assert rearrange_two_elements([1]) == True\", \"assert rearrange_two_elements([2, 1]) == True\", \"assert rearrange_two_elements([3, 2, 1]) == False\", \"assert rearrange_two_elements([1, 3, 2]) == True\", \"assert rea...
{ "split": "train", "index": 71949, "acecode_id": "evol_20159", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given an integer `ticks` representing the number of seconds since the epoch (January 1, 1970), write a function `time_from_ticks(ticks: int) -> str` that returns the time in the format 'HH:MM:SS'. The time should be based on UTC. Make sure to handle the conversion of seconds in...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert time_from_ticks(0) == '00:00:00'\", \"assert time_from_ticks(3661) == '01:01:01'\", \"assert time_from_ticks(86399) == '23:59:59'\", \"assert time_from_ticks(3600) == '01:00:00'\", \"assert time_from_ticks(7200) == '02:00:00'\", \"assert time_from_ticks(1080...
{ "split": "train", "index": 71950, "acecode_id": "bigcode_python_fns_42511", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a list of unique file names based on a given date range. The function should take a starting date and an ending date as input, and for each date in this range, it should create a file name in the format 'posts_YYYY-MM-DD.cs...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_file_names('2023-01-01', '2023-01-05') == ['posts_2023-01-01.csv', 'posts_2023-01-02.csv', 'posts_2023-01-03.csv', 'posts_2023-01-04.csv', 'posts_2023-01-05.csv']\", \"assert generate_file_names('2023-02-01', '2023-02-01') == ['posts_2023-02-01.csv'...
{ "split": "train", "index": 71951, "acecode_id": "bigcode_python_fns_26206", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lists of integers `v1` and `v2` of the same length, return a new list where each element is the result of the bitwise XOR operation between the corresponding elements of `v1` and `v2`. The two input lists will only contain integers that are either 0 or 1. You need to ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert XOR([1, 0, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1]) == [0, 1, 1, 0, 1, 0]\", \"assert XOR([0, 0, 0], [0, 0, 0]) == [0, 0, 0]\", \"assert XOR([1, 1, 1], [1, 1, 1]) == [0, 0, 0]\", \"assert XOR([1, 0], [0, 1]) == [1, 1]\", \"assert XOR([0, 1], [1, 0]) == [1, 1]\", \"a...
{ "split": "train", "index": 71952, "acecode_id": "bigcode_python_fns_850", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks whether a given string can be transformed into another string by performing a series of character replacements. The function should return True if the transformation is possible, and False otherwise. A valid transformation...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_transform_string('abc', 'xyz') == True\", \"assert can_transform_string('aabb', 'xxyy') == True\", \"assert can_transform_string('abc', 'ab') == False\", \"assert can_transform_string('a', 'a') == True\", \"assert can_transform_string('hello', 'holle') =...
{ "split": "train", "index": 71953, "acecode_id": "bigcode_python_fns_3212", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function in Python that takes a list of tuples, each containing a list of numbers and an operator (+, -, *, /). The function should return a new list where each element is the result of the operation performed on the greatest difference between any two numbers from the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_greatest_diff_and_perform_operation([([4, 6, 8, 10, 3, 1, 9], '+')]) == [18]\", \"assert find_greatest_diff_and_perform_operation([([7, 12, 13, 9, 11], '*')]) == [36]\", \"assert find_greatest_diff_and_perform_operation([([1, 2], '-')]) == [0]\", \"asse...
{ "split": "train", "index": 71954, "acecode_id": "evol_33925", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a simple tutoring system. Your goal is to implement a function that simulates a tutor's availability. The function should take the tutor's name and a list of time slots as input, and return a dictionary containing the tutor's name and the list of av...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert tutor_availability('codi', ['Monday 10:00 AM', 'Wednesday 2:00 PM', 'Monday 10:00 AM']) == {'name': 'codi', 'available_slots': ['Monday 10:00 AM', 'Wednesday 2:00 PM']}\", \"assert tutor_availability('jane', []) == {'name': 'jane', 'available_slots': []}\", ...
{ "split": "train", "index": 71955, "acecode_id": "oss_7195", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with booking courses for a training institute based on their priority values. Each course has a priority value associated with it. Your goal is to implement a function `booking_courses_by_priorities(courses)` that takes a list of course objects as input, where ea...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert booking_courses_by_priorities([{'name': 'Math', 'priority': 2}, {'name': 'Science', 'priority': 3}, {'name': 'History', 'priority': 1}]) == ['Science', 'Math', 'History']\", \"assert booking_courses_by_priorities([{'name': 'Art', 'priority': 5}, {'name': 'Mu...
{ "split": "train", "index": 71956, "acecode_id": "oss_32697", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing the heights of a series of buildings. Your task is to write a function that calculates the number of buildings that can see the sunset. A building can see the sunset if it is taller than all the buildings to its right. Implement the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_sunset_buildings([3, 7, 8, 3, 6, 1]) == 3\", \"assert count_sunset_buildings([1]) == 1\", \"assert count_sunset_buildings([1, 1, 1, 1]) == 1\", \"assert count_sunset_buildings([1, 2, 3, 4, 3, 2, 1]) == 4\", \"assert count_sunset_buildings([8, 1, 6, 3, ...
{ "split": "train", "index": 71957, "acecode_id": "bigcode_python_fns_44321", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Implement a function that calculates the average price of a list of products, where each product is represented as a dictionary containing the keys 'name' and 'price'. The function should return the average price rounded to two decimal places.\nPlease reason step by step, then ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_average_price([{'name': 'Apples', 'price': 2.50}, {'name': 'Oranges', 'price': 4.25}, {'name': 'Grapes', 'price': 3.10}]) == 3.28\", \"assert calculate_average_price([{'name': 'Bananas', 'price': 1.50}, {'name': 'Cherries', 'price': 5.00}, {'name':...
{ "split": "train", "index": 71958, "acecode_id": "evol_32257", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function called `elite_truncation` that takes a string representation of a number, `figure`, and two integers, `low` and `apex`, as input. The function should return the nearest integer to the number represented by `figure` without using built-in rounding functions ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert elite_truncation('10', 0, 20) == 10\", \"assert elite_truncation('out_of_range', 5, 10) == 'Error: Invalid input.'\", \"assert elite_truncation('25', 0, 20) == 'Error: Out of range.'\", \"assert elite_truncation('3.2', 0, 5) == 3\", \"assert elite_truncation...
{ "split": "train", "index": 71959, "acecode_id": "evol_8154", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a 2D matrix of prime numbers, write a function that produces a zigzag sequence by traversing the matrix diagonally. The zigzag pattern starts from the top left corner and alternates direction with each diagonal. Implement the function `zigzag(mat)` where `mat` is a list o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert zigzag([[3, 5], [11, 13]]) == [3, 5, 11, 13]\", \"assert zigzag([[2]]) == [2]\", \"assert zigzag([[2, 3]]) == [2, 3]\", \"assert zigzag([[2], [3]]) == [2, 3]\", \"assert zigzag([[1, 2], [3, 4], [5, 6]]) == [1, 2, 3, 5, 4, 6]\", \"assert zigzag([[1, 2, 3], [4...
{ "split": "train", "index": 71960, "acecode_id": "evol_28834", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Given a string, write a function that capitalizes only the first letter of the string and returns the modified string. If the string is empty, return an empty string. Note that the function should only modify the first letter, leaving the rest of the string unchanged. For examp...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert capitalize_first('hello world') == 'Hello world'\", \"assert capitalize_first('python programming') == 'Python programming'\", \"assert capitalize_first('OpenAI') == 'OpenAI'\", \"assert capitalize_first('') == ''\", \"assert capitalize_first('a') == 'A'\", ...
{ "split": "train", "index": 71961, "acecode_id": "bigcode_python_fns_9758", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that checks if a video file has valid endpoints for a specific course. The function should take a dictionary representing a video file and return an error message if no endpoints are configured for that video's collection. The input d...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_video_endpoints({'encoding': 'HLS', 'collection': {'edx_course_id': 'some-course-id', 'endpoints': []}}) == 'No endpoints configured for this video collection'\", \"assert check_video_endpoints({'encoding': 'HLS', 'collection': {'edx_course_id': 'some-...
{ "split": "train", "index": 71962, "acecode_id": "bigcode_python_fns_41613", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `find_missing_number` that determines the missing number in a list of integers from 0 to n. The function takes a list of integers, `nums`, where each number appears exactly once except for one number that is missing from the list. You...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_missing_number([3, 0, 1]) == 2\", \"assert find_missing_number([0]) == 1\", \"assert find_missing_number([1]) == 0\", \"assert find_missing_number([0, 1, 2, 4, 5]) == 3\", \"assert find_missing_number([5, 4, 3, 2, 0]) == 1\", \"assert find_missing_numbe...
{ "split": "train", "index": 71963, "acecode_id": "oss_36742", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Write a Python function that calculates the product of all prime numbers less than a given integer n. The function should take a single integer parameter n and return the product of all prime numbers that are less than n. If there are no prime numbers less than n, the function ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert product_of_primes(10) == 210\", \"assert product_of_primes(2) == 1\", \"assert product_of_primes(3) == 2\", \"assert product_of_primes(1) == 1\", \"assert product_of_primes(20) == 9699690\", \"assert product_of_primes(5) == 6\"]}" }
{ "split": "train", "index": 71964, "acecode_id": "evol_35020", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Given a list of three integers, implement a function `average_of_three(numbers)` that calculates and returns the average of the three integers. The input will always consist of exactly three integers in the list. You may utilize any libraries or methods that can help optimize p...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert average_of_three([1, 2, 3]) == 2.0\", \"assert average_of_three([10, 20, 30]) == 20.0\", \"assert average_of_three([-1, -2, -3]) == -2.0\", \"assert average_of_three([100, 200, 300]) == 200.0\", \"assert average_of_three([0, 0, 0]) == 0.0\", \"assert average...
{ "split": "train", "index": 71965, "acecode_id": "evol_23417", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a unique end joint identifier for a character in a role-playing game. The function will take in two parameters: the character's name (a string) and a suffix (also a string). The function should return a string that combines...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_end_joint('Warrior', 'Elite') == 'Warrior_Elite_end_joint'\", \"assert get_end_joint('Mage', 'Master') == 'Mage_Master_end_joint'\", \"assert get_end_joint('Rogue', 'Shadow') == 'Rogue_Shadow_end_joint'\", \"assert get_end_joint('Paladin', 'Holy') == 'Pa...
{ "split": "train", "index": 71966, "acecode_id": "oss_1940", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of augmented images represented as 2D arrays, a list of corresponding labels, and an integer representing the number of rows to plot the images in. Write a function `plot_images(augmented_images: List[List[List[int]]], labels: List[str], rows: int) -> None`...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert plot_images([[1]], ['Single Image'], 1) == None\", \"assert plot_images([[1, 2]], ['Single Image'], 1) == None\", \"assert plot_images([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]], ['Image 1', 'Image 2', 'Image 3', 'Image 4', 'Image 5', 'Image 6'], 2)...
{ "split": "train", "index": 71967, "acecode_id": "bigcode_python_fns_24544", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Implement a function that converts a hexadecimal string into its corresponding ASCII text representation. The input will be a valid hexadecimal string. Write a function named `hex_to_ascii` that takes a single parameter, `hexadecimal`, and returns the decoded ASCII text.\nPleas...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert hex_to_ascii('48656c6c6f20576f726c64') == 'Hello World'\", \"assert hex_to_ascii('48656c6c6f') == 'Hello'\", \"assert hex_to_ascii('776f726c64') == 'world'\", \"assert hex_to_ascii('48656c6c6f20576f726c64') == 'Hello World'\", \"assert hex_to_ascii('74657374...
{ "split": "train", "index": 71968, "acecode_id": "evol_14364", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of bounding boxes and their corresponding class IDs, write a function that returns a list of formatted strings representing the bounding box information. Each bounding box is given in the format [cls_id, probability, x_min, y_min, x_max, y_max]. The output should b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_bounding_boxes([[0, 0.9, 10, 10, 50, 50], [1, 0.85, 20, 20, 60, 60]], ['cat', 'dog']) == ['0: 0.90', '1: 0.85']\", \"assert format_bounding_boxes([[2, 0.95, 30, 30, 70, 70]], ['cat', 'dog']) == ['2: Invalid']\", \"assert format_bounding_boxes([[1, 0.1...
{ "split": "train", "index": 71969, "acecode_id": "bigcode_python_fns_48877", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string 's' and two natural numbers 'n' and 'm'. Your task is to implement a function that returns a list of phrases found in the string 's'. A phrase is defined as a series of words separated by a single space. Each phrase must have a total count of consonants e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert select_phrases('The rain in Spain', 7, 4) == []\", \"assert select_phrases('She sells seashells by the seashore', 15, 9) == []\", \"assert select_phrases('A big elephant', 5, 6) == []\", \"assert select_phrases('We are the champions', 10, 6) == []\", \"asser...
{ "split": "train", "index": 71970, "acecode_id": "evol_6357", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a request to validate a user registration. The function should utilize a serializer to validate the request data and return an appropriate response based on the validation result. Write a Python function `validate_re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_registration({'data': {'username': 'user1', 'password': 'pass123'}}) == {'status': 200, 'message': 'Registration successful'}\", \"assert validate_registration({'data': {'username': '', 'password': 'pass123'}}) == {'status': 400, 'errors': {'usernam...
{ "split": "train", "index": 71971, "acecode_id": "oss_23080", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Given a list of integers representing the coefficients of a polynomial, implement a function that returns the value of the polynomial evaluated at a given point x. The polynomial is defined as: P(x) = a_n * x^n + a_(n-1) * x^(n-1) + ... + a_1 * x + a_0, where a_n, a_(n-1), ...,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_polynomial([4], 5) == 4\", \"assert evaluate_polynomial([1, 2, 3, 4], 1) == 10\", \"assert evaluate_polynomial([1, 0, 0, -1], 10) == 999\", \"assert evaluate_polynomial([3, 1, 4, 1, 5], 0) == 5\", \"assert evaluate_polynomial([-1, -1, -1], 1) == -3\...
{ "split": "train", "index": 71972, "acecode_id": "bigcode_python_fns_1012", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple user registration system that prevents duplicate usernames from being registered. Your function should take a list of usernames as input and return a list of unique usernames that can be registered. If a username is already present in t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert register_usernames(['alice', 'bob', 'charlie', 'alice']) == ['alice', 'bob', 'charlie']\", \"assert register_usernames(['user1', 'user2', 'user1', 'user3', 'user2']) == ['user1', 'user2', 'user3']\", \"assert register_usernames(['test', 'test', 'test']) == [...
{ "split": "train", "index": 71973, "acecode_id": "oss_1337", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that processes information about a software package based on the operating system of the host machine. Your function should take two parameters: a string representing the host operating system and a dictionary containing information a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_package_info('linux', {'name': 'example', 'version': '1.0', 'misc': {'key1': 'value1', 'key2': 'value2'}}) == {'key1': 'value1', 'key2': 'value2'}\", \"assert process_package_info('mac', {'name': 'example', 'version': '1.0', 'misc': {'key1': 'value1'...
{ "split": "train", "index": 71974, "acecode_id": "oss_34092", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of boolean values representing a series of conditions. Your task is to implement a function `and_operation` that takes a variable number of boolean arguments and returns True if all conditions are True, otherwise returns False. If the list is empty, return ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert and_operation(True, True, True) == True\", \"assert and_operation(True, True, False) == False\", \"assert and_operation(True, False, True) == False\", \"assert and_operation(False, False, False) == False\", \"assert and_operation(False, True, True) == False\...
{ "split": "train", "index": 71975, "acecode_id": "bigcode_python_fns_19375", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `classify_number(n: int) -> str` that classifies an integer `n` as 'Prime', 'Composite', or 'Neither'. A prime number is a natural number greater than 1 that is not a product of two smaller natural numbers. A composite number is a positive integer that has ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert classify_number(-5) == 'Neither'\", \"assert classify_number(0) == 'Neither'\", \"assert classify_number(1) == 'Neither'\", \"assert classify_number(2) == 'Prime'\", \"assert classify_number(3) == 'Prime'\", \"assert classify_number(4) == 'Composite'\", \"as...
{ "split": "train", "index": 71976, "acecode_id": "evol_28400", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary representing a location. The dictionary can contain the following keys: 'type' (which can be 'location', 'geocoords', or 'place_id'), 'city', 'country', 'latitude', and 'longitude'. Implement a function that constructs and returns a formatted string b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert construct_location_name({'type': 'location', 'city': 'new york', 'country': 'usa'}) == 'New York,USA'\", \"assert construct_location_name({'type': 'location', 'city': 'los angeles'}) == 'Los Angeles'\", \"assert construct_location_name({'type': 'geocoords', ...
{ "split": "train", "index": 71977, "acecode_id": "bigcode_python_fns_43752", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two tensors, `mag_spec` and `phase`, represent the magnitude and phase of a complex number respectively. Implement a function `from_magphase(mag_spec: List[float], phase: List[float], dim: int = -2) -> List[complex]` that returns a list of complex numbers constructed from...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert from_magphase([1.0], [0.0]) == [(1.0 + 0.0j)]\", \"assert from_magphase([0.0], [3.14]) == [(0.0 + 0.0j)]\", \"assert from_magphase([1.0, 1.0, 1.0], [0.0, 0.0, 0.0]) == [(1.0 + 0.0j), (1.0 + 0.0j), (1.0 + 0.0j)]\", \"assert from_magphase([0.5], [0.0]) == [(0....
{ "split": "train", "index": 71978, "acecode_id": "bigcode_python_fns_39178", "num_tests": 7 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function `split_list(input_list)` that returns two lists containing the first half and the second half of the input list, respectively. The output lists should be sorted in ascending order. If the input list has an odd number of elements, t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert split_list([1, 2, 3, 4]) == ([1, 2], [3, 4])\", \"assert split_list([5]) == ([], [5])\", \"assert split_list([10, 20, 30, 40, 50, 60]) == ([10, 20, 30], [40, 50, 60])\", \"assert split_list([]) == ([], [])\", \"assert split_list([2, 4, 6, 8, 10, 12, 14]) == ...
{ "split": "train", "index": 71979, "acecode_id": "evol_36100", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Write a function `is_prime(n: int) -> bool` that determines whether a given integer n is a prime number. A prime number is defined as a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. Your function should return True if n is prime...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_prime(2) == True\", \"assert is_prime(3) == True\", \"assert is_prime(4) == False\", \"assert is_prime(5) == True\", \"assert is_prime(10) == False\", \"assert is_prime(11) == True\", \"assert is_prime(12) == False\", \"assert is_prime(13) == True\", \"as...
{ "split": "train", "index": 71980, "acecode_id": "evol_8473", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given the dimensions of an image represented by its width and height, and the coordinates of a bounding box defined by its top-left corner (ymin, xmin) and bottom-right corner (ymax, xmax). Your task is to determine the coordinates of the four corners of the bounding bo...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_bounding_box_coordinates(800, 600, 0.1, 0.2, 0.4, 0.5) == [(160, 60), (400, 60), (400, 240), (160, 240)]\", \"assert get_bounding_box_coordinates(1920, 1080, 0.0, 0.0, 1.0, 1.0) == [(0, 0), (1920, 0), (1920, 1080), (0, 1080)]\", \"assert get_bounding_box...
{ "split": "train", "index": 71981, "acecode_id": "bigcode_python_fns_11006", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `longest_sequence(lst)` that finds the longest contiguous subsequence that contains at least one prime number and one composite number. The function should return the starting and ending indices of this subsequence. If there are no suc...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert longest_sequence([4, 7, 10, 13, 6, 9, 15, 11, 19, 30]) == (0, 9)\", \"assert longest_sequence([2, 3, 5, 7]) == (-1, -1)\", \"assert longest_sequence([4, 6, 8, 10]) == (-1, -1)\", \"assert longest_sequence([13, 15, 17, 19]) == (0, 3)\", \"assert longest_seque...
{ "split": "train", "index": 71982, "acecode_id": "evol_27375", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of modified file paths and returns a dictionary where the keys are the file paths and the values are the status of each file based on the following rules: if a file path ends with '.json', its status should be 'JSON File...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_file_status([]) == {}\", \"assert get_file_status(['file1.json']) == {'file1.json': 'JSON File'}\", \"assert get_file_status(['file2.txt']) == {'file2.txt': 'Text File'}\", \"assert get_file_status(['file3.py']) == {'file3.py': 'Python File'}\", \"assert...
{ "split": "train", "index": 71983, "acecode_id": "bigcode_python_fns_42797", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a function that generates a secure password of a specified length. The password must contain at least one lowercase letter, one uppercase letter, one digit, and one special character. If the specified length is less than 4, the function should default to a length of 12. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_password(12) is not None\", \"assert len(generate_password(12)) == 12\", \"assert any(c.islower() for c in generate_password(12))\", \"assert any(c.isupper() for c in generate_password(12))\", \"assert any(c.isdigit() for c in generate_password(12))...
{ "split": "train", "index": 71984, "acecode_id": "evol_13616", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two numerical arrays, your task is to implement a function that computes two values: 1) the largest disparity between the values contained in both arrays. Disparity is defined as the absolute difference between the maximum value of the first array and the minimum value of...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compute_disparity_and_frequency([20, 10, 4, 0, 10], [17, 1, 10, 7, 8, 7, 7]) == (20, 7)\", \"assert compute_disparity_and_frequency([7, 8, 9], [1, 2, 3]) == (8, 1)\", \"assert compute_disparity_and_frequency([1, 1, 1], [2, 2, 2]) == (1, 1)\", \"assert comput...
{ "split": "train", "index": 71985, "acecode_id": "evol_4668", "num_tests": 11 }
acecode
[ { "role": "user", "content": "Write a function `decimal_to_binary(n: int) -> str` that converts a given decimal integer `n` into its binary equivalent represented as a string. The input `n` will be a non-negative integer. The function should return the binary representation without any leading zeros.\nPleas...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert decimal_to_binary(0) == '0'\", \"assert decimal_to_binary(1) == '1'\", \"assert decimal_to_binary(2) == '10'\", \"assert decimal_to_binary(3) == '11'\", \"assert decimal_to_binary(4) == '100'\", \"assert decimal_to_binary(5) == '101'\", \"assert decimal_to_b...
{ "split": "train", "index": 71986, "acecode_id": "evol_10420", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates a simple stack data structure. A stack is a Last-In-First-Out (LIFO) data structure that supports two main operations: push, which adds an element to the top of the stack, and pop, which removes the top element from the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simple_stack([('push', 1), ('push', 2), ('pop', None), ('pop', None), ('pop', None)]) == [2, 1, None]\", \"assert simple_stack([('push', 5), ('pop', None), ('pop', None), ('push', 3), ('push', 4), ('pop', None)]) == [5, None, 4]\", \"assert simple_stack([('p...
{ "split": "train", "index": 71987, "acecode_id": "oss_4728", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of certificate database IDs and a boolean value indicating whether to check for specific modes. Your task is to retrieve the details of each certificate database ID based on the provided IDs. Implement a function `get_certificates(cert_dbase_ids: List[str],...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_certificates(['cert1', 'cert2'], False) == ['Certificate ID: cert1, Check Mode: False', 'Certificate ID: cert2, Check Mode: False']\", \"assert get_certificates(['cert1'], True) == ['Certificate ID: cert1, Check Mode: True (Check Mode Enabled)']\", \"ass...
{ "split": "train", "index": 71988, "acecode_id": "bigcode_python_fns_29490", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that categorizes a list of URLs based on specified themes. The function should take a list of tuples where each tuple contains a URL and its associated theme. Additionally, it should take a list of themes to be extracted. The function sho...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert categorize_urls([('https://example1.com', 'theme1'), ('https://example2.com', 'theme2'), ('https://example3.com', 'theme1'), ('https://example4.com', 'theme3')], ['theme1', 'theme3']) == {'theme1': ['https://example1.com', 'https://example3.com'], 'theme3': ...
{ "split": "train", "index": 71989, "acecode_id": "oss_30833", "num_tests": 16 }
acecode
[ { "role": "user", "content": "In the card game Bridge, a hand consists of thirteen cards and is ranked based on the value of the cards and the combinations present in the hand. The ranks are as follows: High Card, One Pair, Two Pairs, Three of a Kind, Straight, Flush, Full House, Four of a Kind, Straight Fl...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compare_hands(['4D', '6S', '9H', 'QH', 'QC', '2H', '3D', '5C', '7S', '8H', '10D', 'JS', 'KS'], ['3D', '6D', '7H', 'QD', 'QS', '2C', '4S', '5H', '8D', '9S', '10C', 'JC', 'KC']) == 0\", \"assert compare_hands(['2H', '2D', '4C', '4D', '4S', '3H', '5D', '6C', '7...
{ "split": "train", "index": 71990, "acecode_id": "evol_2205", "num_tests": 9 }
acecode
[ { "role": "user", "content": "Write a function `convert_to_row_oriented(arr)` that takes a two-dimensional list (matrix) `arr` and returns a new two-dimensional list where the rows and columns are transposed. The input matrix will have at least one row and one column. For example, given the input `[[1, 2, 3...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_to_row_oriented([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == [[1, 4, 7], [2, 5, 8], [3, 6, 9]]\", \"assert convert_to_row_oriented([[1]]) == [[1]]\", \"assert convert_to_row_oriented([[1, 2], [3, 4], [5, 6]]) == [[1, 3, 5], [2, 4, 6]]\", \"assert convert_to...
{ "split": "train", "index": 71991, "acecode_id": "evol_9222", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a JSON object represented as a string, implement a function that modifies the numeric value of a specified key by summing the integer values of two additional keys within the same object. The function should first validate the JSON structure and check if the specified key...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert modify_json_value('{\\\"key1\\\": 10, \\\"key2\\\": 20, \\\"key3\\\": 0}', 'key3', 'key1', 'key2') == {'key1': 10, 'key2': 20, 'key3': 30}\", \"assert modify_json_value('{\\\"key1\\\": 10, \\\"key2\\\": 20, \\\"key3\\\": 0}', 'key3', 'key1', 'key2') == {'key...
{ "split": "train", "index": 71992, "acecode_id": "evol_30312", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Write a function `generate_shopping_list(items: List[Tuple[str, int, float, int]]) -> Dict[str, Dict[str, Union[int, float]]]` that takes a list of items, where each item is represented as a tuple containing the item's name (string), quantity (int), price (float), and an option...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_shopping_list([('apple', 5, 0.99, 1), ('toilet paper', 12, 7.99, 2), ('milk', 1, 2.99, 3)]) == {'apple': {'quantity': 5, 'price': 0.99, 'priority': 1}, 'toilet paper': {'quantity': 12, 'price': 7.99, 'priority': 2}, 'milk': {'quantity': 1, 'price': ...
{ "split": "train", "index": 71993, "acecode_id": "evol_30014", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `convert_timezone(original_time: str, original_zone: str, target_zone: str) -> str` that converts a given time string in a specified timezone to another specified timezone. The function should take in a time string in the format 'HH:MM:SS', the original timezon...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_timezone('Invalid time', 'US/Eastern', 'Etc/GMT+3') == 'Error: Invalid input'\", \"assert convert_timezone('19:00:00', 'InvalidZone', 'Etc/GMT+3') == 'Error: Invalid input'\", \"assert convert_timezone('19:00:00', 'US/Eastern', 'InvalidZone') == 'Err...
{ "split": "train", "index": 71994, "acecode_id": "evol_30584", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a string representation of a JSON object. Your task is to parse this string into a Python dictionary. The JSON string may include comments that start with '#' and you need to remove those comments before parsing. Implement a function `parse_json_string(json_string...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_json_string('{\\\"key\\\": \\\"value\\\"}', False) == {'key': 'value'}\", \"assert parse_json_string('{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\"}', False) == {'key1': 'value1', 'key2': 'value2'}\", \"assert parse_json_string('{\\\"key\...
{ "split": "train", "index": 71995, "acecode_id": "bigcode_python_fns_8543", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with updating the details of a book in a library system. Write a function `update_book_details(username: str, book_id: int, data: Dict[str, Any]) -> int` that takes a username, a book ID, and a dictionary of data representing the book's details to update. The fun...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert update_book_details('john_doe', 1, {'title': 'New Title', 'author': 'New Author'}) == 1\", \"assert update_book_details('jane_smith', 2, {'title': 'Another Book', 'published_year': 2020}) == 2\", \"assert update_book_details('user123', 3, {'author': 'Famous ...
{ "split": "train", "index": 71996, "acecode_id": "bigcode_python_fns_28451", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a python function that splits a list at the nth element, adds the first part to the end, and sorts the resulting list in ascending order. The function should handle exceptions for invalid input such as when the nth element is not a valid index in the list. The function sh...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sort_complex_list(0, ['b', 'a', 'c']) == ['a', 'b', 'c']\", \"assert sort_complex_list(0, [{1: 2, 3: 1}, {2: 2, 1: 1}]) == [{2: 2, 1: 1}, {1: 2, 3: 1}]\", \"assert sort_complex_list(1, [{1: 5}, {2: 2}, {1: 1}]) == [{1: 1}, {2: 2}, {1: 5}]\", \"assert sort_co...
{ "split": "train", "index": 71997, "acecode_id": "evol_1512", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of strings and returns a new list containing only the strings that are palindromes. A palindrome is a string that reads the same forward and backward, ignoring cases and spaces. Implement the function `filter_palindromes...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_palindromes(['racecar', 'hello', 'level', 'world']) == ['racecar', 'level']\", \"assert filter_palindromes(['madam', 'civic', 'deified', 'step on no pets']) == ['madam', 'civic', 'deified', 'step on no pets']\", \"assert filter_palindromes(['apple', '...
{ "split": "train", "index": 71998, "acecode_id": "oss_24728", "num_tests": 12 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function that checks if it is possible to convert the list into a strictly increasing sequence by removing at most one element. If it is possible, return True; otherwise, return False. A strictly increasing sequence is one where each element is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert can_form_increasing_sequence([1, 2, 3, 4, 5]) == True\", \"assert can_form_increasing_sequence([1, 3, 2, 1]) == False\", \"assert can_form_increasing_sequence([1, 2, 5, 3, 4]) == True\", \"assert can_form_increasing_sequence([5, 1, 2, 3, 4]) == True\", \"ass...
{ "split": "train", "index": 71999, "acecode_id": "bigcode_python_fns_33566", "num_tests": 16 }