<commit_before>from collections import deque
import datetime

class Balancer(object):
    '''
    Controls witch server is active for a playlist (m3u8)
    '''
    NOT_MODIFIED_TOLERANCE = 8 # in seconds

    def update(self, paths):
        '''
        ``paths`` is a dict returned from ``discover.discover()``
        '''
        self.paths = {}
        self.modified_at = {}
        for path, servers in paths.items():
            self.paths[path] = deque(servers)

    def notify_modified(self, server, path):
        '''
        Remembers that a given server returned a new playlist
        '''
        self.modified_at[path] = self._now()

    def notify_error(self, server, path):<commit_msg>balancer.py: Fix typo of `which` word<commit_after>from collections import deque
import datetime

class Balancer(object):
    '''
    Controls which server is active for a playlist (m3u8)
    '''
    NOT_MODIFIED_TOLERANCE = 8 # in seconds

    def update(self, paths):
        '''
        ``paths`` is a dict returned from ``discover.discover()``
        '''
        self.paths = {}
        self.modified_at = {}
        for path, servers in paths.items():
            self.paths[path] = deque(servers)

    def notify_modified(self, server, path):
        '''
        Remembers that a given server returned a new playlist
        '''
        self.modified_at[path] = self._now()

    def notify_error(self, server, path):
{'fraction_non_alphanumeric': 0.11392405063291139, 'fraction_numerical': 0.004219409282700422, 'mean_word_length': 2.4455205811138017, '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': '1739114', 'n_tokens_mistral': 421, 'n_tokens_neox': 412, 'n_words': 122}