<commit_before>"""Undocumented Module"""

__all__ = ['BufferViewer']

from pandac.PandaModules import *
from direct.task import Task
from direct.directnotify.DirectNotifyGlobal import *
from direct.showbase.DirectObject import DirectObject
import math

class BufferViewer(DirectObject):
    notify = directNotify.newCategory('BufferViewer')

    def __init__(self):
        """Access: private.  Constructor."""
        self.enabled = 0
        self.sizex = 0
        self.sizey = 0
        self.position = "lrcorner"
        self.layout = "hline"
        self.include = "all"
        self.exclude = "none"
        self.cullbin = "fixed"
        self.cullsort = 10000
        self.renderParent = render2d
        self.cards = []
        self.cardindex = 0
        self.cardmaker = CardMaker("cubemaker")
        self.cardmaker.setFrame(-1,1,-1,1)
        self.task = 0
        self.window = 0
        self.dirty = 1
        self.accept("render-texture-targets-changed", self.refreshReadout)
        if (ConfigVariableBool("show-buffers", 0).getValue()):
            self.enable(1)

    def refreshReadout(self):
        """Force the readout to be refreshed.  This is usually invoked
        by GraphicsOutput::add_render_texture (via an event handler).
        However, it is also possible to invoke it manually.  Currently,
        the only time I know of that this is necessary is after a<commit_msg>some config vars to control buffer viewer<commit_after>"""Undocumented Module"""

__all__ = ['BufferViewer']

from pandac.PandaModules import *
from direct.task import Task
from direct.directnotify.DirectNotifyGlobal import *
from direct.showbase.DirectObject import DirectObject
import math

class BufferViewer(DirectObject):
    notify = directNotify.newCategory('BufferViewer')

    def __init__(self):
        """Access: private.  Constructor."""
        self.enabled = 0
        size = ConfigVariableInt('buffer-viewer-size', '0 0')
        self.sizex = size[0]
        self.sizey = size[1]
        self.position = ConfigVariableString('buffer-viewer-position', "lrcorner").getValue()
        self.layout = ConfigVariableString('buffer-viewer-layout', "hline").getValue()
        self.include = "all"
        self.exclude = "none"
        self.cullbin = "fixed"
        self.cullsort = 10000
        self.renderParent = render2d
        self.cards = []
        self.cardindex = 0
        self.cardmaker = CardMaker("cubemaker")
        self.cardmaker.setFrame(-1,1,-1,1)
        self.task = 0
        self.window = 0
        self.dirty = 1
        self.accept("render-texture-targets-changed", self.refreshReadout)
        if (ConfigVariableBool("show-buffers", 0).getValue()):
            self.enable(1)

    def refreshReadout(self):
        """Force the readout to be refreshed.  This is usually invoked
        by GraphicsOutput::add_render_texture (via an event handler).
        However, it is also possible to invoke it manually.  Currently,
        the only time I know of that this is necessary is after a
{'fraction_non_alphanumeric': 0.10397350993377484, 'fraction_numerical': 0.013245033112582781, 'mean_word_length': 2.711302211302211, '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': '5507202', 'n_tokens_mistral': 884, 'n_tokens_neox': 843, 'n_words': 227}