<commit_before>#!/usr/bin/env python

from redis import StrictRedis
import config
import bbs


def main(r):
    pass


if __name__ == '__main__':
    r = StrictRedis(host='localhost', port=6379, db=1)
    main(r)<commit_msg>Add thread purge executable.<commit_after>#!/usr/bin/env python

from redis import StrictRedis
import config
import bbs


def main(r):
    for board in config.BOARDS.keys():
        for thread_id in bbs.get_stale_threads(r, board):
            bbs.purge_thread(r, board, thread_id)


if __name__ == '__main__':
    r = StrictRedis(host='localhost', port=6379, db=1)
    main(r)
{'fraction_non_alphanumeric': 0.11980033277870217, 'fraction_numerical': 0.016638935108153077, 'mean_word_length': 3.8548387096774195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6911019', 'n_tokens_mistral': 231, 'n_tokens_neox': 217, 'n_words': 55}