{"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":"f0493ac9-0913-5697-9cea-13347f37f0ed","task_key":"default--v0~2e1~2e0~5fhf--f0493ac9-0913-5697-9cea-13347f37f0ed","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf f0493ac9-0913-5697-9cea-13347f37f0ed","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import collections\\nimport random\\nimport itertools\\nANIMALS = ['Cat', 'Dog', 'Elephant', 'Lion', 'Tiger', 'Bear', 'Giraffe', 'Horse', 'Rabbit', 'Snake', 'Zebra']\\ndef task_func(animal_dict, max_count=10, seed=0):\\n\",\"complete_prompt\":\"import collections\\nimport random\\nimport itertools\\n\\n\\nANIMALS = ['Cat', 'Dog', 'Elephant', 'Lion', 'Tiger', 'Bear', 'Giraffe', 'Horse', 'Rabbit', 'Snake', 'Zebra']\\n\\ndef task_func(animal_dict, max_count=10, seed=0):\\n    \\\"\\\"\\\"\\n    Given a constant list of animals in ANIMALS, and a dictionary 'animal_dict' with keys as people's names and values\\n    as their favorite animal names, reverse the keys and values in a given dictionary and count the occurrences of each\\n    predefined animal name with a random count. Return the reversed dictionary and the counter with animal name\\n    occurrences.\\n\\n    This function performs two tasks:\\n    1. It reverses the given dictionary (animal_dict) such that the original values become keys and the original \\n    keys become lists of values.\\n    2. It counts the occurrences of each animal name in a predefined list (ANIMALS). The count of each animal name\\n    is a random integer between 1 and max_count (inclusive).\\n\\n    Parameters:\\n    animal_dict (dict): A dictionary with keys as names and values as animal names.\\n    max_count (int, Optional): A positive integer denoting the maximum count of each animal. Default is 10.\\n    Must be greater than 0.\\n    seed (int, Optional): An integer to seed the random number generator. Default is 0.\\n\\n    Returns:\\n    tuple: A tuple where the first element is a reversed dictionary and the second element is a counter with animal \\n           name occurrences (with randomness in count).\\n\\n    Requirements:\\n    - collections\\n    - random\\n    - itertools\\n\\n    Example:\\n    >>> animal_dict = {'John': 'Cat', 'Alice': 'Dog', 'Bob': 'Elephant', 'Charlie': 'Lion', 'David': 'Tiger', 'Sue': 'Pangolin'}\\n    >>> reversed_dict, animal_counter = task_func(animal_dict, 15, 77)\\n    >>> reversed_dict\\n    {'Cat': ['John'], 'Dog': ['Alice'], 'Elephant': ['Bob'], 'Lion': ['Charlie'], 'Tiger': ['David']}\\n    >>> dict(animal_counter.most_common(5))\\n    {'Giraffe': 14, 'Cat': 13, 'Zebra': 9, 'Snake': 8, 'Elephant': 6}\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Given a constant list of animals in ANIMALS, and a dictionary 'animal_dict' with keys as people's names and values as their favorite animal names, reverse the keys and values in a given dictionary and count the occurrences of each predefined animal name with a random count. Return the reversed dictionary and the counter with animal name occurrences. This function performs two tasks: 1. It reverses the given dictionary (animal_dict) such that the original values become keys and the original keys become lists of values. 2. It counts the occurrences of each animal name in a predefined list (ANIMALS). The count of each animal name is a random integer between 1 and max_count (inclusive).\\nThe function should output with:\\n    tuple: A tuple where the first element is a reversed dictionary and the second element is a counter with animal\\n    name occurrences (with randomness in count).\\nYou should write self-contained code starting with:\\n```\\nimport collections\\nimport random\\nimport itertools\\nANIMALS = ['Cat', 'Dog', 'Elephant', 'Lion', 'Tiger', 'Bear', 'Giraffe', 'Horse', 'Rabbit', 'Snake', 'Zebra']\\ndef task_func(animal_dict, max_count=10, seed=0):\\n```\",\"libs\":\"['collections', 'itertools', 'random']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}