<commit_before>import re
import requests, base64
import json
from datetime import datetime

from flask import Flask
from flask import render_template
from flask import url_for
from flask import request

from twilio import twiml
from twilio.util import TwilioCapability

# Declare and configure application
app = Flask(__name__, static_url_path='/static')
app.config.from_pyfile('local_settings.py')


# Voice Request URL
@app.route('/voice', methods=['GET', 'POST'])
def voice():
    response = twiml.Response()
    response.say("Congratulations! You deployed the Twilio Hackpack "
                 "for Heroku and Flask.")
    return str(response)


# SMS Request URL
@app.route('/sms', methods=['POST'])
def sms():
    response = twiml.Response()
    body = request.form['Body']
    if "everyblock" in body:
        textinput = body.replace('everyblock','')
        if textinput.isdigit():
        texttype = 'zipcodes'
        for metro in metros:
            everyblock_url = 'https://api.everyblock.com/content/%s/zipcodes'%metro
            r = requests.get(everyblock_url, headers = {'Authorization' : 'Token <PASSWORD>'})
            return_data = json.loads(r.text)
            for i in return_data:
                #print i
                if textinput == i['name']:<commit_msg>metrofinal<commit_after>import re
import requests, base64
import json
from datetime import datetime

from flask import Flask
from flask import render_template
from flask import url_for
from flask import request

from twilio import twiml
from twilio.util import TwilioCapability

# Declare and configure application
app = Flask(__name__, static_url_path='/static')
app.config.from_pyfile('local_settings.py')


# Voice Request URL
@app.route('/voice', methods=['GET', 'POST'])
def voice():
    response = twiml.Response()
    response.say("Congratulations! You deployed the Twilio Hackpack "
                 "for Heroku and Flask.")
    return str(response)


# SMS Request URL
@app.route('/sms', methods=['POST'])
def sms():
    response = twiml.Response()
    body = request.form['Body']
    metro_final = ''
    if "everyblock" in body:
        textinput = body.replace('everyblock','')
        if textinput.isdigit():
        texttype = 'zipcodes'
        for metro in metros:
            everyblock_url = 'https://api.everyblock.com/content/%s/zipcodes'%metro
            r = requests.get(everyblock_url, headers = {'Authorization' : 'Token <PASSWORD>'})
            return_data = json.loads(r.text)
            for i in return_data:
                #print i
                if textinput == i['name']:
{'fraction_non_alphanumeric': 0.11295296838858905, 'fraction_numerical': 0.0015420200462606013, 'mean_word_length': 3.1321656050955413, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1149188', 'n_tokens_mistral': 775, 'n_tokens_neox': 750, 'n_words': 218}