Download task_015/environment/code/example/example.py from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 304 Bytes
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_015/environment/code/example/example.py
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_015/environment/code/example/example.py
-
curl -L -o example.py https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_015/environment/code/example/example.py
304 Bytes
| from pycron import CronScheduler | |
| if __name__ == "__main__": | |
| scheduler = CronScheduler() | |
| counter = {"count": 0} | |
| scheduler.add_interval_job(0.05, lambda: counter.__setitem__("count", counter["count"] + 1)) | |
| scheduler.start() | |
| scheduler.stop() | |
| print(f"executions={counter['count']}") | |