Datasets:
task_id int64 11 510 | prompt stringlengths 37 191 | canonical_reference stringlengths 37 1.33k | test_assertions listlengths 3 3 | model_metadata dict | raw_generation stringlengths 0 3.71k | parsed_code stringlengths 0 3.7k | evaluation_metrics dict |
|---|---|---|---|---|---|---|---|
11 | Write a python function to remove first and last occurrence of a given character from the string. | def remove_Occ(s,ch):
for i in range(len(s)):
if (s[i] == ch):
s = s[0 : i] + s[i + 1:]
break
for i in range(len(s) - 1,-1,-1):
if (s[i] == ch):
s = s[0 : i] + s[i + 1:]
break
return s | [
"assert remove_Occ(\"hello\",\"l\") == \"heo\"",
"assert remove_Occ(\"abcda\",\"a\") == \"bcd\"",
"assert remove_Occ(\"PHP\",\"P\") == \"H\""
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def remove_first_last_occurrence(s, char):
"""
Remove the first and last occurrence of a given character from the string.
Args:
s (str): The input string
char (str): The character to remove
Returns:
str: The modified string with first and last occurrence of ch... | def remove_first_last_occurrence(s, char):
"""
Remove the first and last occurrence of a given character from the string.
Args:
s (str): The input string
char (str): The character to remove
Returns:
str: The modified string with first and last occurrence of char removed... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'remove_Occ' is not defined",
"codebleu_overall": 0.164,
"syntax_ast_match": 0.25,
"dataflow_match": 0.3824,
"generation_speed_tps": 71.51,
"latency_seconds": 11.55
} |
12 | Write a function to sort a given matrix in ascending order according to the sum of its rows. | def sort_matrix(M):
result = sorted(M, key=sum)
return result | [
"assert sort_matrix([[1, 2, 3], [2, 4, 5], [1, 1, 1]])==[[1, 1, 1], [1, 2, 3], [2, 4, 5]]",
"assert sort_matrix([[1, 2, 3], [-2, 4, -5], [1, -1, 1]])==[[-2, 4, -5], [1, -1, 1], [1, 2, 3]]",
"assert sort_matrix([[5,8,9],[6,4,3],[2,1,4]])==[[2, 1, 4], [6, 4, 3], [5, 8, 9]]"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def sort_matrix_by_row_sum(matrix):
"""
Sort a matrix in ascending order according to the sum of its rows.
Args:
matrix (list of list of numbers): A 2D list representing the matrix
Returns:
list of list of numbers: A new matrix sorted by row sums in ascending order
"""
... | def sort_matrix_by_row_sum(matrix):
"""
Sort a matrix in ascending order according to the sum of its rows.
Args:
matrix (list of list of numbers): A 2D list representing the matrix
Returns:
list of list of numbers: A new matrix sorted by row sums in ascending order
"""
if not m... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'sort_matrix' is not defined",
"codebleu_overall": 0.1685,
"syntax_ast_match": 0.2,
"dataflow_match": 0.42860000000000004,
"generation_speed_tps": 146.18,
"latency_seconds": 4.324
} |
13 | Write a function to count the most common words in a dictionary. | from collections import Counter
def count_common(words):
word_counts = Counter(words)
top_four = word_counts.most_common(4)
return (top_four)
| [
"assert count_common(['red','green','black','pink','black','white','black','eyes','white','black','orange','pink','pink','red','red','white','orange','white',\"black\",'pink','green','green','pink','green','pink','white','orange',\"orange\",'red']) == [('pink', 6), ('black', 5), ('white', 5), ('red', 4)]",
"asser... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def count_most_common_words(dictionary):
"""
Count the most common words in a dictionary.
Args:
dictionary (dict): A dictionary where keys are words and values are counts
Returns:
tuple: (most_common_word, most_common_count)
- most_common_word: The ... | def count_most_common_words(dictionary):
"""
Count the most common words in a dictionary.
Args:
dictionary (dict): A dictionary where keys are words and values are counts
Returns:
tuple: (most_common_word, most_common_count)
- most_common_word: The word with ... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'count_common' is not defined",
"codebleu_overall": 0.1391,
"syntax_ast_match": 0.1111,
"dataflow_match": 0.4,
"generation_speed_tps": 144.21,
"latency_seconds": 5.201
} |
14 | Write a python function to find the volume of a triangular prism. | def find_Volume(l,b,h) :
return ((l * b * h) / 2) | [
"assert find_Volume(10,8,6) == 240",
"assert find_Volume(3,2,2) == 6",
"assert find_Volume(1,2,1) == 1"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_volume_triangular_prism(base, height, prism_height):
"""
Calculate the volume of a triangular prism.
Args:
base (float): Base length of the triangular base
height (float): Height of the triangular base
prism_height (float): Height of the prism
Returns:
... | def find_volume_triangular_prism(base, height, prism_height):
"""
Calculate the volume of a triangular prism.
Args:
base (float): Base length of the triangular base
height (float): Height of the triangular base
prism_height (float): Height of the prism
Returns:
float: V... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'find_Volume' is not defined",
"codebleu_overall": 0.3084,
"syntax_ast_match": 0.2,
"dataflow_match": 1,
"generation_speed_tps": 142.16,
"latency_seconds": 2.61
} |
15 | Write a function to split a string at lowercase letters. | import re
def split_lowerstring(text):
return (re.findall('[a-z][^a-z]*', text)) | [
"assert split_lowerstring(\"AbCd\")==['bC','d']",
"assert split_lowerstring(\"Python\")==['y', 't', 'h', 'o', 'n']",
"assert split_lowerstring(\"Programming\")==['r', 'o', 'g', 'r', 'a', 'm', 'm', 'i', 'n', 'g']"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
import re
def split_lowerstring(s):
"""
Split a string at lowercase letters.
Args:
s (str): The input string to split.
Returns:
List[str]: A list of substrings split at each lowercase letter.
"""
return re.split(r'[a-z]', s)
``` | import re
def split_lowerstring(s):
"""
Split a string at lowercase letters.
Args:
s (str): The input string to split.
Returns:
List[str]: A list of substrings split at each lowercase letter.
"""
return re.split(r'[a-z]', s) | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.4515,
"syntax_ast_match": 0.5833,
"dataflow_match": 1,
"generation_speed_tps": 146.16,
"latency_seconds": 3.544
} |
16 | Write a function to find sequences of lowercase letters joined with an underscore. | import re
def text_lowercase_underscore(text):
patterns = '^[a-z]+_[a-z]+$'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!') | [
"assert text_lowercase_underscore(\"aab_cbbbc\")==('Found a match!')",
"assert text_lowercase_underscore(\"aab_Abbbc\")==('Not matched!')",
"assert text_lowercase_underscore(\"Aaab_abbbc\")==('Not matched!')"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_lowercase_sequences(s):
"""
Find all sequences of consecutive lowercase letters in a string and join them with underscores.
Args:
s (str): Input string to process
Returns:
str: Underscore-joined sequences of lowercase letters
"""
if not s:
... | def find_lowercase_sequences(s):
"""
Find all sequences of consecutive lowercase letters in a string and join them with underscores.
Args:
s (str): Input string to process
Returns:
str: Underscore-joined sequences of lowercase letters
"""
if not s:
return ""... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'text_lowercase_underscore' is not defined",
"codebleu_overall": 0.20850000000000002,
"syntax_ast_match": 0.2381,
"dataflow_match": 0.5714,
"generation_speed_tps": 143.13,
"latency_seconds": 5.442
} |
17 | Write a function to find the perimeter of a square. | def square_perimeter(a):
perimeter=4*a
return perimeter | [
"assert square_perimeter(10)==40",
"assert square_perimeter(5)==20",
"assert square_perimeter(4)==16"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def square_perimeter(side_length):
"""
Calculate the perimeter of a square.
Args:
side_length (float or int): The length of one side of the square.
Returns:
float: The perimeter of the square.
Raises:
ValueError: If side_length is not a positive number.
"""
... | def square_perimeter(side_length):
"""
Calculate the perimeter of a square.
Args:
side_length (float or int): The length of one side of the square.
Returns:
float: The perimeter of the square.
Raises:
ValueError: If side_length is not a positive number.
"""
if side... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.1829,
"syntax_ast_match": 0.25,
"dataflow_match": 0.4,
"generation_speed_tps": 130.89,
"latency_seconds": 1.5590000000000002
} |
18 | Write a function to remove characters from the first string which are present in the second string. | NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
def remove_dirty_chars(string, se... | [
"assert remove_dirty_chars(\"probasscurve\", \"pros\") == 'bacuve'",
"assert remove_dirty_chars(\"digitalindia\", \"talent\") == 'digiidi'",
"assert remove_dirty_chars(\"exoticmiles\", \"toxic\") == 'emles' "
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def remove_dirty_chars(s1, s2):
"""
Remove characters from the first string that are present in the second string.
Args:
s1 (str): The first string to process
s2 (str): The string containing characters to remove from s1
Returns:
str: A new string with characters from ... | def remove_dirty_chars(s1, s2):
"""
Remove characters from the first string that are present in the second string.
Args:
s1 (str): The first string to process
s2 (str): The string containing characters to remove from s1
Returns:
str: A new string with characters from s1 that ar... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.0969,
"syntax_ast_match": 0.2619,
"dataflow_match": 0.11670000000000001,
"generation_speed_tps": 144.98,
"latency_seconds": 3.214
} |
19 | Write a function to find whether a given array of integers contains any duplicate element. | def test_duplicate(arraynums):
nums_set = set(arraynums)
return len(arraynums) != len(nums_set) | [
"assert test_duplicate(([1,2,3,4,5]))==False",
"assert test_duplicate(([1,2,3,4, 4]))==True",
"assert test_duplicate([1,1,2,2,3,3,4,4,5])==True"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def contains_duplicates(arr):
"""
Check if an array of integers contains any duplicate elements.
Args:
arr (list of int): The input array to check for duplicates.
Returns:
bool: True if duplicates are found, False otherwise.
"""
seen = set()
for num in... | def contains_duplicates(arr):
"""
Check if an array of integers contains any duplicate elements.
Args:
arr (list of int): The input array to check for duplicates.
Returns:
bool: True if duplicates are found, False otherwise.
"""
seen = set()
for num in arr:
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'test_duplicate' is not defined",
"codebleu_overall": 0.23820000000000002,
"syntax_ast_match": 0.2857,
"dataflow_match": 0.625,
"generation_speed_tps": 130.52,
"latency_seconds": 1.908
} |
20 | Write a function to check if the given number is woodball or not. | def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False | [
"assert is_woodall(383) == True",
"assert is_woodall(254) == False",
"assert is_woodall(200) == False"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def is_woodball(number):
"""
Check if the given number is a woodball number.
This function checks if the number is a valid woodball number.
A woodball number is typically defined as a number that is a multiple of 100.
Parameters:
number (int): The number to check
Ret... | def is_woodball(number):
"""
Check if the given number is a woodball number.
This function checks if the number is a valid woodball number.
A woodball number is typically defined as a number that is a multiple of 100.
Parameters:
number (int): The number to check
Returns:
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'is_woodall' is not defined",
"codebleu_overall": 0.0868,
"syntax_ast_match": 0.2162,
"dataflow_match": 0.11760000000000001,
"generation_speed_tps": 140.39,
"latency_seconds": 2.8280000000000003
} |
21 | Write a function to find m number of multiples of n. | def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num) | [
"assert multiples_of_num(4,3)== [3,6,9,12]",
"assert multiples_of_num(2,5)== [5,10]",
"assert multiples_of_num(9,2)== [2,4,6,8,10,12,14,16,18]"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def multiples_of_num(m, n):
"""
Find m multiples of n.
Args:
m (int): Number of multiples to find
n (int): The number to find multiples of
Returns:
list: A list containing m multiples of n
Raises:
ValueError: If m or n is not a positive integer
"""
... | def multiples_of_num(m, n):
"""
Find m multiples of n.
Args:
m (int): Number of multiples to find
n (int): The number to find multiples of
Returns:
list: A list containing m multiples of n
Raises:
ValueError: If m or n is not a positive integer
"""
if not i... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.2315,
"syntax_ast_match": 0.125,
"dataflow_match": 0.75,
"generation_speed_tps": 141.61,
"latency_seconds": 2.027
} |
22 | Write a function to find the first duplicate element in a given array of integers. | def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate | [
"assert find_first_duplicate(([1, 2, 3, 4, 4, 5]))==4",
"assert find_first_duplicate([1, 2, 3, 4])==-1",
"assert find_first_duplicate([1, 1, 2, 3, 3, 2, 2])==1"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_first_duplicate(arr):
"""
Find the first duplicate element in a given array of integers.
Args:
arr (list of int): The input array of integers.
Returns:
int or None: The first duplicate element found, or None if no duplicates exist.
Time Complexity: O(n)
Spac... | def find_first_duplicate(arr):
"""
Find the first duplicate element in a given array of integers.
Args:
arr (list of int): The input array of integers.
Returns:
int or None: The first duplicate element found, or None if no duplicates exist.
Time Complexity: O(n)
Space Complexi... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.1666,
"syntax_ast_match": 0.2581,
"dataflow_match": 0.3684,
"generation_speed_tps": 138.36,
"latency_seconds": 4.149
} |
23 | Write a python function to find the maximum sum of elements of list in a list of lists. | def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi | [
"assert maximum_Sum([[1,2,3],[4,5,6],[10,11,12],[7,8,9]]) == 33",
"assert maximum_Sum([[0,1,1],[1,1,2],[3,2,1]]) == 6",
"assert maximum_Sum([[0,1,3],[1,2,1],[9,8,2],[0,1,0],[6,4,8]]) == 19"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def maximum_Sum(list_of_lists):
"""
Find the maximum sum of elements in a list of lists.
Args:
list_of_lists (list of list): A list containing multiple lists of numbers.
Returns:
int or float: The maximum sum of elements across all sublists.
Raises:
ValueError: I... | def maximum_Sum(list_of_lists):
"""
Find the maximum sum of elements in a list of lists.
Args:
list_of_lists (list of list): A list containing multiple lists of numbers.
Returns:
int or float: The maximum sum of elements across all sublists.
Raises:
ValueError: If the inpu... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.1486,
"syntax_ast_match": 0.2,
"dataflow_match": 0.375,
"generation_speed_tps": 141.32,
"latency_seconds": 1.826
} |
24 | Write a function to convert the given binary number to its decimal equivalent. | def binary_to_decimal(binary):
binary1 = binary
decimal, i, n = 0, 0, 0
while(binary != 0):
dec = binary % 10
decimal = decimal + dec * pow(2, i)
binary = binary//10
i += 1
return (decimal) | [
"assert binary_to_decimal(100) == 4",
"assert binary_to_decimal(1011) == 11",
"assert binary_to_decimal(1101101) == 109"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def binary_to_decimal(binary_string):
"""
Convert a binary string to its decimal equivalent.
Args:
binary_string (str): A string containing only '0' and '1' characters.
Returns:
int: The decimal equivalent of the binary number.
Raises:
ValueEr... | def binary_to_decimal(binary_string):
"""
Convert a binary string to its decimal equivalent.
Args:
binary_string (str): A string containing only '0' and '1' characters.
Returns:
int: The decimal equivalent of the binary number.
Raises:
ValueError: If th... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: TypeError - Input must be a string",
"codebleu_overall": 0.1018,
"syntax_ast_match": 0.0333,
"dataflow_match": 0.36,
"generation_speed_tps": 141.8,
"latency_seconds": 2.377
} |
25 | Write a python function to find the product of non-repeated elements in a given array. | def find_Product(arr,n):
arr.sort()
prod = 1
for i in range(0,n,1):
if (arr[i - 1] != arr[i]):
prod = prod * arr[i]
return prod; | [
"assert find_Product([1,1,2,3],4) == 6",
"assert find_Product([1,2,3,1,1],5) == 6",
"assert find_Product([1,1,4,5,6],5) == 120"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
from collections import Counter
def find_product_of_non_repeated_elements(arr):
"""
Find the product of non-repeated elements in a given array.
Args:
arr (list): List of numbers (int or float)
Returns:
float: Product of elements that appear exactly once in the array.
... | from collections import Counter
def find_product_of_non_repeated_elements(arr):
"""
Find the product of non-repeated elements in a given array.
Args:
arr (list): List of numbers (int or float)
Returns:
float: Product of elements that appear exactly once in the array.
Re... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'find_Product' is not defined",
"codebleu_overall": 0.1223,
"syntax_ast_match": 0.15380000000000002,
"dataflow_match": 0.3158,
"generation_speed_tps": 146.45,
"latency_seconds": 4.9030000000000005
} |
26 | Write a function to check if the given tuple list has all k elements. | def check_k_elements(test_list, K):
res = True
for tup in test_list:
for ele in tup:
if ele != K:
res = False
return (res) | [
"assert check_k_elements([(4, 4), (4, 4, 4), (4, 4), (4, 4, 4, 4), (4, )], 4) == True",
"assert check_k_elements([(7, 7, 7), (7, 7)], 7) == True",
"assert check_k_elements([(9, 9), (9, 9, 9, 9)], 7) == False"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def check_k_elements(tuple_list, k):
"""
Check if the tuple list has exactly k elements.
Args:
tuple_list (list): A list of tuples
k (int): The expected number of elements
Returns:
bool: True if the list has exactly k elements, False otherwise
"""
retu... | def check_k_elements(tuple_list, k):
"""
Check if the tuple list has exactly k elements.
Args:
tuple_list (list): A list of tuples
k (int): The expected number of elements
Returns:
bool: True if the list has exactly k elements, False otherwise
"""
return len(tup... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.13470000000000001,
"syntax_ast_match": 0.058800000000000005,
"dataflow_match": 0.4615,
"generation_speed_tps": 144.12,
"latency_seconds": 3.927
} |
27 | Write a python function to remove all digits from a list of strings. | import re
def remove(list):
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list | [
"assert remove(['4words', '3letters', '4digits']) == ['words', 'letters', 'digits']",
"assert remove(['28Jan','12Jan','11Jan']) == ['Jan','Jan','Jan']",
"assert remove(['wonder1','wonder2','wonder3']) == ['wonder','wonder','wonder']"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def remove_digits_from_list(strings):
"""
Remove all digits from a list of strings.
Args:
strings (list of str): List of strings to process
Returns:
list of str: List with all digits removed from each string
"""
return [s.replace('0', '') for s in strings]
``` | def remove_digits_from_list(strings):
"""
Remove all digits from a list of strings.
Args:
strings (list of str): List of strings to process
Returns:
list of str: List with all digits removed from each string
"""
return [s.replace('0', '') for s in strings] | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'remove' is not defined",
"codebleu_overall": 0.1338,
"syntax_ast_match": 0.2778,
"dataflow_match": 0.2308,
"generation_speed_tps": 140.91,
"latency_seconds": 3.683
} |
28 | Write a python function to find binomial co-efficient. | def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k) | [
"assert binomial_Coeff(5,2) == 10",
"assert binomial_Coeff(4,3) == 4",
"assert binomial_Coeff(3,2) == 3"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def binomial_Coeff(n, k):
"""
Calculate the binomial coefficient C(n, k) = n! / (k! * (n-k)!)
Args:
n (int): The total number of items (non-negative integer)
k (int): The number of items to choose (non-negative integer)
Returns:
int: The binomial coefficient C... | def binomial_Coeff(n, k):
"""
Calculate the binomial coefficient C(n, k) = n! / (k! * (n-k)!)
Args:
n (int): The total number of items (non-negative integer)
k (int): The number of items to choose (non-negative integer)
Returns:
int: The binomial coefficient C(n, k)
... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.33240000000000003,
"syntax_ast_match": 0.5217,
"dataflow_match": 0.7143,
"generation_speed_tps": 143.59,
"latency_seconds": 2.674
} |
29 | Write a python function to find the element occurring odd number of times. | def get_Odd_Occurrence(arr,arr_size):
for i in range(0,arr_size):
count = 0
for j in range(0,arr_size):
if arr[i] == arr[j]:
count+=1
if (count % 2 != 0):
return arr[i]
return -1 | [
"assert get_Odd_Occurrence([1,2,3,1,2,3,1],7) == 1",
"assert get_Odd_Occurrence([1,2,3,2,3,1,3],7) == 3",
"assert get_Odd_Occurrence([2,3,5,4,5,2,4,3,5,2,4,4,2],13) == 5"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
from collections import Counter
def find_element_with_odd_occurrence(numbers):
"""
Find the element occurring an odd number of times in a list.
Args:
numbers: A list of hashable elements (e.g., integers, strings)
Returns:
The element that occurs an odd number of times
R... | from collections import Counter
def find_element_with_odd_occurrence(numbers):
"""
Find the element occurring an odd number of times in a list.
Args:
numbers: A list of hashable elements (e.g., integers, strings)
Returns:
The element that occurs an odd number of times
Raises:
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'get_Odd_Occurrence' is not defined",
"codebleu_overall": 0.1436,
"syntax_ast_match": 0.06670000000000001,
"dataflow_match": 0.4762,
"generation_speed_tps": 142.72,
"latency_seconds": 4.786
} |
30 | Write a python function to count all the substrings starting and ending with same characters. | def check_Equality(s):
return (ord(s[0]) == ord(s[len(s) - 1]));
def count_Substring_With_Equal_Ends(s):
result = 0;
n = len(s);
for i in range(n):
for j in range(1,n-i+1):
if (check_Equality(s[i:i+j])):
result+=1;
return result; | [
"assert count_Substring_With_Equal_Ends(\"abc\") == 3",
"assert count_Substring_With_Equal_Ends(\"abcda\") == 6",
"assert count_Substring_With_Equal_Ends(\"ab\") == 2"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def count_substrings_with_same_ends(s):
"""
Count all substrings that start and end with the same characters.
A substring is defined by its start and end indices (i, j) where i <= j.
We count pairs (i, j) such that s[i] == s[j].
Args:
s (str): Input string to analyze
... | def count_substrings_with_same_ends(s):
"""
Count all substrings that start and end with the same characters.
A substring is defined by its start and end indices (i, j) where i <= j.
We count pairs (i, j) such that s[i] == s[j].
Args:
s (str): Input string to analyze
R... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'count_Substring_With_Equal_Ends' is not defined",
"codebleu_overall": 0.24480000000000002,
"syntax_ast_match": 0.3478,
"dataflow_match": 0.2903,
"generation_speed_tps": 147.47,
"latency_seconds": 5.011
} |
31 | Write a function to find the top k integers that occur most frequently from given lists of sorted and distinct integers using heap queue algorithm. | def func(nums, k):
import collections
d = collections.defaultdict(int)
for row in nums:
for i in row:
d[i] += 1
temp = []
import heapq
for key, v in d.items():
if len(temp) < k:
temp.append((v, key))
if len(temp) == k:
... | [
"assert func([[1, 2, 6], [1, 3, 4, 5, 7, 8], [1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12]],3)==[5, 7, 1]",
"assert func([[1, 2, 6], [1, 3, 4, 5, 7, 8], [1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12]],1)==[1]",
"assert func([[1, 2, 6], [1, 3, 4, 5, 7, 8], [1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, ... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
from collections import Counter
import heapq
def find_top_k_frequent(sorted_list, k):
"""
Find the top k integers that occur most frequently from given sorted and distinct integers.
Uses heap queue algorithm.
Args:
sorted_list: List of sorted and distinct integers
k: Numb... | from collections import Counter
import heapq
def find_top_k_frequent(sorted_list, k):
"""
Find the top k integers that occur most frequently from given sorted and distinct integers.
Uses heap queue algorithm.
Args:
sorted_list: List of sorted and distinct integers
k: Number of top ... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'func' is not defined",
"codebleu_overall": 0.21450000000000002,
"syntax_ast_match": 0.5375,
"dataflow_match": 0.2963,
"generation_speed_tps": 146.56,
"latency_seconds": 5.963
} |
32 | Write a python function to find the largest prime factor of a given number. | import math
def max_Prime_Factors (n):
maxPrime = -1
while n%2 == 0:
maxPrime = 2
n >>= 1
for i in range(3,int(math.sqrt(n))+1,2):
while n % i == 0:
maxPrime = i
n = n / i
if n > 2:
maxPrime = n
return int(maxPrime) | [
"assert max_Prime_Factors(15) == 5",
"assert max_Prime_Factors(6) == 3",
"assert max_Prime_Factors(2) == 2"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | {
"functional_pass": false,
"sandbox_feedback": "Empty code string provided.",
"codebleu_overall": 0,
"syntax_ast_match": 0,
"dataflow_match": 0,
"generation_speed_tps": 148.68,
"latency_seconds": 6.8870000000000005
} | ||
33 | Write a python function to convert a decimal number to binary number. | def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number | [
"assert decimal_To_Binary(10) == 1010",
"assert decimal_To_Binary(1) == 1",
"assert decimal_To_Binary(20) == 10100"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def decimal_to_binary(number):
"""
Convert a decimal number to binary string representation.
Args:
number (int): The decimal number to convert
Returns:
str: Binary representation of the number
Examples:
>>> decimal_to_binary(10)
'1010'... | def decimal_to_binary(number):
"""
Convert a decimal number to binary string representation.
Args:
number (int): The decimal number to convert
Returns:
str: Binary representation of the number
Examples:
>>> decimal_to_binary(10)
'1010'
>... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'decimal_To_Binary' is not defined",
"codebleu_overall": 0.0669,
"syntax_ast_match": 0.1111,
"dataflow_match": 0.1429,
"generation_speed_tps": 139.35,
"latency_seconds": 2.196
} |
34 | Write a python function to find the missing number in a sorted array. | def find_missing(ar,N):
l = 0
r = N - 1
while (l <= r):
mid = (l + r) / 2
mid= int (mid)
if (ar[mid] != mid + 1 and ar[mid - 1] == mid):
return (mid + 1)
elif (ar[mid] != mid + 1):
r = mid - 1
else:
l = mid + 1
... | [
"assert find_missing([1,2,3,5],4) == 4",
"assert find_missing([1,3,4,5],4) == 2",
"assert find_missing([1,2,3,5,6,7],5) == 4"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_missing_number(arr):
"""
Find the missing number in a sorted array.
The function assumes the array contains integers from 1 to n,
where n is the length of the array, and one number is missing.
Args:
arr (list): A sorted list of integers
Returns:
... | def find_missing_number(arr):
"""
Find the missing number in a sorted array.
The function assumes the array contains integers from 1 to n,
where n is the length of the array, and one number is missing.
Args:
arr (list): A sorted list of integers
Returns:
int: T... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'find_missing' is not defined",
"codebleu_overall": 0.1374,
"syntax_ast_match": 0.25,
"dataflow_match": 0.2812,
"generation_speed_tps": 144.07,
"latency_seconds": 4.532
} |
35 | Write a function to find the n-th rectangular number. | def find_rect_num(n):
return n*(n + 1) | [
"assert find_rect_num(4) == 20",
"assert find_rect_num(5) == 30",
"assert find_rect_num(6) == 42"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_rectangular_number(n):
"""
Find the n-th rectangular number (square number).
A rectangular number is a number that can be expressed as the product of two equal integers (n Γ n).
Args:
n (int): The position of the rectangular number to find (1-indexed)
Return... | def find_rectangular_number(n):
"""
Find the n-th rectangular number (square number).
A rectangular number is a number that can be expressed as the product of two equal integers (n Γ n).
Args:
n (int): The position of the rectangular number to find (1-indexed)
Returns:
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'find_rect_num' is not defined",
"codebleu_overall": 0.29660000000000003,
"syntax_ast_match": 0.125,
"dataflow_match": 1,
"generation_speed_tps": 136.32,
"latency_seconds": 2.113
} |
36 | Write a python function to find the nth digit in the proper fraction of two given numbers. | def find_Nth_Digit(p,q,N) :
while (N > 0) :
N -= 1;
p *= 10;
res = p // q;
p %= q;
return res; | [
"assert find_Nth_Digit(1,2,1) == 5",
"assert find_Nth_Digit(3,5,1) == 6",
"assert find_Nth_Digit(5,6,5) == 3"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_Nth_Digit(numerator, denominator, n):
"""
Find the nth digit in the decimal representation of a proper fraction.
Args:
numerator (int): The numerator of the fraction
denominator (int): The denominator of the fraction
n (int): The position of the digit to find (1-i... | def find_Nth_Digit(numerator, denominator, n):
"""
Find the nth digit in the decimal representation of a proper fraction.
Args:
numerator (int): The numerator of the fraction
denominator (int): The denominator of the fraction
n (int): The position of the digit to find (1-indexed)
... | {
"functional_pass": false,
"sandbox_feedback": "Compile Error: SyntaxError - invalid syntax (<llm_code>, line 29)",
"codebleu_overall": 0.1689,
"syntax_ast_match": 0.2778,
"dataflow_match": 0.3846,
"generation_speed_tps": 142.82,
"latency_seconds": 7.17
} |
37 | Write a function to sort a given mixed list of integers and strings. | def sort_mixed_list(mixed_list):
int_part = sorted([i for i in mixed_list if type(i) is int])
str_part = sorted([i for i in mixed_list if type(i) is str])
return int_part + str_part | [
"assert sort_mixed_list([19,'red',12,'green','blue', 10,'white','green',1])==[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white']",
"assert sort_mixed_list([19,'red',12,'green','blue', 10,'white','green',1])==[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white']",
"assert sort_mixed_list([19,'red',12,'... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def sort_mixed_list(mixed_list):
"""
Sorts a mixed list of integers and strings.
Args:
mixed_list: A list containing integers and/or strings
Returns:
A new sorted list with all items sorted by their string representation
"""
# Convert all items to strings ... | def sort_mixed_list(mixed_list):
"""
Sorts a mixed list of integers and strings.
Args:
mixed_list: A list containing integers and/or strings
Returns:
A new sorted list with all items sorted by their string representation
"""
# Convert all items to strings for consis... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.06960000000000001,
"syntax_ast_match": 0.0385,
"dataflow_match": 0.21050000000000002,
"generation_speed_tps": 144.01,
"latency_seconds": 2.972
} |
38 | Write a function to find the division of first even and odd number of a given list. | def div_even_odd(list1):
first_even = next((el for el in list1 if el%2==0),-1)
first_odd = next((el for el in list1 if el%2!=0),-1)
return (first_even/first_odd) | [
"assert div_even_odd([1,3,5,7,4,1,6,8])==4",
"assert div_even_odd([1,2,3,4,5,6,7,8,9,10])==2",
"assert div_even_odd([1,5,7,9,10])==10"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def div_even_odd(numbers):
"""
Find the division of the first even and odd number from a given list.
Args:
numbers (list): A list of integers
Returns:
float: The result of dividing the first even number by the first odd number
Raises:
ValueErr... | def div_even_odd(numbers):
"""
Find the division of the first even and odd number from a given list.
Args:
numbers (list): A list of integers
Returns:
float: The result of dividing the first even number by the first odd number
Raises:
ValueError: If no ... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.12010000000000001,
"syntax_ast_match": 0.2222,
"dataflow_match": 0.2381,
"generation_speed_tps": 136.46,
"latency_seconds": 2.22
} |
39 | Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different. | import heapq
from collections import Counter
def rearange_string(S):
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) * 2 > len(S) + 1:
return ""
ans = []
while len(heap) >= 2:
nct1, char1 = heapq.heappop(heap)
... | [
"assert rearange_string(\"aab\")==('aba')",
"assert rearange_string(\"aabb\")==('abab')",
"assert rearange_string(\"abccdd\")==('cdabcd')"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | {
"functional_pass": false,
"sandbox_feedback": "Empty code string provided.",
"codebleu_overall": 0,
"syntax_ast_match": 0,
"dataflow_match": 0,
"generation_speed_tps": 145.9,
"latency_seconds": 7.018
} | ||
40 | Write a function to find frequency of the elements in a given list of lists using collections module. | from collections import Counter
from itertools import chain
def freq_element(nums):
result = Counter(chain.from_iterable(nums))
return result | [
"assert freq_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]])==({2: 3, 1: 2, 5: 2, 3: 1, 4: 1, 6: 1, 7: 1, 9: 1})",
"assert freq_element([[1,2,3,4],[5,6,7,8],[9,10,11,12]])==({1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1})",
"assert freq_element([[15,20,30,40],[80,90,100,110],[30... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
from collections import Counter
def find_frequency_of_elements(data):
"""
Find the frequency of elements in a list of lists using the collections module.
This function flattens the list of lists and counts the occurrences of each element.
Args:
data (list of lists): A list of lists ... | from collections import Counter
def find_frequency_of_elements(data):
"""
Find the frequency of elements in a list of lists using the collections module.
This function flattens the list of lists and counts the occurrences of each element.
Args:
data (list of lists): A list of lists containing... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'freq_element' is not defined",
"codebleu_overall": 0.33490000000000003,
"syntax_ast_match": 0.4444,
"dataflow_match": 0.6667000000000001,
"generation_speed_tps": 147.06,
"latency_seconds": 4.549
} |
41 | Write a function to filter even numbers using lambda function. | def filter_evennumbers(nums):
even_nums = list(filter(lambda x: x%2 == 0, nums))
return even_nums | [
"assert filter_evennumbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[2, 4, 6, 8, 10]",
"assert filter_evennumbers([10,20,45,67,84,93])==[10,20,84]",
"assert filter_evennumbers([5,7,9,8,6,4,3])==[8,6,4]"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | {
"functional_pass": false,
"sandbox_feedback": "Empty code string provided.",
"codebleu_overall": 0,
"syntax_ast_match": 0,
"dataflow_match": 0,
"generation_speed_tps": 147.44,
"latency_seconds": 6.945
} | ||
42 | Write a python function to find the sum of repeated elements in a given array. | def find_Sum(arr,n):
return sum([x for x in arr if arr.count(x) > 1]) | [
"assert find_Sum([1,2,3,1,1,4,5,6],8) == 3",
"assert find_Sum([1,2,3,1,1],5) == 3",
"assert find_Sum([1,1,2],3) == 2"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
from collections import Counter
def find_sum_of_repeated_elements(arr):
"""
Find the sum of repeated elements in a given array.
Args:
arr (list): A list of elements (can be integers, strings, etc.)
Returns:
int or float: The sum of elements that appear more than once in the ... | from collections import Counter
def find_sum_of_repeated_elements(arr):
"""
Find the sum of repeated elements in a given array.
Args:
arr (list): A list of elements (can be integers, strings, etc.)
Returns:
int or float: The sum of elements that appear more than once in the array.
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'find_Sum' is not defined",
"codebleu_overall": 0.2109,
"syntax_ast_match": 0.1429,
"dataflow_match": 0.6667000000000001,
"generation_speed_tps": 144.55,
"latency_seconds": 4.877
} |
43 | Write a function to find sequences of lowercase letters joined with an underscore using regex. | import re
def text_match(text):
patterns = '^[a-z]+_[a-z]+$'
if re.search(patterns, text):
return ('Found a match!')
else:
return ('Not matched!') | [
"assert text_match(\"aab_cbbbc\") == 'Found a match!'",
"assert text_match(\"aab_Abbbc\") == 'Not matched!'",
"assert text_match(\"Aaab_abbbc\") == 'Not matched!'"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
import re
def find_lowercase_sequences(text):
"""
Find sequences of lowercase letters joined with an underscore in a string.
Args:
text (str): The input string to search for lowercase sequences.
Returns:
list: A list of matched sequences, each joined with an undersco... | import re
def find_lowercase_sequences(text):
"""
Find sequences of lowercase letters joined with an underscore in a string.
Args:
text (str): The input string to search for lowercase sequences.
Returns:
list: A list of matched sequences, each joined with an underscore.
""... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'text_match' is not defined",
"codebleu_overall": 0.39780000000000004,
"syntax_ast_match": 0.5,
"dataflow_match": 1,
"generation_speed_tps": 134.12,
"latency_seconds": 1.5430000000000001
} |
44 | Write a function that matches a word at the beginning of a string. | import re
def text_match_string(text):
patterns = '^\w+'
if re.search(patterns, text):
return 'Found a match!'
else:
return 'Not matched!' | [
"assert text_match_string(\" python\")==('Not matched!')",
"assert text_match_string(\"python\")==('Found a match!')",
"assert text_match_string(\" lang\")==('Not matched!')"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def matches_word_at_beginning(string, word):
"""
Check if a word appears at the beginning of a string.
Args:
string (str): The input string to check.
word (str): The word to match.
Returns:
bool: True if the word is at the beginning of the string, False otherw... | def matches_word_at_beginning(string, word):
"""
Check if a word appears at the beginning of a string.
Args:
string (str): The input string to check.
word (str): The word to match.
Returns:
bool: True if the word is at the beginning of the string, False otherwise.
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'text_match_string' is not defined",
"codebleu_overall": 0.19840000000000002,
"syntax_ast_match": 0.2,
"dataflow_match": 0.5714,
"generation_speed_tps": 140.14,
"latency_seconds": 1.534
} |
45 | Write a function to find the gcd of the given array elements. | def find_gcd(x, y):
while(y):
x, y = y, x % y
return x
def get_gcd(l):
num1 = l[0]
num2 = l[1]
gcd = find_gcd(num1, num2)
for i in range(2, len(l)):
gcd = find_gcd(gcd, l[i])
return gcd | [
"assert get_gcd([2, 4, 6, 8, 16]) == 2",
"assert get_gcd([1, 2, 3]) == 1",
"assert get_gcd([2, 4, 6, 8]) == 2 "
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
from math import gcd
from functools import reduce
def find_gcd_of_array(arr):
"""
Find the greatest common divisor (GCD) of all elements in the given array.
Args:
arr (list): A list of integers
Returns:
int: The GCD of all elements in the array
Raise... | from math import gcd
from functools import reduce
def find_gcd_of_array(arr):
"""
Find the greatest common divisor (GCD) of all elements in the given array.
Args:
arr (list): A list of integers
Returns:
int: The GCD of all elements in the array
Raises:
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'get_gcd' is not defined",
"codebleu_overall": 0.1012,
"syntax_ast_match": 0.0789,
"dataflow_match": 0.3125,
"generation_speed_tps": 141.61,
"latency_seconds": 1.8290000000000002
} |
46 | Write a python function to determine whether all the numbers are different from each other are not. | def test_distinct(data):
if len(data) == len(set(data)):
return True
else:
return False; | [
"assert test_distinct([1,5,7,9]) == True",
"assert test_distinct([2,4,5,5,7,9]) == False",
"assert test_distinct([1,2,3]) == True"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def test_distinct(numbers):
"""
Determines whether all numbers in the list are different from each other.
Args:
numbers (list): A list of numbers to check for uniqueness.
Returns:
bool: True if all numbers are unique, False otherwise.
"""
return len(numbers) == len(se... | def test_distinct(numbers):
"""
Determines whether all numbers in the list are different from each other.
Args:
numbers (list): A list of numbers to check for uniqueness.
Returns:
bool: True if all numbers are unique, False otherwise.
"""
return len(numbers) == len(set(numbers)... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.3771,
"syntax_ast_match": 0.4706,
"dataflow_match": 1,
"generation_speed_tps": 135.93,
"latency_seconds": 1.839
} |
47 | Write a python function to find the last digit when factorial of a divides factorial of b. | def compute_Last_Digit(A,B):
variable = 1
if (A == B):
return 1
elif ((B - A) >= 5):
return 0
else:
for i in range(A + 1,B + 1):
variable = (variable * (i % 10)) % 10
return variable % 10 | [
"assert compute_Last_Digit(2,4) == 2",
"assert compute_Last_Digit(6,8) == 6",
"assert compute_Last_Digit(1,2) == 2"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def compute_Last_Digit(a, b):
"""
Find the last digit when factorial of a divides factorial of b.
Args:
a (int): The number for factorial a
b (int): The number for factorial b
Returns:
int: The last digit of (b! / a!)
"""
# Handle edge cases
if a >... | def compute_Last_Digit(a, b):
"""
Find the last digit when factorial of a divides factorial of b.
Args:
a (int): The number for factorial a
b (int): The number for factorial b
Returns:
int: The last digit of (b! / a!)
"""
# Handle edge cases
if a > b:
... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.27890000000000004,
"syntax_ast_match": 0.4,
"dataflow_match": 0.65,
"generation_speed_tps": 143.59,
"latency_seconds": 5.523
} |
48 | Write a python function to set all odd bits of a given number. | def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | [
"assert odd_bit_set_number(10) == 15",
"assert odd_bit_set_number(20) == 21",
"assert odd_bit_set_number(30) == 31"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def set_odd_bits(number):
"""
Sets all odd bits (positions 1, 3, 5, ...) of a given number to 1.
Args:
number (int): The input integer whose odd bits will be set.
Returns:
int: The number with all odd bits set to 1.
"""
result = number
for i in range(1... | def set_odd_bits(number):
"""
Sets all odd bits (positions 1, 3, 5, ...) of a given number to 1.
Args:
number (int): The input integer whose odd bits will be set.
Returns:
int: The number with all odd bits set to 1.
"""
result = number
for i in range(1, 31, 2):
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'odd_bit_set_number' is not defined",
"codebleu_overall": 0.14070000000000002,
"syntax_ast_match": 0.2857,
"dataflow_match": 0.2222,
"generation_speed_tps": 148.4,
"latency_seconds": 6.604
} |
49 | Write a function to extract every first or specified element from a given two-dimensional list. | def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| [
"assert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],0)==[1, 4, 7]",
"assert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],2)==[3, 6, 9]",
"assert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],1)==[2,5,1]"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def extract_elements(matrix, first_element_index=0, specified_index=None):
"""
Extract every first or specified element from a given two-dimensional list.
Args:
matrix (list of list): A 2D list (list of lists)
first_element_index (int): Index of the first element to extract (defau... | def extract_elements(matrix, first_element_index=0, specified_index=None):
"""
Extract every first or specified element from a given two-dimensional list.
Args:
matrix (list of list): A 2D list (list of lists)
first_element_index (int): Index of the first element to extract (default: 0)
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'specified_element' is not defined",
"codebleu_overall": 0.19260000000000002,
"syntax_ast_match": 0.2,
"dataflow_match": 0.5,
"generation_speed_tps": 150,
"latency_seconds": 5.493
} |
50 | Write a function to find the list with minimum length using lambda function. | def min_length_list(input_list):
min_length = min(len(x) for x in input_list )
min_list = min(input_list, key = lambda i: len(i))
return(min_length, min_list) | [
"assert min_length_list([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==(1, [0])",
"assert min_length_list([[1,2,3,4,5],[1,2,3,4],[1,2,3],[1,2],[1]])==(1,[1])",
"assert min_length_list([[3,4,5],[6,7,8,9],[10,11,12],[1,2]])==(2,[1,2])"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_min_length_list(data):
"""
Find the list with minimum length using lambda function.
Args:
data: A list of lists to evaluate
Returns:
The list with the minimum length
"""
if not data:
return []
# Use lambda to compare lengths
m... | def find_min_length_list(data):
"""
Find the list with minimum length using lambda function.
Args:
data: A list of lists to evaluate
Returns:
The list with the minimum length
"""
if not data:
return []
# Use lambda to compare lengths
min_length ... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'min_length_list' is not defined",
"codebleu_overall": 0.2412,
"syntax_ast_match": 0.2273,
"dataflow_match": 0.6875,
"generation_speed_tps": 137.7,
"latency_seconds": 1.5470000000000002
} |
51 | Write a function to print check if the triangle is equilateral or not. | def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | [
"assert check_equilateral(6,8,12)==False ",
"assert check_equilateral(6,6,12)==False",
"assert check_equilateral(6,6,6)==True"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def check_equilateral(sides):
"""
Check if a triangle is equilateral.
Args:
sides (list): A list of three numbers representing the side lengths of a triangle.
Returns:
bool: True if the triangle is equilateral, False otherwise.
"""
if len(sides) != 3:
... | def check_equilateral(sides):
"""
Check if a triangle is equilateral.
Args:
sides (list): A list of three numbers representing the side lengths of a triangle.
Returns:
bool: True if the triangle is equilateral, False otherwise.
"""
if len(sides) != 3:
return Fal... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: TypeError - check_equilateral() takes 1 positional argument but 3 were given",
"codebleu_overall": 0.4254,
"syntax_ast_match": 0.4545,
"dataflow_match": 0.8333,
"generation_speed_tps": 140.06,
"latency_seconds": 1.564
} |
52 | Write a function to caluclate area of a parallelogram. | def parallelogram_area(b,h):
area=b*h
return area | [
"assert parallelogram_area(10,20)==200",
"assert parallelogram_area(15,20)==300",
"assert parallelogram_area(8,9)==72"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def parallelogram_area(base, height):
"""
Calculate the area of a parallelogram.
Args:
base (float): The length of the base of the parallelogram
height (float): The height of the parallelogram (perpendicular distance from base to opposite side)
Returns:
float:... | def parallelogram_area(base, height):
"""
Calculate the area of a parallelogram.
Args:
base (float): The length of the base of the parallelogram
height (float): The height of the parallelogram (perpendicular distance from base to opposite side)
Returns:
float: The area ... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.24930000000000002,
"syntax_ast_match": 0.25,
"dataflow_match": 0.6667000000000001,
"generation_speed_tps": 138.41,
"latency_seconds": 1.6179999999999999
} |
53 | Write a python function to check whether the first and last characters of a given string are equal or not. | def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | [
"assert check_Equality(\"abcda\") == \"Equal\"",
"assert check_Equality(\"ab\") == \"Not Equal\"",
"assert check_Equality(\"mad\") == \"Not Equal\""
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def check_first_last_equal(s):
"""
Check whether the first and last characters of a string are equal.
Args:
s (str): The input string to check
Returns:
bool: True if first and last characters are equal, False otherwise
"""
if len(s) < 2:
return Fal... | def check_first_last_equal(s):
"""
Check whether the first and last characters of a string are equal.
Args:
s (str): The input string to check
Returns:
bool: True if first and last characters are equal, False otherwise
"""
if len(s) < 2:
return False
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'check_Equality' is not defined",
"codebleu_overall": 0.3247,
"syntax_ast_match": 0.2632,
"dataflow_match": 1,
"generation_speed_tps": 143.99,
"latency_seconds": 2.292
} |
54 | Write a function to sort the given array by using counting sort. | def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j... | [
"assert counting_sort([1,23,4,5,6,7,8]) == [1, 4, 5, 6, 7, 8, 23]",
"assert counting_sort([12, 9, 28, 33, 69, 45]) == [9, 12, 28, 33, 45, 69]",
"assert counting_sort([8, 4, 14, 3, 2, 1]) == [1, 2, 3, 4, 8, 14]"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def counting_sort(arr, max_val):
"""
Sorts an array using counting sort algorithm.
Args:
arr (list): The input list to be sorted
max_val (int): The maximum value in the array (inclusive)
Returns:
list: A new sorted list
Raises:
ValueError: If ... | def counting_sort(arr, max_val):
"""
Sorts an array using counting sort algorithm.
Args:
arr (list): The input list to be sorted
max_val (int): The maximum value in the array (inclusive)
Returns:
list: A new sorted list
Raises:
ValueError: If max_val is... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: TypeError - counting_sort() missing 1 required positional argument: 'max_val'",
"codebleu_overall": 0.25420000000000004,
"syntax_ast_match": 0.4375,
"dataflow_match": 0.5,
"generation_speed_tps": 144.6,
"latency_seconds": 3.30... |
55 | Write a function to find t-nth term of geometric series. | import math
def tn_gp(a,n,r):
tn = a * (math.pow(r, n - 1))
return tn | [
"assert tn_gp(1,5,2)==16",
"assert tn_gp(1,5,4)==256",
"assert tn_gp(2,6,3)==486"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def t_nth_term_geometric_series(t, first_term, common_ratio):
"""
Calculate the t-th term of a geometric series.
Parameters:
t (int): The position of the term in the series (1-indexed)
first_term (float): The first term of the series
common_ratio (float): The common ratio between ... | def t_nth_term_geometric_series(t, first_term, common_ratio):
"""
Calculate the t-th term of a geometric series.
Parameters:
t (int): The position of the term in the series (1-indexed)
first_term (float): The first term of the series
common_ratio (float): The common ratio between consecutiv... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'tn_gp' is not defined",
"codebleu_overall": 0.2533,
"syntax_ast_match": 0.1333,
"dataflow_match": 0.8333,
"generation_speed_tps": 141.83,
"latency_seconds": 2.418
} |
56 | Write a python function to check if a given number is one less than twice its reverse. | def rev(num):
rev_num = 0
while (num > 0):
rev_num = (rev_num * 10 + num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) == n + 1) | [
"assert check(70) == False",
"assert check(23) == False",
"assert check(73) == True"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def check(n):
"""
Check if a given number is one less than twice its reverse.
Args:
n (int): The number to check
Returns:
bool: True if the number is one less than twice its reverse, False otherwise
"""
# Handle negative numbers by working with absolute value
reve... | def check(n):
"""
Check if a given number is one less than twice its reverse.
Args:
n (int): The number to check
Returns:
bool: True if the number is one less than twice its reverse, False otherwise
"""
# Handle negative numbers by working with absolute value
reversed_n = i... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.1245,
"syntax_ast_match": 0.1333,
"dataflow_match": 0.33330000000000004,
"generation_speed_tps": 146.71,
"latency_seconds": 5.003
} |
57 | Write a python function to find the largest number that can be formed with the given digits. | def find_Max_Num(arr,n) :
arr.sort(reverse = True)
num = arr[0]
for i in range(1,n) :
num = num * 10 + arr[i]
return num | [
"assert find_Max_Num([1,2,3],3) == 321",
"assert find_Max_Num([4,5,6,1],4) == 6541",
"assert find_Max_Num([1,2,3,9],4) == 9321"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_largest_number(digits):
"""
Find the largest number that can be formed with the given digits.
Args:
digits (list of int): List of digits to form the largest number
Returns:
int: The largest number that can be formed with the given digits
Raises:
ValueErr... | def find_largest_number(digits):
"""
Find the largest number that can be formed with the given digits.
Args:
digits (list of int): List of digits to form the largest number
Returns:
int: The largest number that can be formed with the given digits
Raises:
ValueError: If the... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'find_Max_Num' is not defined",
"codebleu_overall": 0.15230000000000002,
"syntax_ast_match": 0.09090000000000001,
"dataflow_match": 0.5,
"generation_speed_tps": 140.24,
"latency_seconds": 2.104
} |
58 | Write a python function to check whether the given two integers have opposite sign or not. | def opposite_Signs(x,y):
return ((x ^ y) < 0); | [
"assert opposite_Signs(1,-2) == True",
"assert opposite_Signs(3,2) == False",
"assert opposite_Signs(-10,-10) == False"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def opposite_signs(a, b):
"""
Check whether two integers have opposite signs.
Args:
a (int): First integer
b (int): Second integer
Returns:
bool: True if the integers have opposite signs, False otherwise
"""
return (a > 0 and b < 0) or (a < 0 and b > 0)
``` | def opposite_signs(a, b):
"""
Check whether two integers have opposite signs.
Args:
a (int): First integer
b (int): Second integer
Returns:
bool: True if the integers have opposite signs, False otherwise
"""
return (a > 0 and b < 0) or (a < 0 and b > 0) | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'opposite_Signs' is not defined",
"codebleu_overall": 0.2897,
"syntax_ast_match": 0.1111,
"dataflow_match": 1,
"generation_speed_tps": 135.64,
"latency_seconds": 1.423
} |
59 | Write a function to find the nth octagonal number. | def is_octagonal(n):
return 3 * n * n - 2 * n | [
"assert is_octagonal(5) == 65",
"assert is_octagonal(10) == 280",
"assert is_octagonal(15) == 645"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def octagonal_number(n):
"""
Calculate the nth octagonal number.
An octagonal number is a figurate number that represents the number of points
in an octagon. The formula is: O(n) = n(3n - 2)
Args:
n (int): The position in the octagonal number sequence (must be >= 1)
Returns:... | def octagonal_number(n):
"""
Calculate the nth octagonal number.
An octagonal number is a figurate number that represents the number of points
in an octagon. The formula is: O(n) = n(3n - 2)
Args:
n (int): The position in the octagonal number sequence (must be >= 1)
Returns:
i... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'is_octagonal' is not defined",
"codebleu_overall": 0.3684,
"syntax_ast_match": 0.33330000000000004,
"dataflow_match": 1,
"generation_speed_tps": 146.97,
"latency_seconds": 3.348
} |
60 | Write a function to find the maximum length of the subsequence with difference between adjacent elements for the given array. | def max_len_sub( arr, n):
mls=[]
max = 0
for i in range(n):
mls.append(1)
for i in range(n):
for j in range(i):
if (abs(arr[i] - arr[j]) <= 1 and mls[i] < mls[j] + 1):
mls[i] = mls[j] + 1
for i in range(n):
if (max < mls[i]):
max = mls[i]
return max | [
"assert max_len_sub([2, 5, 6, 3, 7, 6, 5, 8], 8) == 5",
"assert max_len_sub([-2, -1, 5, -1, 4, 0, 3], 7) == 4",
"assert max_len_sub([9, 11, 13, 15, 18], 5) == 1"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def max_len_sub(arr):
"""
Find the maximum length of a subsequence where the difference between
adjacent elements is maximized.
Args:
arr (list): Input array of numbers
Returns:
int: Maximum length of subsequence with maximized adjacent difference
"""
... | def max_len_sub(arr):
"""
Find the maximum length of a subsequence where the difference between
adjacent elements is maximized.
Args:
arr (list): Input array of numbers
Returns:
int: Maximum length of subsequence with maximized adjacent difference
"""
if not ar... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: TypeError - max_len_sub() takes 1 positional argument but 2 were given",
"codebleu_overall": 0.2972,
"syntax_ast_match": 0.4035,
"dataflow_match": 0.525,
"generation_speed_tps": 148.91,
"latency_seconds": 6.346
} |
61 | Write a python function to count number of substrings with the sum of digits equal to their length. | from collections import defaultdict
def count_Substrings(s,n):
count,sum = 0,0
mp = defaultdict(lambda : 0)
mp[0] += 1
for i in range(n):
sum += ord(s[i]) - ord('0')
count += mp[sum - (i + 1)]
mp[sum - (i + 1)] += 1
return count | [
"assert count_Substrings('112112',6) == 6",
"assert count_Substrings('111',3) == 6",
"assert count_Substrings('1101112',7) == 12"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def count_substrings_with_sum_equal_length(s):
"""
Count the number of substrings where the sum of digits equals the length of the substring.
Args:
s (str): Input string to analyze
Returns:
int: Number of substrings with digit sum equal to their length
"""
... | def count_substrings_with_sum_equal_length(s):
"""
Count the number of substrings where the sum of digits equals the length of the substring.
Args:
s (str): Input string to analyze
Returns:
int: Number of substrings with digit sum equal to their length
"""
count = 0... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'count_Substrings' is not defined",
"codebleu_overall": 0.1716,
"syntax_ast_match": 0.1111,
"dataflow_match": 0.36360000000000003,
"generation_speed_tps": 149.58,
"latency_seconds": 5.997
} |
62 | Write a python function to find smallest number in a list. | def smallest_num(xs):
return min(xs)
| [
"assert smallest_num([10, 20, 1, 45, 99]) == 1",
"assert smallest_num([1, 2, 3]) == 1",
"assert smallest_num([45, 46, 50, 60]) == 45"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def smallest_num(numbers):
"""
Find the smallest number in a list.
Args:
numbers (list): A list of numbers
Returns:
int or float: The smallest number in the list
Raises:
ValueError: If the list is empty
"""
if not numbers:
rais... | def smallest_num(numbers):
"""
Find the smallest number in a list.
Args:
numbers (list): A list of numbers
Returns:
int or float: The smallest number in the list
Raises:
ValueError: If the list is empty
"""
if not numbers:
raise ValueErr... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.4212,
"syntax_ast_match": 0.5714,
"dataflow_match": 1,
"generation_speed_tps": 139.62,
"latency_seconds": 1.561
} |
63 | Write a function to find the maximum difference between available pairs in the given tuple list. | def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res) | [
"assert max_difference([(3, 5), (1, 7), (10, 3), (1, 2)]) == 7",
"assert max_difference([(4, 6), (2, 17), (9, 13), (11, 12)]) == 15",
"assert max_difference([(12, 35), (21, 27), (13, 23), (41, 22)]) == 23"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def max_difference(tuples):
"""
Find the maximum difference between any two elements in the given list of tuples.
Args:
tuples (list): A list of tuples or numbers.
Returns:
int or float: The maximum difference between any two elements in the list.
Raises:
... | def max_difference(tuples):
"""
Find the maximum difference between any two elements in the given list of tuples.
Args:
tuples (list): A list of tuples or numbers.
Returns:
int or float: The maximum difference between any two elements in the list.
Raises:
Value... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: TypeError - unsupported operand type(s) for -: 'tuple' and 'tuple'",
"codebleu_overall": 0.0892,
"syntax_ast_match": 0.16670000000000001,
"dataflow_match": 0.16670000000000001,
"generation_speed_tps": 145.72,
"latency_seconds"... |
64 | Write a function to sort a list of tuples using lambda. | def subject_marks(subjectmarks):
#subject_marks = [('English', 88), ('Science', 90), ('Maths', 97), ('Social sciences', 82)])
subjectmarks.sort(key = lambda x: x[1])
return subjectmarks | [
"assert subject_marks([('English', 88), ('Science', 90), ('Maths', 97), ('Social sciences', 82)])==[('Social sciences', 82), ('English', 88), ('Science', 90), ('Maths', 97)]",
"assert subject_marks([('Telugu',49),('Hindhi',54),('Social',33)])==([('Social',33),('Telugu',49),('Hindhi',54)])",
"assert subject_mark... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def sort_tuples_by_key(tuples_list, key=None):
"""
Sort a list of tuples using a lambda function.
Args:
tuples_list (list): List of tuples to be sorted.
key (optional): A function to extract the sorting key from each tuple.
If None, sorts by the first el... | def sort_tuples_by_key(tuples_list, key=None):
"""
Sort a list of tuples using a lambda function.
Args:
tuples_list (list): List of tuples to be sorted.
key (optional): A function to extract the sorting key from each tuple.
If None, sorts by the first element of e... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'subject_marks' is not defined",
"codebleu_overall": 0.2272,
"syntax_ast_match": 0.2308,
"dataflow_match": 0.6000000000000001,
"generation_speed_tps": 146.93,
"latency_seconds": 3.662
} |
65 | Write a function of recursion list sum. | def recursive_list_sum(data_list):
total = 0
for element in data_list:
if type(element) == type([]):
total = total + recursive_list_sum(element)
else:
total = total + element
return total | [
"assert recursive_list_sum(([1, 2, [3,4],[5,6]]))==21",
"assert recursive_list_sum(([7, 10, [15,14],[19,41]]))==106",
"assert recursive_list_sum(([10, 20, [30,40],[50,60]]))==210"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def recursive_list_sum(lst):
"""
Calculate the sum of a list using recursion.
Args:
lst (list): A list of numbers
Returns:
int or float: The sum of all elements in the list
Raises:
TypeError: If the input is not a list
"""
if not isins... | def recursive_list_sum(lst):
"""
Calculate the sum of a list using recursion.
Args:
lst (list): A list of numbers
Returns:
int or float: The sum of all elements in the list
Raises:
TypeError: If the input is not a list
"""
if not isinstance(lst,... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: TypeError - can only concatenate list (not \"int\") to list",
"codebleu_overall": 0.2175,
"syntax_ast_match": 0.1852,
"dataflow_match": 0.6667000000000001,
"generation_speed_tps": 132.57,
"latency_seconds": 1.599
} |
66 | Write a python function to count positive numbers in a list. | def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | [
"assert pos_count([1,-2,3,-4]) == 2",
"assert pos_count([3,4,5,-1]) == 3",
"assert pos_count([1,2,3,4]) == 4"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def pos_count(numbers):
"""
Count the number of positive numbers in a list.
Args:
numbers (list): A list of numbers (integers or floats)
Returns:
int: The count of positive numbers in the list
"""
count = 0
for num in numbers:
if num > 0:
count... | def pos_count(numbers):
"""
Count the number of positive numbers in a list.
Args:
numbers (list): A list of numbers (integers or floats)
Returns:
int: The count of positive numbers in the list
"""
count = 0
for num in numbers:
if num > 0:
count += 1
... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.5845,
"syntax_ast_match": 1,
"dataflow_match": 1,
"generation_speed_tps": 136.75,
"latency_seconds": 1.28
} |
67 | Write a function to find the number of ways to partition a set of bell numbers. | def bell_number(n):
bell = [[0 for i in range(n+1)] for j in range(n+1)]
bell[0][0] = 1
for i in range(1, n+1):
bell[i][0] = bell[i-1][i-1]
for j in range(1, i+1):
bell[i][j] = bell[i-1][j-1] + bell[i][j-1]
return bell[n][0] | [
"assert bell_number(2)==2",
"assert bell_number(10)==115975",
"assert bell_number(56)==6775685320645824322581483068371419745979053216268760300"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def bell_number(n):
"""
Calculate the Bell number B(n), which represents the number of ways to partition
a set of n elements.
Args:
n (int): The number of elements in the set
Returns:
int: The Bell number B(n)
Raises:
ValueError: If n is n... | def bell_number(n):
"""
Calculate the Bell number B(n), which represents the number of ways to partition
a set of n elements.
Args:
n (int): The number of elements in the set
Returns:
int: The Bell number B(n)
Raises:
ValueError: If n is negative
... | {
"functional_pass": false,
"sandbox_feedback": "Compile Error: SyntaxError - '[' was never closed (<llm_code>, line 28)",
"codebleu_overall": 0.15710000000000002,
"syntax_ast_match": 0.35850000000000004,
"dataflow_match": 0.125,
"generation_speed_tps": 150.01,
"latency_seconds": 6.8260000000000005
} |
68 | Write a python function to check whether the given array is monotonic or not. | def is_Monotonic(A):
return (all(A[i] <= A[i + 1] for i in range(len(A) - 1)) or
all(A[i] >= A[i + 1] for i in range(len(A) - 1))) | [
"assert is_Monotonic([6, 5, 4, 4]) == True",
"assert is_Monotonic([1, 2, 2, 3]) == True",
"assert is_Monotonic([1, 3, 2]) == False"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def is_monotonic(arr):
"""
Check if the given array is monotonic (either monotonically increasing or decreasing).
Args:
arr (list): The input array to check.
Returns:
bool: True if the array is monotonic, False otherwise.
"""
if not arr:
return True #... | def is_monotonic(arr):
"""
Check if the given array is monotonic (either monotonically increasing or decreasing).
Args:
arr (list): The input array to check.
Returns:
bool: True if the array is monotonic, False otherwise.
"""
if not arr:
return True # Empty arr... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'is_Monotonic' is not defined",
"codebleu_overall": 0.2601,
"syntax_ast_match": 0.4194,
"dataflow_match": 0.5238,
"generation_speed_tps": 140.29,
"latency_seconds": 2.409
} |
69 | Write a function to check whether a list contains the given sublist or not. | def is_sublist(l, s):
sub_set = False
if s == []:
sub_set = True
elif s == l:
sub_set = True
elif len(s) > len(l):
sub_set = False
else:
for i in range(len(l)):
if l[i] == s[0]:
n = 1
while (n < len(s)) and (l[i+n] == s[n]):
n += 1
if n == len(s):
sub_set = True
... | [
"assert is_sublist([2,4,3,5,7],[3,7])==False",
"assert is_sublist([2,4,3,5,7],[4,3])==True",
"assert is_sublist([2,4,3,5,7],[1,6])==False"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def is_sublist(main_list, sublist):
"""
Check whether a list contains the given sublist.
Args:
main_list (list): The main list to search within.
sublist (list): The sublist to check for.
Returns:
bool: True if the sublist is found in the main list, False otherwise.
... | def is_sublist(main_list, sublist):
"""
Check whether a list contains the given sublist.
Args:
main_list (list): The main list to search within.
sublist (list): The sublist to check for.
Returns:
bool: True if the sublist is found in the main list, False otherwise.
"""
... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.0344,
"syntax_ast_match": 0.0317,
"dataflow_match": 0.0952,
"generation_speed_tps": 134.13,
"latency_seconds": 1.528
} |
70 | Write a function to find whether all the given tuples have equal length or not. | def find_equal_tuple(Input, k):
flag = 1
for tuple in Input:
if len(tuple) != k:
flag = 0
break
return flag
def get_equal(Input, k):
if find_equal_tuple(Input, k) == 1:
return ("All tuples have same length")
else:
return ("All tuples do not have same length") | [
"assert get_equal([(11, 22, 33), (44, 55, 66)], 3) == 'All tuples have same length'",
"assert get_equal([(1, 2, 3), (4, 5, 6, 7)], 3) == 'All tuples do not have same length'",
"assert get_equal([(1, 2), (3, 4)], 2) == 'All tuples have same length'"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def check_equal_length_tuples(tuples):
"""
Check whether all given tuples have equal length.
Args:
tuples (list of tuple): List of tuples to check
Returns:
bool: True if all tuples have equal length, False otherwise
"""
if not tuples:
return True # Empty list... | def check_equal_length_tuples(tuples):
"""
Check whether all given tuples have equal length.
Args:
tuples (list of tuple): List of tuples to check
Returns:
bool: True if all tuples have equal length, False otherwise
"""
if not tuples:
return True # Empty list is consid... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'get_equal' is not defined",
"codebleu_overall": 0.1129,
"syntax_ast_match": 0.09090000000000001,
"dataflow_match": 0.33330000000000004,
"generation_speed_tps": 131.6,
"latency_seconds": 1.444
} |
71 | Write a function to sort a list of elements using comb sort. | def comb_sort(nums):
shrink_fact = 1.3
gaps = len(nums)
swapped = True
i = 0
while gaps > 1 or swapped:
gaps = int(float(gaps) / shrink_fact)
swapped = False
i = 0
while gaps + i < len(nums):
if nums[i] > nums[i+gaps]:
nums[i], n... | [
"assert comb_sort([5, 15, 37, 25, 79]) == [5, 15, 25, 37, 79]",
"assert comb_sort([41, 32, 15, 19, 22]) == [15, 19, 22, 32, 41]",
"assert comb_sort([99, 15, 13, 47]) == [13, 15, 47, 99]"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def comb_sort(arr):
"""
Sorts a list of elements using the comb sort algorithm.
Args:
arr: List of comparable elements
Returns:
Sorted list of elements
"""
def compare(a, b):
return a < b
gap = len(arr)
shrink = 1.3
while gap ... | def comb_sort(arr):
"""
Sorts a list of elements using the comb sort algorithm.
Args:
arr: List of comparable elements
Returns:
Sorted list of elements
"""
def compare(a, b):
return a < b
gap = len(arr)
shrink = 1.3
while gap > 1:
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: OverflowError - cannot convert float infinity to integer",
"codebleu_overall": 0.24020000000000002,
"syntax_ast_match": 0.6071000000000001,
"dataflow_match": 0.33330000000000004,
"generation_speed_tps": 146.84,
"latency_second... |
72 | Write a python function to check whether the given number can be represented as difference of two squares or not. | def dif_Square(n):
if (n % 4 != 2):
return True
return False | [
"assert dif_Square(5) == True",
"assert dif_Square(10) == False",
"assert dif_Square(15) == True"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def can_be_difference_of_two_squares(n):
"""
Check if a number can be represented as the difference of two squares.
A number n can be written as the difference of two squares if and only if:
- n is odd, or
- n is divisible by 4
Args:
n (int): The number to check
Returns:... | def can_be_difference_of_two_squares(n):
"""
Check if a number can be represented as the difference of two squares.
A number n can be written as the difference of two squares if and only if:
- n is odd, or
- n is divisible by 4
Args:
n (int): The number to check
Returns:
b... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'dif_Square' is not defined",
"codebleu_overall": 0.3593,
"syntax_ast_match": 0.36360000000000003,
"dataflow_match": 1,
"generation_speed_tps": 148.09,
"latency_seconds": 5.963
} |
73 | Write a function to split the given string with multiple delimiters by using regex. | import re
def multiple_split(text):
return (re.split('; |, |\*|\n',text)) | [
"assert multiple_split('Forces of the \\ndarkness*are coming into the play.') == ['Forces of the ', 'darkness', 'are coming into the play.']",
"assert multiple_split('Mi Box runs on the \\n Latest android*which has google assistance and chromecast.') == ['Mi Box runs on the ', ' Latest android', 'which has google... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
import re
def split_string_by_multiple_delimiters(text, delimiters):
"""
Split a string by multiple regex patterns.
This function splits a string using multiple regex patterns as delimiters.
Each pattern in the delimiters tuple/list is treated as a separate delimiter.
Args:
text... | import re
def split_string_by_multiple_delimiters(text, delimiters):
"""
Split a string by multiple regex patterns.
This function splits a string using multiple regex patterns as delimiters.
Each pattern in the delimiters tuple/list is treated as a separate delimiter.
Args:
text (str): Th... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'multiple_split' is not defined",
"codebleu_overall": 0.3508,
"syntax_ast_match": 0.2308,
"dataflow_match": 1,
"generation_speed_tps": 149.59,
"latency_seconds": 6.511
} |
74 | Write a function to check whether it follows the sequence given in the patterns array. | def is_samepatterns(colors, patterns):
if len(colors) != len(patterns):
return False
sdict = {}
pset = set()
sset = set()
for i in range(len(patterns)):
pset.add(patterns[i])
sset.add(colors[i])
if patterns[i] not in sdict.keys():
sdi... | [
"assert is_samepatterns([\"red\",\"green\",\"green\"], [\"a\", \"b\", \"b\"])==True ",
"assert is_samepatterns([\"red\",\"green\",\"greenn\"], [\"a\",\"b\",\"b\"])==False ",
"assert is_samepatterns([\"red\",\"green\",\"greenn\"], [\"a\",\"b\"])==False "
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def is_same_patterns(sequence, pattern):
"""
Check whether the sequence follows the given pattern.
Args:
sequence (list): The sequence to check
pattern (list): The expected pattern (must be same length as sequence)
Returns:
bool: True if sequence matches patte... | def is_same_patterns(sequence, pattern):
"""
Check whether the sequence follows the given pattern.
Args:
sequence (list): The sequence to check
pattern (list): The expected pattern (must be same length as sequence)
Returns:
bool: True if sequence matches pattern, False ... | {
"functional_pass": false,
"sandbox_feedback": "Compile Error: SyntaxError - '[' was never closed (<llm_code>, line 25)",
"codebleu_overall": 0.17320000000000002,
"syntax_ast_match": 0.3804,
"dataflow_match": 0.2069,
"generation_speed_tps": 150.5,
"latency_seconds": 6.804
} |
75 | Write a function to find tuples which have all elements divisible by k from the given list of tuples. | def find_tuples(test_list, K):
res = [sub for sub in test_list if all(ele % K == 0 for ele in sub)]
return (str(res)) | [
"assert find_tuples([(6, 24, 12), (7, 9, 6), (12, 18, 21)], 6) == '[(6, 24, 12)]'",
"assert find_tuples([(5, 25, 30), (4, 2, 3), (7, 8, 9)], 5) == '[(5, 25, 30)]'",
"assert find_tuples([(7, 9, 16), (8, 16, 4), (19, 17, 18)], 4) == '[(8, 16, 4)]'"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_tuples(tuples_list, k):
"""
Find tuples where all elements are divisible by k.
Args:
tuples_list (list of tuples): List of tuples to check
k (int): Divisor number
Returns:
list of tuples: List of tuples where all elements are divisible by k
Raises:
... | def find_tuples(tuples_list, k):
"""
Find tuples where all elements are divisible by k.
Args:
tuples_list (list of tuples): List of tuples to check
k (int): Divisor number
Returns:
list of tuples: List of tuples where all elements are divisible by k
Raises:
ValueEr... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.2856,
"syntax_ast_match": 0.4444,
"dataflow_match": 0.6154000000000001,
"generation_speed_tps": 144.43,
"latency_seconds": 3.185
} |
76 | Write a python function to count the number of squares in a rectangle. | def count_Squares(m,n):
if(n < m):
temp = m
m = n
n = temp
return ((m * (m + 1) * (2 * m + 1) / 6 + (n - m) * m * (m + 1) / 2)) | [
"assert count_Squares(4,3) == 20",
"assert count_Squares(2,2) == 5",
"assert count_Squares(1,1) == 1"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def count_squares(width, height):
"""
Count the number of squares that can fit within a rectangle of given width and height.
Args:
width (int): The width of the rectangle
height (int): The height of the rectangle
Returns:
int: The total number of squares that ... | def count_squares(width, height):
"""
Count the number of squares that can fit within a rectangle of given width and height.
Args:
width (int): The width of the rectangle
height (int): The height of the rectangle
Returns:
int: The total number of squares that can fit in... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'count_Squares' is not defined",
"codebleu_overall": 0.1457,
"syntax_ast_match": 0.0606,
"dataflow_match": 0.4706,
"generation_speed_tps": 147.73,
"latency_seconds": 4.332
} |
77 | Write a python function to find the difference between sum of even and odd digits. | def is_Diff(n):
return (n % 11 == 0) | [
"assert is_Diff (12345) == False",
"assert is_Diff(1212112) == True",
"assert is_Diff(1212) == False"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_difference_even_odd_digits(number):
"""
Find the difference between sum of even and odd digits in a number.
Args:
number: An integer or string representing a number
Returns:
int: The difference between sum of even digits and sum of odd digits
"""
... | def find_difference_even_odd_digits(number):
"""
Find the difference between sum of even and odd digits in a number.
Args:
number: An integer or string representing a number
Returns:
int: The difference between sum of even digits and sum of odd digits
"""
even_sum =... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'is_Diff' is not defined",
"codebleu_overall": 0.3553,
"syntax_ast_match": 0.375,
"dataflow_match": 1,
"generation_speed_tps": 149.58,
"latency_seconds": 5.422
} |
78 | Write a python function to find number of integers with odd number of set bits. | def count_With_Odd_SetBits(n):
if (n % 2 != 0):
return (n + 1) / 2
count = bin(n).count('1')
ans = n / 2
if (count % 2 != 0):
ans += 1
return ans | [
"assert count_With_Odd_SetBits(5) == 3",
"assert count_With_Odd_SetBits(10) == 5",
"assert count_With_Odd_SetBits(15) == 8"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def count_odd_set_bits(n):
"""
Count the number of integers in the range [0, n] that have an odd number of set bits.
Args:
n (int): The upper bound (inclusive)
Returns:
int: The count of numbers with an odd number of set bits
"""
count = 0
for i in range(n + 1):
... | def count_odd_set_bits(n):
"""
Count the number of integers in the range [0, n] that have an odd number of set bits.
Args:
n (int): The upper bound (inclusive)
Returns:
int: The count of numbers with an odd number of set bits
"""
count = 0
for i in range(n + 1):
# C... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'count_With_Odd_SetBits' is not defined",
"codebleu_overall": 0.266,
"syntax_ast_match": 0.5938,
"dataflow_match": 0.4,
"generation_speed_tps": 147.07,
"latency_seconds": 4.726
} |
79 | Write a python function to check whether the length of the word is odd or not. | def word_len(s):
s = s.split(' ')
for word in s:
if len(word)%2!=0:
return True
else:
return False | [
"assert word_len(\"Hadoop\") == False",
"assert word_len(\"great\") == True",
"assert word_len(\"structure\") == True"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def is_word_length_odd(word: str) -> bool:
"""
Check whether the length of the given word is odd or even.
Args:
word (str): The word to check the length of.
Returns:
bool: True if the word length is odd, False if even.
"""
return len(word) % 2 != 0
``` | def is_word_length_odd(word: str) -> bool:
"""
Check whether the length of the given word is odd or even.
Args:
word (str): The word to check the length of.
Returns:
bool: True if the word length is odd, False if even.
"""
return len(word) % 2 != 0 | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'word_len' is not defined",
"codebleu_overall": 0.1075,
"syntax_ast_match": 0.18180000000000002,
"dataflow_match": 0.2222,
"generation_speed_tps": 132.51,
"latency_seconds": 1.177
} |
80 | Write a function to find the nth tetrahedral number. | def tetrahedral_number(n):
return (n * (n + 1) * (n + 2)) / 6 | [
"assert tetrahedral_number(5) == 35.0",
"assert tetrahedral_number(6) == 56.0",
"assert tetrahedral_number(7) == 84.0"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def tetrahedral_number(n):
"""
Calculate the nth tetrahedral number.
A tetrahedral number is the sum of the first n triangular numbers.
The formula is: T_n = n(n+1)(n+2)/6
Args:
n (int): The position in the sequence (must be a non-negative integer)
Returns:
... | def tetrahedral_number(n):
"""
Calculate the nth tetrahedral number.
A tetrahedral number is the sum of the first n triangular numbers.
The formula is: T_n = n(n+1)(n+2)/6
Args:
n (int): The position in the sequence (must be a non-negative integer)
Returns:
int: Th... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.5329,
"syntax_ast_match": 0.5385,
"dataflow_match": 1,
"generation_speed_tps": 143.12,
"latency_seconds": 1.873
} |
81 | Write a function to zip the two given tuples. | def zip_tuples(test_tup1, test_tup2):
res = []
for i, j in enumerate(test_tup1):
res.append((j, test_tup2[i % len(test_tup2)]))
return (res) | [
"assert zip_tuples((7, 8, 4, 5, 9, 10),(1, 5, 6) ) == [(7, 1), (8, 5), (4, 6), (5, 1), (9, 5), (10, 6)]",
"assert zip_tuples((8, 9, 5, 6, 10, 11),(2, 6, 7) ) == [(8, 2), (9, 6), (5, 7), (6, 2), (10, 6), (11, 7)]",
"assert zip_tuples((9, 10, 6, 7, 11, 12),(3, 7, 8) ) == [(9, 3), (10, 7), (6, 8), (7, 3), (11, 7),... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def zip_tuples(t1, t2):
"""
Zips two tuples together element-wise.
Parameters:
t1 (tuple): First tuple
t2 (tuple): Second tuple
Returns:
tuple: A new tuple containing the zipped elements
Raises:
TypeError: If either input is not a tuple
""... | def zip_tuples(t1, t2):
"""
Zips two tuples together element-wise.
Parameters:
t1 (tuple): First tuple
t2 (tuple): Second tuple
Returns:
tuple: A new tuple containing the zipped elements
Raises:
TypeError: If either input is not a tuple
"""
if n... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.13290000000000002,
"syntax_ast_match": 0.043500000000000004,
"dataflow_match": 0.4667,
"generation_speed_tps": 139.67,
"latency_seconds": 1.5750000000000002
} |
82 | Write a function to find the volume of a sphere. | import math
def volume_sphere(r):
volume=(4/3)*math.pi*r*r*r
return volume | [
"assert volume_sphere(10)==4188.790204786391",
"assert volume_sphere(25)==65449.84694978735",
"assert volume_sphere(20)==33510.32163829113"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
import math
def volume_sphere(radius):
"""
Calculate the volume of a sphere.
Args:
radius (float): The radius of the sphere
Returns:
float: The volume of the sphere
Raises:
ValueError: If radius is not a positive number
TypeError: If ... | import math
def volume_sphere(radius):
"""
Calculate the volume of a sphere.
Args:
radius (float): The radius of the sphere
Returns:
float: The volume of the sphere
Raises:
ValueError: If radius is not a positive number
TypeError: If radius is ... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.41040000000000004,
"syntax_ast_match": 0.5,
"dataflow_match": 0.9091,
"generation_speed_tps": 141.37,
"latency_seconds": 1.733
} |
83 | Write a python function to find the character made by adding all the characters of the given string. | def get_Char(strr):
summ = 0
for i in range(len(strr)):
summ += (ord(strr[i]) - ord('a') + 1)
if (summ % 26 == 0):
return ord('z')
else:
summ = summ % 26
return chr(ord('a') + summ - 1) | [
"assert get_Char(\"abc\") == \"f\"",
"assert get_Char(\"gfg\") == \"t\"",
"assert get_Char(\"ab\") == \"c\""
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
from collections import Counter
def find_most_common_char(s):
"""
Find the character that appears most frequently in the given string.
Args:
s (str): The input string to analyze.
Returns:
str: The most common character, or None if the string is empty.
"""
... | from collections import Counter
def find_most_common_char(s):
"""
Find the character that appears most frequently in the given string.
Args:
s (str): The input string to analyze.
Returns:
str: The most common character, or None if the string is empty.
"""
if not s:... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'get_Char' is not defined",
"codebleu_overall": 0.08020000000000001,
"syntax_ast_match": 0.06670000000000001,
"dataflow_match": 0.2381,
"generation_speed_tps": 144.1,
"latency_seconds": 1.957
} |
84 | Write a function to find the n-th number in newman conway sequence. | def sequence(n):
if n == 1 or n == 2:
return 1
else:
return sequence(sequence(n-1)) + sequence(n-sequence(n-1)) | [
"assert sequence(10) == 6",
"assert sequence(2) == 1",
"assert sequence(3) == 2"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | {
"functional_pass": false,
"sandbox_feedback": "Empty code string provided.",
"codebleu_overall": 0,
"syntax_ast_match": 0,
"dataflow_match": 0,
"generation_speed_tps": 152.22,
"latency_seconds": 6.727
} | ||
85 | Write a function to find the surface area of a sphere. | import math
def surfacearea_sphere(r):
surfacearea=4*math.pi*r*r
return surfacearea | [
"assert surfacearea_sphere(10)==1256.6370614359173",
"assert surfacearea_sphere(15)==2827.4333882308138",
"assert surfacearea_sphere(20)==5026.548245743669"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
import math
def surface_area_sphere(radius):
"""
Calculate the surface area of a sphere.
Args:
radius (float): The radius of the sphere.
Returns:
float: The surface area of the sphere.
Raises:
ValueError: If the radius is not a positive number.
"""
if ra... | import math
def surface_area_sphere(radius):
"""
Calculate the surface area of a sphere.
Args:
radius (float): The radius of the sphere.
Returns:
float: The surface area of the sphere.
Raises:
ValueError: If the radius is not a positive number.
"""
if radius <= 0:... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'surfacearea_sphere' is not defined",
"codebleu_overall": 0.2876,
"syntax_ast_match": 0.3846,
"dataflow_match": 0.5556,
"generation_speed_tps": 142.12,
"latency_seconds": 1.541
} |
86 | Write a function to find nth centered hexagonal number. | def centered_hexagonal_number(n):
return 3 * n * (n - 1) + 1 | [
"assert centered_hexagonal_number(10) == 271",
"assert centered_hexagonal_number(2) == 7",
"assert centered_hexagonal_number(9) == 217"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def centered_hexagonal_number(n):
"""
Calculate the nth centered hexagonal number.
A centered hexagonal number is a figurate number that represents
a hexagon with a center point and n layers of hexagons around it.
The formula for the nth centered hexagonal number is:
H(n) = 3... | def centered_hexagonal_number(n):
"""
Calculate the nth centered hexagonal number.
A centered hexagonal number is a figurate number that represents
a hexagon with a center point and n layers of hexagons around it.
The formula for the nth centered hexagonal number is:
H(n) = 3nΒ² - 3n + ... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.4169,
"syntax_ast_match": 0.2,
"dataflow_match": 1,
"generation_speed_tps": 146.29,
"latency_seconds": 2.946
} |
87 | Write a function to merge three dictionaries into a single expression. | import collections as ct
def merge_dictionaries_three(dict1,dict2, dict3):
merged_dict = dict(ct.ChainMap({},dict1,dict2,dict3))
return merged_dict | [
"assert merge_dictionaries_three({ \"R\": \"Red\", \"B\": \"Black\", \"P\": \"Pink\" }, { \"G\": \"Green\", \"W\": \"White\" },{ \"O\": \"Orange\", \"W\": \"White\", \"B\": \"Black\" })=={'B': 'Black', 'R': 'Red', 'P': 'Pink', 'G': 'Green', 'W': 'White', 'O': 'Orange'}",
"assert merge_dictionaries_three({ \"R\": ... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def merge_dictionaries_three(d1, d2, d3):
"""
Merge three dictionaries into a single expression.
This function combines three dictionaries by updating them sequentially,
ensuring that all keys from all three dictionaries are preserved.
Args:
d1 (dict): First dictionary to... | def merge_dictionaries_three(d1, d2, d3):
"""
Merge three dictionaries into a single expression.
This function combines three dictionaries by updating them sequentially,
ensuring that all keys from all three dictionaries are preserved.
Args:
d1 (dict): First dictionary to merge
... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.28290000000000004,
"syntax_ast_match": 0.1875,
"dataflow_match": 0.9167000000000001,
"generation_speed_tps": 145.95,
"latency_seconds": 3.371
} |
88 | Write a function to get the frequency of the elements in a list. | import collections
def freq_count(list1):
freq_count= collections.Counter(list1)
return freq_count | [
"assert freq_count([10,10,10,10,20,20,20,20,40,40,50,50,30])==({10: 4, 20: 4, 40: 2, 50: 2, 30: 1}) ",
"assert freq_count([1,2,3,4,3,2,4,1,3,1,4])==({1:3, 2:2,3:3,4:3}) ",
"assert freq_count([5,6,7,4,9,10,4,5,6,7,9,5])==({10:1,5:3,6:2,7:2,4:2,9:2}) "
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def freq_count(lst):
"""
Get the frequency of each element in a list.
Args:
lst (list): The input list to analyze.
Returns:
dict: A dictionary where keys are unique elements from the list
and values are their corresponding frequencies.
"""
freq = {}
... | def freq_count(lst):
"""
Get the frequency of each element in a list.
Args:
lst (list): The input list to analyze.
Returns:
dict: A dictionary where keys are unique elements from the list
and values are their corresponding frequencies.
"""
freq = {}
for elemen... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.18050000000000002,
"syntax_ast_match": 0.25,
"dataflow_match": 0.42860000000000004,
"generation_speed_tps": 141.68,
"latency_seconds": 2.9290000000000003
} |
89 | Write a function to find the closest smaller number than n. | def closest_num(N):
return (N - 1) | [
"assert closest_num(11) == 10",
"assert closest_num(7) == 6",
"assert closest_num(12) == 11"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | {
"functional_pass": false,
"sandbox_feedback": "Empty code string provided.",
"codebleu_overall": 0,
"syntax_ast_match": 0,
"dataflow_match": 0,
"generation_speed_tps": 151.18,
"latency_seconds": 6.773
} | ||
90 | Write a python function to find the length of the longest word. | def len_log(list1):
max=len(list1[0])
for i in list1:
if len(i)>max:
max=len(i)
return max | [
"assert len_log([\"python\",\"PHP\",\"bigdata\"]) == 7",
"assert len_log([\"a\",\"ab\",\"abc\"]) == 3",
"assert len_log([\"small\",\"big\",\"tall\"]) == 5"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def longest_word_length(text):
"""
Find the length of the longest word in a given string.
Args:
text (str): The input string containing words.
Returns:
int: The length of the longest word.
Raises:
ValueError: If the input is not a string.
"""
if not isins... | def longest_word_length(text):
"""
Find the length of the longest word in a given string.
Args:
text (str): The input string containing words.
Returns:
int: The length of the longest word.
Raises:
ValueError: If the input is not a string.
"""
if not isinstance(text... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'len_log' is not defined",
"codebleu_overall": 0.1573,
"syntax_ast_match": 0.2381,
"dataflow_match": 0.35710000000000003,
"generation_speed_tps": 139.5,
"latency_seconds": 1.484
} |
91 | Write a function to check if a substring is present in a given list of string values. | def find_substring(str1, sub_str):
if any(sub_str in s for s in str1):
return True
return False | [
"assert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"ack\")==True",
"assert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"abc\")==False",
"assert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"ange\")==True"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def find_substring(substring, strings):
"""
Check if a substring is present in any of the strings in a list.
Args:
substring (str): The substring to search for
strings (list): List of string values to search in
Returns:
bool: True if the substring is found in any of t... | def find_substring(substring, strings):
"""
Check if a substring is present in any of the strings in a list.
Args:
substring (str): The substring to search for
strings (list): List of string values to search in
Returns:
bool: True if the substring is found in any of the strings... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: TypeError - 'in <string>' requires string as left operand, not list",
"codebleu_overall": 0.39690000000000003,
"syntax_ast_match": 0.4167,
"dataflow_match": 0.8333,
"generation_speed_tps": 140.89,
"latency_seconds": 1.732
} |
92 | Write a function to check whether the given number is undulating or not. | def is_undulating(n):
if (len(n) <= 2):
return False
for i in range(2, len(n)):
if (n[i - 2] != n[i]):
return False
return True | [
"assert is_undulating(\"1212121\") == True",
"assert is_undulating(\"1991\") == False",
"assert is_undulating(\"121\") == True"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def is_undulating(number):
"""
Check whether a number is undulating.
A number is considered undulating if its digits alternate in value
(e.g., 1234567890 where each digit is different from the previous).
Args:
number (int): The number to check
Returns:
... | def is_undulating(number):
"""
Check whether a number is undulating.
A number is considered undulating if its digits alternate in value
(e.g., 1234567890 where each digit is different from the previous).
Args:
number (int): The number to check
Returns:
bool: Tr... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.374,
"syntax_ast_match": 0.5769000000000001,
"dataflow_match": 0.6667000000000001,
"generation_speed_tps": 148.7,
"latency_seconds": 4.472
} |
93 | Write a function to calculate the value of 'a' to the power 'b'. | def power(a,b):
if b==0:
return 1
elif a==0:
return 0
elif b==1:
return a
else:
return a*power(a,b-1) | [
"assert power(3,4) == 81",
"assert power(2,3) == 8",
"assert power(5,5) == 3125"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def power(a, b):
"""
Calculate a raised to the power of b.
Args:
a (int or float): The base value
b (int or float): The exponent value
Returns:
float: a raised to the power of b
Examples:
>>> power(2, 3)
8.0
>>> power(5, 0)
... | def power(a, b):
"""
Calculate a raised to the power of b.
Args:
a (int or float): The base value
b (int or float): The exponent value
Returns:
float: a raised to the power of b
Examples:
>>> power(2, 3)
8.0
>>> power(5, 0)
1.0
... | {
"functional_pass": true,
"sandbox_feedback": "Success: Passed all functional test assertions!",
"codebleu_overall": 0.1114,
"syntax_ast_match": 0.0455,
"dataflow_match": 0.36360000000000003,
"generation_speed_tps": 142.25,
"latency_seconds": 1.687
} |
94 | Write a function to extract the index minimum value record from the given tuples. | from operator import itemgetter
def index_minimum(test_list):
res = min(test_list, key = itemgetter(1))[0]
return (res) | [
"assert index_minimum([('Rash', 143), ('Manjeet', 200), ('Varsha', 100)]) == 'Varsha'",
"assert index_minimum([('Yash', 185), ('Dawood', 125), ('Sanya', 175)]) == 'Dawood'",
"assert index_minimum([('Sai', 345), ('Salman', 145), ('Ayesha', 96)]) == 'Ayesha'"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def index_minimum_value_record(tuples_list):
"""
Extracts the index minimum value record from a list of tuples.
This function finds the tuple with the minimum value in the first element (index)
and returns that tuple along with its index.
Parameters:
tuples_list (list of tupl... | def index_minimum_value_record(tuples_list):
"""
Extracts the index minimum value record from a list of tuples.
This function finds the tuple with the minimum value in the first element (index)
and returns that tuple along with its index.
Parameters:
tuples_list (list of tuples): A lis... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'index_minimum' is not defined",
"codebleu_overall": 0.1212,
"syntax_ast_match": 0.058800000000000005,
"dataflow_match": 0.4,
"generation_speed_tps": 143.48,
"latency_seconds": 2.6
} |
95 | Write a python function to find the minimum length of sublist. | def Find_Min_Length(lst):
minLength = min(len(x) for x in lst )
return minLength | [
"assert Find_Min_Length([[1],[1,2]]) == 1",
"assert Find_Min_Length([[1,2],[1,2,3],[1,2,3,4]]) == 2",
"assert Find_Min_Length([[3,3,3],[4,4,4,4]]) == 3"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def Find_Min_Length(sublist):
"""
Find the minimum length of a sublist within a given list.
Args:
sublist (list): A list of elements to analyze
Returns:
int: The minimum length of any non-empty sublist
Raises:
ValueError: If the input list is ... | def Find_Min_Length(sublist):
"""
Find the minimum length of a sublist within a given list.
Args:
sublist (list): A list of elements to analyze
Returns:
int: The minimum length of any non-empty sublist
Raises:
ValueError: If the input list is empty
... | {
"functional_pass": false,
"sandbox_feedback": "Functional Failure: Broken Assertion check.",
"codebleu_overall": 0.24780000000000002,
"syntax_ast_match": 0.33330000000000004,
"dataflow_match": 0.625,
"generation_speed_tps": 145.39,
"latency_seconds": 2.332
} |
96 | Write a python function to find the number of divisors of a given integer. | def divisor(n):
for i in range(n):
x = len([i for i in range(1,n+1) if not n % i])
return x | [
"assert divisor(15) == 4 ",
"assert divisor(12) == 6",
"assert divisor(9) == 3"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def divisor_count(n):
"""
Calculate the number of divisors of a given integer.
Args:
n (int): The integer to find the number of divisors for.
Returns:
int: The number of divisors of the given integer.
"""
if n == 0:
return 0
if n == 1:
return 1
... | def divisor_count(n):
"""
Calculate the number of divisors of a given integer.
Args:
n (int): The integer to find the number of divisors for.
Returns:
int: The number of divisors of the given integer.
"""
if n == 0:
return 0
if n == 1:
return 1
count = ... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'divisor' is not defined",
"codebleu_overall": 0.1968,
"syntax_ast_match": 0.2381,
"dataflow_match": 0.4667,
"generation_speed_tps": 148.46,
"latency_seconds": 5.032
} |
97 | Write a function to find frequency count of list of lists. | def frequency_lists(list1):
list1 = [item for sublist in list1 for item in sublist]
dic_data = {}
for num in list1:
if num in dic_data.keys():
dic_data[num] += 1
else:
key = num
value = 1
dic_data[key] = value
return dic_data
| [
"assert frequency_lists([[1, 2, 3, 2], [4, 5, 6, 2], [7, 8, 9, 5]])=={1: 1, 2: 3, 3: 1, 4: 1, 5: 2, 6: 1, 7: 1, 8: 1, 9: 1}",
"assert frequency_lists([[1,2,3,4],[5,6,7,8],[9,10,11,12]])=={1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1,10:1,11:1,12:1}",
"assert frequency_lists([[20,30,40,17],[18,16,14,13],... | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
from collections import Counter
def frequency_lists(list_of_lists):
"""
Find frequency count of list of lists.
This function counts how many times each unique inner list appears in the outer list.
Args:
list_of_lists (list of lists): A list containing lists of elements
Returns:... | from collections import Counter
def frequency_lists(list_of_lists):
"""
Find frequency count of list of lists.
This function counts how many times each unique inner list appears in the outer list.
Args:
list_of_lists (list of lists): A list containing lists of elements
Returns:
d... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: TypeError - unhashable type: 'list'",
"codebleu_overall": 0.0776,
"syntax_ast_match": 0.09090000000000001,
"dataflow_match": 0.2083,
"generation_speed_tps": 147.68,
"latency_seconds": 3.738
} |
98 | Write a function to multiply all the numbers in a list and divide with the length of the list. | def multiply_num(numbers):
total = 1
for x in numbers:
total *= x
return total/len(numbers) | [
"assert multiply_num((8, 2, 3, -1, 7))==-67.2",
"assert multiply_num((-10,-20,-30))==-2000.0",
"assert multiply_num((19,15,18))==1710.0"
] | {
"model_id": "qwen3.5:2b",
"hardware_profile": "Alienware m18 RTX 4090 Laptop (16GB)"
} | ```python
def multiply_and_divide(numbers):
"""
Multiplies all numbers in a list and divides by the length of the list.
Args:
numbers (list): A list of numeric values
Returns:
float: The average of the list elements
Raises:
ValueError: If the list is em... | def multiply_and_divide(numbers):
"""
Multiplies all numbers in a list and divides by the length of the list.
Args:
numbers (list): A list of numeric values
Returns:
float: The average of the list elements
Raises:
ValueError: If the list is empty
... | {
"functional_pass": false,
"sandbox_feedback": "Execution Failure during test: NameError - name 'multiply_num' is not defined",
"codebleu_overall": 0.5619000000000001,
"syntax_ast_match": 0.7857000000000001,
"dataflow_match": 1,
"generation_speed_tps": 127.96,
"latency_seconds": 1.5470000000000002
} |
YAML Metadata Warning:The task_categories "code-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
Local Code Arena Telemetry: MBPP Benchmark on Qwen 3.5 2B
This repository hosts the raw evaluation metrics, execution telemetry logs, and structural syntax outputs captured from running the Mostly Basic Python Problems (MBPP) benchmark against the Qwen 3.5 2B base model.
This specific run documents how a tiny, next-generation generalist instruction model handles zero-shot functional programming synthesis under standard local execution bounds without active reasoning tokens.
π Core Performance Summary
- Evaluation Target:
qwen3.5:2b(via Ollama Server) - Functional Pass@1 Accuracy: 18.2%
- Average Generation Speed: 144.46 Tokens/Second β‘
- Evaluation Window: 500 tasks (Test Split)
π Cross-Generation Paradigm Analysis
Placing this dataset into the broader Local Code Arena matrix highlights the massive impact of domain-specific pre-training versus generalized generational updates:
| Model Tag | Parameter Size | Architecture Focus | Pass@1 Accuracy | Throughput (TPS) |
|---|---|---|---|---|
qwen2.5-coder:1.5b |
1.5 Billion | Code Specialized | 35.0% π | 190.88 Tokens/Sec |
qwen3:1.7b |
1.7 Billion | Generalist Base | 25.0% | 254.85 Tokens/Sec |
qwen3.5:2b |
2.0 Billion | Generalist Base | 18.2% | 144.46 Tokens/Sec |
Key Structural Insight: The telemetry demonstrates that generational leaps in base model architectures do not automatically translate to better out-of-the-box performance on strict functional coding benchmarks. Without domain-specific code saturation or active chain-of-thought reasoning steps, small generalist weights face significant accuracy trade-offs.
π» Baseline Hardware Configuration
All telemetry records inside this dataset matrix were compiled on a singular local environment footprint:
- Host System: Alienware m18 Performance Notebook
- GPU Accelerator: NVIDIA GeForce RTX 4090 Laptop GPU (16GB GDDR6 VRAM / 175W TGP Max)
- Driver / CUDA Stack: NVIDIA Driver 581.95 | CUDA 13.0
- Isolation Engine: Multi-threaded Python Code Execution Sandbox (2.0s Hard Wall-Clock Timeout Limit)
π Dataset Architecture & Feature Schema
Each row within this dataset represents a fully evaluated, structured code generation instance. The table outlines the schemas available in the parquet records:
| Column Field | Data Type | Functional Description |
|---|---|---|
task_id |
int64 |
The original source tracking pointer for the MBPP dataset entry. |
prompt |
string |
The text string instruction passed to the local LLM model instance. |
canonical_reference |
string |
The ground-truth standard Python solution provided by the base dataset. |
test_assertions |
list |
String arrays of explicit runtime python assert verification operations. |
model_metadata |
struct |
JSON dictionary tracking model_id and the hosting hardware parameters. |
raw_generation |
string |
The unedited, raw string return received directly from the local API stream. |
parsed_code |
string |
Extracted code block stripped cleanly of conversational markdown text wrappers. |
evaluation_metrics |
struct |
Deep metrics tracking structural and execution telemetry. |
π οΈ Evaluation Metrics Breakdown
Inside the evaluation_metrics structural child frame, fields map precise tracking criteria:
functional_pass(bool): Evaluates totrueif the code compiled cleanly and completed 100% of the associated test assertion strings.sandbox_feedback(string): The precise stdout message or traceback captured by the isolated runtime environment loop (e.g.,Execution Timeout,NameError, orSuccess).codebleu_overall(float): An aggregated structural score grading AST matches and data-flow syntax layout configurations against the ground truth target.generation_speed_tps(float): The dedicated processing efficiency score capturing exact Tokens per Second generated on the local RTX 4090.latency_seconds(float): The absolute round-trip execution latency for model inference response strings.
π How to Utilize This Dataset
You can stream this telemetry dataset into your local evaluation analysis notebooks using the Hugging Face datasets engine:
from datasets import load_dataset
# Stream the local code arena performance log straight into your dataframe
dataset = load_dataset("ShahzebKhoso/local-code-arena-mbpp-qwen3.5-2b")
# Access individual record blocks
first_entry = dataset['train'][0]
print(f"Model Throughput Speed: {first_entry['evaluation_metrics']['generation_speed_tps']} TPS")
π Licensing & Citation
This telemetry package is distributed freely under the permissive MIT License. If you adapt this benchmark architecture or build upon these hardware token files in academic workflows, please point back to this Hub repository space.
- Downloads last month
- 19