<commit_before>import os
import pgdb

from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello():
    conn = pgdb.connect( host='pg', user='postgres', password='<PASSWORD>', database='testnet' )
    cur = conn.cursor()
    cur.execute( "SELECT value FROM kv WHERE key='provider'" )
    provider = cur.fetchone()[0]
    conn.close()
    return 'Hello '+provider+'!'

if __name__ == '__main__':
    # Bind to PORT if defined, otherwise default to 5000.
    port = int(os.environ.get('PORT', 5000))
    app.run(host='0.0.0.0', port=port)<commit_msg>Add logging to python webserver<commit_after>import os
import pgdb
import logging

from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello():
    conn = pgdb.connect( host='pg', user='postgres', password='<PASSWORD>', database='testnet' )
    cur = conn.cursor()
    cur.execute( "SELECT value FROM kv WHERE key='provider'" )
    provider = cur.fetchone()[0]
    conn.close()
    return 'Hello '+provider+'!'

if __name__ == '__main__':
    logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
    # Bind to PORT if defined, otherwise default to 5000.
    port = int(os.environ.get('PORT', 5000))
    app.run(host='0.0.0.0', port=port)
{'fraction_non_alphanumeric': 0.16451612903225807, 'fraction_numerical': 0.020967741935483872, 'mean_word_length': 4.149377593360996, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '7642248', 'n_tokens_mistral': 430, 'n_tokens_neox': 411, 'n_words': 109}