<commit_before>var env = process.env,
    port = env.PORT || 80,
    ip = env.PORT ? '0.0.0.0' : '127.0.0.1',
    http = require('http'),
    https = require('https'),
    gzip = require('zlib'),
    Twitter = require('ntwitter');

var twitter = new Twitter({
    consumer_key: env.TWITTER_CONSUMER_KEY,
    consumer_secret: env.TWITTER_CONSUMER_SECRET,
    access_token_key: env.TWITTER_TOKEN_KEY,
    access_token_secret: env.TWITTER_TOKEN_SECRET
});

function lastUTCMinusMinutes(mins) {
    var now = new Date();
    now = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(),  now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());
    now.setMinutes(now.getMinutes() - mins);
    return now.getTime();
}

function getSOUrl() {
    var time = lastUTCMinusMinutes(+env.MINUTES),
        url = '/2.0/questions?fromdate=';
        url += Math.floor(time / 1000);
        url += '&order=desc&sort=creation&tagged=yui&site=stackoverflow';
        url += '&key=' + env.SO_KEY;
    return url;
}

http.createServer(function (req, res) {

    function handleError(err) {
        console.error(err);
        res.end('An error has ocurred\n');
    }
    
    function sendToTwitter(questions) {
        questions.forEach(function (question) {
            var title = question.title;
            if (title.length > 115) {
                title = title.substr(0, 112) + '...';
            }
            twitter.updateStatus(title + 'http://stackoverflow.com/questions/' + question.question_id, function (err) {
                if (err) {
                    console.error(err);
                }
            });
        });
        res.end('published ' + questions.length + ' questions\n');
    }

    if (req.url == '/favicon.ico') {
		res.writeHead(200, { 'Content-Type': 'image/png' });
		res.end();
    } else {
		res.writeHead(200, { 'Content-Type': 'text/plain' });

		https.get({
            host: 'api.stackexchange.com',<commit_msg>missing space beforelink in status<commit_after>var env = process.env,
    port = env.PORT || 80,
    ip = env.PORT ? '0.0.0.0' : '127.0.0.1',
    http = require('http'),
    https = require('https'),
    gzip = require('zlib'),
    Twitter = require('ntwitter');

var twitter = new Twitter({
    consumer_key: env.TWITTER_CONSUMER_KEY,
    consumer_secret: env.TWITTER_CONSUMER_SECRET,
    access_token_key: env.TWITTER_TOKEN_KEY,
    access_token_secret: env.TWITTER_TOKEN_SECRET
});

function lastUTCMinusMinutes(mins) {
    var now = new Date();
    now = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(),  now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());
    now.setMinutes(now.getMinutes() - mins);
    return now.getTime();
}

function getSOUrl() {
    var time = lastUTCMinusMinutes(+env.MINUTES),
        url = '/2.0/questions?fromdate=';
        url += Math.floor(time / 1000);
        url += '&order=desc&sort=creation&tagged=yui&site=stackoverflow';
        url += '&key=' + env.SO_KEY;
    return url;
}

http.createServer(function (req, res) {

    function handleError(err) {
        console.error(err);
        res.end('An error has ocurred\n');
    }
    
    function sendToTwitter(questions) {
        questions.forEach(function (question) {
            var title = question.title;
            if (title.length > 115) {
                title = title.substr(0, 112) + '...';
            }
            twitter.updateStatus(title + ' http://stackoverflow.com/questions/' + question.question_id, function (err) {
                if (err) {
                    console.error(err);
                }
            });
        });
        res.end('published ' + questions.length + ' questions\n');
    }

    if (req.url == '/favicon.ico') {
		res.writeHead(200, { 'Content-Type': 'image/png' });
		res.end();
    } else {
		res.writeHead(200, { 'Content-Type': 'text/plain' });

		https.get({
            host: 'api.stackexchange.com',
{'fraction_non_alphanumeric': 0.15768056968463887, 'fraction_numerical': 0.015768056968463885, 'mean_word_length': 2.5178890876565294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '1226883', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1309, 'n_words': 229}