<commit_before>var spawn = require('child_process').spawn,
    http = require('http'),
    urlmod = require('url'),
    fs = require('fs');
var logLevel = 1;
var vidProc,
    player,
    files = [],
    currFile = 0,
    playing = false;
var localAddress = '',
    peerAddress = '',
    port = 3000,
    req,
    res;

// INIT ////////////////////////////////////

// standardized exit function
var exitFunction = function (code) {
    console.log('exiting vidcomm');
    if (code) console.log('exited with code '+code);
    // show cursor
    console.log('\033[?12l\033[?25h');
}

var echo = function (msg, level) {
    if (!level) level = 1;
    if (level <= logLevel) console.log(msg);
}

// HTTP SERVER /////////////////////////////

// find local ip address
var findLocalAddress = function () {
    require('child_process').exec('ifconfig eth0 | grep \'inet addr:\' | cut -d: -f2 | awk \'{ print $1}\'', function (error, stdout, stderr) {
        if (stdout.search(/192\.168\.1\.\d+/) !== -1) {
            localAddress = stdout.trim();
            echo('local ip address: '+localAddress);
            startServer();
        } else {
            echo('couldn\'t find local ip address, play in offline mode');
            echo('-');
            playNextVideo();<commit_msg>currFile is now reset properly<commit_after>var spawn = require('child_process').spawn,
    http = require('http'),
    urlmod = require('url'),
    fs = require('fs');
var logLevel = 1;
var vidProc,
    player,
    files = [],
    currFile = 0,
    playing = false;
var localAddress = '',
    peerAddress = '',
    port = 3000,
    req,
    res;

// INIT ////////////////////////////////////

// standardized exit function
var exitFunction = function (code) {
    callPeer('ended');
    console.log('exiting vidcomm');
    if (code) console.log('exited with code '+code);
    // show cursor
    console.log('\033[?12l\033[?25h');
}

var echo = function (msg, level) {
    if (!level) level = 1;
    if (level <= logLevel) console.log(msg);
}

// HTTP SERVER /////////////////////////////

// find local ip address
var findLocalAddress = function () {
    require('child_process').exec('ifconfig eth0 | grep \'inet addr:\' | cut -d: -f2 | awk \'{ print $1}\'', function (error, stdout, stderr) {
        if (stdout.search(/192\.168\.1\.\d+/) !== -1) {
            localAddress = stdout.trim();
            echo('local ip address: '+localAddress);
            startServer();
        } else {
            echo('couldn\'t find local ip address, play in offline mode');
            echo('-');
            playNextVideo();
{'fraction_non_alphanumeric': 0.20855821125674634, 'fraction_numerical': 0.02158828064764842, 'mean_word_length': 2.096658711217184, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3037949', 'n_tokens_mistral': 819, 'n_tokens_neox': 768, 'n_words': 214}