Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    ValueError
Message:      Expected object or value
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 290, in _generate_tables
                  pa_table = paj.read_json(
                      io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
                  )
                File "pyarrow/_json.pyx", line 342, in pyarrow._json.read_json
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                  return check_status(status)
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
                  raise convert_status(status)
              pyarrow.lib.ArrowInvalid: JSON parse error: Column() changed from object to string in row 0
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1827, in _prepare_split_single
                  for key, table in generator:
                                    ^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 613, in wrapped
                  for item in generator(*args, **kwargs):
                              ~~~~~~~~~^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 304, in _generate_tables
                  batch = json_encode_fields_in_json_lines(original_batch, json_field_paths)
                File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 111, in json_encode_fields_in_json_lines
                  examples = [ujson_loads(line) for line in original_batch.splitlines()]
                              ~~~~~~~~~~~^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/utils/json.py", line 20, in ujson_loads
                  return pd.io.json.ujson_loads(*args, **kwargs)
                         ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
              ValueError: Expected object or value
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1880, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

task_id
string
solution
string
raw_solution
string
BigCodeBench/13
import subprocess import ftplib import os def task_func(ftp_server='ftp.dlptest.com', ftp_user='dlpuser', ftp_password='rNrKYTX9g7z3RgJRmxWuGHbeu', ftp_dir='/ftp/test'): """ Download all files from a specific directory on an FTP server using wget in a subprocess. Args: ftp_server (str): The FTP ser...
import subprocess import ftplib import os def task_func(ftp_server='ftp.dlptest.com', ftp_user='dlpuser', ftp_password='rNrKYTX9g7z3RgJRmxWuGHbeu', ftp_dir='/ftp/test'): """ Download all files from a specific directory on an FTP server using wget in a subprocess. Args: ftp_server (str): The FTP se...
BigCodeBench/15
import subprocess import csv import os def task_func(commands_file_path, output_dir_path): """ Execute a list of shell commands read from a CSV file and save the outputs in separate files. Each command's output is written to a unique file in the specified output directory. If a command fails, the error ...
import subprocess import csv import os def task_func(commands_file_path, output_dir_path): """ Execute a list of shell commands read from a CSV file and save the outputs in separate files. Each command's output is written to a unique file in the specified output directory. If a command fails, the error...
BigCodeBench/17
import subprocess import psutil import time def task_func(process_name: str) -> str: ''' Check if a particular process is running based on its name. If it is not running, start it using the process name as a command. If it is running, terminate the process and restart it by executing the process name as a ...
import subprocess import psutil import time def task_func(process_name: str) -> str: ''' Check if a particular process is running based on its name. If it is not running, start it using the process name as a command. If it is running, terminate the process and restart it by executing the process name as a...
BigCodeBench/19
import os import glob import zipfile def task_func(directory): """ Zips all files (not including subdirectories) located in the specified directory and returns the path to the created zip file. Parameters: directory (str): The directory path containing the files to be zipped. Returns: ...
import os import glob import zipfile def task_func(directory): """ Zips all files (not including subdirectories) located in the specified directory and returns the path to the created zip file. Parameters: directory (str): The directory path containing the files to be zipped. Returns: ...
BigCodeBench/34
import re from wordcloud import WordCloud import matplotlib.pyplot as plt def task_func(text): """ Create a word cloud from text after removing URLs and plot it. Parameters: - text (str): The text to analyze. Returns: WordCloud object: The generated word cloud. Raises: ValueError("No w...
import re from wordcloud import WordCloud import matplotlib.pyplot as plt def task_func(text): """ Create a word cloud from text after removing URLs and plot it. Parameters: - text (str): The text to analyze. Returns: WordCloud object: The generated word cloud. Raises: ValueError("No...
BigCodeBench/37
import pandas as pd from sklearn.ensemble import RandomForestClassifier import seaborn as sns import matplotlib.pyplot as plt import pandas as pd def task_func(df, target_column): """ Train a random forest classifier to perform the classification of the rows in a dataframe with respect to the column of interest...
import pandas as pd from sklearn.ensemble import RandomForestClassifier import seaborn as sns import matplotlib.pyplot as plt def task_func(df, target_column): """ Train a random forest classifier to perform the classification of the rows in a dataframe with respect to the column of interest plot the bar plot ...
BigCodeBench/82
from flask import Flask, render_template, redirect, url_for from flask_login import LoginManager, UserMixin, login_user, login_required, logout_user, current_user from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import DataRequired, Length from werkzeug...
from flask import Flask, render_template, redirect, url_for from flask_login import LoginManager, UserMixin, login_user, login_required, logout_user, current_user from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import DataRequired, Length from werkzeug...
BigCodeBench/89
import numpy as np import matplotlib.pyplot as plt from scipy import stats from sklearn.preprocessing import StandardScaler def task_func(data, column, outlier_z_score): """ Identifies and removes outliers from a specified column of a dataset based on the Z-score. It standardizes the column, calculates Z-sc...
import numpy as np import matplotlib.pyplot as plt from scipy import stats from sklearn.preprocessing import StandardScaler def task_func(data, column, outlier_z_score): """ Identifies and removes outliers from a specified column of a dataset based on the Z-score. It standardizes the column, calculates Z-s...
BigCodeBench/92
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans from matplotlib.collections import PathCollection def task_func(data, n_clusters=3): """ Perform K-means clustering on a dataset and generate a scatter plot visualizing the clusters and their centroids. ...
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans from matplotlib.collections import PathCollection def task_func(data, n_clusters=3): """ Perform K-means clustering on a dataset and generate a scatter plot visualizing the clusters and their centroids. ...
BigCodeBench/93
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.decomposition import PCA def task_func(data, n_components=2): """ Perform Principal Component Analysis (PCA) on a dataset and record the result. Also, generates a scatter plot of the transformed data. Parameters: da...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.decomposition import PCA def task_func(data, n_components=2): """ Perform Principal Component Analysis (PCA) on a dataset and record the result. Also, generates a scatter plot of the transformed data. Parameters: d...
BigCodeBench/99
import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from sklearn.datasets import load_iris def task_func(): """ Draws a seaborn pair plot of the iris dataset using Arial font. This function sets the global font to Arial for better readability and visual appeal. It then generates a pai...
import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from sklearn.datasets import load_iris def task_func(): """ Draws a seaborn pair plot of the iris dataset using Arial font. This function sets the global font to Arial for better readability and visual appeal. It then generates a pa...
BigCodeBench/100
import matplotlib.pyplot as plt import pandas as pd import random from datetime import datetime def task_func(seed=42): """ Generates a plot of random time series data for the past 30 days with reproducibility controlled by an optional seed parameter. The plot is styled with Arial font for better read...
import matplotlib.pyplot as plt import pandas as pd import random from datetime import datetime def task_func(seed=42): """ Generates a plot of random time series data for the past 30 days with reproducibility controlled by an optional seed parameter. The plot is styled with Arial font for better rea...
BigCodeBench/101
import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import numpy as np import os def task_func(data_url="http://lib.stat.cmu.edu/datasets/boston", seed=42): """ Draw the correlation heatmap of the Boston Housing dataset using Seaborn, with an option to save it to a specified file. Par...
import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import numpy as np import os def task_func(data_url="http://lib.stat.cmu.edu/datasets/boston", seed=42): """ Draw the correlation heatmap of the Boston Housing dataset using Seaborn, with an option to save it to a specified file. Pa...
BigCodeBench/108
import pandas as pd import matplotlib.pyplot as plt from statsmodels.tsa.seasonal import seasonal_decompose def task_func(df, freq='D', decomposition_model='multiplicative'): """ Decomposes a time series in the 'value' column of a DataFrame into trend, seasonality, and residuals. Parameters: df (DataFr...
import pandas as pd import matplotlib.pyplot as plt from statsmodels.tsa.seasonal import seasonal_decompose def task_func(df, freq='D', decomposition_model='multiplicative'): """ Decomposes a time series in the 'value' column of a DataFrame into trend, seasonality, and residuals. Parameters: df (DataF...
BigCodeBench/120
import pandas as pd from datetime import datetime, timedelta from random import randint, seed as random_seed def task_func(start_date=datetime(2020, 1, 1), end_date=datetime(2020, 12, 31), seed=42): """ Generate a pandas Series of random dates within a specified date range, including both start_date and en...
import pandas as pd from datetime import datetime, timedelta from random import randint, seed as random_seed def task_func(start_date=datetime(2020, 1, 1), end_date=datetime(2020, 12, 31), seed=42): """ Generate a pandas Series of random dates within a specified date range, including both start_date and e...
BigCodeBench/123
import pandas as pd import os import glob def task_func(my_list, file_dir='./data_files/', file_ext='.csv'): """ Modify a list by adding the element '12', then concatenate a number of CSV files from a directory into a single DataFrame. The number of files concatenated is determined by the sum of the n...
import pandas as pd import os import glob def task_func(my_list, file_dir='./data_files/', file_ext='.csv'): """ Modify a list by adding the element '12', then concatenate a number of CSV files from a directory into a single DataFrame. The number of files concatenated is determined by the sum of the ...
BigCodeBench/124
from random import randint, seed as random_seed import time import matplotlib.pyplot as plt def task_func(my_list, size=100, seed=100): """ Enhances 'my_list' by appending the number 12, then generates a list of random integers based on the sum of elements in 'my_list', limited by 'size'. It measures the t...
from random import randint, seed as random_seed import time import matplotlib.pyplot as plt def task_func(my_list, size=100, seed=100): """ Enhances 'my_list' by appending the number 12, then generates a list of random integers based on the sum of elements in 'my_list', limited by 'size'. It measures the ...
BigCodeBench/129
import requests from bs4 import BeautifulSoup import pandas as pd def task_func(url='http://example.com'): """ Scrape the first table from a web page and extract data into a Pandas DataFrame. This function scrapes the first table found on the specified web page URL and extracts the data into a DataFrame, ...
import requests from bs4 import BeautifulSoup import pandas as pd def task_func(url='http://example.com'): """ Scrape the first table from a web page and extract data into a Pandas DataFrame. This function scrapes the first table found on the specified web page URL and extracts the data into a DataFrame, ...
BigCodeBench/139
import pandas as pd import numpy as np import matplotlib.pyplot as plt def task_func(df): """ Draw histograms of numeric columns in a DataFrame and return the plots. Each histogram represents the distribution of values in one numeric column, with the column name as the plot title, 'Value' as the x-axis...
import pandas as pd import numpy as np import matplotlib.pyplot as plt def task_func(df): """ Draw histograms of numeric columns in a DataFrame and return the plots. Each histogram represents the distribution of values in one numeric column, with the column name as the plot title, 'Value' as the x-axi...
BigCodeBench/147
import socket from ipaddress import IPv4Network from threading import Thread def task_func(ip_range, port): """ Scans a specified IP address range and checks if a specified port is open on each IP. The function returns a dictionary with IP addresses as keys and a boolean indicating the port's status (Tr...
import socket from ipaddress import IPv4Network from threading import Thread def task_func(ip_range, port): """ Scans a specified IP address range and checks if a specified port is open on each IP. The function returns a dictionary with IP addresses as keys and a boolean indicating the port's status (T...
BigCodeBench/161
import re import pandas as pd from datetime import datetime def task_func(log_file): """ Extracts logging information such as message type, timestamp, and the message itself from a log file and stores the data in a CSV format. This utility is ideal for converting plain text logs into a more structured forma...
import re import pandas as pd from datetime import datetime def task_func(log_file): """ Extracts logging information such as message type, timestamp, and the message itself from a log file and stores the data in a CSV format. This utility is ideal for converting plain text logs into a more structured form...
BigCodeBench/162
import re import matplotlib.pyplot as plt import numpy as np def task_func(text, rwidth=0.8): """ Analyzes and visualizes the distribution of word lengths in a text. The function generates a histogram subplot, which facilitates the understanding of how word lengths vary within the provided text. Parame...
import re import matplotlib.pyplot as plt import numpy as np def task_func(text, rwidth=0.8): """ Analyzes and visualizes the distribution of word lengths in a text. The function generates a histogram subplot, which facilitates the understanding of how word lengths vary within the provided text. Param...
BigCodeBench/177
import re import nltk from string import punctuation import pandas as pd def task_func(df): """ Extracts articles whose titles contain specific case-insensitive keywords ("like" or "what") from a DataFrame and analyzes the frequency of each word in the content of these articles, excluding punctuation. ...
import re import nltk from string import punctuation def task_func(df): """ Extracts articles whose titles contain specific case-insensitive keywords ("like" or "what") from a DataFrame and analyzes the frequency of each word in the content of these articles, excluding punctuation. Parameters: df ...
BigCodeBench/184
import pandas as pd import re from sklearn.feature_extraction.text import CountVectorizer STOPWORDS = ['i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', 'your', 'yours', 'yourself', 'yourselves', 'he', 'him', 'his', 'himself', 'she', 'her', 'hers', 'herself', 'it', 'its', 'itself', ...
import pandas as pd import re from sklearn.feature_extraction.text import CountVectorizer # Constants STOPWORDS = ['i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', 'your', 'yours', 'yourself', 'yourselves', 'he', 'him', 'his', 'himself', 'she', 'her', 'hers', 'herself', 'it', 'its', 'it...
BigCodeBench/187
import numpy as np import geopandas as gpd from shapely.geometry import Point def task_func(dic={'Lon': (-180, 180), 'Lat': (-90, 90)}, cities=['New York', 'London', 'Beijing', 'Tokyo', 'Sydney']): """ Create a GeoPandas DataFrame for a list of cities with randomly generated coordinates based on specified range...
import numpy as np import geopandas as gpd from shapely.geometry import Point def task_func(dic={'Lon': (-180, 180), 'Lat': (-90, 90)}, cities=['New York', 'London', 'Beijing', 'Tokyo', 'Sydney']): """ Create a GeoPandas DataFrame for a list of cities with randomly generated coordinates based on specified rang...
BigCodeBench/199
import pandas as pd import pytz from datetime import datetime from random import randint, seed as set_seed def task_func( utc_datetime, cities=['New York', 'London', 'Beijing', 'Tokyo', 'Sydney'], weather_conditions=['Sunny', 'Cloudy', 'Rainy', 'Snowy', 'Stormy'], timezones={ 'New York': 'Americ...
import pandas as pd import pytz from datetime import datetime from random import randint, seed as set_seed def task_func( utc_datetime, cities=['New York', 'London', 'Beijing', 'Tokyo', 'Sydney'], weather_conditions=['Sunny', 'Cloudy', 'Rainy', 'Snowy', 'Stormy'], timezones={ 'New York': 'Ameri...
BigCodeBench/208
import numpy as np import matplotlib.pyplot as plt import pandas as pd def task_func(elements, seed=0): """ Generate and draw a random sequence of "elements" number of steps. The steps are either -1 or 1, and the sequence is plotted as a random walk. Returns the descriptive statistics of the random wa...
import numpy as np import matplotlib.pyplot as plt import pandas as pd def task_func(elements, seed=0): """ Generate and draw a random sequence of "elements" number of steps. The steps are either -1 or 1, and the sequence is plotted as a random walk. Returns the descriptive statistics of the random w...
BigCodeBench/211
import requests import os import zipfile def task_func(url, destination_directory, headers=None): """ Download and keep a zip file from a URL, extract its contents to the specified directory, and return the list of extracted files. Parameters: url (str): The URL of the zip file to download. destina...
import requests import os import zipfile def task_func(url, destination_directory, headers=None): """ Download and keep a zip file from a URL, extract its contents to the specified directory, and return the list of extracted files. Parameters: url (str): The URL of the zip file to download. destin...
BigCodeBench/214
import random import numpy as np import cv2 import matplotlib.pyplot as plt def task_func(seed=42, image_size=(100, 100, 3), range_low=0, range_high=255): """ Generate a random RGB image and view it. Parameters: - seed (int, optional): Random seed for reproducibility. Default is 42. - image_size (t...
import random import numpy as np import cv2 import matplotlib.pyplot as plt def task_func(seed=42, image_size=(100, 100, 3), range_low=0, range_high=255): """ Generate a random RGB image and view it. Parameters: - seed (int, optional): Random seed for reproducibility. Default is 42. - image_size (...
BigCodeBench/227
import numpy as np import os import soundfile as sf import librosa import matplotlib.pyplot as plt def task_func(L, M, N, audio_file): """ Creates an MxN matrix from a list L, normalizes it based on the sound pressure level (SPL) of a specified audio file, and generates a spectrogram from the matrix. P...
import numpy as np import os import soundfile as sf import librosa import matplotlib.pyplot as plt def task_func(L, M, N, audio_file): """ Creates an MxN matrix from a list L, normalizes it based on the sound pressure level (SPL) of a specified audio file, and generates a spectrogram from the matrix. ...
BigCodeBench/239
import numpy as np import matplotlib.pyplot as plt from scipy import stats def task_func(original): """ Given a list of tuples, extract numeric values, compute basic statistics, and generate a histogram with an overlaid probability density function (PDF). Parameters: original (list of tuples): Inp...
import numpy as np import matplotlib.pyplot as plt from scipy import stats def task_func(original): """ Given a list of tuples, extract numeric values, compute basic statistics, and generate a histogram with an overlaid probability density function (PDF). Parameters: original (list of tuples): In...
BigCodeBench/241
import numpy as np import matplotlib.pyplot as plt from sklearn import preprocessing def task_func(original): """ Create a numeric array from the "original" list, normalize the array, and draw the original and normalized arrays. The function will plot the original and normalized arrays with a title of ...
import numpy as np import matplotlib.pyplot as plt from sklearn import preprocessing def task_func(original): """ Create a numeric array from the "original" list, normalize the array, and draw the original and normalized arrays. The function will plot the original and normalized arrays with a title o...
BigCodeBench/267
import numpy as np from scipy import fftpack import matplotlib.pyplot as plt def task_func(data, sample_rate=8000): """ Given a dictionary "data", this function performs the following operations: 1. Adds a new key "a" with the value 1 to the dictionary. 2. Generates a signal based on the values in "data...
import numpy as np from scipy import fftpack import matplotlib.pyplot as plt def task_func(data, sample_rate=8000): """ Given a dictionary "data", this function performs the following operations: 1. Adds a new key "a" with the value 1 to the dictionary. 2. Generates a signal based on the values in "dat...
BigCodeBench/273
import cgi import http.server import json SUCCESS_RESPONSE = { 'status': 'success', 'message': 'Data received successfully.' } ERROR_RESPONSE = { 'status': 'error', 'message': 'Invalid data received.' } def task_func(): """ Creates an HTTP POST request handler for processing incoming data. The d...
import cgi import http.server import json SUCCESS_RESPONSE = { 'status': 'success', 'message': 'Data received successfully.' } ERROR_RESPONSE = { 'status': 'error', 'message': 'Invalid data received.' } def task_func(): """ Creates an HTTP POST request handler for processing incoming data. Th...
BigCodeBench/274
import cgi import http.server import smtplib from email.mime.text import MIMEText import json def task_func(smtp_server, smtp_port, smtp_username, smtp_password): """ Creates an HTTP POST request handler that processes incoming email data and sends an email. The email data must be a JSON object with 'subjec...
import cgi import http.server import smtplib from email.mime.text import MIMEText import json def task_func(smtp_server, smtp_port, smtp_username, smtp_password): """ Creates an HTTP POST request handler that processes incoming email data and sends an email. The email data must be a JSON object with 'subje...
BigCodeBench/287
from collections import Counter import os import json def task_func(filename, directory): """ Count the number of words in .txt files within a specified directory, export the counts to a JSON file, and then return the total number of words. Parameters: filename (str): The name of the output JSON f...
from collections import Counter import os import json def task_func(filename, directory): """ Count the number of words in .txt files within a specified directory, export the counts to a JSON file, and then return the total number of words. Parameters: filename (str): The name of the output JSON ...
BigCodeBench/302
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns def task_func(df, plot=False): ''' Processes a pandas DataFrame by splitting lists in the 'Value' column into separate columns, calculates the Pearson correlation coefficient between these columns, and optionally visualizes the ...
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Constants COLUMNS = ['Date', 'Value'] def task_func(df, plot=False): ''' Processes a pandas DataFrame by splitting lists in the 'Value' column into separate columns, calculates the Pearson correlation coefficient between these co...
BigCodeBench/308
import pandas as pd from statistics import mean import random FIELDS = ['Physics', 'Math', 'Chemistry', 'Biology', 'English', 'History'] def task_func(additional_fields = []): """ Create a report on students' grades in different subjects and then calculate the average grade for each student and subject. ...
import pandas as pd from statistics import mean import random # Constants for generating the report data FIELDS = ['Physics', 'Math', 'Chemistry', 'Biology', 'English', 'History'] STUDENTS = ['Student_' + str(i) for i in range(1, 101)] def task_func(additional_fields = []): """ Create a report on students' gr...
BigCodeBench/310
import os import csv import random from statistics import mean COLUMNS = ['Name', 'Age', 'Height', 'Weight'] PEOPLE_COUNT = 100 def task_func(filename): """ Generates a CSV file containing simulated data for 100 people, including name, age, height, and weight. It also calculates and appends the average age...
import os import csv import random from statistics import mean # Constants COLUMNS = ['Name', 'Age', 'Height', 'Weight'] PEOPLE_COUNT = 100 def task_func(filename): """ Generates a CSV file containing simulated data for 100 people, including name, age, height, and weight. It also calculates and appends t...
BigCodeBench/313
import re import os import shutil from datetime import datetime def task_func(directory): """ Organize files in a directory based on the first text that is not enclosed in square brackets. Move the files to subdirectories named after this text. If no matching text is found, the file is not moved. P...
import re import os import shutil from datetime import datetime def task_func(directory): """ Organize files in a directory based on the first text that is not enclosed in square brackets. Move the files to subdirectories named after this text. If no matching text is found, the file is not moved. ...
BigCodeBench/324
import subprocess import time import threading def task_func(file_list): """ Run files from list of files as subprocesses at the same time. Parameters: - file_list (list of str): List of files name to run. Returns: list: The exit codes of the subprocesses. Requirements: - subproce...
import subprocess import time import threading def task_func(file_list): """ Run files from list of files as subprocesses at the same time. Parameters: - file_list (list of str): List of files name to run. Returns: list: The exit codes of the subprocesses. Requirements: - subpro...
BigCodeBench/326
import subprocess import os import sys import glob def task_func(directory_path): """ Find and run all .bat files in a given directory, returning their file names and exit codes. Parameters: directory_path (str): The path of the directory to search for .bat files. Returns: list of tuples: A li...
import subprocess import os import sys import glob def task_func(directory_path): """ Find and run all .bat files in a given directory, returning their file names and exit codes. Parameters: directory_path (str): The path of the directory to search for .bat files. Returns: list of tuples: A l...
End of preview.

No dataset card yet

Downloads last month
571