<commit_before>#!/usr/bin/python

import Axon
from Axon.Component import component
import Axon.Ipc as Ipc
#from Axon.Ipc import producerFinished, shutdownMicroprocess, newComponent

from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Util.Graphline import Graphline

from Kamaelia.Util.Console import ConsoleReader, ConsoleEchoer
from Kamaelia.Visualisation.PhysicsGraph.chunks_to_lines import chunks_to_lines
from Kamaelia.Visualisation.PhysicsGraph.lines_to_tokenlists import lines_to_tokenlists

from Kamaelia.Visualisation.Axon.PComponent import PComponent
from Kamaelia.Visualisation.Axon.PPostbox import PPostbox
from Kamaelia.Visualisation.Axon.AxonLaws import AxonLaws
from Kamaelia.Visualisation.PhysicsGraph.TopologyViewerComponent import TopologyViewerComponent

from Kamaelia.UI.Pygame.Button import Button

from Introspector import Introspector
from Sandbox import Sandbox
from NameRemapper import NameRemapper
from EditorLogic import EditorLogic
from ComponentEditor import ComponentEditor

import re

classes = [ { "module"   : "Axon.Component",
              "class"    : "component",
              "defaults" : "",
            },
            { "module"   : "Kamaelia.Util.Console",
              "class"    : "ConsoleEchoer",
              "defaults" : "forwarder = True",
            },
            { "module"   : "Kamaelia.File.Reading",
              "class"    : "RateControlledFileReader",
              "defaults" : 'filename="Sandbox.py", readmode="lines", rate=5, chunksize=1',
            },
          ]
             


class PComponent2(PComponent):
    def __init__(self, ID, position, name):
        textualname = self.parsename(name)
        super(PComponent2, self).__init__(ID=ID, position=position, name=textualname)
        self.name = name

    def parsename(self, name):
        match = re.match("^(?:[^:]*?:)??([^(]+)", name)
        return match.group(0)
        <commit_msg>Added entries to make a few more components available for playing with.<commit_after>#!/usr/bin/python

import Axon
from Axon.Component import component
import Axon.Ipc as Ipc
#from Axon.Ipc import producerFinished, shutdownMicroprocess, newComponent

from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Util.Graphline import Graphline

from Kamaelia.Util.Console import ConsoleReader, ConsoleEchoer
from Kamaelia.Visualisation.PhysicsGraph.chunks_to_lines import chunks_to_lines
from Kamaelia.Visualisation.PhysicsGraph.lines_to_tokenlists import lines_to_tokenlists

from Kamaelia.Visualisation.Axon.PComponent import PComponent
from Kamaelia.Visualisation.Axon.PPostbox import PPostbox
from Kamaelia.Visualisation.Axon.AxonLaws import AxonLaws
from Kamaelia.Visualisation.PhysicsGraph.TopologyViewerComponent import TopologyViewerComponent

from Kamaelia.UI.Pygame.Button import Button

from Introspector import Introspector
from Sandbox import Sandbox
from NameRemapper import NameRemapper
from EditorLogic import EditorLogic
from ComponentEditor import ComponentEditor

import re

classes = [ { "module"   : "Axon.Component",
              "class"    : "component",
              "defaults" : "",
            },
            { "module"   : "Kamaelia.Util.Console",
              "class"    : "ConsoleEchoer",
              "defaults" : "forwarder = True",
            },
            { "module"   : "Kamaelia.File.Reading",
              "class"    : "RateControlledFileReader",
              "defaults" : 'filename="Sandbox.py", readmode="lines", rate=5, chunksize=1',
            },
            { "module"   : "Kamaelia.SingleServer",
              "class"    : "SingleServer",
              "defaults" : "port=1601",
            },
            { "module"   : "Kamaelia.Internet.TCPClient",
              "class"    : "TCPClient",
              "defaults" : 'host="localhost", port=1601, delay=0',
            },
            { "module"   : "Kamaelia.vorbisDecodeComponent",
              "class"    : "AOAudioPlaybackAdaptor",
              "defaults" : "",
            },
            { "module"   : "Kamaelia.vorbisDecodeComponent",
              "class"    : "VorbisDecode",
              "defaults" : "",
            },
            { "module"   : "Kamaelia.Codec.Dirac",
              "class"    : "DiracDecoder",
              "defaults" : "",
            },
            { "module"   : "Kamaelia.Util.RateFilter",
              "class"    : "MessageRateLimit",
              "defaults" : "messages_per_second = 15, buffer = 30",
            },
            { "module"   : "Kamaelia.UI.Pygame.VideoOverlay",
              "class"    : "VideoOverlay",
              "defaults" : "",
            },
          ]
             


class PComponent2(PComponent):
    def __init__(self, ID, position, name):
        textualname = self.parsename(name)
        super(PComponent2, self).__init__(ID=ID, position=position, name=textualname)
        self.name = name

    def parsename(self, name):
        match = re.match("^(?:[^:]*?:)??([^(]+)", name)
        return match.group(0)
        
{'fraction_non_alphanumeric': 0.10834990059642147, 'fraction_numerical': 0.0045725646123260435, 'mean_word_length': 2.6142241379310347, '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': '3607534', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1452, 'n_words': 304}