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

const path = require('path');
const cp = require('child_process');
const ws = require('uws');
const express = require('express');
const connection = require('./server/connection');
const children = {};

const socket_port = 1947;
const socket = new ws.Server({port: socket_port});
socket.on('connection', socket => connection(socket, children));
console.log('socket listening on port', socket_port);

const server_port = 3000;
const server = express();
server.use(express.static(path.resolve(__dirname, 'web')));
server.get('/', (req, res) => res.sendFile(path.resolve(__dirname, 'web', 'index.html')));
server.listen(server_port);
console.log('server listening on port', server_port);

process.on('SIGINT', e => process.exit()).on('SIGTERM', e => process.exit());
process.on('exit', function(signal, code) {
    const names = Object.keys(children).map(name => `--chroot ${name}`).join(' ').split(' ');
    cp.spawnSync('schroot', ['--end-session'].concat(names));
    cp.spawnSync('pkill', ['-KILL', '-P', process.pid]);
    process.kill(process.pid, 'SIGKILL');
});<commit_msg>updated default server port<commit_after>#!/usr/bin/env node

const path = require('path');
const cp = require('child_process');
const ws = require('uws');
const express = require('express');
const connection = require('./server/connection');
const children = {};

const socket_port = 1947;
const socket = new ws.Server({port: socket_port});
socket.on('connection', socket => connection(socket, children));
console.log('socket listening on port', socket_port);

const server_port = 80;
const server = express();
server.use(express.static(path.resolve(__dirname, 'web')));
server.get('/', (req, res) => res.sendFile(path.resolve(__dirname, 'web', 'index.html')));
server.listen(server_port);
console.log('server listening on port', server_port);

process.on('SIGINT', e => process.exit()).on('SIGTERM', e => process.exit());
process.on('exit', function(signal, code) {
    const names = Object.keys(children).map(name => `--chroot ${name}`).join(' ').split(' ');
    cp.spawnSync('schroot', ['--end-session'].concat(names));
    cp.spawnSync('pkill', ['-KILL', '-P', process.pid]);
    process.kill(process.pid, 'SIGKILL');
});
{'fraction_non_alphanumeric': 0.20982142857142858, 'fraction_numerical': 0.00625, 'mean_word_length': 6.003125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6373989', 'n_tokens_mistral': 708, 'n_tokens_neox': 689, 'n_words': 159}