<commit_before>from flask import Flask, request, Response, jsonify
from flask_slack import Slack
from app import *
import json


app = Flask(__name__)

SLACK_WEBHOOK_SECRET = os.environ.get('SLACK_WEBHOOK_SECRET')
SLACK_RAGE_BOT = os.environ.get('SLACK_RAGE_BOT')
SLACK_BOSCO_BOT = os.environ.get('SLACK_BOSCO_BOT')

@app.route('/slack', methods=['POST'])
def inbound():
    if request.form.get('token') == SLACK_WEBHOOK_SECRET:
        channel = request.form.get('channel_name')
        username = request.form.get('user_name')
        channel_id = get_channel_id_from_name(channel)
        message = request.form.get('text')[5:]
        send_message(channel_id=channel_id, message=message)
        return Response(), 200


@app.route('/rage', methods=['POST'])
def RAGE():
    if request.form.get('token') == SLACK_RAGE_BOT:
        user = request.form.get('user_name')
	channel = request.form.get('channel_name')
        channel_id = get_channel_id_from_name(channel)
	message = "@{}: {}".format( user, request.form.get('text').encode('utf-8').upper())
	trump_message(channel_id=channel_id, message=message)
    return Response(), 200

@app.route('/botsco', methods=['POST'])
def BOTSCO():
    if request.form.get('token') == SLACK_BOSCO_BOT:
        channel = request.form.get('channel_name')
        channel_id = get_channel_id_from_name(channel)
        send_message(channel_id=channel_id, message=request.form.get('text'))
	print("{} took over Botsco and said: {}".format(request.form.get('user_name'), request.form.get('text')))
        return Response(), 200

@app.route('/', methods=['GET'])
def test():
    return Response('It works!')


if __name__ == "__main__":
    app.run(debug=True)
<commit_msg>Added a file that will randomly visit a chat once a day during the work week<commit_after>from flask import Flask, request, Response, jsonify
from flask_slack import Slack
from app import *

app = Flask(__name__)

SLACK_WEBHOOK_SECRET = os.environ.get('SLACK_WEBHOOK_SECRET')
SLACK_RAGE_BOT = os.environ.get('SLACK_RAGE_BOT')
SLACK_BOSCO_BOT = os.environ.get('SLACK_BOSCO_BOT')

@app.route('/slack', methods=['POST'])
def inbound():
    if request.form.get('token') == SLACK_WEBHOOK_SECRET:
        channel = request.form.get('channel_name')
        username = request.form.get('user_name')
        channel_id = get_channel_id_from_name(channel)
        message = request.form.get('text')[5:]
        send_message(channel_id=channel_id, message=message)
        return Response(), 200


@app.route('/rage', methods=['POST'])
def RAGE():
    if request.form.get('token') == SLACK_RAGE_BOT:
        user = request.form.get('user_name')
	channel = request.form.get('channel_name')
        channel_id = get_channel_id_from_name(channel)
	message = "@{}: {}".format( user, request.form.get('text').encode('utf-8').upper())
	trump_message(channel_id=channel_id, message=message)
    return Response(), 200

@app.route('/botsco', methods=['POST'])
def BOTSCO():
    if request.form.get('token') == SLACK_BOSCO_BOT:
        channel = request.form.get('channel_name')
        channel_id = get_channel_id_from_name(channel)
        send_message(channel_id=channel_id, message=request.form.get('text'))
	print("{} took over Botsco and said: {}".format(request.form.get('user_name'), request.form.get('text')))
        return Response(), 200

@app.route('/', methods=['GET'])
def test():
    return Response('It works!')

if __name__ == "__main__":
    app.run(debug=True)

{'fraction_non_alphanumeric': 0.15721278433630867, 'fraction_numerical': 0.006334581053843939, 'mean_word_length': 4.657980456026059, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '6360196', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1194, 'n_words': 215}