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
| #!/usr/bin/env python3 | |
| """ | |
| Continuously sends a prompt to the `claude` CLI, stores the streamed JSON | |
| responses to a file, and respects any reported rate-limit reset | |
| time by sleeping until the limit expires. The script mirrors the tool’s output | |
| both to stdout and to the JSON log file so existing log-processing workflows | |
| continue to work. | |
| """ | |
| import json |
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
| #!/usr/bin/env runhaskell | |
| -- Single and double pipe operators are taken, so use triple-pipe :) | |
| infixl 9 ||| | |
| (|||) :: a -> (a -> b) -> b | |
| x ||| f = f x | |
| len = fromIntegral . length | |
| mean xs = sum xs / len xs |