{"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":"abb08ccb-be08-5e27-ba08-f5f1ecf64e09","task_key":"default--v0~2e1~2e0~5fhf--abb08ccb-be08-5e27-ba08-f5f1ecf64e09","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf abb08ccb-be08-5e27-ba08-f5f1ecf64e09","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import collections\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\ndef task_func(data_dict):\\n\",\"complete_prompt\":\"import collections\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(data_dict):\\n    \\\"\\\"\\\"\\n    Analyze the uniformity of a distribution represented by a dictionary of categories and their counts,\\n    and create a description to introduce this distribution.\\n\\n    Parameters:\\n    - data_dict (dict): A dictionary with categories as keys and counts as values.\\n\\n    Returns:\\n    - tuple: A tuple containing:\\n        - matplotlib.axes._axes.Axes: The axes object of the histogram.\\n        - str: A message indicating whether the distribution is uniform (\\\"The distribution is uniform.\\\")\\n               or not (\\\"The distribution is not uniform.\\\").\\n\\n    Note:\\n    - If 'data_dict' is empty, the function returns None and a message \\\"The distribution is uniform.\\\"\\n       indicating that an empty distribution is considered uniform by default.\\n    - If 'data_dict' is not empty, it calculates the average count of the categories.\\n       - The distribution is considered uniform if the absolute difference between each count and the\\n         average count is less than or equal to 1e-5.\\n       - If any count's absolute difference with the average count is more than 1e-5, the distribution\\n         is considered not uniform.\\n    - The function then creates a histogram of the counts using matplotlib, with the number of bins\\n       being the lesser of 10 or the number of unique counts. The histogram's x-ticks are labeled with\\n       the category names.\\n\\n    Requirements:\\n    - collections\\n    - numpy\\n    - matplotlib\\n\\n    Example:\\n    >>> data = {'A': 2, 'B': 3, 'C': 4, 'D': 1, 'E': 2}\\n    >>> ax, message = task_func(data)\\n    >>> print(message)\\n    The distribution is not uniform.\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Analyze the uniformity of a distribution represented by a dictionary of categories and their counts, and create a description to introduce this distribution.\\nNote that: If 'data_dict' is empty, the function returns None and a message \\\"The distribution is uniform.\\\" indicating that an empty distribution is considered uniform by default. If 'data_dict' is not empty, it calculates the average count of the categories. The distribution is considered uniform if the absolute difference between each count and the average count is less than or equal to 1e-5. If any count's absolute difference with the average count is more than 1e-5, the distribution is considered not uniform. The function then creates a histogram of the counts using matplotlib, with the number of bins being the lesser of 10 or the number of unique counts. The histogram's x-ticks are labeled with the category names.\\nThe function should output with:\\n    tuple: A tuple containing:\\n    matplotlib.axes._axes.Axes: The axes object of the histogram.\\n    str: A message indicating whether the distribution is uniform (\\\"The distribution is uniform.\\\")\\n    or not (\\\"The distribution is not uniform.\\\").\\nYou should write self-contained code starting with:\\n```\\nimport collections\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\ndef task_func(data_dict):\\n```\",\"libs\":\"['collections', 'numpy', 'matplotlib']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}