<commit_before>
from kivy.properties import NumericProperty
from kivy.core.window import Window
from kivy.event import EventDispatcher

class Scale(EventDispatcher):
    dp = NumericProperty(1.0)

    def __init__(self):
        Window.bind(height=self.set_height)

    def set_height(self, provider, height):
        self.dp = height / 720.0

MyScale = Scale()
<commit_msg>Ignore apparently harmless ReferenceErrors<commit_after>
from kivy.properties import NumericProperty
from kivy.core.window import Window
from kivy.event import EventDispatcher

class Scale(EventDispatcher):
    dp = NumericProperty(1.0)

    def __init__(self):
        Window.bind(height=self.set_height)

    def set_height(self, provider, height):
        try:
            self.dp = height / 720.0
        except ReferenceError, e:
            # Not sure what is causing this, but it seems ok to just ignore it.
            pass

MyScale = Scale()

{'fraction_non_alphanumeric': 0.08, 'fraction_numerical': 0.012972972972972972, 'mean_word_length': 3.228310502283105, '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': '6301485', 'n_tokens_mistral': 286, 'n_tokens_neox': 266, 'n_words': 80}