<commit_before>#!/usr/bin/env node
'use strict';

//dependencies
var watchr = require('watchr'),
    path = require('path'),
    findit = require('findit2'),
    fs = require('fs'),
    cp = require('child_process');

//our app object
var app = {
  process: undefined,
  start: function() {
    app.process = cp.fork('./app.js');
    console.log('RUN [✔] App started');
    app.process.on('close', function(code, signal) {
      console.log('RUN {!} Attempting to restart app...');
      app.restart();
    });
  },
  restartLog: [],
  restart: function() {
    app.restartLog.push(new Date());
    app.start();
    setTimeout(function() {
      if (app.restartLog.length >= 3) {
        console.log('RUN {#} Mayday relay: app is sickly.');
        app.process.kill();
        process.exit(1);
      }
      else {
        app.restartLog = [];
      }
    }, 1000);
  }
};

//are there any special commands to run?
if (process.argv.length > 2) {
  var command = process.argv[2];
  
  if ('build' === command) {
    console.log('RUN {!} Roger that! Running the build...');
    var filterToBuild = function(filePath, stat) {
      var isLESS = /\.less/.test(filePath);<commit_msg>updated runner<commit_after>#!/usr/bin/env node
'use strict';

//dependencies
var watchr = require('watchr'),
    path = require('path'),
    findit = require('findit2'),
    fs = require('fs'),
    cp = require('child_process');

//our app object
var app = {
  process: undefined,
  start: function() {
    app.process = cp.fork('./server.js');
    console.log('RUN [✔] App started');
    app.process.on('close', function(code, signal) {
      console.log('RUN {!} Attempting to restart app...');
      app.restart();
    });
  },
  restartLog: [],
  restart: function() {
    app.restartLog.push(new Date());
    app.start();
    setTimeout(function() {
      if (app.restartLog.length >= 3) {
        console.log('RUN {#} Mayday relay: app is sickly.');
        app.process.kill();
        process.exit(1);
      }
      else {
        app.restartLog = [];
      }
    }, 1000);
  }
};

//are there any special commands to run?
if (process.argv.length > 2) {
  var command = process.argv[2];
  
  if ('build' === command) {
    console.log('RUN {!} Roger that! Running the build...');
    var filterToBuild = function(filePath, stat) {
      var isLESS = /\.less/.test(filePath);
{'fraction_non_alphanumeric': 0.1847457627118644, 'fraction_numerical': 0.007627118644067797, 'mean_word_length': 2.654798761609907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2377926', 'n_tokens_mistral': 790, 'n_tokens_neox': 773, 'n_words': 180}