<commit_before>import os
import sys

#
# TODO: check the permissions on this file and only read it if it's only readable
# by the owner of this process
#

bauble_rcfile=os.path.join(os.environ['HOME'], ".bauble.api")

# read environment variables from the bauble rcfile
if os.path.exists(bauble_rcfile) and os.path.isfile(bauble_rcfile):
    for line in open(bauble_rcfile):
        name, value = line.split('=')
        if isinstance(name, str) and isinstance(value, str):
            os.environ[name.strip()] = str(value).strip()
else:
    raise FileNotFoundError("~/bauble.api does not exist")

if 'DATABASE_URL' not in os.environ:
    raise Exception("DATABASE URL not in environment")
<commit_msg>- don't require ~/.bauble.api<commit_after>import os
import sys

#
# TODO: check the permissions on this file and only read it if it's only readable
# by the owner of this process
#

bauble_rcfile=os.path.join(os.environ['HOME'], ".bauble.api")

# read environment variables from the bauble rcfile
if os.path.exists(bauble_rcfile) and os.path.isfile(bauble_rcfile):
    for line in open(bauble_rcfile):
        name, value = line.split('=')
        if isinstance(name, str) and isinstance(value, str):
            os.environ[name.strip()] = str(value).strip()

if 'DATABASE_URL' not in os.environ:
    raise Exception("DATABASE URL not in environment")

{'fraction_non_alphanumeric': 0.11660516605166052, 'fraction_numerical': 0.0, 'mean_word_length': 4.022222222222222, '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': '6298968', 'n_tokens_mistral': 447, 'n_tokens_neox': 433, 'n_words': 137}