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 given a list of floating-point numbers. Your task is to implement a function that processes this list by applying an optional transformation function and an optional filter function. The function should return a list of numbers that have been transformed and filtered ac... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_floats([1.0, 2.0, 3.0], None, None) == [1.0, 2.0, 3.0]\", \"assert process_floats([], None, None) == []\", \"assert process_floats([1.0, 2.0, 3.0], lambda x: x * 2, None) == [2.0, 4.0, 6.0]\", \"assert process_floats([1.0, 2.0, 3.0], None, lambda x: ... | {
"split": "train",
"index": 72700,
"acecode_id": "oss_17901",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that determines if a given geographical point (latitude and longitude) is within a specified radius of any of the given points. The function should take a list of geographical points and a target point along with the radius. Your func... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_point_within_radius([(34.0522, -118.2437), (40.7128, -74.0060)], (34.0522, -118.2437), 5) == True\", \"assert is_point_within_radius([(34.0522, -118.2437), (40.7128, -74.0060)], (34.0522, -118.2437), 0) == True\", \"assert is_point_within_radius([(34.0522... | {
"split": "train",
"index": 72701,
"acecode_id": "oss_5269",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, write a function that returns a new list containing only the unique elements from the original list in the order they first appeared. Your function should remove any duplicates while preserving the original order of the elements. The input list may con... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert unique_elements([1, 2, 2, 3, 1]) == [1, 2, 3]\", \"assert unique_elements([4, 5, 4, 6, 5, 7]) == [4, 5, 6, 7]\", \"assert unique_elements([-1, -1, 0, 1, 1, -2]) == [-1, 0, 1, -2]\", \"assert unique_elements([0, 0, 0, 0]) == [0]\", \"assert unique_elements([]... | {
"split": "train",
"index": 72702,
"acecode_id": "bigcode_python_fns_10325",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given two lists of numbers, `data_1` and `data_2`, write a function `find_rmse(data_1: List[float], data_2: List[float]) -> float` that calculates the Root Mean Square Error (RMSE) between the two lists. The RMSE is defined as the square root of the average of the squared diffe... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_rmse([1.0, 2.0, 3.0], [1.0, 2.0, 3.0]) == 0.0\", \"assert find_rmse([1.0, 2.0, 3.0], [4.0, 5.0, 6.0]) == 3.0\", \"assert find_rmse([1, 2, 3], [1, 2, 3]) == 0.0\", \"assert find_rmse([0, 0, 0], [0, 0, 0]) == 0.0\", \"assert find_rmse([10, 20, 30], [10, 2... | {
"split": "train",
"index": 72703,
"acecode_id": "bigcode_python_fns_44354",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "Implement a function `filter_urls(urls: List[str], fmt: str) -> List[str]` that filters a given list of URLs based on a specified format. The format will be a string that may or may not start with 'www.'. The function should return a list of URLs that match the given format. Th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert filter_urls(['https://www.google.com', 'https://www.facebook.com', 'https://www.example.com/path1'], 'www.example.com/') == ['https://www.example.com/path1']\", \"assert filter_urls(['https://www.example.com', 'https://www.google.com'], 'www.google.com/') ==... | {
"split": "train",
"index": 72704,
"acecode_id": "evol_14475",
"num_tests": 8
} |
acecode | [
{
"role": "user",
"content": "You are given a list of 3D coordinates representing the positions of joints in a skeleton. Your task is to implement a function `average_joint_distance` that calculates the average distance between all pairs of joints using the Euclidean distance formula: distance = sqrt((x2 - ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert average_joint_distance([(0, 0, 0), (1, 0, 0)]) == 1.0\", \"assert average_joint_distance([(0, 0, 0), (0, 1, 0)]) == 1.0\", \"assert average_joint_distance([(0, 0, 0), (0, 0, 1)]) == 1.0\", \"assert average_joint_distance([(0, 0, 0), (1, 1, 1)]) == 1.73205080... | {
"split": "train",
"index": 72705,
"acecode_id": "oss_23562",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a program that processes a list of website URLs and generates a report containing the frequency of each top-level domain (TLD) present in the list. A top-level domain is the last part of a domain name, such as '.com', '.org', or '.net'. The program ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_tld_frequencies(['https://www.example.com', 'https://www.test.org', 'https://www.sample.net', 'https://www.demo.com', 'https://www.check.org', 'https://www.try.net']) == ([('com', 2), ('org', 2), ('net', 2)], 3)\", \"assert count_tld_frequencies(['http... | {
"split": "train",
"index": 72706,
"acecode_id": "oss_8127",
"num_tests": 13
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that processes a JSON object representing a question posted in a forum. The input is a dictionary containing the keys 'meetup_id', 'user_id', and 'question_text'. Your function should verify if the 'meetup_id' exists in a predefined l... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert post_question({'meetup_id': 1, 'user_id': 123, 'question_text': 'What time is the meetup?'}) == {'status': 201, 'message': 'Question posted successfully', 'data': {'meetup_id': 1, 'user_id': 123, 'question_text': 'What time is the meetup?'}}\", \"assert post... | {
"split": "train",
"index": 72707,
"acecode_id": "bigcode_python_fns_26893",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "You are given two lists of integers, `fpar_data` and `qc_data`, representing fractional plant cover data and quality control data, respectively. Each integer in `fpar_data` should be treated as a pixel value ranging from 0 to 255, while each integer in `qc_data` should be treat... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert filter_fpar_data([50, 60, 70], [0b00000000, 0b00000000, 0b00000000], 100, -5) == [50, 60, 70]\", \"assert filter_fpar_data([300, 255, 150], [0b11010111, 0b00000001, 0b00000000], 250, -999) == [-999, -999, 150]\", \"assert filter_fpar_data([0, 1, 2], [0b00000... | {
"split": "train",
"index": 72708,
"acecode_id": "bigcode_python_fns_31605",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that returns a specific acknowledgement message related to a scientific facility. Implement a function named `get_acknowledgement` that takes no parameters and returns a string. The returned string should be: 'The Jicamarca Radio Observat... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_acknowledgement() == 'The Jicamarca Radio Observatory is a facility of the Instituto Geofisico del Peru operated with support from the NSF AGS-1433968 through Cornell University.'\", \"assert get_acknowledgement() != 'This is a different message.'\", \"a... | {
"split": "train",
"index": 72709,
"acecode_id": "bigcode_python_fns_39611",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "You are given a string that represents a Landsat scene ID, which follows a specific format. The ID is 23 characters long and must start with 'L', followed by a 3-digit number, a 3-digit number, a 4-digit number, and ends with a 4-character suffix. Write a function `validate_lan... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert validate_landsat_id('L1234567890123ABC00') == False\", \"assert validate_landsat_id('L0300342017083') == False\", \"assert validate_landsat_id('X0300342017083LGN00') == False\", \"assert validate_landsat_id('L0300342017083LGN0') == False\", \"assert validate... | {
"split": "train",
"index": 72710,
"acecode_id": "bigcode_python_fns_7685",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that takes a dictionary of services and a list of existing service names, and returns a list of service names that need to be registered. Each service is represented by a dictionary containing a URL and a type. A service should be reg... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_services_to_register({'service1': {'url': 'http://service1.com', 'type': 'type1'}, 'service2': {'url': 'http://service2.com', 'type': 'type2'}}, ['service1']) == ['service2']\", \"assert get_services_to_register({'serviceA': {'url': 'http://serviceA.com'... | {
"split": "train",
"index": 72711,
"acecode_id": "bigcode_python_fns_20407",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Define a function called `greet` that takes a string parameter `name` and returns a greeting message in the format 'Hello, {name}!' where {name} is replaced by the provided name. Ensure that the function correctly handles different name inputs.\nPlease reason step by step, then... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert greet('Alice') == 'Hello, Alice!'\", \"assert greet('Bob') == 'Hello, Bob!'\", \"assert greet('Charlie') == 'Hello, Charlie!'\", \"assert greet('David') == 'Hello, David!'\", \"assert greet('Eve') == 'Hello, Eve!'\", \"assert greet('Zoe') == 'Hello, Zoe!'\",... | {
"split": "train",
"index": 72712,
"acecode_id": "evol_8237",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are given a string `variant` representing a genetic variant and a list of `traits` where each trait is separated by a comma. The `variant` string consists of characters 'A', 'C', 'G', and 'T', which represent different alleles. Your task is to count the number of reference ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_ref_alleles('ACGTA', 'trait1,trait2') == 0\", \"assert count_ref_alleles('ACGT', '') == 0\", \"assert count_ref_alleles('AACCGGTT', 'trait1,trait2,trait3') == 0\", \"assert count_ref_alleles('ACGTACGT', 'trait1,trait1,trait2') == 0\", \"assert count_re... | {
"split": "train",
"index": 72713,
"acecode_id": "bigcode_python_fns_2487",
"num_tests": 6
} |
acecode | [
{
"role": "user",
"content": "Given a list of dictionaries, each representing a selection of items with their properties, write a function `filter_non_empty_dicts` that filters out any dictionaries which contain all values as None. The function should return a list of dictionaries that have at least one val... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert filter_non_empty_dicts([{'a': None, 'b': None}, {'a': 1, 'b': None}, {'a': None, 'b': 2}]) == [{'a': 1, 'b': None}, {'a': None, 'b': 2}]\", \"assert filter_non_empty_dicts([{'x': None, 'y': None}, {'x': None, 'y': None}]) == []\", \"assert filter_non_empty_d... | {
"split": "train",
"index": 72714,
"acecode_id": "bigcode_python_fns_20281",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that performs basic arithmetic operations. Specifically, you need to implement a function called `arithmetic_operations` that takes three parameters: `x`, `y`, and `operation`. The `operation` parameter is a string that specifies whic... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert arithmetic_operations(10, 5, 'add') == 15\", \"assert arithmetic_operations(10, 5, 'div') == 2\", \"assert arithmetic_operations(10, 0, 'div') == None\", \"assert arithmetic_operations(2, 3, 'bump2') == (3, 4)\", \"assert arithmetic_operations(0, 0, 'add') =... | {
"split": "train",
"index": 72715,
"acecode_id": "oss_23840",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a migration operation to alter a specific field in a `Todo` model. The model has the following fields: `title` (CharField), `description` (TextField), `priority` (IntegerField), `completed` (BooleanField), and `dateevent` (DateField). Your objective... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert alter_priority_field() == {'model_name': 'todo', 'name': 'priority', 'field_type': 'CharField', 'max_length': 20}\", \"assert alter_priority_field() != {'model_name': 'todo', 'name': 'completed', 'field_type': 'BooleanField', 'max_length': 20}\", \"assert al... | {
"split": "train",
"index": 72716,
"acecode_id": "oss_30601",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an integer representing a duration in seconds, write a function that converts this duration into a readable string format. The output should be in the form of 'X minutes Y seconds' if the duration is greater than 60 seconds, or 'Y seconds' if the duration is less than or ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert seconds_to_time(0) == '0 seconds'\", \"assert seconds_to_time(5) == '5 seconds'\", \"assert seconds_to_time(30) == '30 seconds'\", \"assert seconds_to_time(60) == '60 seconds'\", \"assert seconds_to_time(61) == '1 minutes 1 seconds'\", \"assert seconds_to_ti... | {
"split": "train",
"index": 72717,
"acecode_id": "bigcode_python_fns_25244",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates a web crawler. The function, `crawl_article_url`, takes an index URL as input and returns a list of article URLs found on the page. The function should check for duplicate URLs and only include unique URLs in the output... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert crawl_article_url(['http://example.com/article1', 'http://example.com/article2', 'http://example.com/article1']) == ['http://example.com/article1', 'http://example.com/article2']\", \"assert crawl_article_url(['http://example.com/article1', 'http://example.c... | {
"split": "train",
"index": 72718,
"acecode_id": "oss_32358",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function that computes the number of lowercase consonants found exclusively at odd indices of an input string. A lowercase consonant is defined as any lowercase letter that is not a vowel (i.e., 'a', 'e', 'i', 'o', 'u'). The function should return the total count of... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_lower('abcdefg') == 3\", \"assert count_lower('1234!@#$') == 0\", \"assert count_lower('ABCD') == 0\", \"assert count_lower('zYxWvU') == 0\", \"assert count_lower('hEllo') == 1\", \"assert count_lower('') == 0\", \"assert count_lower('Aeiou') == 0\", \... | {
"split": "train",
"index": 72719,
"acecode_id": "evol_7836",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "You are given a string containing a sequence of words, and your task is to identify the unique words in the string and return them as a list. A word is defined as a sequence of alphabetic characters, and it should be treated in a case-insensitive manner. The output list should ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert unique_sorted_words('Hello world hello') == ['hello', 'world']\", \"assert unique_sorted_words('Python is great and python is fun') == ['and', 'fun', 'great', 'is', 'python']\", \"assert unique_sorted_words('LeetCode Leetcode leetcode') == ['leetcode']\", \"... | {
"split": "train",
"index": 72720,
"acecode_id": "oss_35209",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of four integers, write a function `find_largest(numbers)` that returns the largest integer among them. The function should take a list of exactly four integers as input.\nPlease reason step by step, then write a self-contained Python solution. Give your final prog... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_largest([15, 72, 9, 124]) == 124\", \"assert find_largest([3, 5, 2, 8]) == 8\", \"assert find_largest([1, 1, 1, 1]) == 1\", \"assert find_largest([-1, -2, -3, -4]) == -1\", \"assert find_largest([100, 50, 25, 75]) == 100\", \"assert find_largest([0, -1,... | {
"split": "train",
"index": 72721,
"acecode_id": "evol_31369",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a Python function that calculates the cumulative sum of all integer values present within a nested dictionary structure. The dictionary may contain other dictionaries, lists, and integer values. Your function should traverse through all levels of the nested structure ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert nested_sum({'a': 1, 'b': 2}) == 3\", \"assert nested_sum({'a': {'b': 1}, 'c': 2}) == 3\", \"assert nested_sum({'a': [1, 2, 3], 'b': 4}) == 10\", \"assert nested_sum({'a': {'b': [1, 'x', 3], 'c': 2}, 'd': 5}) == 11\", \"assert nested_sum({'x': {'y': {'z': 1}}... | {
"split": "train",
"index": 72722,
"acecode_id": "evol_17687",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, write a function `getMaxValue(numbers)` that returns the maximum value from the list. If the list is empty, return None. The input list can contain both positive and negative integers. Your function should handle large lists efficiently. \n\nExample: \... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert getMaxValue([3, 1, 4, 1, 5, 9, 2, 6, 5]) == 9\", \"assert getMaxValue([-1, -5, -3]) == -1\", \"assert getMaxValue([0, 0, 0]) == 0\", \"assert getMaxValue([100]) == 100\", \"assert getMaxValue([-10, -20, -30]) == -10\", \"assert getMaxValue([1, 2, 3, 4, 5]) =... | {
"split": "train",
"index": 72723,
"acecode_id": "bigcode_python_fns_44556",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with writing a function that takes a Slack webhook URL and a message as input and simulates sending the message to a specified Slack channel. The function should return 'Message sent successfully!' if the provided webhook URL is valid (it should start with 'https... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert send_slack_message('https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX', 'Hello, Slack!') == 'Message sent successfully!'\", \"assert send_slack_message('https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX... | {
"split": "train",
"index": 72724,
"acecode_id": "oss_20894",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that checks if a given string is a valid token. A valid token must meet the following criteria: 1. It must be a non-empty string. 2. It must have a length between 10 and 50 characters inclusive. 3. It must contain at least one upperca... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_valid_token('ValidToken123!') == True\", \"assert is_valid_token('short') == False\", \"assert is_valid_token('1234567890') == False\", \"assert is_valid_token('VALIDTOKEN123!') == False\", \"assert is_valid_token('validtoken123!') == False\", \"assert is... | {
"split": "train",
"index": 72725,
"acecode_id": "bigcode_python_fns_23349",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are developing a social media platform called 'Sosia'. Your task is to simulate the initialization of a database connection using a predefined configuration. You need to write a Python function named `initialize_database_connection` that takes no arguments and returns a dic... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert initialize_database_connection() == {'credentials': 'user:password', 'host': 'localhost', 'port': 5432, 'name': 'sosia_db'}\", \"assert initialize_database_connection() != {'credentials': 'wrong_user:wrong_password', 'host': 'localhost', 'port': 5432, 'name'... | {
"split": "train",
"index": 72726,
"acecode_id": "oss_28979",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that updates a given URL string to a new one. The function should take two parameters: the current URL and the new URL. It should return the new URL. If the current URL is an empty string, the function should still return the new URL. Imp... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert update_url('http://example.com', 'http://newexample.com') == 'http://newexample.com'\", \"assert update_url('http://oldurl.com', 'http://updatedurl.com') == 'http://updatedurl.com'\", \"assert update_url('', 'http://firsturl.com') == 'http://firsturl.com'\",... | {
"split": "train",
"index": 72727,
"acecode_id": "oss_3589",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, write a function that returns a specified number of unique permutations of the list. If the requested number of permutations exceeds the available unique permutations, the function should return all unique permutations. The function should only return ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_unique_permutations([1, 2], 2) == [(1, 2), (2, 1)]\", \"assert get_unique_permutations([1, 1, 1], 1) == [(1, 1, 1)]\", \"assert get_unique_permutations([5], 1) == [(5,)]\", \"assert get_unique_permutations([1, 2, 3], 0) == []\", \"assert get_unique_permu... | {
"split": "train",
"index": 72728,
"acecode_id": "evol_3152",
"num_tests": 7
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a logging function that simulates logging error messages. Write a function `log_error_message(msg: str) -> None` that takes a message string as input and returns nothing. The function should print the message prefixed with the string '[ERROR] '.... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert log_error_message('File not found.') == None\", \"assert log_error_message('Access denied.') == None\", \"assert log_error_message('Unexpected error occurred.') == None\", \"assert log_error_message('Invalid input.') == None\", \"assert log_error_message('Op... | {
"split": "train",
"index": 72729,
"acecode_id": "bigcode_python_fns_3082",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating unique abbreviations for a list of unique non-empty strings. An abbreviation is formed by taking the first letter of the word, followed by the number of characters omitted, and then the last letter of the word. If two or more words generate the same... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_abbreviations(['abcd', 'abce', 'abcf', 'abcg', 'abch']) == ['a2d', 'a2e', 'a2f', 'a2g', 'a2h']\", \"assert generate_abbreviations(['a', 'b', 'c', 'd']) == ['a', 'b', 'c', 'd']\", \"assert generate_abbreviations(['unique', 'unicorn', 'universe', 'uni... | {
"split": "train",
"index": 72730,
"acecode_id": "evol_22059",
"num_tests": 5
} |
acecode | [
{
"role": "user",
"content": "Create a function named 'assemble' that takes a string of individual characters, `letters`, and a connecting string `string_connector` as inputs. The function should return a string with the `string_connector` inserted between every two consecutive letters from the input string... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert assemble('abc', 'z') == 'azbzc'\", \"assert assemble('a', 'z') == 'a'\", \"assert assemble('', 'z') == ''\", \"assert assemble('abcd', 'x') == 'axbxcxd'\", \"assert assemble('hello', ' ') == 'h e l l o'\", \"assert assemble('abc', '') == 'abc'\", \"assert as... | {
"split": "train",
"index": 72731,
"acecode_id": "evol_21449",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "Write a function that checks if a dictionary is empty, and also verifies if any of its values are dictionaries that are themselves empty. The function should return True only if the main dictionary and all nested dictionaries are empty. If any nested dictionary contains any ite... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert check_empty_dict({}) == True\", \"assert check_empty_dict({'a': {}}) == True\", \"assert check_empty_dict({'a': {'b': {}}}) == True\", \"assert check_empty_dict({'a': {'b': {'c': {}}}}) == True\", \"assert check_empty_dict({'a': {'b': {}, 'c': {}}}) == True\... | {
"split": "train",
"index": 72732,
"acecode_id": "evol_25167",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "You are given a list of video titles and their corresponding thumbnail URLs. Your task is to create a function that takes two lists: one containing video titles and the other containing thumbnail URLs. The function should return a list of dictionaries where each dictionary repr... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_video_list(['Python Basics', 'Data Science 101'], ['https://example.com/py.jpg', 'https://example.com/ds.jpg']) == [{'title': 'Python Basics', 'thumbnail_url': 'https://example.com/py.jpg'}, {'title': 'Data Science 101', 'thumbnail_url': 'https://exam... | {
"split": "train",
"index": 72733,
"acecode_id": "oss_37079",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a configuration class that contains two boolean attributes: 'shift' and 'ctf'. Your task is to implement a function called 'get_starfile_metadata_names' that returns a list of strings. Each string in the list should start with the prefix '__rln' followed by a uniq... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_starfile_metadata_names(Config) == ['__rln1', '__rln2', '__rln3', '__rln4', '__rln5', '__rln6', '__rln7', '__rln8', '__rln9', '__rln10']\", \"assert get_starfile_metadata_names(Config) != ['__rln1', '__rln2', '__rln3', '__rln4', '__rln5', '__rln6', '__rl... | {
"split": "train",
"index": 72734,
"acecode_id": "bigcode_python_fns_29455",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates the training process of a machine learning model. The function should print 'Start training..' to indicate the beginning of the training process, take in a list of input features (X) and a corresponding list of target value... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert train_and_save_model([[1], [2], [3]], [2, 4, 6]) == 'Training done, final model saved'\", \"assert train_and_save_model([[0], [1], [2]], [0, 1, 2]) == 'Training done, final model saved'\", \"assert train_and_save_model([[1], [2], [3]], [6, 4, 2]) == 'Trainin... | {
"split": "train",
"index": 72735,
"acecode_id": "oss_11053",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "You are tasked with processing a list of image file paths to calculate the total size of these images when loaded into memory. Each image file is represented by a string containing its size in bytes. You are also given a maximum number of workers that can process the files conc... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_total_image_size([100, 200, 300], 2) == 600\", \"assert calculate_total_image_size([1024, 2048, 3072], 3) == 6144\", \"assert calculate_total_image_size([5000], 1) == 5000\", \"assert calculate_total_image_size([1, 1, 1, 1, 1], 5) == 5\", \"assert ... | {
"split": "train",
"index": 72736,
"acecode_id": "bigcode_python_fns_17426",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with designing a simple user management system for a software application. The system should support three types of users: Gold users, Guest users, and Normal users. Each user type has specific attributes: Gold users have a username and a status, while Guest and ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_users([('Gold', 'Alice', 'Active'), ('Guest', 'Bob'), ('Normal', 'Charlie')]) == [{'type': 'Gold', 'username': 'Alice', 'status': 'Active'}, {'type': 'Guest', 'username': 'Bob'}, {'type': 'Normal', 'username': 'Charlie'}]\", \"assert create_users([('G... | {
"split": "train",
"index": 72737,
"acecode_id": "oss_16439",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates the insertion of a new element into a MaxHeap data structure. A MaxHeap is a binary tree where the value of each node is greater than or equal to the values of its children. Your function should take a list of integers ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert insert_into_max_heap([10, 5, 3], 15) == [15, 10, 3, 5]\", \"assert insert_into_max_heap([20, 15, 10], 25) == [25, 20, 10, 15]\", \"assert insert_into_max_heap([30, 20, 25, 5], 18) == [30, 20, 25, 5, 18]\", \"assert insert_into_max_heap([12, 11, 10], 9) == [1... | {
"split": "train",
"index": 72738,
"acecode_id": "oss_11157",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "You are given a target skeleton represented as a list of animated joints and a list of frames, where each frame is a list of quaternion values. The first four values in each frame represent the orientation of the skeleton, and the subsequent values represent the orientations fo... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert align_quaternion_frames([0, 1, 0, 0], [[1, 0, 0, 0, 0, 1, 0, 0]]) == [[1, 0, 0, 0, 0, 1, 0, 0]]\", \"assert align_quaternion_frames([0, 1, 0, 0], [[1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0]]) == [[1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0]]\",... | {
"split": "train",
"index": 72739,
"acecode_id": "bigcode_python_fns_46824",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "Create a function in Python called `remove_last_element` that takes a list as input, removes the last element using the `pop()` method, and returns the modified list. If the list is empty, the function should return an empty list.\nPlease reason step by step, then write a self-... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert remove_last_element(['a', 'b', 'c', 'd']) == ['a', 'b', 'c']\", \"assert remove_last_element(['x', 'y', 'z']) == ['x', 'y']\", \"assert remove_last_element(['apple']) == []\", \"assert remove_last_element([]) == []\", \"assert remove_last_element(['1', '2', ... | {
"split": "train",
"index": 72740,
"acecode_id": "evol_23802",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a rating system for champions in a competitive gaming environment. Your goal is to implement a function that can handle the initialization, updating, and retrieval of ratings for different champions based on their region, position, and name. Write a... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert manage_champion_rating([('initialize', 'NA', 'Top', 'Quinn', 1500), ('get', 'NA', 'Top', 'Quinn')]) == [1500]\", \"assert manage_champion_rating([('initialize', 'NA', 'Top', 'Quinn', 1500), ('update', 'NA', 'Top', 'Quinn', 50), ('get', 'NA', 'Top', 'Quinn')]... | {
"split": "train",
"index": 72741,
"acecode_id": "oss_18971",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with designing a function that accepts a list of confinement data entries, where each entry is a tuple containing a label (as a string), a confinement type (as a string), and a confinement value (as a float). Your function should return a dictionary where the key... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_confinement_values([('locus1', 'typeA', 1.5), ('locus2', 'typeB', 2.5), ('locus1', 'typeC', 3.0)]) == {'locus1': {'type': 'typeC', 'R': 3.0}, 'locus2': {'type': 'typeB', 'R': 2.5}}\", \"assert get_confinement_values([('locus1', 'typeA', 1.0), ('locus1', ... | {
"split": "train",
"index": 72742,
"acecode_id": "bigcode_python_fns_1345",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that calculates the total duration of a music playlist given a list of songs. Each song is represented by a dictionary containing its title, artist, and duration in seconds. Your function should accept a list of these song dictionaries an... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert total_playlist_duration([]) == 0\", \"assert total_playlist_duration([{'title': 'Song A', 'artist': 'Artist A', 'duration': 200}]) == 200\", \"assert total_playlist_duration([{'title': 'Song A', 'artist': 'Artist A', 'duration': 200}, {'title': 'Song B', 'ar... | {
"split": "train",
"index": 72743,
"acecode_id": "oss_35854",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function that takes a list of integers as input and returns a new list containing the same integers sorted in ascending order. Do not use any built-in sorting functions. The function should be named `sort_integers` and should utilize any sorting algorithm of your ch... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert sort_integers([5, 3, 8, 1, 2]) == [1, 2, 3, 5, 8]\", \"assert sort_integers([10, -1, 2, 5, 0]) == [-1, 0, 2, 5, 10]\", \"assert sort_integers([]) == []\", \"assert sort_integers([7]) == [7]\", \"assert sort_integers([4, 4, 4, 4]) == [4, 4, 4, 4]\", \"assert ... | {
"split": "train",
"index": 72744,
"acecode_id": "evol_19106",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates the resetting of a variable in a storage system. The function, `reset_variable`, takes two parameters: `store_name` (a string representing the name of the storage) and `path` (a string that specifies the variable's path... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert reset_variable('my_store', '/variable1') == 'Variable at /variable1 has been reset.'\", \"assert reset_variable('my_store', '/variable2') == 'Variable at /variable2 has been reset.'\", \"assert reset_variable('my_store', '/data/variable3') == 'Variable at /d... | {
"split": "train",
"index": 72745,
"acecode_id": "bigcode_python_fns_30782",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an integer array 'arr', implement a function 'count_unique_subarrays(arr)' that returns a list containing the cumulative count of unique subarrays up to each index in the array. A unique subarray is defined as a contiguous segment of the array that contains distinct eleme... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_unique_subarrays([3, 1, 4, 2, 5]) == [1, 3, 6, 10, 15]\", \"assert count_unique_subarrays([1, 1, 1, 1]) == [1, 1, 1, 1]\", \"assert count_unique_subarrays([1, 2, 3, 4]) == [1, 3, 6, 10]\", \"assert count_unique_subarrays([]) == []\", \"assert count_uni... | {
"split": "train",
"index": 72746,
"acecode_id": "evol_24040",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates the addition of a network interface. The function will take the following parameters: `interface_name` (a string representing the alphanumeric name of the interface), `interface_desc` (an optional string description of the ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert add_network_interface('eth0') == {'name': 'eth0', 'description': '', 'state': 'up'}\", \"assert add_network_interface('eth1', 'Main Ethernet Interface') == {'name': 'eth1', 'description': 'Main Ethernet Interface', 'state': 'up'}\", \"assert add_network_inte... | {
"split": "train",
"index": 72747,
"acecode_id": "bigcode_python_fns_27650",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, implement a function `second_highest_even_element(l: list)` that returns the second highest even number from the list. If there are not enough even numbers (i.e., less than two), return 'Not enough even numbers'. Note that the list can contain negative... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert second_highest_even_element([1, 2, 4, 3]) == 2\", \"assert second_highest_even_element([1, 3, 5]) == 'Not enough even numbers'\", \"assert second_highest_even_element([10, 20, 30, 40]) == 30\", \"assert second_highest_even_element([-2, -4, -6, -8]) == -4\", ... | {
"split": "train",
"index": 72748,
"acecode_id": "evol_9008",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a timestamp in UTC format (as a Unix timestamp), determine whether that timestamp falls within the current UTC day. A timestamp is considered to be within the current UTC day if it is greater than or equal to the start of the current day in UTC. Implement a function `is_u... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_utc_today(1680566400) == False\", \"assert is_utc_today(1680652800) == False\", \"assert is_utc_today(1680739200) == False\", \"assert is_utc_today(1680825600) == False\", \"assert is_utc_today(1680912000) == False\", \"assert is_utc_today(1680998400) == ... | {
"split": "train",
"index": 72749,
"acecode_id": "bigcode_python_fns_31155",
"num_tests": 14
} |
acecode | [
{
"role": "user",
"content": "Write a function that takes a list of whole numbers as its parameter and returns True if the product of all the numbers in the list is a prime number, and False otherwise.\nPlease reason step by step, then write a self-contained Python solution. Give your final program in a sin... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert check_product_is_prime([1, 1, 1]) == False\", \"assert check_product_is_prime([4, 3]) == False\", \"assert check_product_is_prime([6, 5]) == False\", \"assert check_product_is_prime([8, 9]) == False\", \"assert check_product_is_prime([17]) == True\", \"asser... | {
"split": "train",
"index": 72750,
"acecode_id": "evol_26717",
"num_tests": 12
} |
acecode | [
{
"role": "user",
"content": "Write a function `isolate_characters(sentence: str) -> List[str]` that takes a string `sentence` as input and returns a list containing each individual character in the sentence, including punctuation marks and spaces. The characters in the resulting list should maintain the sa... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert isolate_characters('Hello, AI assistant!') == ['H', 'e', 'l', 'l', 'o', ',', ' ', 'A', 'I', ' ', 'a', 's', 's', 'i', 's', 't', 'a', 'n', 't', '!']\", \"assert isolate_characters('Python 3.8') == ['P', 'y', 't', 'h', 'o', 'n', ' ', '3', '.', '8']\", \"assert ... | {
"split": "train",
"index": 72751,
"acecode_id": "evol_21466",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a password generation function for a secure application. The function should generate a random password of a specified length. The generated password must consist of uppercase letters, lowercase letters, and digits. Your task is to implement a f... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_password(1).startswith('Generated Password: ')\", \"assert len(generate_password(8)[20:]) == 8\", \"assert generate_password(0) == 'Generated Password: '\", \"assert len(generate_password(15)[20:]) == 15\", \"assert generate_password(2)[20:].isalpha... | {
"split": "train",
"index": 72752,
"acecode_id": "oss_31186",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates a basic command-line utility for building a project. The function `build_project` takes a dictionary of parameters and returns a string that describes the command that would be executed to build the project. The input d... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert build_project({'source': 'src', 'target': 'dist', 'build': 'build_dir'}) == 'build_command -a -d build_dir/doctrees -b html src dist'\", \"assert build_project({'source': 'docs', 'target': 'output', 'build': 'output_dir'}) == 'build_command -a -d output_dir/... | {
"split": "train",
"index": 72753,
"acecode_id": "bigcode_python_fns_48948",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that generates a list of file paths based on a given application name and various configuration options. The function should take three parameters: an application name (a string), a boolean indicating whether the application is branded (T... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert generate_file_paths('MyApp', True, ['icon', 'background']) == ['branded/MyApp_icon.png', 'branded/MyApp_background.png']\", \"assert generate_file_paths('MyApp', False, ['icon', 'background']) == ['generic/MyApp_icon.png', 'generic/MyApp_background.png']\", ... | {
"split": "train",
"index": 72754,
"acecode_id": "bigcode_python_fns_11313",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an array of integers, write a function that calculates the difference between each pair of successive numbers and returns an array of these differences. The function should handle invalid data types by returning an error message. If the input is not a list or contains non... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_differences([5, 10, 15]) == [5, 5]\", \"assert find_differences([1, 2, 3, 4]) == [1, 1, 1]\", \"assert find_differences([]) == []\", \"assert find_differences([10]) == []\", \"assert find_differences(['a', 2, 3]) == 'Invalid input'\", \"assert find_diff... | {
"split": "train",
"index": 72755,
"acecode_id": "evol_20859",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a function named `package` that is intended to handle sub-commands. However, this function does not currently perform any actions. Your task is to implement a modified version of this function that returns a string indicating that a sub-command has been called. Th... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert package('install') == 'Sub-command called: install'\", \"assert package('update') == 'Sub-command called: update'\", \"assert package('remove') == 'Sub-command called: remove'\", \"assert package('') == 'No sub-command provided.'\", \"assert package('upgrade... | {
"split": "train",
"index": 72756,
"acecode_id": "bigcode_python_fns_8846",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function to validate email addresses. The function should check whether a given email address follows the standard email format, which consists of a local part, an '@' symbol, and a domain part. The local part can contain alphanumeric characters a... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert is_valid_email('test@example.com') == True\", \"assert is_valid_email('user@subdomain.example.com') == True\", \"assert is_valid_email('user@.com') == False\", \"assert is_valid_email('user@domain.com.') == False\", \"assert is_valid_email('username@-example... | {
"split": "train",
"index": 72757,
"acecode_id": "oss_30554",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that takes an instance of an `Animal` subclass and calls its `sound` method. The goal is to demonstrate polymorphism by ensuring that the correct sound is produced for different types of animals. You need to create a base class named ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert make_sound(Cat()) == 'Meow'\", \"assert make_sound(Dog()) == 'Bark'\", \"assert make_sound(Cat()) == 'Meow'\", \"assert make_sound(Dog()) == 'Bark'\", \"assert make_sound(Cat()) == 'Meow'\", \"assert make_sound(Dog()) == 'Bark'\", \"assert make_sound(Cat()) ... | {
"split": "train",
"index": 72758,
"acecode_id": "evol_237",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that counts the occurrences of each word in a given text and returns the top N most frequently occurring words, ignoring case sensitivity and punctuation. The function should only consider alphanumeric characters as part of a word. The in... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert top_n_words('Hello world! Hello everyone.', 1) == [('hello', 2)]\", \"assert top_n_words('Python is great. Python is fun!', 3) == [('python', 2), ('is', 2), ('great', 1)]\", \"assert top_n_words('A quick brown fox jumps over the lazy dog. A quick brown dog j... | {
"split": "train",
"index": 72759,
"acecode_id": "oss_24139",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that simulates a simple stopwatch. The stopwatch should be able to start, stop, and reset, and it should display the elapsed time in seconds when running. Your task is to implement the function `stopwatch_simulation(actions: List[s... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert stopwatch_simulation(['start', 'stop', 'reset']) == 0\", \"assert stopwatch_simulation(['start', 'stop', 'start', 'stop', 'start', 'reset', 'stop']) == 0\", \"assert stopwatch_simulation(['start', 'stop', 'start', 'stop', 'start', 'stop', 'reset']) == 0\", \... | {
"split": "train",
"index": 72760,
"acecode_id": "oss_27666",
"num_tests": 7
} |
acecode | [
{
"role": "user",
"content": "You need to implement a function called `login_wallet` that checks the user's THX wallet activation status based on their email verification status. The function should take in two parameters: `email` (a string representing the user's email) and `is_verified` (a boolean indicat... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert login_wallet('user1@example.com', True) == '\\u2709\\ufe0fYour THX wallet is already activated'\", \"assert login_wallet('user2@example.com', False) == '\\u2709\\ufe0fPlease, check your email for THX wallet activation link'\", \"assert login_wallet('test.ema... | {
"split": "train",
"index": 72761,
"acecode_id": "oss_24765",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a program that processes a given Python script represented as a list of strings, where each string is a line of the script. Your goal is to identify the number of lines that contain a specific shebang line, which is defined as any line that starts w... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_shebang_lines(['#!/usr/bin/python3', 'print(\\\"Hello, World!\\\")']) == 1\", \"assert count_shebang_lines(['# This is a comment', 'print(\\\"Hello, World!\\\")']) == 0\", \"assert count_shebang_lines(['#!/usr/bin/env python', 'print(\\\"Hello, World!\... | {
"split": "train",
"index": 72762,
"acecode_id": "oss_22385",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that takes a list of integers and returns a new list containing only the unique integers from the original list, preserving the order of their first occurrence. Write a function `unique_integers(lst: List[int]) -> List[int]` that implemen... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert unique_integers([1, 2, 2, 3, 4]) == [1, 2, 3, 4]\", \"assert unique_integers([5, 5, 5, 5]) == [5]\", \"assert unique_integers([]) == []\", \"assert unique_integers([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert unique_integers([1, 2, 2, 1, 1, 3]) == [1, 2, ... | {
"split": "train",
"index": 72763,
"acecode_id": "bigcode_python_fns_1039",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that generates a recipe dictionary based on user input. The function should accept a user identifier and a variable number of keyword arguments representing recipe parameters. The function should have default values for the recipe's title... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_recipe('user1') == {'title': 'paneer tikka', 'time_minute': 10, 'price': 5.00}\", \"assert create_recipe('user2', title='spaghetti') == {'title': 'spaghetti', 'time_minute': 10, 'price': 5.00}\", \"assert create_recipe('user3', time_minute=15) == {'ti... | {
"split": "train",
"index": 72764,
"acecode_id": "bigcode_python_fns_36552",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function to create a multisig transaction from a payment transaction. Your function should take two inputs: a payment transaction represented as a dictionary and a multisig address. The payment transaction will contain the following keys: 'add... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert create_multisig_transaction({'address': 'address1', 'params': 'params1', 'to': 'recipient1', 'amt': 100, 'close': True, 'note': 'Payment 1'}, 'multisig_address1') == {'txn': {'address': 'address1', 'params': 'params1', 'to': 'recipient1', 'amt': 100, 'close'... | {
"split": "train",
"index": 72765,
"acecode_id": "oss_33763",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `extract_dict(string: str) -> dict` that takes a string representation of a dictionary containing key-value pairs. The dictionary may include nested dictionaries as values. Your function should convert this string into an actual Python dictionary using recu... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert extract_dict(\\\"{'a': 1, 'b': {'c': 2, 'd': 3}}\\\") == {'a': 1, 'b': {'c': 2, 'd': 3}}\", \"assert extract_dict(\\\"{'key1': 'value1', 'key2': {'key3': 'value3'}}\\\") == {'key1': 'value1', 'key2': {'key3': 'value3'}}\", \"assert extract_dict(\\\"{'name': ... | {
"split": "train",
"index": 72766,
"acecode_id": "evol_3496",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function `sort_dict` that takes a dictionary as input and returns a new dictionary with its keys sorted by their corresponding values. Numeric values should be sorted in ascending order, and string values should be sorted in lexicographical order. The function shoul... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert sort_dict({'a': 3, 'b': 1, 'c': 2}) == {'b': 1, 'c': 2, 'a': 3}\", \"assert sort_dict({'x': 'banana', 'y': 'apple', 'z': 'cherry'}) == {'y': 'apple', 'x': 'banana', 'z': 'cherry'}\", \"assert sort_dict({'foo': 10, 'bar': 5, 'baz': 7}) == {'bar': 5, 'baz': 7,... | {
"split": "train",
"index": 72767,
"acecode_id": "evol_31509",
"num_tests": 5
} |
acecode | [
{
"role": "user",
"content": "Develop a function that determines if two given sentences contain the same unique words, taking into account the sensitivity to case and punctuation. The function should return True if the unique words in both sentences are the same, and False otherwise.\nPlease reason step by ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert compare_word_sets('Hello, world!', 'world! Hello.') == True\", \"assert compare_word_sets('Python is fun.', 'fun Python is.') == True\", \"assert compare_word_sets('Data science is amazing.', 'Data Science is amazing.') == False\", \"assert compare_word_sets... | {
"split": "train",
"index": 72768,
"acecode_id": "evol_15983",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of strings that may contain tags and content. Your task is to implement a function `process_data(data)` that processes this list according to the following rules: 1. Strip leading and trailing whitespaces from each string in the list. 2. Skip any empty stri... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert process_data(['', ' ', ' <tag4>', '<tag5>', 'content5', ' content6 ']) == 'tag4tag5content5content6'\", \"assert process_data(['<tag6>', ' ', 'content7', ' <tag8> ']) == 'tag6content7tag8'\", \"assert process_data(['<tag9>', '', 'content8', ' co... | {
"split": "train",
"index": 72769,
"acecode_id": "oss_5296",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function to manage a simple event scheduling system. Your function will take a list of scheduled events and an event name to delete. The function should remove the specified event from the list of events if it exists, and return `True`. If the... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert delete_event(['meeting', 'lunch', 'workshop'], 'lunch') == True\", \"assert delete_event(['meeting', 'lunch', 'workshop'], 'dinner') == False\", \"assert delete_event(['meeting'], 'meeting') == True\", \"assert delete_event([], 'meeting') == False\", \"asser... | {
"split": "train",
"index": 72770,
"acecode_id": "oss_34034",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that takes a list of integers as input and returns a new list containing only the unique elements from the original list, preserving the order of their first occurrence. Implement the function `unique_elements(arr: List[int]) -> List[int]... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert unique_elements([1, 2, 2, 3, 4, 3]) == [1, 2, 3, 4]\", \"assert unique_elements([1, 1, 1, 1]) == [1]\", \"assert unique_elements([5, 3, 5, 2, 5, 1, 2]) == [5, 3, 2, 1]\", \"assert unique_elements([]) == []\", \"assert unique_elements([7, 8, 9]) == [7, 8, 9]\... | {
"split": "train",
"index": 72771,
"acecode_id": "bigcode_python_fns_20721",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a Python function that simulates loading a model by returning a string indicating the model is ready. Your function should take a single parameter, `model_path` (string), which represents the file path of the model to be loaded. If the model path en... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert load_model('path/to/your/pretrained/model.ckpt') == 'Model loaded successfully from path/to/your/pretrained/model.ckpt'\", \"assert load_model('path/to/your/pretrained/model.txt') == 'Invalid model format'\", \"assert load_model('') == 'Model path cannot be ... | {
"split": "train",
"index": 72772,
"acecode_id": "oss_9410",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a program that analyzes the frequency of words in a given string of text. Your program should take a string as input and output a list of unique words along with their frequencies. The output should be sorted in descending order of frequency. If the... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert word_frequency('apple banana apple orange banana fruit') == [('apple', 2), ('banana', 2), ('fruit', 1), ('orange', 1)]\", \"assert word_frequency('hello world hello') == [('hello', 2), ('world', 1)]\", \"assert word_frequency('a b a b c') == [('a', 2), ('b',... | {
"split": "train",
"index": 72773,
"acecode_id": "oss_24572",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "Given a list of integers, write a function that calculates and returns the sum of the cubes of the elements in the list. The function should take a single argument, which is a list of integers. Your task is to implement the function `sum_of_cubes` that performs this calculation... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert sum_of_cubes([1, 2, 3]) == 36\", \"assert sum_of_cubes([0]) == 0\", \"assert sum_of_cubes([-1, -2, -3]) == -36\", \"assert sum_of_cubes([5]) == 125\", \"assert sum_of_cubes([]) == 0\", \"assert sum_of_cubes([10, 20]) == 9000\", \"assert sum_of_cubes([-2, -3,... | {
"split": "train",
"index": 72774,
"acecode_id": "oss_31459",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function to manage budget allocation for a rural hospital. The function should take an annual budget as input and calculate the allocation for three departments based on the following percentages: 40% for medical supplies, 30% for staff salaries, ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert allocate_budget(1000) == {'Medical Supplies': 400.0, 'Staff Salaries': 300.0, 'Maintenance and Infrastructure': 300.0}\", \"assert allocate_budget(2000) == {'Medical Supplies': 800.0, 'Staff Salaries': 600.0, 'Maintenance and Infrastructure': 600.0}\", \"ass... | {
"split": "train",
"index": 72775,
"acecode_id": "oss_10698",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a simplified task scheduler for a system that manages task properties. Each task can have various properties, such as 'KillOnIdleEnd', 'DontStartIfOnBatteries', 'RunOnlyIfDocked', and so on, which can be either enabled or disabled. Your goal is ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert task_properties([('set', 'KillOnIdleEnd', True), ('get', 'KillOnIdleEnd')]) == [True]\", \"assert task_properties([('set', 'DontStartIfOnBatteries', False), ('get', 'DontStartIfOnBatteries')]) == [False]\", \"assert task_properties([('get', 'RunOnlyIfDocked'... | {
"split": "train",
"index": 72776,
"acecode_id": "oss_23455",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that takes a list of integers and returns a new list containing only the unique elements from the input list, preserving the original order of their first occurrence. Your function should be named `get_unique_elements`. The function s... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_unique_elements([1, 2, 2, 3, 4, 4, 5]) == [1, 2, 3, 4, 5]\", \"assert get_unique_elements([1, 1, 1, 1]) == [1]\", \"assert get_unique_elements([]) == []\", \"assert get_unique_elements([5, 4, 3, 2, 1]) == [5, 4, 3, 2, 1]\", \"assert get_unique_elements([... | {
"split": "train",
"index": 72777,
"acecode_id": "oss_5891",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of strings representing containers in a Docker environment. Each string can either be 'running' or 'stopped'. Your task is to implement a function called `cleanup_containers(containers: List[str], remove_stopped: bool) -> List[str]` that will return a new l... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert cleanup_containers(['running', 'stopped', 'running'], True) == ['running', 'running']\", \"assert cleanup_containers(['stopped', 'stopped'], True) == []\", \"assert cleanup_containers(['running', 'running'], True) == ['running', 'running']\", \"assert cleanu... | {
"split": "train",
"index": 72778,
"acecode_id": "bigcode_python_fns_713",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates sending a request to a hardware device to enter unlinking mode. The function should take an integer parameter `group`, which represents the group number for the request. If no group number is provided, it defaults to 0. You... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert send_unlinking_request() == 'Request sent to enter unlinking mode for group 0.'\", \"assert send_unlinking_request(1) == 'Request sent to enter unlinking mode for group 1.'\", \"assert send_unlinking_request(5) == 'Request sent to enter unlinking mode for gr... | {
"split": "train",
"index": 72779,
"acecode_id": "oss_25767",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given two positive integers x and y, write a function that returns the count of positive integers that are common factors of both x and y. A common factor is a positive integer that divides both x and y without leaving a remainder.\nPlease reason step by step, then write a self... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert common_factors(10, 5) == 2\", \"assert common_factors(100, 25) == 3\", \"assert common_factors(7, 14) == 2\", \"assert common_factors(1, 1) == 1\", \"assert common_factors(64, 16) == 5\", \"assert common_factors(50, 50) == 6\", \"assert common_factors(3, 9) ... | {
"split": "train",
"index": 72780,
"acecode_id": "evol_3261",
"num_tests": 7
} |
acecode | [
{
"role": "user",
"content": "Write a function `get_movie_rating(movie_title: str) -> str` that takes a movie title as input and returns the rating of the movie from a mock IMDb database. If the movie does not exist, return 'Movie not found'. The mock database can be represented as a dictionary where the ke... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_movie_rating('The Shawshank Redemption') == '9.3'\", \"assert get_movie_rating('The Godfather') == '9.2'\", \"assert get_movie_rating('The Dark Knight') == '9.0'\", \"assert get_movie_rating('Pulp Fiction') == '8.9'\", \"assert get_movie_rating('The Lord... | {
"split": "train",
"index": 72781,
"acecode_id": "evol_23474",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of string representations of Object Identifiers (OIDs). Each OID is a unique identifier used in various networking protocols to identify managed objects in a MIB (Management Information Base). Your task is to implement a function that constructs and returns... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert construct_oid_list(['1.3.6.1.2.1.1.1.0', '1.3.6.1.2.1.1.2.0']) == ['1.3.6.1.2.1.1.1.0', '1.3.6.1.2.1.1.2.0']\", \"assert construct_oid_list(['1.3.6.1.2.1.2.2.1.1', '1.3.6.1.2.1.2.2.1.2']) == ['1.3.6.1.2.1.2.2.1.1', '1.3.6.1.2.1.2.2.1.2']\", \"assert construc... | {
"split": "train",
"index": 72782,
"acecode_id": "bigcode_python_fns_24014",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function called `fibonacci_up_to_n` that calculates the Fibonacci series up to the nth term. The function must accept an integer 'n' (where 1 <= n <= 25) as an argument and return the Fibonacci sequence up to the nth term. If the argument 'n' is not provided, then b... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert fibonacci_up_to_n(1) == [0]\", \"assert fibonacci_up_to_n(2) == [0, 1]\", \"assert fibonacci_up_to_n(3) == [0, 1, 1]\", \"assert fibonacci_up_to_n(4) == [0, 1, 1, 2]\", \"assert fibonacci_up_to_n(5) == [0, 1, 1, 2, 3]\", \"assert fibonacci_up_to_n(6) == [0, ... | {
"split": "train",
"index": 72783,
"acecode_id": "evol_9053",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Implement a function that converts a given non-negative integer in decimal notation to its binary representation as a string. The function should take an integer input and return its binary equivalent without any leading zeros. For example, the decimal number 5 should return '1... | 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": 72784,
"acecode_id": "evol_14137",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an integer limit, find the sum of the perimeters of all near-Pythagorean triangles with integral side lengths and area whose perimeters do not exceed the given limit. A near-Pythagorean triangle is defined as a triangle for which the square of the longest side differs by ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_near_pythagorean_triangles(1) == 0\", \"assert find_near_pythagorean_triangles(2) == 0\", \"assert find_near_pythagorean_triangles(3) == 0\", \"assert find_near_pythagorean_triangles(4) == 0\", \"assert find_near_pythagorean_triangles(5) == 0\", \"asser... | {
"split": "train",
"index": 72785,
"acecode_id": "evol_31823",
"num_tests": 10
} |
acecode | [
{
"role": "user",
"content": "Implement a function that takes two lists of integers as input and returns a list of unique integers that are present in both lists. The output list should be sorted in ascending order. The function should be defined as follows: def find_intersection(list_a: List[int], list_b: ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_intersection([1, 2, 3, 4, 5], [2, 5, 7, 10]) == [2, 5]\", \"assert find_intersection([1, 2, 3], [4, 5, 6]) == []\", \"assert find_intersection([10, 20, 30], [20, 10, 40]) == [10, 20]\", \"assert find_intersection([], [1, 2, 3]) == []\", \"assert find_in... | {
"split": "train",
"index": 72786,
"acecode_id": "evol_33660",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given an array of integers, write a function that computes the sum of all elements in the array except for the current element for each position in the array. Your function should return a new array containing these sums. For example, given the input array [1, 2, 3, 4], the out... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert compute_sums([1, 2, 3, 4]) == [9, 8, 7, 6]\", \"assert compute_sums([5, 10, 15]) == [25, 20, 15]\", \"assert compute_sums([0, 0, 0]) == [0, 0, 0]\", \"assert compute_sums([1]) == [0]\", \"assert compute_sums([-1, -2, -3]) == [-5, -4, -3]\", \"assert compute_... | {
"split": "train",
"index": 72787,
"acecode_id": "evol_17783",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates the selection of a server from a list of available servers for handling API requests. Each server is represented as a string in the format 'host:port'. Your function should randomly select one of the servers and return ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert pick_server(['192.168.1.1:8080']) in [('192.168.1.1', 8080)]\", \"assert pick_server(['localhost:3000', '127.0.0.1:4000']) in [('localhost', 3000), ('127.0.0.1', 4000)]\", \"assert pick_server(['example.com:80', 'example.org:443', 'example.net:8080']) in [('... | {
"split": "train",
"index": 72788,
"acecode_id": "bigcode_python_fns_4390",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Design a Python function that calculates the surface area of a rectangular prism. The function should take three parameters: length, width, and height. It must handle non-numerical inputs by returning an error message and also check for negative values by returning a different ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert calculate_surface_area(2, 3, 4) == 52\", \"assert calculate_surface_area(5, 5, 5) == 150\", \"assert calculate_surface_area(0, 2, 3) == 12\", \"assert calculate_surface_area(0, 0, 0) == 0\", \"assert calculate_surface_area(1, 1, 1) == 6\", \"assert calculate... | {
"split": "train",
"index": 72789,
"acecode_id": "evol_10138",
"num_tests": 6
} |
acecode | [
{
"role": "user",
"content": "Create a function that multiplies the input matrix 'y' by 4. The function should use only bitwise shift operators for the multiplication and it should handle the scenario if the input matrix includes both positive and negative integers. The function should return the resulting ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert multiplyMatrixByFour([[1, 2], [3, 4]]) == [[4, 8], [12, 16]]\", \"assert multiplyMatrixByFour([[0, -1], [-2, 3]]) == [[0, -4], [-8, 12]]\", \"assert multiplyMatrixByFour([[5]]) == [[20]]\", \"assert multiplyMatrixByFour([[-1]]) == [[-4]]\", \"assert multiply... | {
"split": "train",
"index": 72790,
"acecode_id": "evol_34768",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "Given a triangular number sequence generated up to the 20th term, implement a function that receives the triangular numbers arranged in a pyramid shape and returns the maximum sum of the values from top to bottom. The triangular number at position n is defined as T(n) = n * (n ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert max_path_sum([[1], [2, 3], [3, 2, 1]]) == 6\", \"assert max_path_sum([[1], [1, 1], [1, 1, 1]]) == 3\", \"assert max_path_sum([[1], [1, 2], [2, 1, 1]]) == 4\", \"assert max_path_sum([[1], [1, 3], [3, 1, 1]]) == 5\", \"assert max_path_sum([[1], [1, 1], [1, 2, ... | {
"split": "train",
"index": 72791,
"acecode_id": "evol_11044",
"num_tests": 6
} |
acecode | [
{
"role": "user",
"content": "Given a list of strings, each representing a mathematical expression consisting of integers and additive symbols (like '+', '-'), validate the expressions by ensuring that each expression is well-formed. An expression is well-formed if it contains only integers and the allowed ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert validate_expressions(['1 + 2', '3 - 4 + 5', '5 + + 6', '7 -', '+ 8', '9 - 10 + 11']) == [True, True, False, False, False, True]\", \"assert validate_expressions(['10', '0 + 0', '1 - 1 + 2', '2 + 3 - 4 + 5 +', '5 - 6 + 7 - 8 + 9']) == [True, True, True, False... | {
"split": "train",
"index": 72792,
"acecode_id": "bigcode_python_fns_732",
"num_tests": 8
} |
acecode | [
{
"role": "user",
"content": "Given a list of geographic coordinates represented as tuples of (latitude, longitude), write a function that returns the average latitude and longitude. The average latitude is obtained by averaging all the latitude values, and the average longitude is obtained by averaging all... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert average_lat_lon([(10.0, 20.0), (30.0, 40.0)]) == (20.0, 30.0)\", \"assert average_lat_lon([(0.0, 0.0)]) == (0.0, 0.0)\", \"assert average_lat_lon([(1.0, 2.0), (3.0, 4.0), (5.0, 6.0)]) == (3.0, 4.0)\", \"assert average_lat_lon([(45.0, 90.0), (0.0, 0.0), (-45.... | {
"split": "train",
"index": 72793,
"acecode_id": "bigcode_python_fns_28921",
"num_tests": 15
} |
acecode | [
{
"role": "user",
"content": "Given a string, write a function `count_vowels` that computes and returns the total number of vowels in the string. Vowels are defined as the characters 'a', 'e', 'i', 'o', 'u' in both lowercase and uppercase. You may assume the input string will only contain printable ASCII ch... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert count_vowels('Hello World!') == 3\", \"assert count_vowels('Python Programming') == 4\", \"assert count_vowels('') == 0\", \"assert count_vowels('AEIOUaeiou') == 10\", \"assert count_vowels('The quick brown fox jumps over the lazy dog') == 11\", \"assert cou... | {
"split": "train",
"index": 72794,
"acecode_id": "evol_2800",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are given a list of integers representing the intensities of an infrared (IR) spectrum. Your task is to implement a function that identifies the peaks in the spectrum based on a specified prominence threshold. A peak is defined as a value that is greater than its neighbors ... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert find_peaks([1, 2, 1, 2, 1], 0) == [1, 3]\", \"assert find_peaks([1, 5, 1, 5, 1], 3) == [1, 3]\", \"assert find_peaks([1, 2, 3, 2, 1], 0) == [2]\", \"assert find_peaks([1, 2, 1, 3, 1, 2, 1], 1) == [3]\", \"assert find_peaks([0, 0, 0, 1, 0, 0], 0) == [3]\", \"... | {
"split": "train",
"index": 72795,
"acecode_id": "bigcode_python_fns_30437",
"num_tests": 11
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that initializes two variables: `i` and `Output`. The variable `i` should be initialized to 0 and the variable `Output` should be initialized to 10. After initializing these variables, you need to increment the variable `i` by 1. Finally,... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert initialize_and_increment() == 10\", \"assert initialize_and_increment() == 10\", \"assert initialize_and_increment() == 10\", \"assert initialize_and_increment() == 10\", \"assert initialize_and_increment() == 10\", \"assert initialize_and_increment() == 10\... | {
"split": "train",
"index": 72796,
"acecode_id": "oss_21023",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that returns a formatted string containing a glossary of terms related to a specific domain. The glossary should include a list of terms along with their definitions. Implement a function named `get_glossary()` that takes no parameters an... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert get_glossary() == '*all-atom = in the case of sampling, synonymous with fine movements and often including side chain information; also referred to as high-resolution\\\\n*benchmark = another word for a test of a method, scoring function, algorithm, etc. by ... | {
"split": "train",
"index": 72797,
"acecode_id": "bigcode_python_fns_18960",
"num_tests": 16
} |
acecode | [
{
"role": "user",
"content": "You are tasked with creating a function that simulates fetching the contents of multiple web pages concurrently. The function should take a list of URLs as input and return a list of strings, where each string is the simulated content of the corresponding URL. The fetching oper... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert fetch_multiple_pages(['http://test.com']) == ['Content of http://test.com']\", \"assert fetch_multiple_pages([]) == []\", \"assert fetch_multiple_pages(['http://123.456.789.0']) == ['Content of http://123.456.789.0']\", \"assert fetch_multiple_pages(['http:/... | {
"split": "train",
"index": 72798,
"acecode_id": "oss_13450",
"num_tests": 6
} |
acecode | [
{
"role": "user",
"content": "You are tasked with implementing a function that simulates displaying images and text on a screen. The function should take two parameters: an image path (a string) and accompanying text (also a string). The function should return a formatted string that indicates the display o... | code | {
"style": "rule",
"ground_truth": "{\"tests\": [\"assert display_content('image1.jpg', 'This is an image') == 'Displaying image: image1.jpg with text: This is an image'\", \"assert display_content('image2.png', 'Sample text') == 'Displaying image: image2.png with text: Sample text'\", \"assert display_content('ima... | {
"split": "train",
"index": 72799,
"acecode_id": "oss_29080",
"num_tests": 11
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.