{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"82f37747-f404-53c6-9a19-c1904bd9109b","task_key":"default--v0~2e1~2e0~5fhf--82f37747-f404-53c6-9a19-c1904bd9109b","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 82f37747-f404-53c6-9a19-c1904bd9109b","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import collections\\nimport operator\\nimport os\\nimport shutil\\ndef task_func(data_dict, source_directory, backup_directory):\\n\",\"complete_prompt\":\"import collections\\nimport operator\\nimport os\\nimport shutil\\n\\n\\ndef task_func(data_dict, source_directory, backup_directory):\\n    \\\"\\\"\\\"\\n    Modifies a dictionary, sorts it by the frequency of its values, and backs up files from a source directory.\\n\\n    This function performs three main tasks:\\n    1. Updates the input dictionary by adding a key 'a' with the value 1.\\n    2. Sorts the dictionary by the frequency of its values in descending order.\\n    3. Backs up all files from the specified source directory to a backup directory.\\n\\n    Parameters:\\n        data_dict (dict): The dictionary to be modified and sorted.\\n        source_directory (str): The path to the source directory containing files to be backed up.\\n        backup_directory (str): The path to the backup directory where files will be copied.\\n\\n    Returns:\\n        tuple:\\n            - dict: The modified dictionary with the added key and value.\\n            - list: A list of tuples representing the sorted items of the dictionary by their frequency.\\n            - bool: A boolean indicating whether the backup was successful (True) or not (False).\\n\\n    Requirements:\\n     - collections\\n     - operator\\n     - os\\n     - shutil\\n\\n    Examples:\\n    >>> data_dict = {'b': 'val1', 'c': 'val2'}\\n    >>> updated_dict, value_frequencies, backup_status = task_func(data_dict, 'folder1', 'backup_folder')\\n    >>> print(updated_dict)\\n    {'a': 1, 'key1': 'value1', 'key2': 'value2'}\\n    >>> print(value_frequencies)\\n    [('val1', 1), ('val2', 1), (1, 1)]\\n    >>> print(backup_status)\\n    True\\n\\n    >>> data_dict = {'avc': '1', 'hello': 'world', 'test': 'world', 'cat': 'meow'}\\n    >>> updated_dict, value_frequencies, backup_status = task_func(data_dict, 'to_backup', 'backup')\\n    >>> print(updated_dict)\\n    {'a': 1, 'avc': '1', 'hello': 'world', 'test': 'world', 'cat': 'meow'}\\n    >>> print(value_frequencies)\\n    [('avc', 1), ('world', 2), ('meow', 1), (1, 2)]\\n    >>> print(backup_status)\\n    True\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Modifies a dictionary, sorts it by the frequency of its values, and backs up files from a source directory. This function performs three main tasks: 1. Updates the input dictionary by adding a key 'a' with the value 1. 2. Sorts the dictionary by the frequency of its values in descending order. 3. Backs up all files from the specified source directory to a backup directory. >>> data_dict = {'avc': '1', 'hello': 'world', 'test': 'world', 'cat': 'meow'} >>> updated_dict, value_frequencies, backup_status = task_func(data_dict, 'to_backup', 'backup') >>> print(updated_dict) {'a': 1, 'avc': '1', 'hello': 'world', 'test': 'world', 'cat': 'meow'} >>> print(value_frequencies) [('avc', 1), ('world', 2), ('meow', 1), (1, 2)] >>> print(backup_status) True\\nThe function should output with:\\n    tuple:\\n    dict: The modified dictionary with the added key and value.\\n    list: A list of tuples representing the sorted items of the dictionary by their frequency.\\n    bool: A boolean indicating whether the backup was successful (True) or not (False).\\nYou should write self-contained code starting with:\\n```\\nimport collections\\nimport operator\\nimport os\\nimport shutil\\ndef task_func(data_dict, source_directory, backup_directory):\\n```\",\"libs\":\"['operator', 'shutil', 'collections', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}