{"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":"b5184609-a4c7-5136-891f-9506ea846282","task_key":"default--v0~2e1~2e0~5fhf--b5184609-a4c7-5136-891f-9506ea846282","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf b5184609-a4c7-5136-891f-9506ea846282","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import random\\nimport string\\nfrom collections import defaultdict\\ndef task_func(n, seed=None):\\n\",\"complete_prompt\":\"import random\\nimport string\\nfrom collections import defaultdict\\n\\n\\ndef task_func(n, seed=None):\\n    \\\"\\\"\\\"\\n    Generate a dictionary with lists of random lowercase english letters. \\n    \\n    Each key in the dictionary  represents a unique letter from the alphabet,\\n    and the associated value is a list, containing randomly generated instances\\n    of that letter based on a seed.\\n\\n    The function randomly selects 'n' letters from the alphabet (a-z) and places each \\n    occurrence in the corresponding list within the dictionary. The randomness is based\\n    on the provided seed value; the same seed will produce the same distribution of letters.\\n\\n    The dictionary has only those keys for which a letter was generated.\\n\\n    Parameters:\\n    n (int): The number of random letters to generate.\\n    seed (int, optional): A seed value for the random number generator. If None, the randomness\\n                          is based on system time or the OS's randomness source.\\n\\n    Returns:\\n    defaultdict: A dictionary where the keys are characters ('a' to 'z') and the values \\n                 are lists of randomly generated letters. Each list may have 0 to 'n' occurrences of \\n                 its associated letter, depending on the randomness and seed.\\n\\n    Requirements:\\n    - collections.defaultdict\\n    - random\\n    - string\\n\\n    Example:\\n    >>> task_func(5, seed=123)\\n    defaultdict(<class 'list'>, {'b': ['b'], 'i': ['i'], 'c': ['c'], 'y': ['y'], 'n': ['n']})\\n\\n    >>> task_func(30, seed=1)\\n    defaultdict(<class 'list'>, {'e': ['e'], 's': ['s'], 'z': ['z', 'z', 'z'], 'y': ['y', 'y', 'y', 'y'], 'c': ['c'], 'i': ['i', 'i'], 'd': ['d', 'd'], 'p': ['p', 'p', 'p'], 'o': ['o', 'o'], 'u': ['u'], 'm': ['m', 'm'], 'g': ['g'], 'a': ['a', 'a'], 'n': ['n'], 't': ['t'], 'w': ['w'], 'x': ['x'], 'h': ['h']})\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a dictionary with lists of random lowercase english letters. Each key in the dictionary  represents a unique letter from the alphabet, and the associated value is a list, containing randomly generated instances of that letter based on a seed. The function randomly selects 'n' letters from the alphabet (a-z) and places each occurrence in the corresponding list within the dictionary. The randomness is based on the provided seed value; the same seed will produce the same distribution of letters. The dictionary has only those keys for which a letter was generated. >>> task_func(30, seed=1) defaultdict(<class 'list'>, {'e': ['e'], 's': ['s'], 'z': ['z', 'z', 'z'], 'y': ['y', 'y', 'y', 'y'], 'c': ['c'], 'i': ['i', 'i'], 'd': ['d', 'd'], 'p': ['p', 'p', 'p'], 'o': ['o', 'o'], 'u': ['u'], 'm': ['m', 'm'], 'g': ['g'], 'a': ['a', 'a'], 'n': ['n'], 't': ['t'], 'w': ['w'], 'x': ['x'], 'h': ['h']})\\nThe function should output with:\\n    defaultdict: A dictionary where the keys are characters ('a' to 'z') and the values\\n    are lists of randomly generated letters. Each list may have 0 to 'n' occurrences of\\n    its associated letter, depending on the randomness and seed.\\nYou should write self-contained code starting with:\\n```\\nimport random\\nimport string\\nfrom collections import defaultdict\\ndef task_func(n, seed=None):\\n```\",\"libs\":\"['collections', 'random', 'string']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}