<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#  SQLMapper.py
#  PythonSQLMapper
#
#  Copyright 2013-2017 <NAME>. All rights reserved.
#  Written by <NAME> <<EMAIL>>.
#

import re


class MappingError(Exception):

    def __init__(self, message, cause=None):
        self.message = message
        self.cause = cause

    def __str__(self):
        if self.cause is None:
            return str(self.message)
        else:
            return '{0} {1}'.format(str(self.message), str(self.cause))


class DriverWarning(MappingError):

    def __init__(self, cause):
        super(DriverWarning, self).__init__('Driver warning occurred.', cause=cause)


class DriverError(MappingError):

    def __init__(self, cause):
        super(DriverError, self).__init__('Driver error occurred.', cause=cause)


class Result(object):
    pass


class Mapper(object):
<commit_msg>Fix PicklingError at Celery<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#  SQLMapper.py
#  PythonSQLMapper
#
#  Copyright 2013-2017 <NAME>. All rights reserved.
#  Written by <NAME> <<EMAIL>>.
#

import re


class MappingError(Exception):

    def __init__(self, message, cause=None):
        super(MappingError, self).__init__(message, cause)
        self.message = message
        self.cause = cause

    def __str__(self):
        if self.cause is None:
            return str(self.message)
        else:
            return '{0} {1}'.format(str(self.message), str(self.cause))


class DriverWarning(MappingError):

    def __init__(self, cause):
        super(DriverWarning, self).__init__('Driver warning occurred.', cause=cause)


class DriverError(MappingError):

    def __init__(self, cause):
        super(DriverError, self).__init__('Driver error occurred.', cause=cause)


class Result(object):
    pass


class Mapper(object):

{'fraction_non_alphanumeric': 0.13104948341489941, 'fraction_numerical': 0.011963023382272975, 'mean_word_length': 3.16289592760181, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1487408', 'n_tokens_mistral': 599, 'n_tokens_neox': 552, 'n_words': 138}