<commit_before>import os

from flask import Flask
from mandrill_webhooks import MandrillWebhooks

app = Flask(__name__)

if os.getenv('MANDRILL_WEBHOOKS_SETTINGS'):
    app.config.from_envvar('MANDRILL_WEBHOOKS_SETTINGS')

mandrill = MandrillWebhooks(app)


@mandrill.hook('*')
def log_event(payload, event):
    print "New event: %s received! with payload: %s" % (event, payload)


if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True, use_reloader=False)<commit_msg>Using osconf to configure demo app.py<commit_after>import os

from flask import Flask
from mandrill_webhooks import MandrillWebhooks


from osconf import config_from_environment

app = Flask(__name__)


for k, v in config_from_environment('MANDRILL_WEBHOOKS').items():
    app.config['MANDRILL_WEBHOOKS_%s' % k.upper()] = v

mandrill = MandrillWebhooks(app)


@mandrill.hook('*')
def log_event(payload, event):
    print "New event: %s received! with payload: %s" % (event, payload)


if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True, use_reloader=False)
{'fraction_non_alphanumeric': 0.12452471482889733, 'fraction_numerical': 0.0076045627376425855, 'mean_word_length': 5.707006369426751, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3879717', 'n_tokens_mistral': 398, 'n_tokens_neox': 387, 'n_words': 87}