{"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":"93201b1b-2941-5e30-ac99-202d61d52c34","task_key":"default--v0~2e1~2e0~5fhf--93201b1b-2941-5e30-ac99-202d61d52c34","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 93201b1b-2941-5e30-ac99-202d61d52c34","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import csv\\nimport random\\nfrom faker import Faker\\ndef task_func(file_path, num_rows, random_seed=None):\\n\",\"complete_prompt\":\"import csv\\nimport random\\nfrom faker import Faker\\n\\n\\ndef task_func(file_path, num_rows, random_seed=None):\\n    \\\"\\\"\\\"\\n    Generate a CSV file on a specific file path with fake personal data.\\n    The personal data consists of the following columns:\\n    - Name: random names generated with faker\\n    - Age: random age values: 20<=age<=60\\n    - Address: random adresses generated with faker\\n    - Email: random email adresses generated with faker\\n\\n    Newlines '\\\\n' in the generated addresses get replaced with ', '.\\n    The number of rows in the CSV file is determined by num_rows.\\n\\n    Parameters:\\n    file_path (str): The file path where the CSV file should be created.\\n    num_rows (int): The number of rows of random data to generate.\\n    random_seed (int, optional): Seed used random generation. Same seed used for faker and random module.\\n                                 Defaults to None.\\n    \\n    Returns:\\n    str: The file path of the generated CSV file.\\n\\n    Raises:\\n    ValueError: If num_rows is not an integer >= 0.\\n\\n    Requirements:\\n    - csv\\n    - random\\n    - faker\\n\\n    Example:\\n    >>> task_func('/tmp/people.csv', 100)\\n    '/tmp/people.csv'\\n\\n    >>> path = task_func('test.csv', 5, random_seed=12)\\n    >>> with open(path, 'r') as file:\\n    >>>     reader = csv.reader(file)\\n    >>>     rows = list(reader)\\n    >>> print(rows)\\n    [\\n        ['Name', 'Age', 'Address', 'Email'], \\n        ['Matthew Estrada', '50', '7479 Angela Shore, South Michael, MA 28059', 'johnstonjames@example.net'],\\n        ['Gabrielle Sullivan', '37', '83167 Donna Dale, Nicoleside, GA 91836', 'peterswilliam@example.org'],\\n        ['Jason Carlson', '53', '013 Kelly Lake Suite 414, West Michael, NY 75635', 'anthonycarson@example.com'],\\n        ['Alexander Lowe', '42', '183 Christian Harbor, South Joshuastad, PA 83984', 'palmermicheal@example.com'],\\n        ['John Benjamin', '29', '8523 Rhonda Avenue, Rosemouth, HI 32166', 'masonjohn@example.org']\\n    ]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a CSV file on a specific file path with fake personal data. The personal data consists of the following columns: - Name: random names generated with faker - Age: random age values: 20<=age<=60 - Address: random adresses generated with faker - Email: random email adresses generated with faker Newlines '\\\\n' in the generated addresses get replaced with ', '. The number of rows in the CSV file is determined by num_rows. >>> path = task_func('test.csv', 5, random_seed=12) >>> with open(path, 'r') as file: >>>     reader = csv.reader(file) >>>     rows = list(reader) >>> print(rows) [ ['Name', 'Age', 'Address', 'Email'], ['Matthew Estrada', '50', '7479 Angela Shore, South Michael, MA 28059', 'johnstonjames@example.net'], ['Gabrielle Sullivan', '37', '83167 Donna Dale, Nicoleside, GA 91836', 'peterswilliam@example.org'], ['Jason Carlson', '53', '013 Kelly Lake Suite 414, West Michael, NY 75635', 'anthonycarson@example.com'], ['Alexander Lowe', '42', '183 Christian Harbor, South Joshuastad, PA 83984', 'palmermicheal@example.com'], ['John Benjamin', '29', '8523 Rhonda Avenue, Rosemouth, HI 32166', 'masonjohn@example.org'] ]\\nThe function should raise the exception for: ValueError: If num_rows is not an integer >= 0.\\nThe function should output with:\\n    str: The file path of the generated CSV file.\\nYou should write self-contained code starting with:\\n```\\nimport csv\\nimport random\\nfrom faker import Faker\\ndef task_func(file_path, num_rows, random_seed=None):\\n```\",\"libs\":\"['faker', 'csv', 'random']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}