<commit_before>__author__ = 'arkilic'

mds_config = {
    'database': 'metadataStore',
    'host': "localhost",
    'port': 27017,
}<commit_msg>ENH: Read config file for db connection.<commit_after>import os
import yaml
import logging

logger = logging.getLogger(__name__)
filename = os.path.join(os.path.expanduser('~'), '.config', 'metadatastore',
                        'connection.yml')
if os.path.isfile(filename):
    with open(filename) as f:
        mds_config = yaml.load(f)
    logger.debug("Using db connection specified in config file.")
else:
    logger.debug("Using default db connection.")
    mds_config = {
        'database': 'metadataStore',
        'host': "localhost",
        'port': 27017,
        }

{'fraction_non_alphanumeric': 0.13950276243093923, 'fraction_numerical': 0.013812154696132596, 'mean_word_length': 3.1666666666666665, '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': '5178023', 'n_tokens_mistral': 234, 'n_tokens_neox': 221, 'n_words': 55}