<commit_before># server

express = require 'express'

app = express()
app.use express.logger()

app.get '/', (req, res) ->
  res.send 'Hello, world!'

port = process.env.PORT or 5000
app.listen port, ->
  console.log "listening on #{port}"<commit_msg>server: test formula<commit_after># server

tester = require './tester'
express = require 'express'

app = express()
app.use express.logger()

app.get '/', (req, res) ->
  formula = req.query.formula
  data = req.query.data
  unless formula?
    res.send "Formula required!"
    return
  if not data?
    res.send tester.getTemplate formula
  else
    tester.test formula, data, (failures) ->
      res.send JSON.stringify failures, null, 2

port = process.env.PORT or 5000
app.listen port, ->
  console.log "listening on #{port}"
{'fraction_non_alphanumeric': 0.14084507042253522, 'fraction_numerical': 0.011523687580025609, 'mean_word_length': 3.520231213872832, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '3577918', 'n_tokens_mistral': 267, 'n_tokens_neox': 255, 'n_words': 77}