<commit_before>#!/usr/bin/env python
# -*- coding: latin-1 -*-

'''
'''

__docformat__ = 'restructuredtext'
__version__ = '$Id$'

import math
import random
import re
import os.path
from pyglet.window import Window
from pyglet import clock
from pyglet.window.event import *
from pyglet.ext.euclid import *
from pyglet.gl import *
import xml.dom
import xml.dom.minidom

# sample from http://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands
sample = 'M100,200 C100,100 250,100 250,200 S400,300 400,200'

class Curve:
    PATH_RE = re.compile(r'([MLHVCSQTAZ])([^MLHVCSQTAZ]+)', re.IGNORECASE)
    INT = r'([+-]?\d+)'
    FLOAT = r'(?:[\s,]*)([+-]?\d+(?:\.\d+)?)'

    HANDLERS = {}
    def handle(char, rx, types, HANDLERS=HANDLERS):
        def register(function):
            HANDLERS[char] = (rx and re.compile(rx), function, types)
            return function
        return register

    def __init__(self, spec):<commit_msg>Actually euclid isn't used ;)<commit_after>#!/usr/bin/env python
# -*- coding: latin-1 -*-

'''
'''

__docformat__ = 'restructuredtext'
__version__ = '$Id$'

import math
import random
import re
import os.path
from pyglet.window import Window
from pyglet import clock
from pyglet.window.event import *
from pyglet.gl import *
import xml.dom
import xml.dom.minidom

# sample from http://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands
sample = 'M100,200 C100,100 250,100 250,200 S400,300 400,200'

class Curve:
    PATH_RE = re.compile(r'([MLHVCSQTAZ])([^MLHVCSQTAZ]+)', re.IGNORECASE)
    INT = r'([+-]?\d+)'
    FLOAT = r'(?:[\s,]*)([+-]?\d+(?:\.\d+)?)'

    HANDLERS = {}
    def handle(char, rx, types, HANDLERS=HANDLERS):
        def register(function):
            HANDLERS[char] = (rx and re.compile(rx), function, types)
            return function
        return register

    def __init__(self, spec):
{'fraction_non_alphanumeric': 0.16414686825053995, 'fraction_numerical': 0.04103671706263499, 'mean_word_length': 3.598014888337469, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '6470354', 'n_tokens_mistral': 764, 'n_tokens_neox': 686, 'n_words': 154}