<commit_before>
/**
 * Module dependencies.
 */

process.title = "NimbusMeus";

var express = require('express')
  , fs = require('fs')
  , routes = require('./routes')
  , path = require('path');

var remove = require('remove');

var config = require('./config');

var app = module.exports = express.createServer();

// Configuration

var streamer = require('./streamer');

app.configure(function(){
  app.use(express.logger());
  app.set('views', __dirname + '/views');
  app.set('view engine', 'jade');
  app.use(express.cookieParser());
  app.use(express.session({ secret: "keyboard cat" }));
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  app.use(function (req, res, next) {
    if (!req.session.hash) {
      req.session.hash = require('crypto').createHash('md5')
        .update(req.session.id)
        .digest('hex');
    }
    streamer.touch(req.session.hash);
    next();
  });
  app.use(app.router);
  app.use(express.static(__dirname + '/public'));
});

app.configure('development', function(){
  app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});

app.configure('production', function(){
  app.use(express.errorHandler());
});

// Routes

app.get('/', routes.index);
app.get('/b/*', routes.listing);
app.get('/v/*', routes.view);
app.get('/stream/*', routes.stream);

app.get('/tv/:device/:tuner', routes.tv);
app.get('/view/tv/:device/:tuner/:channel/:program', routes.tv_view);

app.get('/settings', routes.settings);
app.post('/settings', routes.settings_save);

app.get('/thumbnail/*', routes.thumbnail);

try {
  fs.mkdirSync(config.TMPDIR);
} catch (e) {
}

try {<commit_msg>add nowplaying route<commit_after>
/**
 * Module dependencies.
 */

process.title = "NimbusMeus";

var express = require('express')
  , fs = require('fs')
  , routes = require('./routes')
  , path = require('path');

var remove = require('remove');

var config = require('./config');

var app = module.exports = express.createServer();

// Configuration

var streamer = require('./streamer');

app.configure(function(){
  //app.use(express.logger());
  app.set('views', __dirname + '/views');
  app.set('view engine', 'jade');
  app.use(express.cookieParser());
  app.use(express.session({ secret: "keyboard cat" }));
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  app.use(function (req, res, next) {
    if (!req.session.hash) {
      req.session.hash = require('crypto').createHash('md5')
        .update(req.session.id)
        .digest('hex');
    }
    streamer.touch(req.session.hash);
    next();
  });
  app.use(app.router);
  app.use(express.static(__dirname + '/public'));
});

app.configure('development', function(){
  app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});

app.configure('production', function(){
  app.use(express.errorHandler());
});

// Routes

app.get('/', routes.index);
app.get('/b/*', routes.listing);
app.get('/v/*', routes.view);
app.get('/stream/*', routes.stream);
app.get('/nowplaying', routes.nowplaying);

app.get('/tv/:device/:tuner', routes.tv);
app.get('/view/tv/:device/:tuner/:channel/:program', routes.tv_view);

app.get('/settings', routes.settings);
app.post('/settings', routes.settings_save);

app.get('/thumbnail/*', routes.thumbnail);

try {
  fs.mkdirSync(config.TMPDIR);
} catch (e) {
}

try {
{'fraction_non_alphanumeric': 0.21979665071770335, 'fraction_numerical': 0.0005980861244019139, 'mean_word_length': 4.292721518987341, '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': '7066115', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1121, 'n_words': 188}