Download wheels/mast3r/utils/misc.py from virtualbot123421/ReconViaGen: direct link, hf CLI and curl.
- Browser
- Download file 464 Bytes
-
https://huggingface.co/spaces/virtualbot123421/ReconViaGen/resolve/main/wheels/mast3r/utils/misc.py
- Command line
-
hf download hf://spaces/virtualbot123421/ReconViaGen/wheels/mast3r/utils/misc.py
-
curl -L -o misc.py https://huggingface.co/spaces/virtualbot123421/ReconViaGen/resolve/main/wheels/mast3r/utils/misc.py
464 Bytes
| # Copyright (C) 2024-present Naver Corporation. All rights reserved. | |
| # Licensed under CC BY-NC-SA 4.0 (non-commercial use only). | |
| # | |
| # -------------------------------------------------------- | |
| # utilitary functions for MASt3R | |
| # -------------------------------------------------------- | |
| import os | |
| import hashlib | |
| def mkdir_for(f): | |
| os.makedirs(os.path.dirname(f), exist_ok=True) | |
| return f | |
| def hash_md5(s): | |
| return hashlib.md5(s.encode('utf-8')).hexdigest() | |