{"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":"20edf78c-d745-5f81-bb41-95ee7338aad8","task_key":"default--v0~2e1~2e0~5fhf--20edf78c-d745-5f81-bb41-95ee7338aad8","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 20edf78c-d745-5f81-bb41-95ee7338aad8","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import matplotlib.pyplot as plt\\nimport random\\nimport string\\nimport pandas as pd\\nimport seaborn as sns\\n# Constants\\nLETTERS = list(string.ascii_lowercase)\\ndef task_func(rows=1000, string_length=3):\\n\",\"complete_prompt\":\"import matplotlib.pyplot as plt\\nimport random\\nimport string\\nimport pandas as pd\\nimport seaborn as sns\\n\\n# Constants\\nLETTERS = list(string.ascii_lowercase)\\n\\n\\ndef task_func(rows=1000, string_length=3):\\n    \\\"\\\"\\\"\\n    Generate a dataframe of random strings and create a heatmap showing the correlation\\n    in the frequency of each letter in these strings.\\n\\n    This function generates a specified number of random strings, each of a given length,\\n    and calculates the frequency of each letter in these strings. A heatmap of the \\n    correlation matrix is then displayed, showing the co-occurrence frequencies of different \\n    letters within these strings.\\n\\n    If the number of rows specified is zero, the function will print a message indicating\\n    that no data is available to generate the heatmap and will return None. Otherwise, \\n    it processes the DataFrame to convert the generated strings into a one-hot encoded format\\n    and then sums up these encodings to calculate the frequency of each letter.\\n\\n    Parameters:\\n    - rows (int, optional): Number of random strings to generate. Must be non-negative. \\n      Default is 1000. If set to 0, the function returns None after printing a message.\\n    - string_length (int, optional): Length of each random string. Must be non-negative. \\n      Default is 3. A value of 0 results in the generation of empty strings.\\n\\n    Returns:\\n    - matplotlib.axes._axes.Axes or None: A seaborn heatmap plot object if \\n      data is generated; otherwise, None.\\n\\n    Requirements:\\n    - random\\n    - string\\n    - pandas\\n    - seaborn\\n    - matplotlib\\n\\n    Note\\n    - If no strings are generated (e.g., rows = 0), the \\n       DataFrame will be empty. In this case, the function prints a message \\\"No data to generate heatmap.\\\" and returns None.\\n    - If the DataFrame is not empty, each string is split into its \\n       constituent letters, converted into one-hot encoded format, and then the frequency \\n       of each letter is calculated by summing these encodings.\\n       \\n    Example:\\n    >>> ax = task_func(1000, 3)\\n    >>> ax.get_xlim()\\n    (0.0, 26.0)\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a dataframe of random strings and create a heatmap showing the correlation in the frequency of each letter in these strings. This function generates a specified number of random strings, each of a given length, and calculates the frequency of each letter in these strings. A heatmap of the correlation matrix is then displayed, showing the co-occurrence frequencies of different letters within these strings. If the number of rows specified is zero, the function will print a message indicating that no data is available to generate the heatmap and will return None. Otherwise, it processes the DataFrame to convert the generated strings into a one-hot encoded format and then sums up these encodings to calculate the frequency of each letter. Note - If no strings are generated (e.g., rows = 0), the DataFrame will be empty. In this case, the function prints a message \\\"No data to generate heatmap.\\\" and returns None. - If the DataFrame is not empty, each string is split into its constituent letters, converted into one-hot encoded format, and then the frequency of each letter is calculated by summing these encodings.\\nThe function should output with:\\n    matplotlib.axes._axes.Axes or None: A seaborn heatmap plot object if\\n    data is generated; otherwise, None.\\nYou should write self-contained code starting with:\\n```\\nimport matplotlib.pyplot as plt\\nimport random\\nimport string\\nimport pandas as pd\\nimport seaborn as sns\\n# Constants\\nLETTERS = list(string.ascii_lowercase)\\ndef task_func(rows=1000, string_length=3):\\n```\",\"libs\":\"['pandas', 'matplotlib', 'random', 'string', 'seaborn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}