<commit_before>var express   = require('express')
  , imageable = require("imageable")
  , app       = module.exports = express.createServer()
  , fs        = require("fs")
  , config    = JSON.parse(fs.readFileSync(__dirname + "/config/config.json"))
  , http      = require("http")

// Configuration
app.configure(function(){
  var start = Date.now()
  
  app.use(express.logger({ format: ':date - :method :url' }))
  app.use(express.bodyParser())
  app.use(express.methodOverride())
  app.use(imageable(config, {
    before: function(stats) {},
    after: function(stats) {
      if(config.statsd && ((Date.now() - (config.statsd.interval * 1000)) > start)) {
        var data = stats.format()

        for(var key in data) {
          var url = config.statsd.urls[key].replace("%{by}", data[key])
          
          console.log("REQUESTING:", url)
          require('child_process').exec("curl --insecure " + url, function(err, stdout, stderr) {<commit_msg>fixed reporting<commit_after>var express   = require('express')
  , imageable = require("imageable")
  , http      = require("http")
  , fs        = require("fs")
  , app       = module.exports = express.createServer()
  , config    = JSON.parse(fs.readFileSync(__dirname + "/config/config.json"))

// Configuration
app.configure(function(){
  var start = Date.now()
  
  app.use(express.logger({ format: ':date - :method :url' }))
  app.use(express.bodyParser())
  app.use(express.methodOverride())
  app.use(imageable(config, {
    before: function(stats) {},
    after: function(stats) {
      if(config.statsd && ((Date.now() - (config.statsd.interval * 1000)) > start)) {
        var data = stats.format()

        for(var key in data) {
          var url = config.statsd.urls[key].replace("%{by}", data[key])
            , cmd = "curl --insecure '" + url + "'"
          
          console.log("EXECUTING:", cmd)
          require('child_process').exec(cmd, function(err, stdout, stderr) {
{'fraction_non_alphanumeric': 0.17415730337078653, 'fraction_numerical': 0.0040858018386108275, 'mean_word_length': 2.965587044534413, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3147761', 'n_tokens_mistral': 619, 'n_tokens_neox': 606, 'n_words': 115}