<commit_before>import schedule
import tweepy
import time
import os


from turingtweets.models import get_engine
from sqlalchemy.orm import sessionmaker
from turingtweets.models.mymodel import FakeTweet

test_dict = {'sqlalchemy.url': os.environ.get('DATABASE_URL')}
print(os.environ.get('DATABASE_URL'))
engine = get_engine(test_dict)
print(engine)
SessionFactory = sessionmaker(bind=engine)
session = SessionFactory()


faketweet = session.query(FakeTweet).filter_by(tweeted=False).first().faketweet


def job(tweet):
    auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
    auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
    api = tweepy.API(auth)
    api.update_status(status=tweet)


# schedule.every().hour.do(job)
job(faketweet)

# while True:
#     print("Inside of tweet_scheduler:")
#     schedule.run_pending()
#     time.sleep(1)
<commit_msg>trying to tweet fake tweet<commit_after>import schedule
import tweepy
import time
import os


from turingtweets.models import get_engine
from sqlalchemy.orm import sessionmaker
from turingtweets.models.mymodel import FakeTweet

test_dict = {'sqlalchemy.url': os.environ.get('DATABASE_URL')}
print(os.environ.get('DATABASE_URL'))
engine = get_engine(test_dict)
print(engine)
SessionFactory = sessionmaker(bind=engine)
session = SessionFactory()


faketweet = session.query(FakeTweet).filter_by(tweeted=False).first().faketweet


def job(tweet):
    auth = tweepy.OAuthHandler(os.environ.get('CONSUMER_KEY'), os.environ.get('CONSUMER_SECRET'))
    auth.set_access_token(os.environ.get('ACCESS_TOKEN'), os.environ.get('ACCESS_TOKEN_SECRET'))
    api = tweepy.API(auth)
    api.update_status(status=tweet)


# schedule.every().hour.do(job)
job(faketweet)

# while True:
#     print("Inside of tweet_scheduler:")
#     schedule.run_pending()
#     time.sleep(1)

{'fraction_non_alphanumeric': 0.1202843083652269, 'fraction_numerical': 0.0010934937124111536, 'mean_word_length': 6.011494252873563, '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': '3744721', 'n_tokens_mistral': 671, 'n_tokens_neox': 656, 'n_words': 108}