<commit_before>import express from 'express';
import _ from 'lodash';

const app = express();

app.get('/', function (req, res) {
  const a = _.get(req.query, 'a', 0);
  const b = _.get(req.query, 'b', 0);
  res.send({ result: Number(a) + Number(b) });
});

app.listen(5000, function () {
  console.log('Example app listening on port 3000!');
});<commit_msg>add task 2<commit_after>import express from 'express';
import _ from 'lodash';

const app = express();

app.get('/', function (req, res) {
  const a = _.get(req.query, 'a', 0);
  const b = _.get(req.query, 'b', 0);
  res.send(200, Number(a) + Number(b));
});

app.get('/name', function (req, res) {
  const match = _.get(req.query, 'fullname', '').match(/([\S]+)\s?([\S]*)\s?([\S]*)\s?(.*)/i);
  let shortName = '';
  if (match !== null && match[4].length === 0) {
    const parts = _.chain(match).drop().compact().value();
    shortName += _.capitalize(_.last(parts).toLowerCase());
    if (parts.length > 1) {
      shortName += _.chain(parts).dropRight().map(function(string) {
        const symbol = _.capitalize(string.charAt(0));
        return  ` ${symbol}.`;
      }).join('');
    }
  } else {
    shortName = 'Invalid fullname';
  }

  res.send(200, shortName);
});

app.listen(5000, function () {
  console.log('Example app listening on port 3000!');
});
{'fraction_non_alphanumeric': 0.22826908541194255, 'fraction_numerical': 0.02343159486016629, 'mean_word_length': 3.6132404181184667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1399447', 'n_tokens_mistral': 497, 'n_tokens_neox': 465, 'n_words': 111}