Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /DiamondLightSource_python-murfey /src /murfey /client /gain_ref.py
| from __future__ import annotations | |
| from pathlib import Path | |
| def determine_gain_ref(gain_ref_dir: Path) -> Path: | |
| candidates = list(gain_ref_dir.glob("**/*")) | |
| candidates = sorted(candidates, key=lambda x: x.stat().st_mtime, reverse=True) | |
| viable_candidates = candidates[:3] | |
| viable_candidates = sorted( | |
| viable_candidates, key=lambda x: x.stat().st_size, reverse=True | |
| ) | |
| if viable_candidates: | |
| return viable_candidates[0] | |
| raise RuntimeError(f"Cannot identify a gain reference candidate in {gain_ref_dir}") | |
Xet Storage Details
- Size:
- 546 Bytes
- Xet hash:
- ec8996c21562d5975882b8ac0007207d3030233af2aeff6cfde062d68e4ef3d7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.