<commit_before>import JSInterpreter from 'js-interpreter';
import { observer as globalObserver } from 'binary-common-utils/lib/observer';
import { createScope } from './CliTools';
import Interface from './Interface';

const unrecoverableErrorList = ['InsufficientBalance', 'CustomLimitsReached'];
const botInitialized = bot => bot && bot.tradeEngine.options;
const botStarted = bot => botInitialized(bot) && bot.tradeEngine.tradeOptions;
const shouldRestartOnError = (bot, e = {}) =>
    unrecoverableErrorList.includes(e.name) && botInitialized(bot) && bot.tradeEngine.options.shouldRestartOnError;
const timeMachineEnabled = bot => botInitialized(bot) && bot.tradeEngine.options.timeMachineEnabled;

export default class Interpreter {
    constructor() {
        this.init();
    }
    init() {
        this.$scope = createScope();
        this.bot = new Interface(this.$scope);
        this.stopped = false;<commit_msg>Rename variables<commit_after>import JSInterpreter from 'js-interpreter';
import { observer as globalObserver } from 'binary-common-utils/lib/observer';
import { createScope } from './CliTools';
import Interface from './Interface';

const unrecoverableErrors = ['InsufficientBalance', 'CustomLimitsReached'];
const botInitialized = bot => bot && bot.tradeEngine.options;
const botStarted = bot => botInitialized(bot) && bot.tradeEngine.tradeOptions;
const shouldRestartOnError = (bot, e = {}) =>
    unrecoverableErrors.includes(e.name) && botInitialized(bot) && bot.tradeEngine.options.shouldRestartOnError;
const timeMachineEnabled = bot => botInitialized(bot) && bot.tradeEngine.options.timeMachineEnabled;

export default class Interpreter {
    constructor() {
        this.init();
    }
    init() {
        this.$scope = createScope();
        this.bot = new Interface(this.$scope);
        this.stopped = false;
{'fraction_non_alphanumeric': 0.12710483432916894, 'fraction_numerical': 0.0, 'mean_word_length': 4.720496894409938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2244500', 'n_tokens_mistral': 515, 'n_tokens_neox': 517, 'n_words': 116}