<commit_before>from demosys import resources
from pyrr import matrix44, Matrix33, Matrix44, Vector3


def bind_target(func):
    """
    Decorator auto binding and releasing the incoming FBO in ``draw()``.

    literal blocks::

       @bind_target
        def draw(...):
            # draw stuff
    """
    def func_wrapper(*args, **kwargs):
        args[3].bind()
        func(*args, **kwargs)
        args[3].release()
    return func_wrapper


class Effect:
    """Effect base class.

    The following attributes are injected by demosys before initialization:

    * window_width (int): Window width in pixels
    * window_height (int): Window height in pixels
    * window_aspect (float): Aspect ratio of the resolution
    * sys_camera (demosys.scene.camera.Camera): The system camera responding to inputs
    """
    # Window properties set by controller on initialization
    name = ""
    window_width = 0
    window_height = 0
    window_aspect = 0
    sys_camera = None

    # Methods to override
    def draw(self, time, frametime, target):
        """Draw function called by the system every frame.

        :param time: The current time in seconds (float)
        :param frametime: The number of milliseconds the frame is expected to take
        :param target: The target FBO for the effect
        """
        raise NotImplemented<commit_msg>Raise NotImplementedError when draw is not overridden<commit_after>from demosys import resources
from pyrr import matrix44, Matrix33, Matrix44, Vector3


def bind_target(func):
    """
    Decorator auto binding and releasing the incoming FBO in ``draw()``.

    literal blocks::

       @bind_target
        def draw(...):
            # draw stuff
    """
    def func_wrapper(*args, **kwargs):
        args[3].bind()
        func(*args, **kwargs)
        args[3].release()
    return func_wrapper


class Effect:
    """Effect base class.

    The following attributes are injected by demosys before initialization:

    * window_width (int): Window width in pixels
    * window_height (int): Window height in pixels
    * window_aspect (float): Aspect ratio of the resolution
    * sys_camera (demosys.scene.camera.Camera): The system camera responding to inputs
    """
    # Window properties set by controller on initialization
    name = ""
    window_width = 0
    window_height = 0
    window_aspect = 0
    sys_camera = None

    # Methods to override
    def draw(self, time, frametime, target):
        """Draw function called by the system every frame.

        :param time: The current time in seconds (float)
        :param frametime: The number of milliseconds the frame is expected to take
        :param target: The target FBO for the effect
        """
        raise NotImplementedError("draw() is not implemented")
{'fraction_non_alphanumeric': 0.08303507516105942, 'fraction_numerical': 0.008589835361488905, 'mean_word_length': 2.8079019073569484, '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': '483702', 'n_tokens_mistral': 761, 'n_tokens_neox': 725, 'n_words': 292}