<commit_before>"""Client global settings."""

HOST = 'api.snowfloat.com:443'
HTTP_TIMEOUT = 10
HTTP_RETRIES = 3
HTTP_RETRY_INTERVAL = 5

API_KEY = ''
API_PRIVATE_KEY = ''

try:
    # pylint: disable=F0401
    from settings_prod import *
except ImportError:
    try:
        # pylint: disable=F0401
        from settings_dev import *
    except ImportError:
        pass<commit_msg>Read config file in different locations and set global config variables based on that.<commit_after>"""Client global settings."""
import os
import ConfigParser

HOST = 'api.snowfloat.com:443'
HTTP_TIMEOUT = 10
HTTP_RETRIES = 3
HTTP_RETRY_INTERVAL = 5

API_KEY = ''
API_PRIVATE_KEY = ''

CONFIG = ConfigParser.RawConfigParser()
for loc in (os.curdir, os.path.expanduser("~"), "/etc/snowfloat"):
    try:
        with open(os.path.join(loc, "snowfloat.conf")) as source:
            CONFIG.readfp(source)
            API_KEY = CONFIG.get('snowfloat', 'api_key')
            API_PRIVATE_KEY = CONFIG.get('snowfloat', 'api_private_key')
            break
    except IOError:
        pass
{'fraction_non_alphanumeric': 0.11090225563909774, 'fraction_numerical': 0.020676691729323307, 'mean_word_length': 3.3647540983606556, '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': '4401446', 'n_tokens_mistral': 363, 'n_tokens_neox': 347, 'n_words': 84}