{"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":"687f29b9-71f1-5674-8ced-5550e8c1d115","task_key":"default--v0~2e1~2e0~5fhf--687f29b9-71f1-5674-8ced-5550e8c1d115","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 687f29b9-71f1-5674-8ced-5550e8c1d115","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"from bs4 import BeautifulSoup\\nimport requests\\n# Constants\\nURL = \\\"http://example.com\\\"\\ndef task_func(url=URL, from_encoding=\\\"cp1251\\\", use_lxml=False):\\n\",\"complete_prompt\":\"from bs4 import BeautifulSoup\\nimport requests\\n\\n# Constants\\nURL = \\\"http://example.com\\\"\\n\\n\\ndef task_func(url=URL, from_encoding=\\\"cp1251\\\", use_lxml=False):\\n    \\\"\\\"\\\"\\n    Fetches a web page from a given URL, decodes its content from a specified encoding,\\n    and returns the parsed HTML using BeautifulSoup. If specified, 'lxml' is used as\\n    the parser for improved performance. In case of any failure (like network issues,\\n    invalid URL, or decoding errors), the function returns None.\\n\\n    Parameters:\\n    - url (str): The URL of the webpage to fetch. Defaults to the constant URL.\\n    - from_encoding (str): The original encoding of the webpage content. Defaults to 'cp1251'.\\n    - use_lxml (bool): Flag to use 'lxml' as the parser for BeautifulSoup. If False, the default 'html.parser' is used. Defaults to False.\\n\\n    Returns:\\n    - BeautifulSoup object if the fetch and parse are successful.\\n    - None if the URL is invalid, the request fails, or parsing fails.\\n\\n    Requirements:\\n    - bs4\\n    - requests\\n\\n    Example:\\n    >>> html = task_func('http://example.com', 'cp1251', True)\\n    >>> print(html.prettify()) if html else print(\\\"Error fetching or parsing the webpage.\\\")\\n\\n    Notes:\\n    - The function returns None if the URL is empty or None.\\n    - Network errors, HTTP errors, and decoding issues are caught and result in None being returned.\\n    - If the HTTP response status code is 200 (indicating success), the content is decoded using the specified encoding\\n    - If the response status code is not 200, it implies an unsuccessful HTTP request (e.g., 404 Not Found, 403 Forbidden).\\n      In such cases, the function returns None, indicating that the webpage could not be successfully retrieved or was not available.\\n      \\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Fetches a web page from a given URL, decodes its content from a specified encoding, and returns the parsed HTML using BeautifulSoup. If specified, 'lxml' is used as the parser for improved performance. In case of any failure (like network issues, invalid URL, or decoding errors), the function returns None.\\nNote that: Notes: The function returns None if the URL is empty or None. Network errors, HTTP errors, and decoding issues are caught and result in None being returned. If the HTTP response status code is 200 (indicating success), the content is decoded using the specified encoding If the response status code is not 200, it implies an unsuccessful HTTP request (e.g., 404 Not Found, 403 Forbidden). In such cases, the function returns None, indicating that the webpage could not be successfully retrieved or was not available.\\nThe function should output with:\\n    BeautifulSoup object if the fetch and parse are successful.\\n    None if the URL is invalid, the request fails, or parsing fails.\\nYou should write self-contained code starting with:\\n```\\nfrom bs4 import BeautifulSoup\\nimport requests\\n# Constants\\nURL = \\\"http://example.com\\\"\\ndef task_func(url=URL, from_encoding=\\\"cp1251\\\", use_lxml=False):\\n```\",\"libs\":\"['bs4', 'requests']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}