{"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":"494363b4-b1cf-597f-87c7-b20f87161059","task_key":"default--v0~2e1~2e0~5fhf--494363b4-b1cf-597f-87c7-b20f87161059","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 494363b4-b1cf-597f-87c7-b20f87161059","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import random\\nfrom collections import Counter\\nfrom statistics import mode\\ndef task_func(list_length=1000, range_start=1, range_end=10, random_seed=None):\\n\",\"complete_prompt\":\"import random\\nfrom collections import Counter\\nfrom statistics import mode\\n\\n\\ndef task_func(list_length=1000, range_start=1, range_end=10, random_seed=None):\\n    \\\"\\\"\\\"\\n    Generate a random list of integers within a specified range. Convert this\\n    list to a generator object that yields tuples. Each tuple contains a number\\n    from the list and its frequency. Additionally, find and return the mode of \\n    the list.\\n\\n    Parameters:\\n    - list_length (int): The length of the random list to be generated. Default is 1000.\\n    - range_start (int): The start of the range for random numbers. Default is 1.\\n    - range_end (int): The end of the range for random numbers. Default is 10.\\n    - random_seed (int): Seed for the rng. Default is None.\\n\\n    Returns:\\n    tuple: A tuple containing:\\n    - int: The mode of the generated list.\\n    - generator: A generator object yielding tuples with each number from the list and its frequency.\\n\\n    Requirements:\\n    - random\\n    - collections\\n    - statistics\\n\\n    Example:\\n    >>> mode, numbers = task_func(100, 1, 5, random_seed=1)\\n    >>> print(mode)  # prints the mode e.g. 3\\n    4\\n    >>> print(next(numbers))  # prints a tuple like (1, 25)\\n    (2, 18)\\n\\n    >>> mode, numbers = task_func(20, -12, 334, random_seed=23)\\n    >>> print(mode)\\n    136\\n    >>> print([_ for _ in numbers])\\n    [(136, 1), (30, 1), (-4, 1), (291, 1), (145, 1), (204, 1), (182, 1), (259, 1), (171, 1), (54, 1), (86, 1), (124, 1), (215, 1), (-5, 1), (101, 1), (305, 1), (220, 1), (0, 1), (42, 1), (31, 1)]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a random list of integers within a specified range. Convert this list to a generator object that yields tuples. Each tuple contains a number from the list and its frequency. Additionally, find and return the mode of the list. >>> mode, numbers = task_func(20, -12, 334, random_seed=23) >>> print(mode) 136 >>> print([_ for _ in numbers]) [(136, 1), (30, 1), (-4, 1), (291, 1), (145, 1), (204, 1), (182, 1), (259, 1), (171, 1), (54, 1), (86, 1), (124, 1), (215, 1), (-5, 1), (101, 1), (305, 1), (220, 1), (0, 1), (42, 1), (31, 1)]\\nThe function should output with:\\n    tuple: A tuple containing:\\n    int: The mode of the generated list.\\n    generator: A generator object yielding tuples with each number from the list and its frequency.\\nYou should write self-contained code starting with:\\n```\\nimport random\\nfrom collections import Counter\\nfrom statistics import mode\\ndef task_func(list_length=1000, range_start=1, range_end=10, random_seed=None):\\n```\",\"libs\":\"['statistics', 'collections', 'random']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}