This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.14" | |
| # dependencies = [ | |
| # "schedule", | |
| # "rich", | |
| # "requests", | |
| # ] | |
| # /// | |
| import schedule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "requests", | |
| # "numpy", | |
| # "rich" | |
| # ] | |
| # /// | |
| import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from typing import Callable | |
| def memo(f: Callable) -> Callable: | |
| cache = {} | |
| def wrapper(*args, **kwargs): | |
| if len(args) == 0 or not isinstance(args[0], int): | |
| raise ValueError() |