<commit_before>var Twitter = require('twitter');
var express = require('express');

var app = express();

var client = new Twitter({
  consumer_key: 'c4bOhkKzepAdPROftmezTksJY',
  consumer_secret: '<KEY>',
  access_token_key: '',
  access_token_secret: ''
});

app.use(function(req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  next();
});

app.get('/', function (req, res) {
    getTweet(function (data) { res.send(data); });
});
 
var params = {screen_name: 'nodejs'};

function getTweet(callback) {
    client.get('statuses/show/568715979498393600.json', params, function(error, tweets, response){
        if (!error) {
            callback(tweets);
        } else {
            callback('error');
        }
    });
}

app.listen(process.env.PORT || 3000, function () {
    console.log('Server started');
});<commit_msg>get geotagged tweets<commit_after>var Twitter = require('twitter');
var express = require('express');

var app = express();

var client = new Twitter({
  consumer_key: 'c4bOhkKzepAdPROftmezTksJY',
  consumer_secret: '<KEY>',
  access_token_key: '',
  access_token_secret: ''
});

app.use(function(req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  next();
});

app.get('/', function (req, res) {
    getTweet(data => res.send(data));
});
 
var params = {q: 'Helsinki', result_type: 'recent', count: 100};

function getTweet(callback) {
     client.get('search/tweets.json', params, function(error, tweets, response){
        if (!error) {
            var tweetsWithGeo = [];

            tweets.statuses.forEach(tweet => {
                if (tweet.geo) {
                    tweetsWithGeo.push(tweet);
                }
            });

            callback(tweetsWithGeo);
        } else {
            callback('error');
        }
    });
}

app.listen(process.env.PORT || 3000, function () {
    console.log('Server started');
});
{'fraction_non_alphanumeric': 0.1763296597987542, 'fraction_numerical': 0.014853857211308098, 'mean_word_length': 3.2267206477732793, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3411704', 'n_tokens_mistral': 716, 'n_tokens_neox': 684, 'n_words': 125}