<commit_before>#!/usr/bin/env python
# vim:expandtab:smarttab
#A thread that allows us to process files
import sys, os

# processing module changes names in 2.6 (FUTURE READY!!!)
try:
    import multiprocessing as mp
except ImportError:
    import processing as mp

import time
from amqplib import client_0_8 as amqp
from configuration import *
import logging

#The different handlers
from actions import *

class FileProcessor(object):

    def __init__(self):
        self.running = 1

        self._connection = amqp.Connection(
                host = "localhost:5672",
                userid = "guest",
                password = "<PASSWORD>",
                virtual_host = "/",
                insist = False)
        self._channel = self._connection.channel()
        self._channel.exchange_declare(
                exchange = config['exchange'],
                type = "direct",
                durable = True,
                auto_delete = False)

        self.children = [] # child processes to monitor
        self.handlers = [
            Hasher(),
            PuidGenerator(),
            TagGetter(),
            TagSaver(),<commit_msg>Take out tagshelf for the time being as it has stopped working<commit_after>#!/usr/bin/env python
# vim:expandtab:smarttab
#A thread that allows us to process files
import sys, os

# processing module changes names in 2.6 (FUTURE READY!!!)
try:
    import multiprocessing as mp
except ImportError:
    import processing as mp

import time
from amqplib import client_0_8 as amqp
from configuration import *
import logging

#The different handlers
from actions import *

class FileProcessor(object):

    def __init__(self):
        self.running = 1

        self._connection = amqp.Connection(
                host = "localhost:5672",
                userid = "guest",
                password = "<PASSWORD>",
                virtual_host = "/",
                insist = False)
        self._channel = self._connection.channel()
        self._channel.exchange_declare(
                exchange = config['exchange'],
                type = "direct",
                durable = True,
                auto_delete = False)

        self.children = [] # child processes to monitor
        self.handlers = [
            Hasher(),
            PuidGenerator(),
            TagGetter(),
            #TagSaver(), # Need to come up with a better way of doing this.
{'fraction_non_alphanumeric': 0.08621407746772178, 'fraction_numerical': 0.007496876301541024, 'mean_word_length': 2.0213836477987424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '907800', 'n_tokens_mistral': 648, 'n_tokens_neox': 610, 'n_words': 201}