<commit_before>from flask import *
import threading
import socket
import queue
app = Flask(__name__)

messages = queue.Queue()

def socket_handler():
    serversocket = socket.socket(
    socket.AF_INET, socket.SOCK_STREAM)
    serversocket.bind(('', 3500))
    serversocket.listen(5)
    #accept connections from outside
    (clientsocket, address) = serversocket.accept()
    while True:
        item = messages.get()
        send_data(clientsocket, str(item).encode('ascii'))

def send_data(sock, msg):
        totalsent = 0
        while totalsent < len(msg):
            sent = sock.send(msg[totalsent:])
            if sent == 0:
                raise RuntimeError("socket connection broken")
            totalsent = totalsent + sent

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

@app.route('/voice')
def voice():
    #messages.put(request.args.get('CallSid'))
    response = make_response(render_template("Response.xml"))
    response.headers['Content-Type'] = "text/xml"
    return response

@app.route('status')
def status():
    messages.put(request.args.get('CallSid'))
    return "";

if __name__ == '__main__':
    threading.Thread(target=socket_handler).start()
    print("I'm still going")
    app.run(host='0.0.0.0')<commit_msg>Added leading slash<commit_after>from flask import *
import threading
import socket
import queue
app = Flask(__name__)

messages = queue.Queue()

def socket_handler():
    serversocket = socket.socket(
    socket.AF_INET, socket.SOCK_STREAM)
    serversocket.bind(('', 3500))
    serversocket.listen(5)
    #accept connections from outside
    (clientsocket, address) = serversocket.accept()
    while True:
        item = messages.get()
        send_data(clientsocket, str(item).encode('ascii'))

def send_data(sock, msg):
        totalsent = 0
        while totalsent < len(msg):
            sent = sock.send(msg[totalsent:])
            if sent == 0:
                raise RuntimeError("socket connection broken")
            totalsent = totalsent + sent

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

@app.route('/voice')
def voice():
    #messages.put(request.args.get('CallSid'))
    response = make_response(render_template("Response.xml"))
    response.headers['Content-Type'] = "text/xml"
    return response

@app.route('/status')
def status():
    messages.put(request.args.get('CallSid'))
    return "";

if __name__ == '__main__':
    threading.Thread(target=socket_handler).start()
    print("I'm still going")
    app.run(host='0.0.0.0')
{'fraction_non_alphanumeric': 0.14116251482799524, 'fraction_numerical': 0.008699090549624358, 'mean_word_length': 3.3470790378006874, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 2, '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': '6354092', 'n_tokens_mistral': 800, 'n_tokens_neox': 780, 'n_words': 169}