Save a single result to the results file.
(filename: str, result: Dict)
| 460 | return [] |
| 461 | |
| 462 | def save_result(filename: str, result: Dict): |
| 463 | """Save a single result to the results file.""" |
| 464 | results = load_existing_results(filename) |
| 465 | results.append(result) |
| 466 | with open(filename, 'w') as f: |
| 467 | json.dump(results, f, indent=2) |
| 468 | |
| 469 | def get_last_processed_index(results: List[Dict]) -> int: |
| 470 | """Get the index of the last processed problem.""" |
no test coverage detected