data_source
large_stringclasses
1 value
prompt
listlengths
1
1
ability
large_stringclasses
1 value
reward_model
dict
extra_info
dict
acecode
[ { "role": "user", "content": "You are tasked with creating a logging system for a software module. Implement a function `create_logger(module_name: str) -> str` that takes a string `module_name` as input and returns a string message indicating that a logger has been created for that module. The message shou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_logger('module1') == 'Logger created for module1'\", \"assert create_logger('module2') == 'Logger created for module2'\", \"assert create_logger('testModule') == 'Logger created for testModule'\", \"assert create_logger('my_logger') == 'Logger created...
{ "split": "train", "index": 3200, "acecode_id": "bigcode_python_fns_32993", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing a list of solar tile data stored in CSV format. Each tile has a name, minimum and maximum x and y coordinates. Your job is to create a function `process_tiles` that accepts a list of tuples, where each tuple consists of the tile name and its coord...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_tiles([('tile1', 0, 0, 1, 1)]) == [{'tilename': 'tile1', 'coordinates': {'min': (0, 0), 'max': (1, 1)}, 'extentBox': {'minx': 0, 'miny': 0, 'maxx': 1, 'maxy': 1}}]\", \"assert process_tiles([('tile1', 0, 0, 1, 1), ('tile2', 2, 2, 3, 3)]) == [{'tilena...
{ "split": "train", "index": 3201, "acecode_id": "bigcode_python_fns_7688", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `calculate_area(width: int, height: int) -> int` that takes two integers representing the width and height of a rectangle, and returns the area of the rectangle. The area is calculated as the product of width and height.\nPlease reason step by step, then wr...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_area(5, 10) == 50\", \"assert calculate_area(0, 10) == 0\", \"assert calculate_area(7, 3) == 21\", \"assert calculate_area(2, 4) == 8\", \"assert calculate_area(1, 1) == 1\", \"assert calculate_area(5, 5) == 25\", \"assert calculate_area(12, 0) == ...
{ "split": "train", "index": 3202, "acecode_id": "evol_7097", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a self transition probability 'p' and a dimension 'N', create a function that computes a uniform transition matrix. The transition matrix is defined as an NxN matrix where the diagonal entries are equal to the self transition probability 'p', and all off-diagonal entries ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert uniform_transition_matrix(0.0, 3) == [[0.0] + [0.5]*2] * 3\", \"assert uniform_transition_matrix(0.0, 1) == []\", \"assert uniform_transition_matrix(0.3, 5) == [[0.3] + [0.175]*4] * 5\", \"assert uniform_transition_matrix(0.5, 1) == []\", \"assert uniform_tr...
{ "split": "train", "index": 3203, "acecode_id": "bigcode_python_fns_4110", "num_tests": 6 }
acecode
[ { "role": "user", "content": "Given a string, implement a function that calculates the frequency of each character in the string and returns a dictionary with characters as keys and their corresponding frequencies as values.\nPlease reason step by step, then write a self-contained Python solution. Give your...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_frequencies('hello') == {'h': 1, 'e': 1, 'l': 2, 'o': 1}\", \"assert calculate_frequencies('aabbcc') == {'a': 2, 'b': 2, 'c': 2}\", \"assert calculate_frequencies('') == {}\", \"assert calculate_frequencies('python') == {'p': 1, 'y': 1, 't': 1, 'h'...
{ "split": "train", "index": 3204, "acecode_id": "evol_4366", "num_tests": 10 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a dictionary representing the training history data for a neural network. The dictionary contains two keys: 'accuracy' and 'val_accuracy', each of which holds a list of floats representing the training and validation...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert average_accuracy({'accuracy': [0.6, 0.65], 'val_accuracy': [0.55, 0.58]}) == {'avg_accuracy': 0.625, 'avg_val_accuracy': 0.565}\", \"assert average_accuracy({'accuracy': [0.5], 'val_accuracy': [0.5]}) == {'avg_accuracy': 0.5, 'avg_val_accuracy': 0.5}\", \"as...
{ "split": "train", "index": 3205, "acecode_id": "oss_17955", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You need to create a function that takes a list of train station records and returns a list of station names. Each record is represented as a dictionary with the following keys: 'stationName', 'stationLocation', 'stationStaffId', and 'date'. Your function should extract the 'st...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_station_names([]) == []\", \"assert get_station_names([{ 'stationName': 'Central Station', 'stationLocation': 'Downtown', 'stationStaffId': '001', 'date': '2023-01-01T10:00:00' }, { 'stationName': 'North Station', 'stationLocation': 'Northside', 'station...
{ "split": "train", "index": 3206, "acecode_id": "oss_18852", "num_tests": 15 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `findMax` that returns the maximum value in the list. If the list is empty, the function should return None. The function should only implement a single return statement at the end. For example, if the input list is `nums = [5, 8, 2, 1...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert findMax([5, 8, 2, 10, 6]) == 10\", \"assert findMax([-1, -5, -3]) == -1\", \"assert findMax([0, 0, 0]) == 0\", \"assert findMax([1]) == 1\", \"assert findMax([3, 2, 1]) == 3\", \"assert findMax([2, 3, 2]) == 3\", \"assert findMax([-10, -20, -5]) == -5\", \"a...
{ "split": "train", "index": 3207, "acecode_id": "oss_10191", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string message, implement a function `infostring` that formats the string into a log entry. The function should remove any trailing whitespace from the message and replace any newline characters with a space. The log entry should be prefixed with the current timestamp (...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert infostring('Hello World!') == '2023-10-01 12:00:00\\t## INFO ## Hello World!\\\\n'\", \"assert infostring('Single line log') == '2023-10-01 12:00:00\\t## INFO ## Single line log\\\\n'\", \"assert infostring('A string with special chars: !@#$%^&*()') == '2023...
{ "split": "train", "index": 3208, "acecode_id": "bigcode_python_fns_36203", "num_tests": 5 }
acecode
[ { "role": "user", "content": "You are given a list of strings representing test step definitions in the format \"* adding step definition: {step}\". Your task is to write a function that counts the occurrences of unique step definitions. Write a function `count_step_definitions(step_definitions: List[str]) ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_step_definitions(['* adding step definition: click on button', '* adding step definition: enter username', '* adding step definition: click on button', '* adding step definition: verify page title', '* adding step definition: enter username', '* adding...
{ "split": "train", "index": 3209, "acecode_id": "oss_30776", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a dictionary representing user authentication data, which includes a 'token' key and other arbitrary key-value pairs. Your task is to create a function that takes this dictionary and an optional integer parameter representing the expiration time in seconds. The fu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_auth_data({'token': 'abc123', 'user': 'Alice'}, 3600) == 'token:abc123, expires_in:3600'\", \"assert format_auth_data({'token': 'xyz789', 'role': 'admin'}, 7200) == 'token:xyz789, expires_in:7200'\", \"assert format_auth_data({'token': 'token456', 'pe...
{ "split": "train", "index": 3210, "acecode_id": "bigcode_python_fns_21186", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string 'template' that contains placeholders in the format '{key}', where 'key' represents a parameter name. You are also given a dictionary 'params' that maps parameter names to their corresponding values. Your task is to write a function 'expand_template(templ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert expand_template('Hello, {name}!', {'name': 'Alice'}) == 'Hello, Alice!'\", \"assert expand_template('Your score is {score}.', {'score': '95'}) == 'Your score is 95.'\", \"assert expand_template('Welcome, {user}!', {'user': 'Bob'}) == 'Welcome, Bob!'\", \"ass...
{ "split": "train", "index": 3211, "acecode_id": "bigcode_python_fns_17394", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers `list_data` and an index `pivot_index`. Your task is to write a function `find_pivot_value` that returns the value at the pivot index in the list. If the pivot index is out of range (negative or greater than the last index), the function should ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_pivot_value([3, 7, 2, 8, 5], 2) == 2\", \"assert find_pivot_value([1, 4, 7, 9], 0) == 1\", \"assert find_pivot_value([-1, -5, 6, 3], 1) == -5\", \"assert find_pivot_value([10, 20, 30, 40, 50], 4) == 50\", \"assert find_pivot_value([], 0) == 'Index out o...
{ "split": "train", "index": 3212, "acecode_id": "oss_33341", "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. The order of the unique integers in the output list should be the same as their first appearance in the input list. Please im...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_unique_integers([1, 2, 3, 1, 2, 4]) == [1, 2, 3, 4]\", \"assert get_unique_integers([5, 5, 5, 5]) == [5]\", \"assert get_unique_integers([]) == []\", \"assert get_unique_integers([10, 20, 10, 30, 20, 40]) == [10, 20, 30, 40]\", \"assert get_unique_intege...
{ "split": "train", "index": 3213, "acecode_id": "oss_15842", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing video data represented as a list of dictionaries in Python. Each dictionary contains information about a video, including 'video_id', 'title', 'duration', and 'category'. Your program should implement a function that takes this list of video data ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_video_data([{'video_id': '1', 'title': 'Video A', 'duration': 120, 'category': 'Education'}, {'video_id': '2', 'title': 'Video B', 'duration': 240, 'category': 'Education'}, {'video_id': '3', 'title': 'Video C', 'duration': 180, 'category': 'Entertai...
{ "split": "train", "index": 3214, "acecode_id": "oss_10497", "num_tests": 15 }
acecode
[ { "role": "user", "content": "You are tasked with managing a registry of records that need unique identifiers (PIDs). Implement a function `mint_pid(pid_type: str, pid_field: str, record: Dict[str, Any]) -> None` that performs the following: If the `record` dictionary does not contain the key `pid_field`, i...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert mint_pid('recid', 'pid', {'id': '1234'}) == None\", \"assert mint_pid('recid', 'pid', {'id': '5678', 'pid': 'existing_pid'}) == None\", \"assert mint_pid('recid', 'pid', {'id': '91011'}) == None\", \"assert mint_pid('recid', 'pid', {'id': '1213'}) == None\",...
{ "split": "train", "index": 3215, "acecode_id": "bigcode_python_fns_20986", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of positive integers, write a function `find_position(arr, target)` that returns the index of the first occurrence of a specified integer `target` in the list `arr`. If the integer is not found, return -1. The input list is guaranteed to be non-empty and will conta...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_position([2, 3, 3, 1, 5, 2], 3) == 1\", \"assert find_position([2, 3, 3, 1, 5, 2], 5) == 4\", \"assert find_position([2, 3, 3, 1, 5, 2], 2) == 0\", \"assert find_position([2, 3, 3, 1, 5, 2], 1) == 3\", \"assert find_position([2, 3, 3, 1, 5, 2], 4) == -1...
{ "split": "train", "index": 3216, "acecode_id": "evol_24497", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `pet_sound(pet_type: str) -> str` that takes a string representing the type of pet ('dog' or 'cat') and returns the sound that pet makes. If the input is not 'dog' or 'cat', return 'Unknown pet type'.\nPlease reason step by step, then write a self-contained...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert pet_sound('dog') == 'Woof!'\", \"assert pet_sound('cat') == 'Meow!'\", \"assert pet_sound('dog') == 'Woof!'\", \"assert pet_sound('cat') == 'Meow!'\", \"assert pet_sound('rabbit') == 'Unknown pet type'\", \"assert pet_sound('fish') == 'Unknown pet type'\", \...
{ "split": "train", "index": 3217, "acecode_id": "evol_25391", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that processes a list of strings representing network provider information. Each string contains a 'provider' and its corresponding 'domain' in the format 'provider: <provider_name>; domain: <domain_name>'. Your function should take a lis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_provider_info([]) == {}\", \"assert process_provider_info(['provider: ofi; domain: domain1', 'provider: ofi; domain: domain2']) == {'domain1': {'ofi'}, 'domain2': {'ofi'}}\", \"assert process_provider_info(['provider: ofi; domain: domain1', 'provider...
{ "split": "train", "index": 3218, "acecode_id": "bigcode_python_fns_17996", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `greet(name: str) -> str` that takes a name as input and returns a greeting string in the format 'Hello, {name}'. The function should not print the greeting but instead return it as a string. Ensure that the name is properly formatted with a comma and space fol...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert greet('John') == 'Hello, John'\", \"assert greet('Alice') == 'Hello, Alice'\", \"assert greet('Bob') == 'Hello, Bob'\", \"assert greet('Charlie') == 'Hello, Charlie'\", \"assert greet('Diana') == 'Hello, Diana'\", \"assert greet('Eve') == 'Hello, Eve'\", \"a...
{ "split": "train", "index": 3219, "acecode_id": "evol_20306", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that performs a mock object detection on an input image represented as a list of pixel values. The function should take in an input image and a confidence threshold, and return a list of dictionaries representing detected objec...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert object_detection([255, 0, 0], 0.5) == [{'class_label': 'red', 'bounding_box': (0, 0, 1, 1), 'confidence_score': 0.9}]\", \"assert object_detection([0, 255, 0], 0.5) == [{'class_label': 'green', 'bounding_box': (1, 1, 2, 2), 'confidence_score': 0.8}]\", \"ass...
{ "split": "train", "index": 3220, "acecode_id": "oss_35644", "num_tests": 6 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that computes the accuracy of a classification model based on given distances between images and their corresponding true labels. The function should take three parameters: a list of distances (dist), a list of labels indicating the t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert compute_accuracy([0.1, 0.2, 0.3], [1, 1, 1], 0.5) == 1.0\", \"assert compute_accuracy([], [0], 0.5) == 0.0\", \"assert compute_accuracy([0.5, 0.5, 0.5], [1, 1, 0], 0.5) == 0.6666666666666666\", \"assert compute_accuracy([0.3, 0.3, 0.3], [1, 0, 1], 0.3) == 0....
{ "split": "train", "index": 3221, "acecode_id": "bigcode_python_fns_49786", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates suspending a user account of a member. The function should take the following parameters: a user ID (uid) as a string, a boolean flag (keep_groups) that indicates whether to retain the groups associated with the member,...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert suspend_member('user123', False, ['societyA', 'societyB']) == ['User user123 suspended', 'Tasks cleared for user123', 'User user123 removed', 'Website archived for user123', 'Account details dropped for user123', 'Removed from society societyA', 'Removed fro...
{ "split": "train", "index": 3222, "acecode_id": "bigcode_python_fns_19500", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing a specific message format. Given a message string that contains a date and time embedded in it, your goal is to extract the date and time, convert it into a UTC datetime object, and return it. The message format you will receive is similar to '.A ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_message_a('.A YCPC1 220101 PD DH240000 /PCIRRZZ 6.89') == utc(2022, 1, 1, 0, 0)\", \"assert process_message_a('.A YCPC1 190312 PD DH240000 /PCIRRZZ 6.89') == utc(2019, 3, 12, 0, 0)\", \"assert process_message_a('.A YCPC1 200415 PD DH240000 /PCIRRZZ 6...
{ "split": "train", "index": 3223, "acecode_id": "bigcode_python_fns_38983", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Write a function `get_walkman_purchasers(patron_list, purchase_list, product_list)` that takes three lists as input: `patron_list`, `purchase_list`, and `product_list`. Each list contains dictionaries representing patrons, purchases, and products respectively. The function shou...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_walkman_purchasers([{'patronId': 1, 'patronName': 'Alice'}, {'patronId': 2, 'patronName': 'Bob'}], [{'patronId': 1, 'productId': 101}, {'patronId': 2, 'productId': 102}], [{'productId': 101, 'productName': 'Sony Walkman', 'subsection': 'Audio Devices'}, ...
{ "split": "train", "index": 3224, "acecode_id": "evol_22035", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a binary search algorithm to find the index of a given value in a sorted collection. The binary search algorithm compares the target value to the middle element of the collection. If they are not equal, the half in which the target cannot lie is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert binary_search([1, 2, 3, 4, 5, 6, 7, 8, 9], 8) == 7\", \"assert binary_search([1, 2, 3, 4, 5, 6, 7, 8, 9], 1) == 0\", \"assert binary_search([1, 2, 3, 4, 5, 6, 7, 8, 9], 9) == 8\", \"assert binary_search([1, 2, 3, 4, 5, 6, 7, 8, 9], 5) == 4\", \"assert binary...
{ "split": "train", "index": 3225, "acecode_id": "oss_7874", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function `check_version_update(command: str, current_version: str, latest_version: str) -> str` that checks if a newer version of a software package is available based on the current and latest version numbers. If the latest version is higher ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_version_update('update', '1.0.0', '2.0.0') == 'There is a new version (2.0.0) of the software available.'\", \"assert check_version_update('update', '1.0.0', '1.0.0') == ''\", \"assert check_version_update('update', '1.2.0', '1.2.0-rc') == ''\", \"asse...
{ "split": "train", "index": 3226, "acecode_id": "bigcode_python_fns_49235", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates a 2D array filled with zeros given the dimensions of the array. Write a function `create_zero_array` that takes two parameters: an integer `rows` and an integer `cols`, which represent the number of rows and columns of the ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_zero_array(0, 0) == []\", \"assert create_zero_array(1, 1) == [[0]]\", \"assert create_zero_array(1, 5) == [[0, 0, 0, 0, 0]]\", \"assert create_zero_array(3, 3) == [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\", \"assert create_zero_array(2, 4) == [[0, 0, 0, 0],...
{ "split": "train", "index": 3227, "acecode_id": "bigcode_python_fns_46006", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lowercase strings `a` and `b`, determine if it is possible to swap any two characters in `a` such that it becomes identical to `b`. Implement a function `buddyStrings(a: str, b: str) -> bool` that returns `true` if the swap can make `a` equal to `b`, and `false` other...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert buddyStrings('ab', 'ba') == True\", \"assert buddyStrings('ab', 'ab') == False\", \"assert buddyStrings('aa', 'aa') == True\", \"assert buddyStrings('aaaaaaabc', 'aaaaaaacb') == True\", \"assert buddyStrings('abc', 'acb') == True\", \"assert buddyStrings('ab...
{ "split": "train", "index": 3228, "acecode_id": "evol_33758", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates the full directory address of a database file based on its name and location. The function should take two parameters: 'name' (the name of the database file) and 'location' (the directory where the file is stored). If the '...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_full_directory() == './main.db'\", \"assert get_full_directory('test') == './test.db'\", \"assert get_full_directory(location='/data/') == '/data/main.db'\", \"assert get_full_directory('mydb', '/var/db/') == '/var/db/mydb.db'\", \"assert get_full_direct...
{ "split": "train", "index": 3229, "acecode_id": "oss_19787", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple calculator that can perform basic arithmetic operations: addition, subtraction, multiplication, and division. Your task is to implement a function `calculate` that takes three parameters: two integers `a` and `b`, and a string `operatio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate(3, 5, 'add') == 8\", \"assert calculate(10, 4, 'subtract') == 6\", \"assert calculate(2, 7, 'multiply') == 14\", \"assert calculate(10, 2, 'divide') == 5\", \"assert calculate(10, 0, 'divide') == 'undefined'\", \"assert calculate(0, 0, 'add') == 0\...
{ "split": "train", "index": 3230, "acecode_id": "oss_20104", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function that takes a single string parameter 's' and returns the index of the first occurrence of the character that appears most frequently in the string. The comparison should be case-insensitive, and only alphabetic characters should be considered while ignoring...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert highest_freq_char('aabbcc') == 0\", \"assert highest_freq_char('aaabbbccc') == 0\", \"assert highest_freq_char('abcdefg') == 0\", \"assert highest_freq_char('abCabc') == 0\", \"assert highest_freq_char('Mississippi') == 1\", \"assert highest_freq_char('a') =...
{ "split": "train", "index": 3231, "acecode_id": "evol_33799", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a list of words as input and returns a new list containing only the unique words from the input list, preserving the original order. Write a function `remove_duplicates(wordlist: List[str]) -> List[str]` where `wordlist` is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_duplicates(['word1', 'word2', 'word3']) == ['word1', 'word2', 'word3']\", \"assert remove_duplicates(['word1', 'word1', 'word1']) == ['word1']\", \"assert remove_duplicates(['apple', 'banana', 'apple', 'orange']) == ['apple', 'banana', 'orange']\", \"...
{ "split": "train", "index": 3232, "acecode_id": "bigcode_python_fns_16638", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a Python function that calculates the sum of all even Fibonacci numbers up to a given positive integer limit. The Fibonacci sequence is defined as follows: F(0) = 0, F(1) = 1, and F(n) = F(n-1) + F(n-2) for n > 1. Your function should return the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert even_fibonacci_sum(10) == 10\", \"assert even_fibonacci_sum(100) == 44\", \"assert even_fibonacci_sum(4000000) == 4613732\", \"assert even_fibonacci_sum(1) == 0\", \"assert even_fibonacci_sum(2) == 2\", \"assert even_fibonacci_sum(3) == 2\", \"assert even_fi...
{ "split": "train", "index": 3233, "acecode_id": "oss_13180", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Given a list of points representing the vertices of a polygon, your task is to simplify the polygon by removing consecutive duplicate points. A point is considered a duplicate if it has the same coordinates as the previous point in the list. The function should return a new lis...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert simplify_polygon([(0, 0), (1, 1), (1, 1), (2, 2)]) == [(0, 0), (1, 1), (2, 2)]\", \"assert simplify_polygon([(1, 1), (1, 1), (1, 1)]) == [(1, 1)]\", \"assert simplify_polygon([(0, 0), (0, 0), (0, 0), (0, 0)]) == [(0, 0)]\", \"assert simplify_polygon([(1, 2),...
{ "split": "train", "index": 3234, "acecode_id": "bigcode_python_fns_25949", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a function that takes in a list of image data and their corresponding class labels. Your task is to implement a function that organizes these images into a grid format based on the specified number of columns. The function should return a list of strings represent...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_image_titles(['img1', 'img2', 'img3'], ['cat', 'dog'], [[0], [1], [0]], 2) == ['cat', 'dog', 'cat']\", \"assert generate_image_titles(['img1', 'img2'], ['cat'], [[0], [0]], 1) == ['cat', 'cat']\", \"assert generate_image_titles(['img1'], ['cat', 'do...
{ "split": "train", "index": 3235, "acecode_id": "bigcode_python_fns_36568", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with simulating the parsing of a build configuration file for an Android project. Write a function `processBuildConfig` that takes a string input representing the build configuration commands and returns a structured representation of the configuration. The struc...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert processBuildConfig('env.android_add_res_dir(\\\"drawable\\\")\\\\nenv.android_add_res_dir(\\\"layout\\\")') == {'resource_directories': ['drawable', 'layout'], 'asset_directories': [], 'dependencies': [], 'default_config': '', 'manifest_chunk': '', 'permissi...
{ "split": "train", "index": 3236, "acecode_id": "oss_6813", "num_tests": 14 }
acecode
[ { "role": "user", "content": "Implement a function that counts the number of pairs of strings in a given list that are reverse of each other. A pair is considered valid if one string is the reverse of the other. The function should take a list of strings as input and return the total count of such pairs.\nP...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_pairs(['abc', 'cba', 'xyz', 'zyx', 'abc']) == 2\", \"assert reverse_pairs(['a', 'b', 'c', 'd']) == 0\", \"assert reverse_pairs(['hello', 'olleh', 'world', 'dlrow', 'test']) == 2\", \"assert reverse_pairs(['abc', 'def', 'fed', 'cba', 'xyz']) == 2\", \...
{ "split": "train", "index": 3237, "acecode_id": "evol_10910", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that takes a string input and returns a modified version of the input string by appending '_modified' to it. Write a function called `custom_method` that takes a single parameter, `input_data`, which is a string, and returns the modif...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert custom_method('test') == 'test_modified'\", \"assert custom_method('hello') == 'hello_modified'\", \"assert custom_method('world') == 'world_modified'\", \"assert custom_method('') == '_modified'\", \"assert custom_method('example') == 'example_modified'\", ...
{ "split": "train", "index": 3238, "acecode_id": "oss_18142", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function that returns a new list containing the same integers but with their signs reversed. If an integer is positive, it should be changed to negative. If it is negative, it should be changed to positive. If the integer is zero, it should...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert reverse_sign([1, -2, 3, 0, -5]) == [-1, 2, -3, 0, 5]\", \"assert reverse_sign([0, 0, 0]) == [0, 0, 0]\", \"assert reverse_sign([-1, -2, -3]) == [1, 2, 3]\", \"assert reverse_sign([1, 2, 3]) == [-1, -2, -3]\", \"assert reverse_sign([100, -200, 300]) == [-100,...
{ "split": "train", "index": 3239, "acecode_id": "oss_967", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a program that calculates a user's score based on their answers to a series of quiz questions. The function should take in a dictionary called `quiz_questions`, where the keys are questions and the values are the correct answers. You will also recei...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_score({'What is the capital of France?': 'Paris', 'What is the largest planet in our solar system?': 'Jupiter', 'What is the powerhouse of the cell?': 'Mitochondria'}, ['Paris', 'Jupiter', 'Mitochondria']) == 3\", \"assert calculate_score({'What is...
{ "split": "train", "index": 3240, "acecode_id": "oss_25786", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that simulates the initialization of an I2C (Inter-Integrated Circuit) interface for communication between microcontrollers and peripheral devices. The function should take a unique ID and a configuration dictionary as its inputs. The...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert initialize_i2c('i2c_device', {'frequency': 100000}) == {'unique_id': 'i2c_device', 'frequency': 100000, 'status': 'I2C component setup successfully.'}\", \"assert initialize_i2c('i2c_device', {}) == {'unique_id': 'i2c_device', 'frequency': None, 'status': 'I...
{ "split": "train", "index": 3241, "acecode_id": "oss_8840", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with generating a string of HTML <script> tags to include JavaScript libraries based on a user's preference for offline or online usage. Write a function `generate_script(offline: bool) -> str` that takes a boolean parameter `offline`. If `offline` is True, the f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_script(True) == '<script src=\\\"https://cdn.plot.ly/plotly-latest.min.js\\\"></script><script src=\\\"https://yourdomain.com/path/to/helper_functions.js\\\"></script>'\", \"assert generate_script(False) == '<script src=\\\"https://cdn.plot.ly/plotl...
{ "split": "train", "index": 3242, "acecode_id": "bigcode_python_fns_568", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with calculating the necessary adjustments to move a sticker from its current location to a desired location on a 2D plane. The sticker's current and desired locations are represented by their x and y coordinates. Implement a function `calculate_adjustments(curre...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_adjustments((0, 0), (0, 0)) == (0, 0)\", \"assert calculate_adjustments((1, 1), (2, 2)) == (1, 1)\", \"assert calculate_adjustments((5, 5), (10, 10)) == (5, 5)\", \"assert calculate_adjustments((10, 10), (5, 5)) == (-5, -5)\", \"assert calculate_ad...
{ "split": "train", "index": 3243, "acecode_id": "oss_14368", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a list of model options and their corresponding ordering options. The function should take in a list of tuples, where each tuple represents a model and its ordering option. The ordering option is a dictionary with th...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_model_options([('book', {'ordering': ['title']}), ('author', {'ordering': ['name']}), ('method', {'ordering': ['created_at']})]) == {'book': ['title'], 'author': ['name'], 'method': ['created_at']}\", \"assert process_model_options([('car', {'orderin...
{ "split": "train", "index": 3244, "acecode_id": "oss_3226", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `check_sources` that takes a list of argument strings and returns a dictionary representing the state of various sources. Each string in the list can either enable or disable a source based on the following rules: \n\n- If the string is '...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_sources([]) == {'instagram': True, 'youtube': True, 'spotify': True, 'birthday': True, 'twitter': True, 'billboard': True}\", \"assert check_sources(['-no-instagram']) == {'instagram': False, 'youtube': True, 'spotify': True, 'birthday': True, 'twitter...
{ "split": "train", "index": 3245, "acecode_id": "bigcode_python_fns_2015", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function `cumulative_sum` that returns a new list where the ith element is the sum of all elements from the beginning of the list up to and including the ith element. For example, if the input list is [1, 2, 3], the output should be [1, 3, ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cumulative_sum([1, 2, 3]) == [1, 3, 6]\", \"assert cumulative_sum([5, 5, 5]) == [5, 10, 15]\", \"assert cumulative_sum([-1, -2, -3]) == [-1, -3, -6]\", \"assert cumulative_sum([10]) == [10]\", \"assert cumulative_sum([0, 0, 0]) == [0, 0, 0]\", \"assert cumul...
{ "split": "train", "index": 3246, "acecode_id": "bigcode_python_fns_45426", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with processing document information and need to implement a function that takes three parameters: `title` (string), `author` (string), and `word_count` (integer). The function should return a dictionary containing the document's title, author, and word count. Ad...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_document_info('Python Basics', 'John Doe', 1500) == {'title': 'Python Basics', 'author': 'John Doe', 'word_count': 1500}\", \"assert process_document_info('Python Basics', 'John Doe', 1500, 'Advanced Python') == {'title': 'Advanced Python', 'author':...
{ "split": "train", "index": 3247, "acecode_id": "oss_8979", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string of digits from 0 to 9, you need to write a function that checks if the string is a pandigital number with the special sub-string divisibility property. A pandigital number contains each digit from 0 to 9 exactly once. The special property is defined as follows: f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert check_pandigital_divisibility('1234567890') == False\", \"assert check_pandigital_divisibility('0123456789') == False\", \"assert check_pandigital_divisibility('1234567809') == False\", \"assert check_pandigital_divisibility('9876304215') == False\", \"asser...
{ "split": "train", "index": 3248, "acecode_id": "evol_34741", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two integer arrays, return a new array containing all unique elements from both arrays. The order of the elements in the output array should be the same as their first appearance in the input arrays. Write a function `unique_elements(arr1, arr2)` that takes in two lists o...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert unique_elements([1, 2, 3], [2, 3, 4]) == [1, 2, 3, 4]\", \"assert unique_elements([1, 1, 2], [2, 3, 4]) == [1, 2, 3, 4]\", \"assert unique_elements([], [1, 2, 3]) == [1, 2, 3]\", \"assert unique_elements([5, 6, 7], []) == [5, 6, 7]\", \"assert unique_element...
{ "split": "train", "index": 3249, "acecode_id": "evol_31959", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of strings, where each string represents a programming language. Your task is to count the occurrences of each programming language in the list and return a dictionary with the languages as keys and their respective counts as values. The input list may cont...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert count_languages(['Python', 'Java', 'Python', 'C++', 'JavaScript', 'Ruby', 'Java']) == {'Python': 2, 'Java': 2, 'C++': 1, 'JavaScript': 1, 'Ruby': 1}\", \"assert count_languages(['Python', 'Python', 'Python']) == {'Python': 3}\", \"assert count_languages(['Ja...
{ "split": "train", "index": 3250, "acecode_id": "bigcode_python_fns_16706", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a 2D list of integers. Your task is to implement a function that sorts each row of the list in ascending order. The function should take a 2D list as input and return a new 2D list with each row sorted. For example, if the input is [[3, 7, 2], [8, 1, 4], [6, 5, 9]...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert sort_2D_list([[3, 7, 2], [8, 1, 4], [6, 5, 9]]) == [[2, 3, 7], [1, 4, 8], [5, 6, 9]]\", \"assert sort_2D_list([[5, 2, 9], [1, 3, 4], [8, 6, 7]]) == [[2, 5, 9], [1, 3, 4], [6, 7, 8]]\", \"assert sort_2D_list([[10, 20], [30, 15], [5, 25]]) == [[10, 20], [15, 3...
{ "split": "train", "index": 3251, "acecode_id": "evol_15628", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lists of integers, return a list of distinct elements that are present in both lists while maintaining the order of their first appearance from the first list. Each element should only appear once in the output. Implement a function `common_elements(list1: List[int], ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert common_elements([1, 2, 2, 3, 4], [2, 4, 4, 6, 7]) == [2, 4]\", \"assert common_elements([1, 1, 1, 2], [2, 2, 3]) == [2]\", \"assert common_elements([], [1, 2, 3]) == []\", \"assert common_elements([5, 6, 7], [1, 2, 3]) == []\", \"assert common_elements([1, 2...
{ "split": "train", "index": 3252, "acecode_id": "evol_591", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that generates an output sentence based on the input data provided in a dictionary `input_streams_dict`. The dictionary will contain the following keys and their corresponding values: \n\n- `'sentences_logits'`: A 3D list (or tensor) ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_output_sentence({'sentences_logits': [[[0.1, 0.2], [0.3, 0.4]]], 'sentences_widx': [[[1], [2]]], 'sentences_one_hot': [[[0, 1], [1, 0]]], 'experiences': [[[1, 2, 3]]], 'exp_latents': [[0.5, 0.6]], 'multi_round': True, 'graphtype': 'simple'}) == {'ou...
{ "split": "train", "index": 3253, "acecode_id": "oss_24585", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `is_valid_sequence(nums)` that checks if the list contains a sequence of numbers that can be represented as a continuous range without any missing integers. The function should return True if such a sequence exists, and False otherwise...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_valid_sequence([3, 4, 5, 6]) == True\", \"assert is_valid_sequence([1, 2, 3]) == True\", \"assert is_valid_sequence([5, 3, 4, 6]) == True\", \"assert is_valid_sequence([1, 1, 2, 2]) == True\", \"assert is_valid_sequence([1, 2, 4]) == False\", \"assert is_...
{ "split": "train", "index": 3254, "acecode_id": "bigcode_python_fns_17638", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a simple package management system that can handle the installation and removal of packages. Your system should support adding new packages and removing existing packages. To achieve this, you need to implement a function called `manage_packages(ope...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert manage_packages([('add', 'package1')]) == ['package1']\", \"assert manage_packages([('add', 'package2'), ('add', 'package3')]) == ['package2', 'package3']\", \"assert manage_packages([('add', 'package4'), ('remove', 'package4')]) == []\", \"assert manage_pac...
{ "split": "train", "index": 3255, "acecode_id": "oss_34906", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that generates the vertices and faces of a rectangular box mesh given its dimensions. The function should take three float parameters: x_extent, y_extent, and z_extent, which represent the lengths of the box along the x, y, and z axes, re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert box_mesh(2.0, 3.0, 4.0) == ([ [1.0, 1.5, 2.0], [1.0, 1.5, -2.0], [1.0, -1.5, 2.0], [1.0, -1.5, -2.0], [-1.0, 1.5, 2.0], [-1.0, 1.5, -2.0], [-1.0, -1.5, 2.0], [-1.0, -1.5, -2.0] ], [[0, 1, 3, 2], [4, 6, 7, 5], [0, 2, 6, 4], [1, 5, 7, 3], [0, 4, 5, 1], [2, 3, ...
{ "split": "train", "index": 3256, "acecode_id": "bigcode_python_fns_45678", "num_tests": 13 }
acecode
[ { "role": "user", "content": "Implement a function `parse_html(html_string: str) -> dict` that takes an HTML string as input and returns a dictionary containing the count of each HTML tag found in the input string. The keys of the dictionary should be the tag names (without angle brackets), and the values s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert parse_html('<div><p>Hello</p><div></div></div>') == {'div': 2, 'p': 1}\", \"assert parse_html('<html><body><h1>Title</h1><p>Paragraph</p></body></html>') == {'html': 1, 'body': 1, 'h1': 1, 'p': 1}\", \"assert parse_html('') == {}\", \"assert parse_html('<div...
{ "split": "train", "index": 3257, "acecode_id": "evol_18666", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `prime_status(start: int, end: int) -> List[str]` that takes two integers, `start` and `end`, and returns a list of strings. Each string should represent the numbers in the range from `start` to `end` (inclusive), formatted as 'number is prime' if the number is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prime_status(1, 5) == ['1 is not prime', '2 is prime', '3 is prime', '4 is not prime', '5 is prime']\", \"assert prime_status(10, 15) == ['10 is not prime', '11 is prime', '12 is not prime', '13 is prime', '14 is not prime', '15 is not prime']\", \"assert pr...
{ "split": "train", "index": 3258, "acecode_id": "evol_6923", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `evaluate_net` that takes the list as input and returns the sum of the squares of all the even numbers in the list. If there are no even numbers, return 0.\nPlease reason step by step, then write a self-contained Python solution. Give ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert evaluate_net([1, 2, 3, 4, 5]) == 20\", \"assert evaluate_net([1, 3, 5, 7]) == 0\", \"assert evaluate_net([]) == 0\", \"assert evaluate_net([2, 4, 6]) == 56\", \"assert evaluate_net([-2, -4, 1, 3]) == 20\", \"assert evaluate_net([0, 1, 3, 5]) == 0\", \"assert...
{ "split": "train", "index": 3259, "acecode_id": "bigcode_python_fns_27564", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with writing a function that takes an integer `number` as input and converts it into a list of its individual digits. The function should return a list where each element is an integer representing a digit from the input number, in the same order. If the input nu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_to_digits(12345) == [1, 2, 3, 4, 5]\", \"assert convert_to_digits(987654321) == [9, 8, 7, 6, 5, 4, 3, 2, 1]\", \"assert convert_to_digits(0) == [0]\", \"assert convert_to_digits(-123) == [1, 2, 3]\", \"assert convert_to_digits(-987) == [9, 8, 7]\", \...
{ "split": "train", "index": 3260, "acecode_id": "oss_36433", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a hospital with a name and a capacity, along with a list of resident names that the hospital matched with. Implement a function `get_worst_match(hospital_name: str, capacity: int, pref_names: List[str]) -> str` that returns the name of the resident that is conside...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_worst_match('City Hospital', 3, ['Alice', 'Bob', 'Charlie']) == 'Charlie'\", \"assert get_worst_match('City Hospital', 3, ['Alice']) == 'Alice'\", \"assert get_worst_match('City Hospital', 3, []) == ''\", \"assert get_worst_match('Health Center', 2, ['Da...
{ "split": "train", "index": 3261, "acecode_id": "bigcode_python_fns_24225", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given two lists of integers, `list1` and `list2`, write a function `cartesian_product(list1, list2)` that returns a list of tuples representing the Cartesian product of the two lists. The Cartesian product of two sets A and B is the set of all possible ordered pairs (a, b) wher...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert cartesian_product([1, 2], [3, 4]) == [(1, 3), (1, 4), (2, 3), (2, 4)]\", \"assert cartesian_product([1], [2]) == [(1, 2)]\", \"assert cartesian_product([], [1, 2, 3]) == []\", \"assert cartesian_product([1, 2, 3], []) == []\", \"assert cartesian_product([1, ...
{ "split": "train", "index": 3262, "acecode_id": "oss_36062", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `validate_api_keys(api_keys: List[int]) -> Tuple[int, List[int]]` that checks if the provided API keys are valid. An API key is considered valid if it is a positive integer. The function should return a tuple where the first element is...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_api_keys([1, -2, 3, 0, 5]) == (3, [1, 3, 5])\", \"assert validate_api_keys([-1, -2, -3]) == (0, [])\", \"assert validate_api_keys([0, 0, 0]) == (0, [])\", \"assert validate_api_keys([10, 20, 30]) == (3, [10, 20, 30])\", \"assert validate_api_keys([-...
{ "split": "train", "index": 3263, "acecode_id": "bigcode_python_fns_12082", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a string consisting of several column names separated by spaces, write a function `create_column_dict` that returns a dictionary mapping each column name to its index in the order they appear. If a column name ends with a '!', it indicates that the column contains non-UTF...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert create_column_dict('name age! height weight name') == {'name': 0, 'age': 1, 'height': 2, 'weight': 3}\", \"assert create_column_dict('id name! age name id') == {'id': 0, 'name': 1, 'age': 2}\", \"assert create_column_dict('column1 column2! column3 column1') ...
{ "split": "train", "index": 3264, "acecode_id": "bigcode_python_fns_48405", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of bounding boxes defined by their bottom-left corner coordinates and their width and height. Each bounding box is represented as a list of four integers: [x, y, width, height]. Your task is to determine the total area covered by these bounding boxes. Note ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert calculate_total_area([[1, 1, 2, 2], [2, 2, 2, 2], [3, 3, 1, 1]]) == 7\", \"assert calculate_total_area([[0, 0, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1]]) == 3\", \"assert calculate_total_area([[0, 0, 2, 2], [1, 1, 2, 2], [2, 2, 1, 1]]) == 7\", \"assert calculate_to...
{ "split": "train", "index": 3265, "acecode_id": "bigcode_python_fns_40513", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are given a field of view (FOV) configuration represented as a dictionary containing various attributes. Implement a function `validate_fov(fov_config: Dict[str, Any]) -> bool` that checks if the FOV configuration is valid based on the following criteria: 1. The field name ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert validate_fov({'fov_name': 'Std_SA100', 'format_version': '1.0', 'ra': 135.0, 'dec': -0.6333, 'chart': 'X15687X', 'fov_date': '12/20/2015', 'main_target': 'Standard', 'target_type': 'Standard', 'observing_list': [('V', 11.5, 1)], 'aavso_stars': [{'is_valid': ...
{ "split": "train", "index": 3266, "acecode_id": "bigcode_python_fns_22681", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes a list of product tuples and returns a list of dictionaries representing those products. Each product tuple consists of three elements: an integer ID, a string name (with a maximum length of 100 characters), and a float price. ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert convert_products([(1, 'Product A', 10.5), (2, 'Product B', 20.0)]) == [{'id': 1, 'name': 'Product A', 'price': 10.5}, {'id': 2, 'name': 'Product B', 'price': 20.0}]\", \"assert convert_products([(3, 'Product C', 15.75)]) == [{'id': 3, 'name': 'Product C', 'p...
{ "split": "train", "index": 3267, "acecode_id": "oss_5418", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that simulates the output of a command executed with given arguments. Write a function called `execute_command` that accepts two parameters: `command` (a string representing the command) and `args` (a list of strings representing t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert execute_command('ls', ['-l']) == ('Command executed', 0)\", \"assert execute_command('echo', ['Hello, World!']) == ('Command executed', 0)\", \"assert execute_command('pwd', []) == ('Command executed', 0)\", \"assert execute_command('whoami', []) == ('Comman...
{ "split": "train", "index": 3268, "acecode_id": "oss_23603", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that checks if a document is available in a content library based on its identifier. The function should take a string identifier as input and return a boolean value: True if the document exists, and False otherwise. The list of available...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_document_available('doc123') == True\", \"assert is_document_available('doc456') == True\", \"assert is_document_available('doc000') == False\", \"assert is_document_available('docghi') == False\", \"assert is_document_available('docmno') == False\", \"as...
{ "split": "train", "index": 3269, "acecode_id": "bigcode_python_fns_48402", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with generating a platform architecture string based on the given platform type and settings. Implement the function `generate_platform_string(platform_type: str, settings: dict) -> str` that takes the following inputs: \n\n- `platform_type`: A string representin...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert generate_platform_string('ios', {'//command_line_option:ios_multi_cpus': ['arm64'], '//command_line_option:cpu': 'some_cpu'}) == 'ios_arm64'\", \"assert generate_platform_string('macos', {'//command_line_option:macos_cpus': ['arm64']}) == 'darwin_arm64'\", \...
{ "split": "train", "index": 3270, "acecode_id": "bigcode_python_fns_36188", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function `connect_to_host(address: str, port: int) -> str` that simulates opening a connection to a remote host. The function should return a string indicating the status of the connection: 'Connection to {address}:{port} established.' if the conn...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert connect_to_host('localhost', 80) == 'Connection to localhost:80 established.'\", \"assert connect_to_host('127.0.0.1', 443) == 'Connection to 127.0.0.1:443 established.'\", \"assert connect_to_host('example.com', 8080) == 'Connection to example.com:8080 esta...
{ "split": "train", "index": 3271, "acecode_id": "bigcode_python_fns_4690", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of integers representing values in a dataset. Your task is to implement a function that removes any integer values that are equal to -1, which are considered as missing values. The function should return a new list containing only the integers that are not ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert remove_missing_values([1, 2, -1, 4, -1, 5]) == [1, 2, 4, 5]\", \"assert remove_missing_values([-1, -1, -1]) == []\", \"assert remove_missing_values([0, 1, 2, 3]) == [0, 1, 2, 3]\", \"assert remove_missing_values([-1, 2, -1, 3, 4]) == [2, 3, 4]\", \"assert re...
{ "split": "train", "index": 3272, "acecode_id": "bigcode_python_fns_19767", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a simple error handling system for a software application. You have a set of error codes, each associated with a meaningful error message. Your function should take an error code as input and return the corresponding error message. If the error ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_error_message(31522) == 'Positive keyword not loaded (UniquenessError)'\", \"assert get_error_message(31531) == 'Negative keyword not loaded (TypeError)'\", \"assert get_error_message(31532) == 'Negative keyword not loaded (UniquenessError)'\", \"assert ...
{ "split": "train", "index": 3273, "acecode_id": "oss_24711", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `start_game()` that initializes a CLI space invader game with a score of 0 and level 1. The function should return the initialized game state as a dictionary containing the score, level, and an empty list of invaders. The game should be designed to have 10 ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert start_game() == {'score': 0, 'level': 1, 'invaders': [], 'spaceship': {'x': 40, 'y': 20}}\", \"assert start_game()['score'] == 0\", \"assert start_game()['level'] == 1\", \"assert isinstance(start_game()['invaders'], list)\", \"assert len(start_game()['invad...
{ "split": "train", "index": 3274, "acecode_id": "evol_23968", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given an array of integers. Your task is to implement a function that sorts the array in ascending order using the merge sort algorithm. The function should take an array as input and return the sorted array. Do not use any external libraries for sorting. Your implement...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert merge_sort([]) == []\", \"assert merge_sort([5]) == [5]\", \"assert merge_sort([3, 1, 4]) == [1, 3, 4]\", \"assert merge_sort([4, 3, 2, 1]) == [1, 2, 3, 4]\", \"assert merge_sort([2, -1, 0, 3]) == [-1, 0, 2, 3]\", \"assert merge_sort([1, 2, 3]) == [1, 2, 3]\...
{ "split": "train", "index": 3275, "acecode_id": "bigcode_python_fns_25494", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that checks if a given skill ID exists in a list of skills. Each skill has a unique ID and a name. Your function should take a skill ID as input and return a boolean indicating whether the skill ID is found in the list. Implement the func...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert is_skill_available('skill_1', [{'id': 'skill_1', 'name': 'Skill One'}, {'id': 'skill_2', 'name': 'Skill Two'}]) == True\", \"assert is_skill_available('skill_2', [{'id': 'skill_1', 'name': 'Skill One'}, {'id': 'skill_2', 'name': 'Skill Two'}]) == True\", \"a...
{ "split": "train", "index": 3276, "acecode_id": "bigcode_python_fns_4222", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `triangle_area(base: float, height: float) -> float` that calculates the area of a triangle given its base and height. The area of a triangle can be computed using the formula: Area = 0.5 * base * height. The function should return the calculated area as a floa...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert triangle_area(10, 5) == 25.0\", \"assert triangle_area(7, 3) == 10.5\", \"assert triangle_area(0, 5) == 0.0\", \"assert triangle_area(5, 0) == 0.0\", \"assert triangle_area(3, 4) == 6.0\", \"assert triangle_area(1, 1) == 0.5\", \"assert triangle_area(15, 10)...
{ "split": "train", "index": 3277, "acecode_id": "evol_21978", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Design a function `get_synonyms(word: str, thesaurus: Dict[str, List[str]]) -> List[str]` that takes a word and a thesaurus represented as a dictionary, where each key is a word and its corresponding value is a list of synonyms. The function should return the list of synonyms f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_synonyms('happy', {'happy': ['cheerful', 'content', 'pleased', 'joyful']}) == ['cheerful', 'content', 'pleased', 'joyful']\", \"assert get_synonyms('sad', {'happy': ['cheerful', 'content', 'pleased', 'joyful']}) == []\", \"assert get_synonyms('excited', ...
{ "split": "train", "index": 3278, "acecode_id": "evol_3943", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, implement a function that determines and returns the 3 lowest even numbers from the list. If there are fewer than 3 even numbers, return all of them. The function should only return even numbers and should not modify the original list.\nPlease reason s...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert lowest_even_numbers([12, 7, 18, 2, 10, 15, 20, 4, 13, 22, 17, 16, 14, 6, 8], 3) == [2, 4, 6]\", \"assert lowest_even_numbers([1, 3, 5, 7, 9], 3) == []\", \"assert lowest_even_numbers([10, 20, 30, 40, 50], 3) == [10, 20, 30]\", \"assert lowest_even_numbers([1...
{ "split": "train", "index": 3279, "acecode_id": "evol_32330", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a list of file names and a tuple of file extensions. Write a function that returns a list of file names that have one of the given extensions. The function should be case-insensitive, meaning it should match extensions regardless of their case. \n\nImplement the f...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_files(['example.txt', 'test.doc', 'sample.PNG', 'note.py'], ('.txt', '.doc')) == ['example.txt', 'test.doc']\", \"assert filter_files(['photo.jpg', 'document.pdf', 'report.docx'], ('.pdf', '.jpg')) == ['photo.jpg', 'document.pdf']\", \"assert filter_f...
{ "split": "train", "index": 3280, "acecode_id": "bigcode_python_fns_23728", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Write a function `format_datetime_to_iso(dt: datetime) -> str` that takes a datetime object as input and returns its ISO 8601 string representation in the 'Europe/Zagreb' timezone. The input datetime is assumed to be in UTC format. The output should be a string in the format 'Y...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert format_datetime_to_iso(datetime(2023, 10, 1, 12, 0, 0)) == '2023-10-01T14:00:00+02:00'\", \"assert format_datetime_to_iso(datetime(2023, 10, 1, 0, 0, 0)) == '2023-10-01T02:00:00+02:00'\", \"assert format_datetime_to_iso(datetime(2023, 10, 31, 12, 0, 0)) == '...
{ "split": "train", "index": 3281, "acecode_id": "bigcode_python_fns_48128", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a string representing a hexadecimal file hash. Your task is to convert this hexadecimal string into its corresponding byte representation. The input string will only contain valid hexadecimal digits (0-9, a-f). The output should be a bytes object that represents t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert hex_to_bytes('') == b''\", \"assert hex_to_bytes('1a') == b'\\\\x1a'\", \"assert hex_to_bytes('2b') == b'\\\\x2b'\", \"assert hex_to_bytes('3f') == b'\\\\x3f'\", \"assert hex_to_bytes('4e') == b'\\\\x4e'\", \"assert hex_to_bytes('5d') == b'\\\\x5d'\", \"asse...
{ "split": "train", "index": 3282, "acecode_id": "bigcode_python_fns_32234", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are given a numerical matrix and a singular numerical value. Your task is to write a function that inserts this specific numerical value as the final element of the last list within the given matrix. The function should return the modified matrix after the insertion.\nPleas...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert insert_into_matrix([[1, 2], [3, 4, 5]], 6) == [[1, 2], [3, 4, 5, 6]]\", \"assert insert_into_matrix([[10, 20], [30]], 40) == [[10, 20], [30, 40]]\", \"assert insert_into_matrix([[1]], 2) == [[1, 2]]\", \"assert insert_into_matrix([[1, 2, 3], []], 4) == [[1, ...
{ "split": "train", "index": 3283, "acecode_id": "evol_17171", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of points in a 2D space represented as tuples (x, y), calculate the minimum distance between a point and the closest line formed by any two other points. The distance should be computed as the perpendicular distance from the point to the line. If the point lies on ...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert minimum_distance([(0, 0), (1, 1), (2, 2)]) == 0.0\", \"assert minimum_distance([(0, 0), (2, 2), (3, 3), (5, 5)]) == 0.0\", \"assert minimum_distance([(1, 2), (3, 4), (5, 6), (7, 8)]) == 0.0\", \"assert minimum_distance([(1, 1), (2, 2), (3, 3), (4, 4)]) == 0....
{ "split": "train", "index": 3284, "acecode_id": "bigcode_python_fns_14182", "num_tests": 9 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that determines the default configuration file path based on a given working directory. The function should take a string representing the working directory and return the full path to the default configuration file. The default configura...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert get_conf_file_default_path('project') == 'project/config.json'\", \"assert get_conf_file_default_path('test') == 'test/config.json'\", \"assert get_conf_file_default_path('my_folder') == 'my_folder/config.json'\", \"assert get_conf_file_default_path('C:/User...
{ "split": "train", "index": 3285, "acecode_id": "bigcode_python_fns_30191", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `string_operations(my_string: str) -> Tuple[str, bool, bool]` that takes a string `my_string` of variable length (up to 20 characters) and returns a tuple with three elements: the reversed string, a boolean indicating whether the string is a palindrome, and...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert string_operations('hello') == ('olleh', False, False)\", \"assert string_operations('rotator') == ('rotator', True, False)\", \"assert string_operations('listen') == ('netsil', False, True)\", \"assert string_operations('silent') == ('tnelis', False, True)\"...
{ "split": "train", "index": 3286, "acecode_id": "evol_25295", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function to determine whether a specific file should be processed based on its processing history. You have a dictionary `cron_history` that keeps track of the processing status of files, where the keys are filenames and the values are diction...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert should_process_file('file1.txt', {'file1.txt': {'processed': True}}) == False\", \"assert should_process_file('file2.txt', {'file2.txt': {'processed': False}}) == True\", \"assert should_process_file('file3.txt', {}) == True\", \"assert should_process_file('...
{ "split": "train", "index": 3287, "acecode_id": "oss_21330", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of file paths and a specific file suffix, implement a function that returns a list of all file paths that end with the specified suffix. The input will be a list of strings where each string is a file path, and a string suffix. The function should only consider the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert filter_files(['file1.txt', 'file2.nc', 'file3.nc', 'file4.jpg'], '.nc') == ['file2.nc', 'file3.nc']\", \"assert filter_files(['document.pdf', 'image.png', 'video.mp4'], '.mp4') == ['video.mp4']\", \"assert filter_files([], '.jpg') == []\", \"assert filter_fi...
{ "split": "train", "index": 3288, "acecode_id": "bigcode_python_fns_4623", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, your task is to implement a function that transforms this list by converting all negative integers to zero, while leaving non-negative integers unchanged. The function should return the modified list. For example, if the input list is [-1, 2, -3, 4], t...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert transform_list([-1, 2, -3, 4]) == [0, 2, 0, 4]\", \"assert transform_list([0, -10, 5, -1]) == [0, 0, 5, 0]\", \"assert transform_list([-5, -2, -8]) == [0, 0, 0]\", \"assert transform_list([3, 4, 5]) == [3, 4, 5]\", \"assert transform_list([-1, -1, -1, -1]) =...
{ "split": "train", "index": 3289, "acecode_id": "bigcode_python_fns_42530", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given an energy value in keV (kiloelectronvolts), write a function that calculates the corresponding wavelength in Angstroms. The wavelength can be calculated using the formula: wavelength (λ) = 12.3984 / energy (in keV). Implement the function 'kev_to_wavelength(kev: float) ->...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert abs(kev_to_wavelength(1) - 12.3984) < 1e-5\", \"assert abs(kev_to_wavelength(5) - 2.47968) < 1e-5\", \"assert abs(kev_to_wavelength(10) - 1.23984) < 1e-5\", \"assert abs(kev_to_wavelength(15) - 0.82656) < 1e-5\", \"assert abs(kev_to_wavelength(20) - 0.61992)...
{ "split": "train", "index": 3290, "acecode_id": "bigcode_python_fns_728", "num_tests": 13 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that determines the appropriate block size for a cryptographic algorithm based on the specified length of bytes. The function should follow the following rules: \n\n- If the specified length of bytes is less than or equal to 0, the fu...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert determine_block_size(-5) == 0\", \"assert determine_block_size(0) == 0\", \"assert determine_block_size(5) == 12\", \"assert determine_block_size(10) == 12\", \"assert determine_block_size(12) == 12\", \"assert determine_block_size(13) == 16\", \"assert dete...
{ "split": "train", "index": 3291, "acecode_id": "oss_5294", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Given a list of integers, write a function `find_maximum` that returns the maximum integer from the list. If the list is empty, return None. The function should handle both positive and negative integers. For example, if the input list is [3, 1, 4, 1, 5, 9], the output should b...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert find_maximum([3, 1, 4, 1, 5, 9]) == 9\", \"assert find_maximum([-1, -2, -3]) == -1\", \"assert find_maximum([0]) == 0\", \"assert find_maximum([2, 2, 2]) == 2\", \"assert find_maximum([]) == None\", \"assert find_maximum([-10, -5, -1]) == -1\", \"assert find...
{ "split": "train", "index": 3292, "acecode_id": "bigcode_python_fns_34993", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `isolated_element(array)` that takes an array as input and returns the first element of the array if it contains exactly one element. If the array contains multiple elements, the function should raise an exception with the message 'Array contains multiple e...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert isolated_element([42]) == 42\", \"assert isolated_element(['hello']) == 'hello'\", \"assert isolated_element([3.14]) == 3.14\", \"assert isolated_element(['a']) == 'a'\", \"assert isolated_element([True]) == True\", \"assert isolated_element(['single element...
{ "split": "train", "index": 3293, "acecode_id": "evol_4450", "num_tests": 12 }
acecode
[ { "role": "user", "content": "You are tasked with implementing a function that splits a row of a table into individual cells based on certain delimiters and escape sequences. Your function should take a string representing a row of the table as input and return a list of individual cells after splitting the...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert split_row('name|age|${EMPTY}|city') == ['name', 'age', 'EMPTY', 'city']\", \"assert split_row('name|age|${EMPTY}|city # comment') == ['name', 'age', 'EMPTY', 'city']\", \"assert split_row('# comment line') == []\", \"assert split_row('${EMPTY}|${EMPTY}|${EMP...
{ "split": "train", "index": 3294, "acecode_id": "oss_33557", "num_tests": 8 }
acecode
[ { "role": "user", "content": "Implement a function that groups a list of dictionaries based on a specified key. Each dictionary contains various attributes, and you need to organize them into a new dictionary where the keys are the unique values of the specified attribute, and the values are lists of dictio...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert group_by_criteria([{'name': 'Alice', 'age': 20}, {'name': 'Bob', 'age': 22}, {'name': 'Carol', 'age': 18}], 'age') == {20: [{'name': 'Alice', 'age': 20}], 22: [{'name': 'Bob', 'age': 22}], 18: [{'name': 'Carol', 'age': 18}]}\", \"assert group_by_criteria([{'...
{ "split": "train", "index": 3295, "acecode_id": "evol_12822", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes user annotations. The function should take in the following parameters: \n- `user` (string): The username of the user whose annotations are being processed.\n- `json_annotations` (dict): A dictionary containing the a...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert process_annotations('admin', {}, {}, 'sha1', 5, 10) == {'annotations': 5, 'relations': 10}\", \"assert process_annotations('user1', {}, {}, 'sha1', 5, 10) == {}\", \"assert process_annotations('admin', {}, {}, 'sha2', 0, 0) == {'annotations': 0, 'relations':...
{ "split": "train", "index": 3296, "acecode_id": "oss_7120", "num_tests": 16 }
acecode
[ { "role": "user", "content": "Implement a function `greet_person(name: str) -> str` that takes a person's name as input and returns a greeting string in the format 'Hello, <name>'. Make sure to handle cases where the input name might be an empty string. If the name is empty, return 'Hello, Guest'.\nPlease r...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert greet_person('Jane') == 'Hello, Jane'\", \"assert greet_person('Alice') == 'Hello, Alice'\", \"assert greet_person('') == 'Hello, Guest'\", \"assert greet_person('Bob') == 'Hello, Bob'\", \"assert greet_person('') == 'Hello, Guest'\", \"assert greet_person('...
{ "split": "train", "index": 3297, "acecode_id": "evol_25025", "num_tests": 16 }
acecode
[ { "role": "user", "content": "You are tasked with creating a Python function that processes a simplified HTML content string to extract movie information. The function should take the HTML content as input and return a dictionary containing the extracted data. The HTML content may include multiple genres re...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert extract_movie_info('<span property=\\\"v:genre\\\">Comedy</span><span class=\\\"all hidden\\\">Funny moments newline and more.</span>') == { 'genre': 'Comedy', 'description': 'Funny moments <br/> and more.' }\", \"assert extract_movie_info('<span property=\\...
{ "split": "train", "index": 3298, "acecode_id": "oss_3928", "num_tests": 14 }
acecode
[ { "role": "user", "content": "You are tasked with creating a function that takes two optional parameters: 'statement_name' and 'work_group', both of which are strings. The function will return a dictionary that contains a description and a query statement based on these inputs. If 'statement_name' is provid...
code
{ "style": "rule", "ground_truth": "{\"tests\": [\"assert prepare_statement('TestStatement', 'TestGroup') == {'description': 'Prepared statement for: TestStatement', 'query_statement': 'SELECT * FROM TestGroup;'}\", \"assert prepare_statement('Statement1', None) == {'description': 'Prepared statement for: Statement...
{ "split": "train", "index": 3299, "acecode_id": "bigcode_python_fns_17845", "num_tests": 15 }