{"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":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"a48d8c5c-19c4-52ed-bb62-f8dea9bb0393","task_key":"default--v0~2e1~2e0~5fhf--a48d8c5c-19c4-52ed-bb62-f8dea9bb0393","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf a48d8c5c-19c4-52ed-bb62-f8dea9bb0393","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import csv\\nimport io\\nfrom django.http import HttpRequest, FileResponse\\ndef task_func(request, header, csv_data):\\n\",\"complete_prompt\":\"import csv\\nimport io\\nfrom django.http import HttpRequest, FileResponse\\n\\ndef task_func(request, header, csv_data):\\n    \\\"\\\"\\\"\\n    This function generates a CSV file response from a Django HttpRequest. It constructs a CSV\\n    file using the provided header and CSV data, and sends it back as a Django FileResponse.\\n    This function is particularly useful in scenarios where you need to provide a downloadable\\n    CSV file in response to a user request on a Django web application.\\n\\n    Parameters:\\n    request (HttpRequest): The incoming Django HttpRequest.\\n    header (list of str): List of strings representing the header of the CSV file.\\n    csv_data (list of list of str): List of rows, with each row being a list of strings, to be written into the CSV file.\\n\\n    Returns:\\n    FileResponse: A Django FileResponse object containing the CSV data as an attachment.\\n\\n    Requirements:\\n    - django.http\\n    - django.conf\\n    - csv\\n    - io\\n\\n    Examples:\\n    >>> from django.conf import settings\\n    >>> if not settings.configured:\\n    ...     settings.configure()\\n    >>> request = HttpRequest()\\n    >>> header = ['id', 'name', 'email']\\n    >>> csv_data = [['1', 'John Doe', 'john@example.com'], ['2', 'Jane Doe', 'jane@example.com']]\\n    >>> response = task_func(request, header, csv_data)\\n    >>> response['Content-Type']\\n    'text/csv'\\n    >>> response['Content-Disposition']\\n    'attachment; filename=\\\"data.csv\\\"'\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"This function generates a CSV file response from a Django HttpRequest. It constructs a CSV file using the provided header and CSV data, and sends it back as a Django FileResponse. This function is particularly useful in scenarios where you need to provide a downloadable CSV file in response to a user request on a Django web application.\\nThe function should output with:\\n    FileResponse: A Django FileResponse object containing the CSV data as an attachment.\\nYou should write self-contained code starting with:\\n```\\nimport csv\\nimport io\\nfrom django.http import HttpRequest, FileResponse\\ndef task_func(request, header, csv_data):\\n```\",\"libs\":\"['io', 'csv', 'django']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}