{"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":"f6d4cb0b-1938-57ae-b513-d6cfd70fb126","task_key":"default--v0~2e1~2e0~5fhf--f6d4cb0b-1938-57ae-b513-d6cfd70fb126","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf f6d4cb0b-1938-57ae-b513-d6cfd70fb126","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nfrom random import randint, seed\\ndef task_func(dictionary, item, sample_size=None, random_seed=None):\\n\",\"complete_prompt\":\"import pandas as pd\\nfrom random import randint, seed\\n\\n\\ndef task_func(dictionary, item, sample_size=None, random_seed=None):\\n    \\\"\\\"\\\"\\n    Converts a dictionary to a pandas DataFrame and Find the positions of a particular item in a the resulting DataFrame and record its frequency distribution.\\n    Optionally, return a random sample of these positions, with an option to set a random seed for reproducibility.\\n\\n    Parameters:\\n    dictionary (dictionary): The dictionary.\\n    item (str): The item to find.\\n    sample_size (int, optional): The number of positions to randomly sample. If None, all positions are returned.\\n    random_seed (int, optional): The seed for the random number generator. If None, the results are not reproducible.\\n\\n    Returns:\\n    list: A list of positions (row index, column name) where the item is found.\\n    DataFrame: The converted dictionary.\\n\\n    Requirements:\\n    - pandas\\n    - random.seed\\n    - random.randint\\n\\n    Example:\\n    >>> dictionary = ([['Apple', 'Banana', 'Orange', 'Apple', 'Banana'] for _ in range(5)])\\n    >>> positions = task_func(dictionary, 'Apple', sample_size=2, random_seed=42)\\n    >>> print(positions)\\n    ([(0, 3), (0, 0)],        0       1       2      3       4\\n    0  Apple  Banana  Orange  Apple  Banana\\n    1  Apple  Banana  Orange  Apple  Banana\\n    2  Apple  Banana  Orange  Apple  Banana\\n    3  Apple  Banana  Orange  Apple  Banana\\n    4  Apple  Banana  Orange  Apple  Banana)\\n\\n    >>> dictionary =  {\\n    ...         1: ['road', 'car', 'traffic'],\\n    ...         2: ['car', 'light', 'candle']\\n    ...     }\\n    >>> positions = task_func(dictionary, 'car')\\n    >>> print(positions)\\n    ([(0, 2), (1, 1)],          1       2\\n    0     road     car\\n    1      car   light\\n    2  traffic  candle)\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Converts a dictionary to a pandas DataFrame and Find the positions of a particular item in a the resulting DataFrame and record its frequency distribution. Optionally, return a random sample of these positions, with an option to set a random seed for reproducibility. >>> dictionary =  { ...         1: ['road', 'car', 'traffic'], ...         2: ['car', 'light', 'candle'] ...     } >>> positions = task_func(dictionary, 'car') >>> print(positions) ([(0, 2), (1, 1)],          1       2 0     road     car 1      car   light 2  traffic  candle)\\nThe function should output with:\\n    list: A list of positions (row index, column name) where the item is found.\\n    DataFrame: The converted dictionary.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nfrom random import randint, seed\\ndef task_func(dictionary, item, sample_size=None, random_seed=None):\\n```\",\"libs\":\"['pandas', 'random']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}