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