<commit_before>#! /usr/bin/env python3
"""Spaghetti-Twitter-Bot/Flask/Zappa."""

import tweepy
from tweepy.error import TweepError
from auth import give_me_auth as auth
from send_tweet import main as send_tweet
from tweet_finder import tweet_finder as finder
from models.tweetlog import get_last_tweet, update_tweet_log
import flask

app = flask(__name__)

def check_go(in_tweet):
    if in_tweet.id > get_last_tweet():
        return True
    else:
        return False

@app.route('/')
def main():
    new_tweet = finder()
    if check_go(new_tweet):
        try:
            send_tweet(new_tweet)
        except TweepError:
            update_tweet_log(new_tweet.id)
        else:
            update_tweet_log(new_tweet.id)
    else:
        return

if __name__ == '__main__':
    app.run(port=5000)
<commit_msg>makes good<commit_after>#! /usr/bin/env python3
"""Spaghetti-Twitter-Bot/Flask/Zappa."""

import tweepy
from tweepy.error import TweepError
from auth import give_me_auth as auth
from send_tweet import main as send_tweet
from tweet_finder import tweet_finder as finder
from models.tweetlog import get_last_tweet, update_tweet_log
from flask import Flask

app = Flask(__name__)

def check_go(in_tweet):
    if in_tweet.id > get_last_tweet():
        return True
    else:
        return False

@app.route('/')
def main():
    new_tweet = finder()
    if check_go(new_tweet):
        try:
            send_tweet(new_tweet)
        except TweepError:
            update_tweet_log(new_tweet.id)
        else:
            update_tweet_log(new_tweet.id)
    else:
        return

if __name__ == '__main__':
    app.run(port=5000)

{'fraction_non_alphanumeric': 0.08669108669108669, 'fraction_numerical': 0.006105006105006105, 'mean_word_length': 3.0569306930693068, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5018721', 'n_tokens_mistral': 594, 'n_tokens_neox': 571, 'n_words': 137}