{"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":"afdeb611-6532-5d85-9415-6618be7f54c8","task_key":"default--v0~2e1~2e0~5fhf--afdeb611-6532-5d85-9415-6618be7f54c8","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf afdeb611-6532-5d85-9415-6618be7f54c8","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nimport pandas as pd\\ndef task_func(products, n_samples=100, sales_lower=50, sales_upper=200, profit_margin_min=0.1, profit_margin_max=0.5, random_seed=42):\\n\",\"complete_prompt\":\"import numpy as np\\nimport pandas as pd\\n\\ndef task_func(products, n_samples=100, sales_lower=50, sales_upper=200, profit_margin_min=0.1, profit_margin_max=0.5, random_seed=42):\\n    \\\"\\\"\\\"\\n    Generate a sales report with randomly simulated sales and profit data for a given list of products.\\n    The data is aggregated by product and sorted by total profit in descending order. \\n    \\n    Parameters:\\n    - products (list of str): List of product names.\\n    - n_samples (int): The number of data points to generate for the report. Default is 100.\\n    - sales_lower (int): The minimum sales value for the random generation. Default is 50.\\n    - sales_upper (int): The maximum sales value for the random generation. Default is 200.\\n    - profit_margin_min (float): The minimum profit margin as a fraction of sales. Default is 0.1.\\n    - profit_margin_max (float): The maximum profit margin as a fraction of sales. Default is 0.5.\\n    - random_seed (int): Seed for the random number generator to ensure reproducibility. Default is 42.\\n\\n    Returns:\\n    pd.DataFrame: A DataFrame containing aggregated sales and profit data for each product, sorted by profit.\\n\\n    Raises:\\n    ValueError: If n_samples is not a positive integer, or if sales_lower is greater than sales_upper.\\n    TypeError: If products is not a list of strings, or if sales_lower, sales_upper, profit_margin_min, or profit_margin_max are not numeric.\\n\\n    Requirements:\\n    - numpy\\n    - pandas\\n\\n    Example:\\n    >>> products = [\\\"iPhone\\\", \\\"iPad\\\", \\\"Macbook\\\", \\\"Airpods\\\", \\\"Apple Watch\\\"]\\n    >>> report = task_func(products, n_samples=50, sales_lower=100, sales_upper=150, profit_margin_min=0.2, profit_margin_max=0.4, random_seed=42)\\n    >>> print(report)\\n           Product  Sales      Profit\\n    2      Macbook   1561  444.826709\\n    3         iPad   1383  401.925334\\n    0      Airpods   1297  381.482713\\n    1  Apple Watch   1123  308.078536\\n    4       iPhone    921  294.013887\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a sales report with randomly simulated sales and profit data for a given list of products. The data is aggregated by product and sorted by total profit in descending order.\\nThe function should raise the exception for: ValueError: If n_samples is not a positive integer, or if sales_lower is greater than sales_upper. TypeError: If products is not a list of strings, or if sales_lower, sales_upper, profit_margin_min, or profit_margin_max are not numeric.\\nThe function should output with:\\n    pd.DataFrame: A DataFrame containing aggregated sales and profit data for each product, sorted by profit.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nimport pandas as pd\\ndef task_func(products, n_samples=100, sales_lower=50, sales_upper=200, profit_margin_min=0.1, profit_margin_max=0.5, random_seed=42):\\n```\",\"libs\":\"['pandas', 'numpy']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}