Spaces:
Runtime error
Runtime error
Download utils.py from fathyshalab/nemointent: direct link, hf CLI and curl.
- Browser
- Download file 295 Bytes
-
https://huggingface.co/spaces/fathyshalab/nemointent/resolve/main/utils.py
- Command line
-
hf download hf://spaces/fathyshalab/nemointent/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/fathyshalab/nemointent/resolve/main/utils.py
295 Bytes
| import time | |
| def measure_time(f): | |
| def timed(*args, **kw): | |
| ts = time.time() | |
| result = f(*args, **kw) | |
| te = time.time() | |
| print('%r (%r, %r) %2.2f sec' % \ | |
| (f.__name__, args, kw, te-ts)) | |
| return result | |
| return timed | |