<commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 21 20:54:53 2017

@author: pnbrown
"""

import steem as st
from datetime import datetime,timedelta
import time
import json
import logging

import util.db as db
import util.validators as val
import util.constants as const
import util.confirmation as conf

DB = db.Mist_DB()
logging.basicConfig(filename='ops.log',
                    level=logging.DEBUG,
                    format='%(asctime)s %(levelname)s %(name)s %(message)s')
logging.getLogger("urllib3.util.retry").setLevel(logging.ERROR)
logging.getLogger("urllib3.connectionpool").setLevel(logging.ERROR)

try :
    with open('config.json') as cfgfile :
        cfg = json.load(cfgfile)
except FileNotFoundError :
    cfg = {'confirmer-account':'',
           'confirmer_key':'',
           'nodes':[''],
           'confirm_message':'',
           'confirmation_active':True}
    with open('config.json','w') as cfgfile :
        json.dump(cfg,cfgfile)
    raise FileNotFoundError('Please populate config.json file with relevant values')

confirmer_account = cfg['confirmer-account']
confirmer_key = cfg['confirmer_key']
nodes = cfg['nodes']
confirm_message = cfg['confirm_message']
confirmation_active = cfg['confirmation_active']
<commit_msg>cast bool<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 21 20:54:53 2017

@author: pnbrown
"""

import steem as st
from datetime import datetime,timedelta
import time
import json
import logging

import util.db as db
import util.validators as val
import util.constants as const
import util.confirmation as conf

DB = db.Mist_DB()
logging.basicConfig(filename='ops.log',
                    level=logging.DEBUG,
                    format='%(asctime)s %(levelname)s %(name)s %(message)s')
logging.getLogger("urllib3.util.retry").setLevel(logging.ERROR)
logging.getLogger("urllib3.connectionpool").setLevel(logging.ERROR)

try :
    with open('config.json') as cfgfile :
        cfg = json.load(cfgfile)
except FileNotFoundError :
    cfg = {'confirmer-account':'',
           'confirmer_key':'',
           'nodes':[''],
           'confirm_message':'',
           'confirmation_active':True}
    with open('config.json','w') as cfgfile :
        json.dump(cfg,cfgfile)
    raise FileNotFoundError('Please populate config.json file with relevant values')

confirmer_account = cfg['confirmer-account']
confirmer_key = cfg['confirmer_key']
nodes = cfg['nodes']
confirm_message = cfg['confirm_message']
confirmation_active = bool(cfg['confirmation_active'])

{'fraction_non_alphanumeric': 0.13421256788207914, 'fraction_numerical': 0.012412723041117145, 'mean_word_length': 3.903041825095057, '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': '4078377', 'n_tokens_mistral': 830, 'n_tokens_neox': 795, 'n_words': 183}