<jupyter_start><jupyter_text>wcm tweet updateThis is a python script to update twitter that wcmckee.com has been updated.<jupyter_code>import tweepy
import sys
opconkey = open('/home/wcmckee/twconkey.txt', 'r')
conkeys = opconkey.read().strip('\n')

opconsec = open('/home/wcmckee/twconsec.txt', 'r')
consecs = opconsec.read().strip('\n')

opacckey = open('/home/wcmckee/twacckey.txt', 'r')
acckeys = opacckey.read().strip('\n')

opaccsec = open('/home/wcmckee/twaccsec.txt', 'r')
accsecs  = opaccsec.read().strip('\n')

#argfile = str(sys.argv[1])
 
#enter the corresponding information from your Twitter application:
#conskey = '<KEY>...'#keep the quotes, replace this with your consumer key
#consec = '1234abcd...'#keep the quotes, replace this with your consumer secret key
#acckey = '1234abcd...'#keep the quotes, replace this with your access token
#accsec = '1234abcd...'#keep the quotes, replace this with your access token secret
auth = tweepy.OAuthHandler(conkeys, consecs)
auth.set_access_token(acckeys, accsecs)
api = tweepy.API(auth)
update = ('this is an update')
api.update_status(update)
my_str = "hello world"
bytes = str.encode(my_str)
type(bytes) # insures its bytes
my_decoded_str = str.decode(bytes)
type(my_decoded_str) # insures its string<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14318885448916407, 'fraction_numerical': 0.010061919504643963, 'mean_word_length': 5.630769230769231, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '638442', 'license': 'MIT', 'n_tokens_mistral': 463, 'n_tokens_neox': 454, 'n_words': 118, 'path': '.ipynb_checkpoints/wcmtweetupdate-checkpoint.ipynb', 'repo_name': 'wcmckee/wcmckee', 'size': '1295'}