<commit_before>import json

import datetime
import random

import bot_logger
import crypto
import lang
from config import bot_config, DATA_PATH


# read file
def get_users():
    with open(DATA_PATH + bot_config['user_file'], 'r') as f:
        try:
            data = json.load(f)
        except ValueError:
            bot_logger.logger.warning("Error on read user file")
            data = {}
        return data


# save to file:
def add_user(user, address):
    bot_logger.logger.info("Add user " + user + ' ' + address)
    data = get_users()
    with open(DATA_PATH + bot_config['user_file'], 'w') as f:
        data[user] = address
        json.dump(data, f)


def get_user_info(rpc, msg):
    dict = get_users()
    address = dict[msg.author.name]
    balance = crypto.get_user_balance(rpc, msg.author.name)
    msg.reply(lang.message_info_introduction + lang.message_account_details % (msg.author.name, str(balance), address) + lang.message_footer)


def get_user_address(user):<commit_msg>fix on info<commit_after>import json

import datetime
import random

import bot_logger
import crypto
import lang
from config import bot_config, DATA_PATH


# read file
def get_users():
    with open(DATA_PATH + bot_config['user_file'], 'r') as f:
        try:
            data = json.load(f)
        except ValueError:
            bot_logger.logger.warning("Error on read user file")
            data = {}
        return data


# save to file:
def add_user(user, address):
    bot_logger.logger.info("Add user " + user + ' ' + address)
    data = get_users()
    with open(DATA_PATH + bot_config['user_file'], 'w') as f:
        data[user] = address
        json.dump(data, f)


def get_user_info(rpc, msg):
    dict = get_users()
    address = dict[msg.author.name]
    balance = crypto.get_user_balance(rpc, msg.author.name)
    msg.reply(lang.message_info_introduction % msg.author.name + lang.message_account_details % (str(balance), address) + lang.message_footer)


def get_user_address(user):
{'fraction_non_alphanumeric': 0.11105552776388194, 'fraction_numerical': 0.0, 'mean_word_length': 3.219409282700422, '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': '6025344', 'n_tokens_mistral': 635, 'n_tokens_neox': 626, 'n_words': 161}