<commit_before>"""
This program allows you to tweet directly from terminal.

Prerequisites:
	install tweepy (python module) with "pip install tweepy"
	Also, grab your Twitter API from apps.twitter.com
	Get your comsumer key, consumer key secret, access token, access token secret.
	Replace them in initialize() method.

Have fun, this code is all yours.
NEVER SHARE YOUR CONSUMER KEY SECRET AND ACCESS TOKEN SECRET!!!
"""
import tweepy, os

def tweetthis(type):
	if type == "text":
		print "Enter your tweet "+user.name
		tweet = raw_input()
		api.update_status(tweet)
		print "\n\nDONE!!"
	elif type == "pic":
		print "Enter pic path "+user.name
		pic = os.path.abspath(raw_input())
		print "Enter status "+user.name
		title = raw_input()
		api.update_with_media(pic, status=title)
		print "\n\nDONE!!"

def initialize():
	global api, auth, user
	ck = "here" # consumer key
	cks = "here" # consumer key SECRET
	at = "here" # access token
	ats = "here" # access token SECRET

	auth = tweepy.OAuthHandler(ck,cks)
	auth.set_access_token(at,ats)

	api = tweepy.API(auth)
	user = api.me()

def main():
	doit = int(raw_input("\n1. text\n2. picture\n"))
	if doit == 1:
		initialize()
		tweetthis("text")
	elif doit == 2:
		initialize()
		tweetthis("pic")
	else:
		print "OK, Let's try again!"
		main()

main()

# written by shreydan. github.com/shreydan<commit_msg>Updated tweets.py<commit_after>"""
This program allows you to tweet directly from terminal.

Prerequisites:
	install tweepy (python module) with "pip install tweepy"
	Also, grab your Twitter API from apps.twitter.com
	Get your comsumer key, consumer key secret, access token, access token secret.
	Replace them in initialize() method.

Have fun, this code is all yours.
NEVER SHARE YOUR CONSUMER KEY SECRET AND ACCESS TOKEN SECRET!!!
"""
import tweepy, os

def tweetthis(type):
	if type == "text":
		print "Enter your tweet "+user.name
		tweet = raw_input()
		api.update_status(tweet)
	elif type == "pic":
		print "Enter pic path "+user.name
		pic = os.path.abspath(raw_input())
		print "Enter status "+user.name
		title = raw_input()
		api.update_with_media(pic, status=title)

	print "\n\nDONE!!"

def initialize():
	global api, auth, user
	ck = "here" # consumer key
	cks = "here" # consumer key SECRET
	at = "here" # access token
	ats = "here" # access token SECRET

	auth = tweepy.OAuthHandler(ck,cks)
	auth.set_access_token(at,ats)

	api = tweepy.API(auth)
	user = api.me()

def main():
	doit = int(raw_input("\n1. text\n2. picture\n"))
	initialize()
	if doit == 1:
		tweetthis("text")
	elif doit == 2:
		tweetthis("pic")
	else:
		print "OK, Let's try again!"
		main()

main()

# written by shreydan. github.com/shreydan
{'fraction_non_alphanumeric': 0.12700186219739293, 'fraction_numerical': 0.0029795158286778397, 'mean_word_length': 4.116190476190476, 'pattern_counts': {'":': 4, '<': 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': '5765917', 'n_tokens_mistral': 1013, 'n_tokens_neox': 950, 'n_words': 311}