{"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":"38f5aac0-50ff-50fe-a3f0-c3d2a01c4d27","task_key":"default--v0~2e1~2e0~5fhf--38f5aac0-50ff-50fe-a3f0-c3d2a01c4d27","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 38f5aac0-50ff-50fe-a3f0-c3d2a01c4d27","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import re\\nimport numpy as np\\nfrom collections import Counter\\nfrom sklearn.mixture import GaussianMixture\\ndef task_func(text, num_gaussians=1, seed=42):\\n\",\"complete_prompt\":\"import re\\nimport numpy as np\\nfrom collections import Counter\\nfrom sklearn.mixture import GaussianMixture\\n\\n\\ndef task_func(text, num_gaussians=1, seed=42):\\n    '''\\n    Extract names from a string that aren't enclosed by square brackets, \\n    tokenize the names into words, and count the frequency of each word.\\n    Finally, fit a mixture of num_gaussians 1-D Gaussian distributions to \\n    the word frequencies and return the means and variances of the fitted \\n    Gaussians.\\n    \\n    Parameters:\\n    text (str): The text from which to extract names and count word frequencies.\\n    num_gaussians (int, Optional): The number of Gaussian distributions to fit to \\n                                   the word frequencies. Defaults to 1.\\n    seed (int, Optional): The seed for the random number generator. Defaults to 42.\\n    \\n    Returns:\\n    dict: A dictionary with the frequency of each word.\\n    \\n    Requirements:\\n    - re module for regular expression operations.\\n    - numpy for setting the random seed.\\n    - collections.Counter for counting word frequencies.\\n    - scipy.stats.gmm for fitting Gaussian mixture models.\\n\\n    Raises:\\n    ValueError: If num_gaussians is less than or equal to 0.\\n    Exception: If num_gaussians is greater than the number of unique words.\\n    \\n    Examples:\\n    >>> freqs, means = task_func(\\\"Josie Smith [3996 COLLEGE AVENUE, SOMETOWN, MD 21003]Mugsy Dog Smith [2560 OAK ST, GLENMEADE, WI 14098]\\\")\\n    >>> freqs\\n    {'Josie': 1, 'Smith': 2, 'Mugsy': 1, 'Dog': 1}\\n    '''\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Extract names from a string that aren't enclosed by square brackets, tokenize the names into words, and count the frequency of each word. Finally, fit a mixture of num_gaussians 1-D Gaussian distributions to the word frequencies and return the means and variances of the fitted Gaussians.\\nThe function should raise the exception for: ValueError: If num_gaussians is less than or equal to 0. Exception: If num_gaussians is greater than the number of unique words.\\nThe function should output with:\\n    dict: A dictionary with the frequency of each word.\\nYou should write self-contained code starting with:\\n```\\nimport re\\nimport numpy as np\\nfrom collections import Counter\\nfrom sklearn.mixture import GaussianMixture\\ndef task_func(text, num_gaussians=1, seed=42):\\n```\",\"libs\":\"['numpy', 'collections', 're', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}