시나리오 내용 반영

This commit is contained in:
KIM SU BO committed 2026-10-08 16:43:48 +09:00
1 parent d9287de729
commit 350bb92bf9
270 files changed
+198867

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import json
import ast
for path in ['uploads/OPS01/OPS01.ipynb', 'uploads/OPS01/OPS01_student.ipynb']:
with open(path, encoding='utf-8') as f:
nb = json.load(f)
print("Checking:", path)
print(" Cells count:", len(nb["cells"]))
code_cells = 0
md_cells = 0
for i, cell in enumerate(nb['cells']):
if cell['cell_type'] == 'code':
code_cells += 1
code_src = ''.join(cell['source'])
try:
ast.parse(code_src)
except SyntaxError as e:
print(f" [ERROR] Syntax error in cell {i}: {e}")
elif cell['cell_type'] == 'markdown':
md_cells += 1
print(f" Passed! (Code cells: {code_cells}, Markdown cells: {md_cells})")