<commit_before>#!/usr/bin/python2.5
# -*- coding: utf-8 -*-
"""
 gettor_config.py - Parse configuration file for gettor

 Copyright (c) 2008, <NAME> <<EMAIL>>, 
                     <NAME> <<EMAIL>>

 This is Free Software. See LICENSE for license information.

 This library implements all of the email replying features needed for gettor. 
"""

import os
import smtplib
import MimeWriter
import mimetools
import cStringIO
import base64
import gettext
import re
import sys

import gettor.gtlog
import gettor.blacklist



__all__ = ["Response"]

log = gettor.gtlog.getLogger()

trans = None

def sendNotification(config, sendTo):
    """Send notification to user"""
    response = Response(config, sendTo, None, "", False, True, "")
    message = gettor.constants.mailfailmsg
    return response.sendGenericMessage(message)

class Response:

    def __init__(self, config, replyto, lang, package, split, signature, caddr):
        self.config = config
        self.srcEmail = "GetTor <<EMAIL>>"
        self.replyTo = replyto
        assert self.replyTo is not None, "Empty reply address."
        # Default lang is en
        if lang is None:
            lang = "en"
        self.mailLang = lang
        self.package = package
        self.splitsend = split
        self.signature = signature
        self.cmdAddr = caddr
        # If cmdAddr is set, we are forwarding mail rather than sending a 
        # reply to someone
        if self.cmdAddr is not None:<commit_msg>Add some missing bits from the previous commit<commit_after>#!/usr/bin/python2.5
# -*- coding: utf-8 -*-
"""
 gettor_config.py - Parse configuration file for gettor

 Copyright (c) 2008, <NAME> <<EMAIL>>, 
                     <NAME> <<EMAIL>>

 This is Free Software. See LICENSE for license information.

 This library implements all of the email replying features needed for gettor. 
"""

import os
import smtplib
import MimeWriter
import mimetools
import cStringIO
import base64
import gettext
import re
import sys

import gettor.gtlog
import gettor.blacklist



__all__ = ["Response"]

log = gettor.gtlog.getLogger()

trans = None

def sendNotification(config, sendFr, sendTo):
    """Send notification to user"""
    response = Response(config, sendFr, sendTo, None, "", False, True, "")
    message = gettor.constants.mailfailmsg
    return response.sendGenericMessage(message)

class Response:

    def __init__(self, config, sendFr, replyto, lang, package, split, signature, caddr):
        self.config = config
        if sendFr is None:
            self.srcEmail = "GetTor <<EMAIL>>"
        else:
            self.srcEmail = sendFr
        self.replyTo = replyto
        assert self.replyTo is not None, "Empty reply address."
        # Default lang is en
        if lang is None:
            lang = "en"
        self.mailLang = lang
        self.package = package
        self.splitsend = split
        self.signature = signature
        self.cmdAddr = caddr
        # If cmdAddr is set, we are forwarding mail rather than sending a 
        # reply to someone
        if self.cmdAddr is not None:
{'fraction_non_alphanumeric': 0.08984755108660396, 'fraction_numerical': 0.005838469023678235, 'mean_word_length': 2.7156626506024097, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '5795881', 'n_tokens_mistral': 890, 'n_tokens_neox': 861, 'n_words': 312}