<commit_before>var express = require('express');
var router = express.Router();
var exec = require('child_process').exec;
var fs = require('fs');
var twilio = require('twilio');

//Give a file number that is not used to the file
var findFileNumber = function(){
    number = Math.random(0, 999999999); 
    return number;
} 

router.post('/', function(req, res){
    //Get the sent source code of the program
    var sourceCode = req.body.sourceCode;

    //Find an unused fileNumber
    var fileNumber = findFileNumber();

    //Get a random name for the file
    var lolaFileName = 'lola' + fileNumber + '.txt';
    var pythonFileName = 'python' + fileNumber + '.py';

    //Put the sourceCode in a file
    fs.writeFile(lolaFileName, sourceCode, function(err){
        if(err)
            console.log(err);

        //File is written here. Now run the python script
        exec('python ' + lolaFileName + ' ' + pythonFileName, function(err, stdout, sterr){
            if(err)
                console.log(err);

            //Delete the temporary lola and python apps
            fs.unlink(lolaFileName);
            fs.unlink(pythonFileName);

            //Send the resut of the compiling back
            res.json({compileResult: stdout});
        }); //exec01
    }); //writeFile1
}) //router.post1

var sendMessageBack = function(output){
    // Twilio Credentials
    var accountSid = 'AC49beb2b0ce8058005d7db2504507a09f';
    var authToken = '<KEY>';

    //require the Twilio module and create a REST client
    var twilio = require('twilio');
    var client = new twilio.RestClient(accountSid, authToken);
};

router.post('/message', function(req, res){
    //get the message Sid
    var messageSid = req.body.SmsMessageSid
    
    // Twilio Credentials
    var accountSid = 'AC49beb2b0ce8<PASSWORD>';
    var authToken = '<KEY>';

    //require the Twilio module and create a REST client
    var twilio = require('twilio');
    var client = new twilio.RestClient(accountSid, authToken);

    client.messages(messageSid).get(function(err, message) {
        //Get the sent source code of the program
        var sourceCode = req.body.sourceCode;

        //Find an unused fileNumber
        var fileNumber = findFileNumber();

        //Get a random name for the file
        var lolaFileName = 'lola' + fileNumber + '.txt';
        var pythonFileName = 'python' + fileNumber + '.py';

        //Put the sourceCode in a file
        fs.writeFile(lolaFileName, sourceCode, function(err){
            if(err)
                console.log(err);

            console.log("File was written");
            //File is written at this point. Now run the python script
            exec('python interpreter.py ' + lolaFileName + ' ' + pythonFileName, function(err, stdout, sterr){
                if(err)
                    console.log(err);

                //Delete the temporary lola and python apps
                fs.unlink(lolaFileName);
                fs.unlink(pythonFileName);

                console.log("Send sms back");

                client.sms.messages.create({
                    to: '+447733645724',
                    from: '+441376350104',
                    body: stdout
                }, function(err, message) {
                    if(!err)
                        console.log(message.sid);
                    else
                        console.log(err);
                });

                //Send the resut of the compiling back
                res.json({compileResult: stdout});
            }); //exec01
        }); //writeFile1
    });
})

router.post

//return the router
module.exports = router;<commit_msg>I don't know.... stuff<commit_after>var express = require('express');
var router = express.Router();
var exec = require('child_process').exec;
var fs = require('fs');
var twilio = require('twilio');

//Give a file number that is not used to the file
var findFileNumber = function(){
    number = Math.random(0, 999999999); 
    return number;
} 

router.post('/', function(req, res){
    //Get the sent source code of the program
    var sourceCode = req.body.sourceCode;

    //Find an unused fileNumber
    var fileNumber = findFileNumber();

    //Get a random name for the file
    var lolaFileName = 'lola' + fileNumber + '.txt';
    var pythonFileName = 'python' + fileNumber + '.py';

    //Put the sourceCode in a file
    fs.writeFile(lolaFileName, sourceCode, function(err){
        if(err)
            console.log(err);

        //File is written here. Now run the python script
        exec('python ' + lolaFileName + ' ' + pythonFileName, function(err, stdout, sterr){
            if(err)
                console.log(err);

            //Delete the temporary lola and python apps
            fs.unlink(lolaFileName);
            //fs.unlink(pythonFileName);

            //Send the resut of the compiling back
            res.json({compileResult: stdout});
        }); //exec01
    }); //writeFile1
}); //router.post1

router.post('/message', function(req, res){
    //get the message Sid
    var messageSid = req.body.SmsMessageSid
    
    // Twilio Credentials
    var accountSid = 'AC49beb2b0ce8058005d7db2504507a09f';
    var authToken = '<KEY>';

    //require the Twilio module and create a REST client
    var twilio = require('twilio');
    var client = new twilio.RestClient(accountSid, authToken);

    client.messages(messageSid).get(function(err, message) {
        //Get the sent source code of the program
        var sourceCode = req.body.sourceCode;

        //Find an unused fileNumber
        var fileNumber = findFileNumber();

        //Get a random name for the file
        var lolaFileName = 'lola' + fileNumber + '.txt';
        var pythonFileName = 'python' + fileNumber + '.py';

        //Put the sourceCode in a file
        fs.writeFile(lolaFileName, sourceCode, function(err){
            if(err)
                console.log(err);

            console.log("File was written");
            //File is written at this point. Now run the python script
            exec('python interpreter.py ' + lolaFileName + ' ' + pythonFileName, function(err, stdout, sterr){
                if(err)
                    console.log(err);

                //Delete the temporary lola and python apps
                fs.unlink(lolaFileName);
                //fs.unlink(pythonFileName);

                console.log("Send sms back");

                stdout = 'dsajdkljsa';
                client.sms.messages.create({
                    to: '+447733645724',
                    from: '+441376350104',
                    body: stdout
                }, function(err, message) {
                    if(!err)
                        console.log(message.sid);
                    else
                        console.log(err);
                });

                //Send the resut of the compiling back
                res.json({compileResult: stdout});
            }); //exec01
        }); //writeFile1
    });
});

//return the router
module.exports = router;
{'fraction_non_alphanumeric': 0.1123275984643822, 'fraction_numerical': 0.018342101521399118, 'mean_word_length': 1.9430962343096234, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '1746704', 'n_tokens_mistral': 2053, 'n_tokens_neox': 1888, 'n_words': 569}