<commit_before>import os
import yaml
from bunch import Bunch

CWD = os.getcwd()

C = Bunch()
C.redis = Bunch(port='6379', host='10.0.0.2')
C.solar_db = Bunch(mode='riak', port='8087', host='10.0.0.2', protocol='pbc')
C.dblayer = 'riak'


def _lookup_vals(setter, config, prefix=None):
    for key, val in config.iteritems():
        if prefix is None:
            sub = [key]
        else:
            sub = prefix + [key]
        if isinstance(val, Bunch):
            _lookup_vals(setter, val, sub)
        else:
            setter(config, sub)


def from_configs():

    paths = [
        os.getenv('SOLAR_CONFIG', os.path.join(CWD, '.config')),
        os.path.join(CWD, '.config.override')<commit_msg>removed dblayer option from config<commit_after>import os
import yaml
from bunch import Bunch

CWD = os.getcwd()

C = Bunch()
C.redis = Bunch(port='6379', host='10.0.0.2')
C.solar_db = Bunch(mode='riak', port='8087', host='10.0.0.2', protocol='pbc')


def _lookup_vals(setter, config, prefix=None):
    for key, val in config.iteritems():
        if prefix is None:
            sub = [key]
        else:
            sub = prefix + [key]
        if isinstance(val, Bunch):
            _lookup_vals(setter, val, sub)
        else:
            setter(config, sub)


def from_configs():

    paths = [
        os.getenv('SOLAR_CONFIG', os.path.join(CWD, '.config')),
        os.path.join(CWD, '.config.override')
{'fraction_non_alphanumeric': 0.15417256011315417, 'fraction_numerical': 0.02545968882602546, 'mean_word_length': 2.5822784810126582, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '6848665', 'n_tokens_mistral': 528, 'n_tokens_neox': 506, 'n_words': 117}