<commit_before>var processor = require('./processor');
var DbModel = require('./DbModel');
var trainer = require('./trainer');
var DEXIE = require('./Dexie');
var m = require('./mithril');
var API_URL = 'http://valis.strangled.net/locationtracker';
var DATA_LENGTH = 45;

/**
 *  @function checkForCompleteDataSet
 *  Checks if the data set is complete. If so, write to the db.
 */
var checkForCompleteDataSet = function(model, vm){
    if(isDataComplete(model)){
        handleCompleteDataSet(model, vm);
    }
};

// various flags to track the current app state.
var _export = false,
_predict = false,
_collecting = false,
_display = true,
_sensor = false;
_train = false;
_collection_ctn = 0;
// the current training set to submit to the server
var training_data = [];

/**
 *  @function handleCompleteDataSet - processes the complete data set. if predicting, sends it through the neural network,<commit_msg>Changed server to use https<commit_after>var processor = require('./processor');
var DbModel = require('./DbModel');
var trainer = require('./trainer');
var DEXIE = require('./Dexie');
var m = require('./mithril');
var API_URL = 'https://valis.strangled.net/locationtracker';
var DATA_LENGTH = 45;

/**
 *  @function checkForCompleteDataSet
 *  Checks if the data set is complete. If so, write to the db.
 */
var checkForCompleteDataSet = function(model, vm){
    if(isDataComplete(model)){
        handleCompleteDataSet(model, vm);
    }
};

// various flags to track the current app state.
var _export = false,
_predict = false,
_collecting = false,
_display = true,
_sensor = false;
_train = false;
_collection_ctn = 0;
// the current training set to submit to the server
var training_data = [];

/**
 *  @function handleCompleteDataSet - processes the complete data set. if predicting, sends it through the neural network,
{'fraction_non_alphanumeric': 0.12520413718018508, 'fraction_numerical': 0.00326619488296135, 'mean_word_length': 4.26647564469914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '5235572', 'n_tokens_mistral': 539, 'n_tokens_neox': 534, 'n_words': 187}