<commit_before>from flask import Flask, request, session, g, redirect, url_for, abort, \
     render_template, flash
from twython import Twython
import json

app = Flask(__name__)
app.config.from_object(__name__)

APP_KEY = '<KEY>'
APP_SECRET = '<KEY>'

twitter = Twython(APP_KEY, APP_SECRET, oauth_version=2)
ACCESS_TOKEN = twitter.obtain_access_token()

APP_KEY = '<KEY>'

twitter = Twython(APP_KEY, access_token=ACCESS_TOKEN)

tweets = twitter.search(q='LVHack', count=100, result_type='recent')
#print json.dumps(tweets)


@app.route('/')
def index():
    return 'Hello World'

@app.route('/twitter')
def twitter():
    return json.dumps(tweets)

@app.route('/facebook')
def gmail():
    return 'Fuck gmail'<commit_msg>Allows user to specify trending twitter topic<commit_after>from flask import Flask, request, session, g, redirect, url_for, abort, \
     render_template, flash
from twython import Twython
import json

# Flask setup
app = Flask(__name__)
app.config.from_object(__name__)
app.debug=True

# Twitter API Setup
APP_KEY = '<KEY>'
APP_SECRET = '<KEY>'
twitter = Twython(APP_KEY, APP_SECRET, oauth_version=2)
ACCESS_TOKEN = twitter.obtain_access_token()
APP_KEY = '<KEY>'
twitter = Twython(APP_KEY, access_token=ACCESS_TOKEN)

# routing
@app.route('/')
def index():
    return 'Hello World! Why are you here?'

@app.route('/twitter/<query>')
def twitter(query):
    tweets = twitter.search(q=query, count=100, result_type='recent')
    return json.dumps(tweets)

@app.route('/gmail')
def gmail():
    return 'Fuck gmail'
{'fraction_non_alphanumeric': 0.13671875, 'fraction_numerical': 0.005208333333333333, 'mean_word_length': 5.5965665236051505, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '4948109', 'n_tokens_mistral': 561, 'n_tokens_neox': 543, 'n_words': 132}