<commit_before># coding: utf-8
import json
from redis_wrap import get_hash, get_list

__config__ = 'config.json'

with open(__config__, 'r') as cfr:
    config = json.loads(cfr.read())

PATH = '/%s' % '/'.join(config.get('server').replace('https://', '').replace('http://', '').split('/')[1:])

TOKEN = config.get('token')
SERVER = config.get('server')
PORT = config.get('port')

def get(key):
    ''' Get raw config from redis with a prefix '''
    list_keys = ('admins', )
    hash_keys = (None, )
    real_key = '%s:%s' % (str(__name__), key, )
    if key in list_keys:
        return get_list(real_key)
    elif key in hash_keys:
        return get_hash(real_key)

def init_redis():
    admins = get('admins')
    if len(admins) == 0:
        [admins.append(admin) for admin in config.get('admins')]

def require_admin(func):
    def wrapper(*args, **kwargs):<commit_msg>Fix __name__ in config<commit_after># coding: utf-8
import json
from redis_wrap import get_hash, get_list

__name__ = 'eth0_bot'
__config__ = 'config.json'

with open(__config__, 'r') as cfr:
    config = json.loads(cfr.read())

PATH = '/%s' % '/'.join(config.get('server').replace('https://', '').replace('http://', '').split('/')[1:])

TOKEN = config.get('token')
SERVER = config.get('server')
PORT = config.get('port')

def get(key):
    ''' Get raw config from redis with a prefix '''
    list_keys = ('admins', )
    hash_keys = (None, )
    real_key = '%s:%s' % (str(__name__), key, )
    if key in list_keys:
        return get_list(real_key)
    elif key in hash_keys:
        return get_hash(real_key)

def init_redis():
    admins = get('admins')
    if len(admins) == 0:
        [admins.append(admin) for admin in config.get('admins')]

def require_admin(func):
    def wrapper(*args, **kwargs):
{'fraction_non_alphanumeric': 0.18248175182481752, 'fraction_numerical': 0.0039303761931499155, 'mean_word_length': 3.7018469656992083, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '160003', 'n_tokens_mistral': 645, 'n_tokens_neox': 636, 'n_words': 158}