<commit_before>import json

import requests

import boto3

import validatesns

from flask import Flask, request, abort
from flow import Flow

from raven.contrib.flask import Sentry

from config import ORG_ID, CHANNEL_ID, SENTRY_DSN, BOTNAME, BOTPW

flow = Flow(BOTNAME)
app = Flask(__name__)


try:
    flow.start_up(BOTNAME)
except flow.FlowError as e:
    app.logger.info('Bot {} already created'.format(BOTNAME))


try:
    flow.create_device(BOTNAME, BOTPW)
except flow.FlowError as e:
    app.logger.info('Device for bot {} already excists'.format(BOTNAME))


if SENTRY_DSN:
    sentry = Sentry(app, dsn=SENTRY_DSN)


@app.route('/')
def index():
    flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot')
    return 'foo'


@app.route('/pong/')
def pong():<commit_msg>Remove explicit start_up call<commit_after>import json

import requests

import boto3

import validatesns

from flask import Flask, request, abort
from flow import Flow

from raven.contrib.flask import Sentry

from config import ORG_ID, CHANNEL_ID, SENTRY_DSN, BOTNAME, BOTPW

flow = Flow(BOTNAME)
app = Flask(__name__)


try:
    flow.create_device(BOTNAME, BOTPW)
except flow.FlowError as e:
    app.logger.info('Device for bot {} already exists'.format(BOTNAME))


if SENTRY_DSN:
    sentry = Sentry(app, dsn=SENTRY_DSN)


@app.route('/')
def index():
    flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot')
    return 'foo'


@app.route('/pong/')
def pong():
{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.001397624039133473, 'mean_word_length': 4.6156862745098035, 'pattern_counts': {'":': 0, '<': 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': '1123476', 'n_tokens_mistral': 542, 'n_tokens_neox': 522, 'n_words': 135}