<commit_before>
import sys
import os
import ConfigParser

_Config = ConfigParser.RawConfigParser()
_Args = { }

def _init():
    """
    Parse an initalize the Config object
    """
    mod = sys.modules[__name__]

    if os.environ.get("PLOW_CFG"):
        _Config.read([os.environ["PLOW_CFG"]])
    else:
        _Config.read([
            os.path.join(os.environ.get("PLOW_ROOT", "/usr/local"), "etc/plow/plow.cfg"),
            os.path.expanduser("~/.plow/plow.cfg")])

    host_list = [h.strip() for h in get('plow', 'hosts').strip(',').split(',')]
    setattr(mod, 'PLOW_HOSTS', host_list or ["localhost:11336"])


def get(section, key, default=None):
    """
    Return the specified configuration option.
    """
    try:
        return _Config.get(section, key)
    except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
        return default


# run as a function to avoid polluting module with temp variables<commit_msg>gave hosts a default value, empty strip, so python doesn't crash on strip()<commit_after>
import sys
import os
import ConfigParser

_Config = ConfigParser.RawConfigParser()
_Args = { }

def _init():
    """
    Parse an initalize the Config object
    """
    mod = sys.modules[__name__]

    if os.environ.get("PLOW_CFG"):
        _Config.read([os.environ["PLOW_CFG"]])
    else:
        _Config.read([
            os.path.join(os.environ.get("PLOW_ROOT", "/usr/local"), "etc/plow/plow.cfg"),
            os.path.expanduser("~/.plow/plow.cfg")])

    host_list = [h.strip() for h in get('plow', 'hosts', '').strip(',').split(',')]
    setattr(mod, 'PLOW_HOSTS', host_list or ["localhost:11336"])


def get(section, key, default=None):
    """
    Return the specified configuration option.
    """
    try:
        return _Config.get(section, key)
    except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
        return default


# run as a function to avoid polluting module with temp variables
{'fraction_non_alphanumeric': 0.14754098360655737, 'fraction_numerical': 0.005122950819672131, 'mean_word_length': 3.209051724137931, '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': '2465104', 'n_tokens_mistral': 643, 'n_tokens_neox': 631, 'n_words': 152}