<commit_before>#!/usr/bin/env python3

STRUCTURE=1021149293700

from collections import defaultdict
from esipy import App, EsiSecurity, EsiClient

FILE='refresh.code'

def init_esi():
    esi_app = App.create('https://esi.tech.ccp.is/latest/swagger.json?datasource=tranquility')
    esi_security = EsiSecurity(
        app=esi_app,
        redirect_uri='https://www.msully.net/stuff/get-token',
        client_id='720c0d0aa9714cec9d08c36a068f20c3',
        # XXX: THIS IS A SECRET KEY BUT I DON'T UNDERSTAND WHY IT IS SECRET
        secret_key='<KEY>',
    )
    return (esi_app, esi_security)


def getRefreshToken():
    esi_app, esi_security = init_esi()
    url = esi_security.get_auth_uri(scopes=['esi-markets.structure_markets.v1'])
    print("Visit: ", url)<commit_msg>stop storing a human-readable secret key ;)<commit_after>#!/usr/bin/env python3

STRUCTURE=1021149293700

from collections import defaultdict
from esipy import App, EsiSecurity, EsiClient
import codecs

FILE='refresh.code'

def init_esi():
    esi_app = App.create('https://esi.tech.ccp.is/latest/swagger.json?datasource=tranquility')
    esi_security = EsiSecurity(
        app=esi_app,
        redirect_uri='https://www.msully.net/stuff/get-token',
        client_id='fca36d677f9a4b8e8581d8cd2c738c2c',
        # 'The "Secret Key" should never be human-readable in your application.'
        secret_key=codecs.decode('AIUr5ntWiEIXiavPjKtUCiNFwlvT<KEY>',
                                 'rot_13'),
    )
    return (esi_app, esi_security)


def getRefreshToken():
    esi_app, esi_security = init_esi()
    url = esi_security.get_auth_uri(scopes=['esi-markets.structure_markets.v1'])
    print("Visit: ", url)
{'fraction_non_alphanumeric': 0.11796087729697688, 'fraction_numerical': 0.04208654416123296, 'mean_word_length': 3.809116809116809, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6662721', 'n_tokens_mistral': 659, 'n_tokens_neox': 605, 'n_words': 104}