<commit_before>
class Observable(object):

    def __init__(self, **kwargs):
        super(Observable, self).__init__(**kwargs)
        self.observers = set()

    def notify_observers(self):
        for observer in self.observers:
            observer.notify(self)


class IterObservable(Observable):
    """Observable that auto-notifies observers if indexed assignment is performed on it."""

    def __setitem__(self, key, value):<commit_msg>Notifies observers upon creation--important when changing the rotation type in the Physical class.<commit_after>
class Observable(object):

    def __init__(self, **kwargs):
        super(Observable, self).__init__(**kwargs)
        self.observers = set()
        self.notify_observers()

    def notify_observers(self):
        for observer in self.observers:
            observer.notify(self)


class IterObservable(Observable):
    """Observable that auto-notifies observers if indexed assignment is performed on it."""

    def __setitem__(self, key, value):
{'fraction_non_alphanumeric': 0.1012909632571996, 'fraction_numerical': 0.0, 'mean_word_length': 3.581818181818182, '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': '1522660', 'n_tokens_mistral': 276, 'n_tokens_neox': 269, 'n_words': 80}