{"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":"b67c8975-a441-5324-8965-1a8e1fdbae56","task_key":"default--v0~2e1~2e0~5fhf--b67c8975-a441-5324-8965-1a8e1fdbae56","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf b67c8975-a441-5324-8965-1a8e1fdbae56","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"from itertools import cycle\\nfrom random import choice, seed\\ndef task_func(n_colors, colors=['Red', 'Green', 'Blue', 'Yellow', 'Purple'], rng_seed=None):\\n\",\"complete_prompt\":\"from itertools import cycle\\nfrom random import choice, seed\\n\\n\\ndef task_func(n_colors, colors=['Red', 'Green', 'Blue', 'Yellow', 'Purple'], rng_seed=None):\\n    \\\"\\\"\\\"\\n    Generates a list representing a color pattern. The pattern consists of 'n_colors' elements \\n    and alternates between a cyclic sequence of colors as defined in the parameter 'colors',\\n    and random colors from the same list.\\n    Optionally, a seed for the random number generator can be provided for repeatable randomness.\\n\\n    If n_colors is smaller than or equal to zero an empty list is returned.\\n\\n    Parameters:\\n    n_colors (int): The number of colors to include in the pattern. This number indicates the total \\n                    elements in the returned list, alternating between cyclic and random colors.\\n    colors (list of str, optional): The list of colors to generate from. \\n                Defaults to  ['Red', 'Green', 'Blue', 'Yellow', 'Purple'].\\n    rng_seed (int, optional): A seed for the random number generator to ensure repeatability of the color selection. \\n                              If 'None', the randomness is based on system time or other sources of entropy.\\n\\n    Returns:\\n    list: A list representing the color pattern. Each element of the list is a string indicating \\n          the color. For example, with n_colors=4 and a specific seed, the result could be consistent \\n          across calls with the same seed.\\n\\n    Requirements:\\n    - itertools\\n    - random\\n\\n    Examples:\\n    >>> color_pattern = task_func(4, rng_seed=123)\\n    >>> print(color_pattern)\\n    ['Red', 'Red', 'Green', 'Blue']\\n\\n    >>> colors = ['Brown', 'Green', 'Black']\\n    >>> color_pattern = task_func(12, colors=colors, rng_seed=42)\\n    >>> print(color_pattern)\\n    ['Brown', 'Black', 'Green', 'Brown', 'Black', 'Brown', 'Brown', 'Black', 'Green', 'Green', 'Black', 'Brown']\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generates a list representing a color pattern. The pattern consists of 'n_colors' elements and alternates between a cyclic sequence of colors as defined in the parameter 'colors', and random colors from the same list. Optionally, a seed for the random number generator can be provided for repeatable randomness. If n_colors is smaller than or equal to zero an empty list is returned. >>> colors = ['Brown', 'Green', 'Black'] >>> color_pattern = task_func(12, colors=colors, rng_seed=42) >>> print(color_pattern) ['Brown', 'Black', 'Green', 'Brown', 'Black', 'Brown', 'Brown', 'Black', 'Green', 'Green', 'Black', 'Brown']\\nThe function should output with:\\n    list: A list representing the color pattern. Each element of the list is a string indicating\\n    the color. For example, with n_colors=4 and a specific seed, the result could be consistent\\n    across calls with the same seed.\\nYou should write self-contained code starting with:\\n```\\nfrom itertools import cycle\\nfrom random import choice, seed\\ndef task_func(n_colors, colors=['Red', 'Green', 'Blue', 'Yellow', 'Purple'], rng_seed=None):\\n```\",\"libs\":\"['random', 'itertools']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}