Skip to content

Instantly share code, notes, and snippets.

View jjmaestro's full-sized avatar
🧙‍♂️

Javier Maestro jjmaestro

🧙‍♂️
View GitHub Profile
@jjmaestro
jjmaestro / whisper-calculator.py
Last active January 25, 2025 05:11
whisper-calculator.py: Calculates the size of the whisper storage for the given retention (in frequency:history format)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def archive_to_bytes(archive):
def to_seconds(s):
SECONDS_IN_A = {
's': 1,
'm': 1 * 60,
'h': 1 * 60 * 60,