id stringlengths 8 10 | task_id stringlengths 6 8 | split stringclasses 2 values | prompt listlengths 2 2 | hit_response_target bool 2 classes | passing_responses listlengths 1 32 | response_attempts int64 42 10.2k | canonical_solution stringlengths 0 878 | rejected_responses listlengths 0 10.2k | num_passing_responses int64 1 32 | num_rejected_responses int64 0 10.2k |
|---|---|---|---|---|---|---|---|---|---|---|
sample_440 | MBPP/60 | test | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | false | ["# This is a python code of the function given, I will explain it line by line:\n\ndef max_len_sub((...TRUNCATED) | 10,240 | "\t \n\tmls=[] \n\tmax = 0\n\tfor i in range(n): \n\t\tmls.append(1) \n\tfor i in range(n): \n\t\tfo(...TRUNCATED) | ["Here is the solution:\n\nThe problem is finding the maximum length of the longest possible subsequ(...TRUNCATED) | 8 | 10,232 |
sample_672 | MBPP/597 | test | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | true | [" #To find the kth element in the first array, we can concatenate the two arrays and sort them. (...TRUNCATED) | 1,901 | "\t\n\tsorted1 = [0] * (m + n)\n\ti = 0\n\tj = 0\n\td = 0\n\twhile (i < m and j < n):\n\t\tif (arr1[(...TRUNCATED) | ["\n if m <= 0:\n return arr2[k]\n if n <= 0:\n return arr1[k]\n if k <= 0:\n(...TRUNCATED) | 32 | 1,869 |
sample_659 | MBPP/563 | test | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | true | [" \n import re\n\n result = re.findall(r'\"((?:[^\"\\\\]|\\\\.)*)\"', text)\n\n return (...TRUNCATED) | 921 | import re
return (re.findall(r'"(.*?)"', text)) | [" import re\n quotes = re.findall(r'\"((?:[^\"\\\\]|\\\\.)*)\"', text)\n return [quote[0] (...TRUNCATED) | 32 | 889 |
sample_97 | MBPP/203 | train | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | true | [" # Convert both numbers to binary representation\n bin_n1 = bin(n1)[2:]\n bin_n2 = bin(n2(...TRUNCATED) | 107 | " \n x = n1 ^ n2 \n setBits = 0\n while (x > 0) : \n setBits += x & 1\n (...TRUNCATED) | [] | 32 | 0 |
sample_49 | MBPP/101 | train | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | true | [" # Error handling for the case when k is out of the array bounds\n if k > n or k < 1:\n (...TRUNCATED) | 190 | " \n for i in range(n):\n for j in range(0, n-i-1):\n if arr[j] > arr[j+1]:\n arr[j(...TRUNCATED) | [] | 32 | 0 |
sample_433 | MBPP/45 | test | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | true | [" # calculate gcd of first two numbers\n num1 = l[0]\n num2 = l[1]\n gcd = num1\n\n (...TRUNCATED) | 129 | " def find_gcd(x, y): \n \twhile(y): \n \t\tx, y = y, x % y \n \treturn x \n \n num1 = l[0]\n (...TRUNCATED) | ["The gcd of two numbers is always the largest number that divides both of them without a remainder.(...TRUNCATED) | 32 | 97 |
sample_393 | MBPP/923 | train | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | true | [" # Using Dynamic Programming to solve the problem\n # Initialize a 2D matrix with size(m+1, (...TRUNCATED) | 607 | "\t\n\tif (not m):\n\t\treturn n\n\tif (not n):\n\t\treturn m\n\tif (X[m - 1] == Y[n - 1]):\n\t\tret(...TRUNCATED) | [" dp = [[0] * (n+1) for _ in range(m+1)]\n\n for i in range(m+1):\n for j in range(n+1(...TRUNCATED) | 32 | 575 |
sample_67 | MBPP/140 | train | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | true | [" # Create an empty list to store the singly elements\n singly_elements = []\n\n # Iterate(...TRUNCATED) | 1,257 | " \n res = []\n temp = set()\n for inner in test_list:\n for ele in inner:\n if not ele (...TRUNCATED) | [] | 32 | 0 |
sample_792 | MBPP/882 | test | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | false | [" # calculate the perimeter\n perimeter = 2*(b*h)\n\n return perimeter\n\n# Testing the fu(...TRUNCATED) | 10,240 |
perimeter=2*(b*h)
return perimeter | [" # Calculate the perimeter of the parallelogram\n perimeter = 2 * (b + h)\n\n return peri(...TRUNCATED) | 16 | 10,224 |
sample_302 | MBPP/724 | train | [{"content":"You are an expert python programmer. You are given a task to write a program that solve(...TRUNCATED) | true | [" \n\n \ndef power_base_sum(base, power):\n \"\"\"\n Write a function to calculate the (...TRUNCATED) | 765 |
return sum([int(i) for i in str(pow(base, power))]) | [" sum = 0\n base_str = str(base)\n power_str = str(power)\n for digit in base_str:\n (...TRUNCATED) | 32 | 733 |
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 16