<commit_before>#!/usr/bin/env python

"""
bearlib

:copyright: (c) 2012 by <NAME>
:license: BSD, see LICENSE for more details.

"""

VERSION = (0, 5, 0, "alpha")

__author__    = 'bear (<NAME>)'
__contact__   = '<EMAIL>'
__copyright__ = 'Copyright 2012, Mike Taylor'
__license__   = 'BSD 2-Clause'
__site__      = 'https://github.com/bear/bearlib'
__version__   = u'.'.join(map(str, VERSION[0:3])) + u''.join(VERSION[3:])

import os
import os.path
import sys
import json
import types
import logging

from optparse import OptionParser

_ourPath = os.getcwd()
_ourName = os.path.splitext(os.path.basename(sys.argv[0]))[0]
log      = logging.getLogger(_ourName)

def bLogs(logger, echo=True, chatty=False, debug=False, loglevel=logging.INFO, logpath=None, logname=None, fileHandler=None):
    """ Initialize logging
    """
    if logpath is not None:
        if logname is None:
            logname = _ourName

        if fileHandler is None:
            _handler      = logging.FileHandler(os.path.join(logpath, logname))<commit_msg>bumped version to 0.5.1<commit_after>#!/usr/bin/env python

"""
bearlib

:copyright: (c) 2012 by <NAME>
:license: BSD, see LICENSE for more details.

"""

VERSION = (0, 5, 1, "alpha")

__author__    = 'bear (<NAME>)'
__contact__   = '<EMAIL>'
__copyright__ = 'Copyright 2012, Mike Taylor'
__license__   = 'BSD 2-Clause'
__site__      = 'https://github.com/bear/bearlib'
__version__   = u'.'.join(map(str, VERSION[0:3])) + u''.join(VERSION[3:])

import os
import os.path
import sys
import json
import types
import logging

from optparse import OptionParser

_ourPath = os.getcwd()
_ourName = os.path.splitext(os.path.basename(sys.argv[0]))[0]
log      = logging.getLogger(_ourName)

def bLogs(logger, echo=True, chatty=False, debug=False, loglevel=logging.INFO, logpath=None, logname=None, fileHandler=None):
    """ Initialize logging
    """
    if logpath is not None:
        if logname is None:
            logname = _ourName

        if fileHandler is None:
            _handler      = logging.FileHandler(os.path.join(logpath, logname))
{'fraction_non_alphanumeric': 0.13886210221793635, 'fraction_numerical': 0.017839922854387655, 'mean_word_length': 3.715909090909091, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '1026186', 'n_tokens_mistral': 746, 'n_tokens_neox': 718, 'n_words': 182}