<commit_before><commit_msg>Core: xTweet Function<commit_after>#!/usr/bin/python

import ConfigParser
from twython import Twython

global twythonid

def xtweetconfiguration():
    configuration = ConfigParser.ConfigParser()
    configuration.read('configuration/credentials.config')
    consumer_key = configuration.get('twitter','consumer_key')
    consumer_secret = configuration.get('twitter','consumer_secret')
    access_token = configuration.get('twitter','access_token')
    access_token_secret = configuration.get('twitter','access_token_secret')
    twythonid = Twython(consumer_key,consumer_secret,access_token,access_token_secret)
    return twythonid

def xtweet(status, media):
    twythonid = xtweetconfiguration()
    if media:
        photo = open(media,'rb')
        twythonid.update_status_with_media(media=photo, status=status)
    else:
        twythonid.update_status(status=status)

# End of File
{'fraction_non_alphanumeric': 0.1025081788440567, 'fraction_numerical': 0.0, 'mean_word_length': 5.60431654676259, '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': '6756241', 'n_tokens_mistral': 275, 'n_tokens_neox': 269, 'n_words': 44}