<commit_before>var express = require('express');
var app = express();
var fs = require("fs");
var util = require('util');
var cookieParser = require('cookie-parser');
var bodyParser = require("body-parser");
var session = require('express-session');
var favicon = require('serve-favicon');
 
app.use(favicon(__dirname + '/src/app/favicon.ico'));

var colors = require('colors');
process.on('uncaughtException', function(e) {
  console.log("server on error");　　
  console.log(e);
});


app.use(session({
  name:'token',
  secret: 'secret.91blb.com',
  resave: false,
  saveUninitialized: false,
  cookie: {
    secure: false
  },
  debug:true
}));
app.use(cookieParser());
app.use(logErrors);
app.use(clientErrorHandler);
app.use(errorHandler);
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({
  extended: false
}))

// parse application/json
app.use(bodyParser.json())

function logErrors(err, req, res, next) {
  console.log("logErrors");
  console.error(err.stack);
  next(err);
}

function clientErrorHandler(err, req, res, next) {
  if (req.xhr) {
    res.send(500, {
      error: 'Something blew up!'
    });
  } else {
    next(err);
  }
}

function errorHandler(err, req, res, next) {
  res.status(500);
  res.render('error', {
    error: err
  });
}

app.all('*', function(req, res, next) {
  //res.header("Access-Control-Allow-Origin", "*");
  //res.header("Access-Control-Allow-Headers", "Content-Type,Content-Length, Authorization, Accept,X-Requested-With,Cookie");
  //res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
  //res.header("Access-Control-Request-Headers","Content-Type,Content-Length, Authorization, Accept,X-Requested-With,Cookie");
  //res.header('Set-Cookie','myCookie=test');
  res.header('Cache-Control', 'no-cache');
  //console.log("node receive reqest " + req.path);
  var fs = require("fs");
  var encoding = {
    encoding: "utf8"
  };

  if (req.method == "OPTIONS") res.send(200); /*让options快速返回*/
  if (/\.(js|css|txt|json|html|png|jpeg|jpg|gif|tpl|ico|woff)/ig.test(req.path)) {
    //如果是文件名
    next();
    console.log("is File");
  }
  else{
    next();
  }
});<commit_msg>注释掉无用代码<commit_after>var express = require('express');
var app = express();
var fs = require("fs");
var util = require('util');
var cookieParser = require('cookie-parser');
var bodyParser = require("body-parser");
var session = require('express-session');
var favicon = require('serve-favicon');
 
app.use(favicon(__dirname + '/src/app/favicon.ico'));

var colors = require('colors');
process.on('uncaughtException', function(e) {
  console.log("server on error");　　
  console.log(e);
});


app.use(session({
  name:'token',
  secret: 'secret.91blb.com',
  resave: false,
  saveUninitialized: false,
  cookie: {
    secure: false
  },
  debug:true
}));
app.use(cookieParser());
app.use(logErrors);
app.use(clientErrorHandler);
app.use(errorHandler);
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({
  extended: false
}))

// parse application/json
app.use(bodyParser.json())

function logErrors(err, req, res, next) {
  console.log("logErrors");
  console.error(err.stack);
  next(err);
}

function clientErrorHandler(err, req, res, next) {
  if (req.xhr) {
    res.send(500, {
      error: 'Something blew up!'
    });
  } else {
    next(err);
  }
}

function errorHandler(err, req, res, next) {
  res.status(500);
  res.render('error', {
    error: err
  });
}

//app.all('*', function(req, res, next) {
//  //res.header("Access-Control-Allow-Origin", "*");
//  //res.header("Access-Control-Allow-Headers", "Content-Type,Content-Length, Authorization, Accept,X-Requested-With,Cookie");
//  //res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
//  //res.header("Access-Control-Request-Headers","Content-Type,Content-Length, Authorization, Accept,X-Requested-With,Cookie");
//  //res.header('Set-Cookie','myCookie=test');
//  //res.header('Cache-Control', 'no-cache');
//  //console.log("node receive reqest " + req.path);
//  var fs = require("fs");
//  var encoding = {
//    encoding: "utf8"
//  };
//
//  if (req.method == "OPTIONS") res.send(200); /*让options快速返回*/
//  if (/\.(js|css|txt|json|html|png|jpeg|jpg|gif|tpl|ico|woff)/ig.test(req.path)) {
//    //如果是文件名
//    next();
//    console.log("is File");
//  }
//  else{
//    next();
//  }
//});
{'fraction_non_alphanumeric': 0.20741758241758243, 'fraction_numerical': 0.005494505494505495, 'mean_word_length': 4.182680901542112, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3647756', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1539, 'n_words': 260}