<commit_before>#!/usr/bin/env node

var
  Cookies = require('cookies'),
  formidable = require('formidable'),
  fs = require('fs'),
  http = require('http'),
  httpStatus = require('http-status'),
  jsontemplate = require('json-template-foo'),
  openid = require('openid'),
  url = require('url'),
  uuid = require('node-uuid');

var
  idToGameMap = {},
  idToSessionMap = {};

function validateAndParseDecimalNonNegativeInt(string) {
  return string != null && string.match(/^\d+$/) ? parseInt(string, 10) : NaN;
}

http.ServerResponse.prototype.writeOnlyHead = function () {
  this.writeHead.apply(this, arguments);
  this.end();
};

http.createServer(function (request, response) {
  var
    cookies = new Cookies(request, response),
    game,
    gameId,
    gamePathParse,
    makeGuessPathParse,
    urlParse = url.parse(request.url, true);
  var
    sessionId = cookies.get('sessionId'),
    session = idToSessionMap.hasOwnProperty(sessionId) && idToSessionMap[sessionId];
  switch (urlParse.pathname) {
    case '/':
      response.writeOnlyHead(httpStatus.FOUND, { 'Location': 'game/' });
    break;<commit_msg>Fix import from node-uuid to uuid<commit_after>#!/usr/bin/env node

var
  Cookies = require('cookies'),
  formidable = require('formidable'),
  fs = require('fs'),
  http = require('http'),
  httpStatus = require('http-status'),
  jsontemplate = require('json-template-foo'),
  openid = require('openid'),
  url = require('url'),
  uuid = require('uuid');

var
  idToGameMap = {},
  idToSessionMap = {};

function validateAndParseDecimalNonNegativeInt(string) {
  return string != null && string.match(/^\d+$/) ? parseInt(string, 10) : NaN;
}

http.ServerResponse.prototype.writeOnlyHead = function () {
  this.writeHead.apply(this, arguments);
  this.end();
};

http.createServer(function (request, response) {
  var
    cookies = new Cookies(request, response),
    game,
    gameId,
    gamePathParse,
    makeGuessPathParse,
    urlParse = url.parse(request.url, true);
  var
    sessionId = cookies.get('sessionId'),
    session = idToSessionMap.hasOwnProperty(sessionId) && idToSessionMap[sessionId];
  switch (urlParse.pathname) {
    case '/':
      response.writeOnlyHead(httpStatus.FOUND, { 'Location': 'game/' });
    break;
{'fraction_non_alphanumeric': 0.15698447893569845, 'fraction_numerical': 0.0017738359201773836, 'mean_word_length': 4.295774647887324, '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': '1951951', 'n_tokens_mistral': 728, 'n_tokens_neox': 717, 'n_words': 136}