Download reports/code_report.json from parser-tech/prismmind-v2: direct link, hf CLI and curl.
- Browser
- Download file 10.9 kB
-
https://huggingface.co/parser-tech/prismmind-v2/resolve/main/reports/code_report.json
- Command line
-
hf download hf://parser-tech/prismmind-v2/reports/code_report.json
-
curl -L -o code_report.json https://huggingface.co/parser-tech/prismmind-v2/resolve/main/reports/code_report.json
10.9 kB
| { | |
| "code_vault_docs": 18694, | |
| "japanese_coding_suite": { | |
| "passed": 16, | |
| "total": 16, | |
| "accuracy_pct": 100, | |
| "cases": [ | |
| { | |
| "category": "動的計画法/反復", | |
| "question": "フィボナッチ数列の第n項を返すPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 4, | |
| "tests_total": 4, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def fibonacci(n: int) -> int:\n if n < 0:\n raise ValueError(\"n must be non-negative\")\n a, b = 0, 1\n for _ in range(n):\n a, b = b, a + b\n return a", | |
| "latency_ms": 187.8063 | |
| }, | |
| { | |
| "category": "数論", | |
| "question": "与えられた整数が素数かどうか判定するPython関数を実装して", | |
| "verified": true, | |
| "tests_passed": 4, | |
| "tests_total": 4, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def is_prime(n: int) -> bool:\n if n < 2:\n return False\n if n % 2 == 0:\n return n == 2\n d = 3\n while d * d <= n:\n if n % d == 0:\n return False\n d += 2\n return True", | |
| "latency_ms": 116.533 | |
| }, | |
| { | |
| "category": "数論", | |
| "question": "整数を素因数分解してリストで返すPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def prime_factors(n: int) -> list[int]:\n factors = []\n d = 2\n while d * d <= n:\n while n % d == 0:\n factors.append(d)\n n //= d\n d += 1 if d == 2 else 2\n if n > 1:\n factors.append(n)\n return factors", | |
| "latency_ms": 121.6569 | |
| }, | |
| { | |
| "category": "文字列", | |
| "question": "文字列が回文かどうか判定するPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 3, | |
| "tests_total": 3, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def is_palindrome(s: str) -> bool:\n cleaned = \"\".join(ch.lower() for ch in s if ch.isalnum())\n return cleaned == cleaned[::-1]", | |
| "latency_ms": 126.2367 | |
| }, | |
| { | |
| "category": "スタック", | |
| "question": "括弧の対応が正しいか判定するPython関数を作って", | |
| "verified": true, | |
| "tests_passed": 4, | |
| "tests_total": 4, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def is_valid_brackets(s: str) -> bool:\n pairs = {')': '(', ']': '[', '}': '{', '」': '「', ')': '('}\n stack = []\n for ch in s:\n if ch in pairs.values():\n stack.append(ch)\n elif ch in pairs:\n if not stack or stack.pop() != pairs[ch]:\n return False\n return not stack", | |
| "latency_ms": 115.9873 | |
| }, | |
| { | |
| "category": "探索", | |
| "question": "ソート済み配列から二分探索を行うPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def binary_search(arr: list[int], target: int) -> int:\n lo, hi = 0, len(arr) - 1\n while lo <= hi:\n mid = (lo + hi) // 2\n if arr[mid] == target:\n return mid\n elif arr[mid] < target:\n lo = mid + 1\n else:\n hi = mid - 1\n return -1", | |
| "latency_ms": 121.1641 | |
| }, | |
| { | |
| "category": "ソート", | |
| "question": "配列をクイックソートするPython関数を実装して", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def quicksort(arr: list) -> list:\n if len(arr) <= 1:\n return list(arr)\n pivot = arr[len(arr) // 2]\n left = [x for x in arr if x < pivot]\n mid = [x for x in arr if x == pivot]\n right = [x for x in arr if x > pivot]\n return quicksort(left) + mid + quicksort(right)", | |
| "latency_ms": 120.653 | |
| }, | |
| { | |
| "category": "2ポインタ", | |
| "question": "ソート済みの2つの配列をマージするPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def merge_sorted(a: list, b: list) -> list:\n res = []\n i = j = 0\n while i < len(a) and j < len(b):\n if a[i] <= b[j]:\n res.append(a[i]); i += 1\n else:\n res.append(b[j]); j += 1\n res.extend(a[i:])\n res.extend(b[j:])\n return res", | |
| "latency_ms": 119.2883 | |
| }, | |
| { | |
| "category": "ハッシュ集合", | |
| "question": "リストの重複を順序を保って削除するPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def remove_duplicates(items: list) -> list:\n seen = set()\n out = []\n for x in items:\n if x not in seen:\n seen.add(x)\n out.append(x)\n return out", | |
| "latency_ms": 122.038 | |
| }, | |
| { | |
| "category": "文字列", | |
| "question": "2つの文字列がアナグラムかどうか判定するPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "from collections import Counter\n\ndef is_anagram(a: str, b: str) -> bool:\n ca = Counter(ch.lower() for ch in a if ch.isalnum())\n cb = Counter(ch.lower() for ch in b if ch.isalnum())\n return ca == cb", | |
| "latency_ms": 124.9456 | |
| }, | |
| { | |
| "category": "数論", | |
| "question": "2つの整数の最大公約数を求めるPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def gcd(a: int, b: int) -> int:\n a, b = abs(a), abs(b)\n while b:\n a, b = b, a % b\n return a", | |
| "latency_ms": 118.1081 | |
| }, | |
| { | |
| "category": "数論", | |
| "question": "非負整数の階乗を計算するPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 3, | |
| "tests_total": 3, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def factorial(n: int) -> int:\n if n < 0:\n raise ValueError(\"n must be non-negative\")\n res = 1\n for k in range(2, n + 1):\n res *= k\n return res", | |
| "latency_ms": 118.6706 | |
| }, | |
| { | |
| "category": "行列", | |
| "question": "2次元行列を転置するPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 1, | |
| "tests_total": 1, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def transpose(matrix: list[list]) -> list[list]:\n if not matrix:\n return []\n return [list(row) for row in zip(*matrix)]", | |
| "latency_ms": 116.245 | |
| }, | |
| { | |
| "category": "ハッシュマップ", | |
| "question": "配列の中から合計がターゲットになる2つの要素のインデックスを返すTwo SumのPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def two_sum(nums: list[int], target: int) -> tuple[int, int] | None:\n seen = {}\n for i, x in enumerate(nums):\n need = target - x\n if need in seen:\n return (seen[need], i)\n seen[x] = i\n return None", | |
| "latency_ms": 131.6688 | |
| }, | |
| { | |
| "category": "集計", | |
| "question": "文字列中の各文字の出現回数を辞書で返すPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 1, | |
| "tests_total": 1, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "from collections import Counter\n\ndef char_frequency(s: str) -> dict[str, int]:\n return dict(Counter(s))", | |
| "latency_ms": 120.4019 | |
| }, | |
| { | |
| "category": "文字列", | |
| "question": "文字列を反転して返すPython関数を書いて", | |
| "verified": true, | |
| "tests_passed": 2, | |
| "tests_total": 2, | |
| "source": "PrismMind-Verified-Algo", | |
| "code": "def reverse_string(s: str) -> str:\n return s[::-1]", | |
| "latency_ms": 116.2763 | |
| } | |
| ] | |
| }, | |
| "mbpp_heldout_test": { | |
| "passed": 22, | |
| "total": 100, | |
| "pass_at_10_pct": 22, | |
| "solved_examples": [ | |
| { | |
| "task_id": 17, | |
| "prompt": "Write a function to find the perimeter of a square.", | |
| "source": "mbpp", | |
| "code": "def square_perimeter(a):\r\n perimeter=4*a\r\n return perimeter" | |
| }, | |
| { | |
| "task_id": 19, | |
| "prompt": "Write a function to find whether a given array of integers contains any duplicate element.", | |
| "source": "codeinst122k", | |
| "code": "def test_duplicate(arr): \n # Create a new array to store the elements \n result = [] \n\n # Iterate over the given array \n for i in range(len(arr)): \n # If element is already present in the result array, the element is duplicate \n if arr[i] in result: \n return True \n else: \n # If the element is not present, add it to the result array \n result.append(arr[i]) \n\n # If all elements are unique, return False \n return False" | |
| }, | |
| { | |
| "task_id": 20, | |
| "prompt": "Write a function to check if the given number is woodball or not.", | |
| "source": "codeinst122k", | |
| "code": "def is_woodall(n):\n # check if 2 or greater \n if n >= 2:\n # check for factors \n for i in range(2, int(n**0.5) + 1):\n if n % i == 0:\n # number is not prime \n return False\n # number is prime \n return True\n # number is not prime \n return False" | |
| }, | |
| { | |
| "task_id": 24, | |
| "prompt": "Write a function to convert the given binary number to its decimal equivalent.", | |
| "source": "codealpaca", | |
| "code": "def binary_to_decimal(number):\n result = 0\n power = 0\n for digit in str(number)[::-1]:\n if digit == '1':\n result += 2 ** power\n power += 1\n return result" | |
| }, | |
| { | |
| "task_id": 28, | |
| "prompt": "Write a python function to find binomial co-efficient.", | |
| "source": "mbpp", | |
| "code": "def binomial_Coeff(n,k): \r\n C = [0] * (k + 1); \r\n C[0] = 1; # nC0 is 1 \r\n for i in range(1,n + 1): \r\n for j in range(min(i, k),0,-1): \r\n C[j] = C[j] + C[j - 1]; \r\n return C[k]; \r\ndef sum_Of_product(n): \r\n return binomial_Coeff(2 * n,n - 1);" | |
| } | |
| ] | |
| } | |
| } |