Download shellops_pro/assets/ShellOps_0b796d26f8/init/src/db/handler.py from Hoyant-Su/ShellOps: direct link, hf CLI and curl.
- Browser
- Download file 204 Bytes
-
https://huggingface.co/datasets/Hoyant-Su/ShellOps/resolve/main/shellops_pro/assets/ShellOps_0b796d26f8/init/src/db/handler.py
- Command line
-
hf download hf://datasets/Hoyant-Su/ShellOps/shellops_pro/assets/ShellOps_0b796d26f8/init/src/db/handler.py
-
curl -L -o handler.py https://huggingface.co/datasets/Hoyant-Su/ShellOps/resolve/main/shellops_pro/assets/ShellOps_0b796d26f8/init/src/db/handler.py
204 Bytes
| def handler_func(x): | |
| if x > 0: | |
| return x * 2 | |
| return -x | |
| class Handler: | |
| def __init__(self): | |
| self.count = 0 | |
| def step(self): | |
| self.count += 1 | |
| return self.count | |