Make this rate limiter testable without a single sleep. Save /workspace/ratelimit.py: import time class…
Make this rate limiter testable without a single sleep. Save /workspace/ratelimit.py: import time class…: a task in traj2envs-rl: RL tasks generated with traj2envs (Harbor dataset). class SlidingWindowLimiter: def init (self, max requests, window seconds, clock=time.monotonic): ... def allow(self)…
The task
class SlidingWindowLimiter: def __init__(self, max_requests, window_seconds, clock=time.monotonic): ... def allow(self) -> bool: ... ```
Part of harness-hub/traj2envs-rl.