<commit_before>var express = require('express');
var exphbs = require('express-handlebars');
var favicon = require('serve-favicon');
var ascribe = require('./ascribe');
var _ = require('lodash');

var A = function () {
  var app = this.app = express();

  app.engine('handlebars', exphbs({defaultLayout: __dirname + '/../views/layout'}));
  app.set('view engine', 'handlebars');
  app.use(favicon(__dirname + '/../public/favicon.ico'));
  app.use('/static', express.static(__dirname +'/../public'));

  app.get('/', function (req, res) {
    ascribe.getEditions(function (data) {
      _.each(data, function (piece) {
        piece.price = Math.round(Math.random() * (100000 - 10000) + 10000, 2);
      });

      res.render(__dirname + '/../views/index', {
        pieces: data
      });
    });
  });
}

A.prototype.start = function (port) {
  this.app.listen(port);  
}

module.exports = A;<commit_msg>fixing images<commit_after>var express = require('express');
var exphbs = require('express-handlebars');
var favicon = require('serve-favicon');
var ascribe = require('./ascribe');
var _ = require('lodash');

var A = function () {
  var app = this.app = express();

  app.engine('handlebars', exphbs({defaultLayout: __dirname + '/../views/layout'}));
  app.set('view engine', 'handlebars');
  app.use(favicon(__dirname + '/../public/favicon.ico'));
  app.use('/static', express.static(__dirname +'/../public'));

  app.get('/', function (req, res) {
    ascribe.getEditions(function (data) {
      _.each(data, function (piece) {
        piece.price = Math.round(Math.random() * (100000 - 10000) + 10000, 2);
        piece.thumbnail.url_safe = piece.thumbnail.url_safe.replace('100x100', '600x600');
      });

      res.render(__dirname + '/../views/index', {
        pieces: data
      });
    });
  });
}

A.prototype.start = function (port) {
  this.app.listen(port);  
}

module.exports = A;
{'fraction_non_alphanumeric': 0.20305102577590742, 'fraction_numerical': 0.0241977906365071, 'mean_word_length': 3.4335664335664338, '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': '4761922', 'n_tokens_mistral': 666, 'n_tokens_neox': 612, 'n_words': 119}