<commit_before>import hashlib

PORT = 26221
KEYFILE = "/home/amcat/resources/key" # for amcat
KEYFILE = "/usr/home/netframe/resources/key" # for parc
KEY = None

REQUEST_LIST = 1
REQUEST_LIST_DISTINCT = 2
REQUEST_QUOTE = 3

FILTER_VALUES = 1
FILTER_INTERVAL = 2

def hash(s):
    global KEY
    if KEY is None: KEY = open(KEYFILE).read()
    return hashlib.md5(KEY+s).digest()
<commit_msg>key should be found now on both servers<commit_after>import hashlib

PORT = 26221
KEYFILE1 = "/home/amcat/resources/key" # for amcat
KEYFILE2 = "/usr/home/netframe/resources/key" # for parc
KEY = None

REQUEST_LIST = 1
REQUEST_LIST_DISTINCT = 2
REQUEST_QUOTE = 3

FILTER_VALUES = 1
FILTER_INTERVAL = 2

def hash(s):
    global KEY
    if KEY is None:
        try:
            KEY = open(KEYFILE1).read()
        except IOError:
            KEY = open(KEYFILE2).read()
    return hashlib.md5(KEY+s).digest()

{'fraction_non_alphanumeric': 0.10714285714285714, 'fraction_numerical': 0.029017857142857144, 'mean_word_length': 3.3333333333333335, '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': '7180287', 'n_tokens_mistral': 339, 'n_tokens_neox': 316, 'n_words': 84}