{"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":"a05bca57-cc41-57b5-b8d7-1b3a72f9076d","task_key":"default--v0~2e1~2e0~5fhf--a05bca57-cc41-57b5-b8d7-1b3a72f9076d","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf a05bca57-cc41-57b5-b8d7-1b3a72f9076d","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import csv\\nimport os\\ndef task_func(data, file_path, headers):\\n\",\"complete_prompt\":\"import csv\\nimport os\\n\\ndef task_func(data, file_path, headers):\\n    \\\"\\\"\\\"\\n    Writes a list of tuples to a CSV file.\\n\\n    Each tuple in the 'data' list represents a row in the CSV file, with each \\n    element of the tuple corresponding to a cell in the row. If a tuple contains\\n    fewer elements than there are headers, the missing elements are filled with None.\\n\\n    Parameters:\\n        data (list of tuples): A list of tuples with each tuple representing a row of data.\\n        file_path (str): The complete file path where the CSV file will be saved. If the file already exists, it will be overwritten.\\n        headers (list of str): A list of strings representing the headers (column names) in the CSV file.\\n\\n    Returns:\\n        str: The absolute path of the saved CSV file.\\n\\n    Raises:\\n        ValueError: If 'file_path' is None.\\n\\n    Requirements:\\n    - csv\\n    - os\\n\\n    \\n    Examples:\\n    >>> full_path = task_func([(1, 'a', 2), ('a', 3, 5), ('c', 1, -2)], 'test.csv', ['a', 'b', 'c'])\\n    >>> print(full_path)\\n    '/user/data/test.csv' #full path depends on os and individual folder structure\\n    >>> with open('test.csv', 'r', newline='') as csvfile:\\n    >>>     reader = csv.reader(csvfile)\\n    >>>     for row in reader: \\n    >>>         print(row)\\n    ['a', 'b', 'c']\\n    ['1', 'a', '2']\\n    ['a', '3', '5']\\n    ['c', '1', '-2']\\n\\n    >>> task_func([('test', 123, 2), (3, -3, -15), ('hallo', 1, -2)], 'data.csv', ['test1', 'test2', 'test3'])\\n    '/user/data/data.csv' #full path depends on os and individual folder structure\\n    >>> with open('data.csv', 'r', newline='') as csvfile:\\n    >>>     reader = csv.reader(csvfile)\\n    >>>     for row in reader: \\n    >>>         print(row)\\n    ['test1', 'test2', 'test3']\\n    ['test', '123', '2']\\n    ['3', '-3', '-15']\\n    ['hallo', '1', '-2']\\n    ['1', 'hi', 'hello']\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Writes a list of tuples to a CSV file. Each tuple in the 'data' list represents a row in the CSV file, with each element of the tuple corresponding to a cell in the row. If a tuple contains fewer elements than there are headers, the missing elements are filled with None. >>> task_func([('test', 123, 2), (3, -3, -15), ('hallo', 1, -2)], 'data.csv', ['test1', 'test2', 'test3']) '/user/data/data.csv' #full path depends on os and individual folder structure >>> with open('data.csv', 'r', newline='') as csvfile: >>>     reader = csv.reader(csvfile) >>>     for row in reader: >>>         print(row) ['test1', 'test2', 'test3'] ['test', '123', '2'] ['3', '-3', '-15'] ['hallo', '1', '-2'] ['1', 'hi', 'hello']\\nThe function should raise the exception for: ValueError: If 'file_path' is None.\\nThe function should output with:\\n    str: The absolute path of the saved CSV file.\\nYou should write self-contained code starting with:\\n```\\nimport csv\\nimport os\\ndef task_func(data, file_path, headers):\\n```\",\"libs\":\"['csv', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}