<commit_before># We expose many Processing-related names as builtins, so that no imports
# are necessary, even in auxilliary modules.
import __builtin__
import os.path

from numbers import Number

# Bring all of the core Processing classes by name into the builtin namespace.
from processing.core import PApplet
__builtin__.PApplet = PApplet

from processing.core import PConstants
__builtin__.PConstants = PConstants

from processing.core import PFont
__builtin__.PFont = PFont

from processing.core import PGraphics
__builtin__.PGraphics = PGraphics

from processing.core import PGraphicsJava2D
__builtin__.PGraphicsJava2D = PGraphicsJava2D

from processing.core import PGraphicsRetina2D
__builtin__.PGraphicsRetina2D = PGraphicsRetina2D

from processing.core import PImage
__builtin__.PImage = PImage

from processing.core import PMatrix
__builtin__.PMatrix = PMatrix

from processing.core import PMatrix2D
__builtin__.PMatrix2D = PMatrix2D

from processing.core import PMatrix3D
__builtin__.PMatrix3D = PMatrix3D

from processing.core import PShape
__builtin__.PShape = PShape

from processing.core import PShapeOBJ
__builtin__.PShapeOBJ = PShapeOBJ

from processing.core import PShapeSVG
__builtin__.PShapeSVG = PShapeSVG

from processing.core import PStyle
__builtin__.PStyle = PStyle

from processing.opengl import FontTexture
__builtin__.FontTexture = FontTexture

from processing.opengl import FrameBuffer
__builtin__.FrameBuffer = FrameBuffer

from processing.opengl import LinePath
__builtin__.LinePath = LinePath

from processing.opengl import LineStroker
__builtin__.LineStroker = LineStroker

from processing.opengl import PGL
__builtin__.PGL = PGL

from processing.opengl import PGraphics2D
__builtin__.PGraphics2D = PGraphics2D

from processing.opengl import PGraphics3D
__builtin__.PGraphics3D = PGraphics3D

from processing.opengl import PGraphicsOpenGL
__builtin__.PGraphicsOpenGL = PGraphicsOpenGL

from processing.opengl import PJOGL
__builtin__.PJOGL = PJOGL

from processing.opengl import PShader
__builtin__.PShader = PShader

from processing.opengl import PShapeOpenGL
__builtin__.PShapeOpenGL = PShapeOpenGL

from processing.opengl import Texture
__builtin__.Texture = Texture

from processing.data import Table
__builtin__.Table = Table

# PVector requires special handling, because it exposes the same method names
# as static methods and instance methods.
from processing.core import PVector as __pvector__
class PVector(__pvector__):
    def __instance_add__(self, *args):
        if len(args) == 1:
            v = args[0]
            self.x += v.x
            self.y += v.y
            self.z += v.z
        else:
            self.x += args[0]
            self.y += args[1]
            self.z += args[2]
        
    def __instance_sub__(self, *args):
        if len(args) == 1:
            return PVector.sub(self, args[0], self)
        else:
            return PVector.sub(self, PVector(*args), self)

    def __instance_mult__(self, o):
        PVector.mult(self, o, self)

    def __instance_div__(self, f):
        PVector.div(self, f, self)

    def __instance_cross__(self, o):
        return PVector.cross(self, o, self)

    def __instance_dist__(self, o):
        return PVector.dist(self, o)

    def __instance_dot__(self, *args):
        if len(args) == 1:
            v = args[0]
            return self.x * v.x + self.y * v.y + self.z * v.z
        return self.x * args[0] + self.y * args[1] + self.z * args[2]

    def __init__(self, x=0, y=0, z=0):
        __pvector__.__init__(self, x, y, z)
        self.add = self.__instance_add__
        self.sub = self.__instance_sub__
        self.mult = self.__instance_mult__
        self.div = self.__instance_div__
        self.cross = self.__instance_cross__
        self.dist = self.__instance_dist__<commit_msg>Do PVector.sub in Python to save some garbage.<commit_after># We expose many Processing-related names as builtins, so that no imports
# are necessary, even in auxilliary modules.
import __builtin__
import os.path

from numbers import Number

# Bring all of the core Processing classes by name into the builtin namespace.
from processing.core import PApplet
__builtin__.PApplet = PApplet

from processing.core import PConstants
__builtin__.PConstants = PConstants

from processing.core import PFont
__builtin__.PFont = PFont

from processing.core import PGraphics
__builtin__.PGraphics = PGraphics

from processing.core import PGraphicsJava2D
__builtin__.PGraphicsJava2D = PGraphicsJava2D

from processing.core import PGraphicsRetina2D
__builtin__.PGraphicsRetina2D = PGraphicsRetina2D

from processing.core import PImage
__builtin__.PImage = PImage

from processing.core import PMatrix
__builtin__.PMatrix = PMatrix

from processing.core import PMatrix2D
__builtin__.PMatrix2D = PMatrix2D

from processing.core import PMatrix3D
__builtin__.PMatrix3D = PMatrix3D

from processing.core import PShape
__builtin__.PShape = PShape

from processing.core import PShapeOBJ
__builtin__.PShapeOBJ = PShapeOBJ

from processing.core import PShapeSVG
__builtin__.PShapeSVG = PShapeSVG

from processing.core import PStyle
__builtin__.PStyle = PStyle

from processing.opengl import FontTexture
__builtin__.FontTexture = FontTexture

from processing.opengl import FrameBuffer
__builtin__.FrameBuffer = FrameBuffer

from processing.opengl import LinePath
__builtin__.LinePath = LinePath

from processing.opengl import LineStroker
__builtin__.LineStroker = LineStroker

from processing.opengl import PGL
__builtin__.PGL = PGL

from processing.opengl import PGraphics2D
__builtin__.PGraphics2D = PGraphics2D

from processing.opengl import PGraphics3D
__builtin__.PGraphics3D = PGraphics3D

from processing.opengl import PGraphicsOpenGL
__builtin__.PGraphicsOpenGL = PGraphicsOpenGL

from processing.opengl import PJOGL
__builtin__.PJOGL = PJOGL

from processing.opengl import PShader
__builtin__.PShader = PShader

from processing.opengl import PShapeOpenGL
__builtin__.PShapeOpenGL = PShapeOpenGL

from processing.opengl import Texture
__builtin__.Texture = Texture

from processing.data import Table
__builtin__.Table = Table

# PVector requires special handling, because it exposes the same method names
# as static methods and instance methods.
from processing.core import PVector as __pvector__
class PVector(__pvector__):
    def __instance_add__(self, *args):
        if len(args) == 1:
            v = args[0]
            self.x += v.x
            self.y += v.y
            self.z += v.z
        else:
            self.x += args[0]
            self.y += args[1]
            self.z += args[2]
        
    def __instance_sub__(self, *args):
        if len(args) == 1:
            v = args[0]
            self.x -= v.x
            self.y -= v.y
            self.z -= v.z
        else:
            self.x -= args[0]
            self.y -= args[1]
            self.z -= args[2]

    def __instance_mult__(self, o):
        PVector.mult(self, o, self)

    def __instance_div__(self, f):
        PVector.div(self, f, self)

    def __instance_cross__(self, o):
        return PVector.cross(self, o, self)

    def __instance_dist__(self, o):
        return PVector.dist(self, o)

    def __instance_dot__(self, *args):
        if len(args) == 1:
            v = args[0]
            return self.x * v.x + self.y * v.y + self.z * v.z
        return self.x * args[0] + self.y * args[1] + self.z * args[2]

    def __init__(self, x=0, y=0, z=0):
        __pvector__.__init__(self, x, y, z)
        self.add = self.__instance_add__
        self.sub = self.__instance_sub__
        self.mult = self.__instance_mult__
        self.div = self.__instance_div__
        self.cross = self.__instance_cross__
        self.dist = self.__instance_dist__
{'fraction_non_alphanumeric': 0.07309184993531695, 'fraction_numerical': 0.008926261319534282, 'mean_word_length': 3.412671232876712, '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': '5423655', 'n_tokens_mistral': 2373, 'n_tokens_neox': 2408, 'n_words': 672}