Download data2/step22/find_none_score_func.py from SciCode/dataset-builder: direct link, hf CLI and curl.
- Browser
- Download file 430 Bytes
-
https://huggingface.co/SciCode/dataset-builder/resolve/main/data2/step22/find_none_score_func.py
- Command line
-
hf download hf://SciCode/dataset-builder/data2/step22/find_none_score_func.py
-
curl -L -o find_none_score_func.py https://huggingface.co/SciCode/dataset-builder/resolve/main/data2/step22/find_none_score_func.py
430 Bytes
| import os | |
| import jsonlines | |
| dir = '/home/weifengsun/tangou1/step2/step22/dataset' | |
| subdirs = sorted([d for d in os.listdir(dir)]) | |
| for subdir in subdirs: | |
| json_path = os.path.join(dir, subdir, 'functions.jsonl') | |
| if os.path.exists(json_path): | |
| with jsonlines.open(json_path) as reader: | |
| for obj in reader: | |
| if 'score' not in obj: | |
| print(subdir) | |
| break | |