from tqdm import tqdm import json f = open("/home/aiscuser/fhw/data/all_instruct_with_tasks.json", "r+") lines = f.readlines() a , b, c, d, e, f, g = 0, 0, 0, 0, 0, 0, 0 for line in tqdm(lines): dd = json.loads(line) text = dd["task"] if "Code Transpile" in text: g+=1 continue if "Code Debugging" in text: b +=1 continue if "Code Optimization" in text: c +=1 continue if "Code Reasoning" in text: d +=1 continue if "Code Analysis" in text: e +=1 continue if "Code Generation" in text: a +=1 continue if "Theoretical Explanation" in text: f +=1 continue print({"Code Generation": a, "Code Debugging": b, "Code Optimization": c, "Code Reasoning": d, "Code Analysis": e, "Theoretical Explanation": f, "Code Transpile": g})