{"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":"d599d687-c91e-5deb-a9fd-2a5ca9938bce","task_key":"default--v0~2e1~2e0~5fhf--d599d687-c91e-5deb-a9fd-2a5ca9938bce","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf d599d687-c91e-5deb-a9fd-2a5ca9938bce","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import random\\nimport string\\nfrom django.http import HttpResponse\\ndef task_func(request, session_expire_time):\\n\",\"complete_prompt\":\"import random\\nimport string\\nfrom django.http import HttpResponse\\n\\n\\ndef task_func(request, session_expire_time):\\n    \\\"\\\"\\\"\\n    This function creates a random session key comprising letters and digits with a specific length of 20,\\n    then sets this key in a cookie on an HttpResponse object with the specified expiration time.\\n\\n    Parameters:\\n    request (django.http.HttpRequest): The incoming Django HttpRequest.\\n    session_expire_time (int): The expiration time for the session cookie in seconds.\\n\\n    Returns:\\n    django.http.HttpResponse: A Django HttpResponse with the session key set in a cookie.\\n\\n    Raises:\\n    ValueError: If the session key does not contain both letters and digits or\\n                the session key length is not equal to 20.\\n\\n    Note:\\n    -   The function set the response content to \\\"Session key generated successfully.\\\" if the session key\\n        is valid.\\n\\n    Examples:\\n    >>> from django.conf import settings\\n    >>> from django.http import HttpRequest\\n    >>> if not settings.configured:\\n    ...     settings.configure()\\n    >>> request = HttpRequest()\\n    >>> response = task_func(request, 60)\\n    >>> 'session_key' in response.cookies\\n    True\\n    >>> len(response.cookies['session_key'].value) == 20\\n    True\\n    >>> response.cookies['session_key']['max-age'] == 60\\n    True\\n\\n    Requirements:\\n    - django.http\\n    - django.conf\\n    - random\\n    - string\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"This function creates a random session key comprising letters and digits with a specific length of 20, then sets this key in a cookie on an HttpResponse object with the specified expiration time.\\nNote that: The function set the response content to \\\"Session key generated successfully.\\\" if the session key is valid.\\nThe function should raise the exception for: ValueError: If the session key does not contain both letters and digits or the session key length is not equal to 20.\\nThe function should output with:\\n    django.http.HttpResponse: A Django HttpResponse with the session key set in a cookie.\\nYou should write self-contained code starting with:\\n```\\nimport random\\nimport string\\nfrom django.http import HttpResponse\\ndef task_func(request, session_expire_time):\\n```\",\"libs\":\"['django', 'string', 'random']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}