GMU:Bots 'n' Plots/Azucena Sanchez: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
Line 1: Line 1:
Hello World!
Hello World!
== Midterm Bot ==
This is a bot that takes a song from the band Interpol called Leif Erikson. It tries to take line by line from the lyrics and re-arrange them. My experiment was to see if some nice combinations could be created from lyrics that are very thoughtful and metaphoric.
So far the bot is running in twitter and is working, but I still need to clean it and take it a step further, I wan to take the lyrics from the song Roland (also from interpol) and mix them in one tweet, to make ir more interesting.
This is the code
<pre style="font-size:smaller" >
import tweepy
import sys
import time
import random
from time import sleep
#TWITTER KEYS
consumer_key = "JgAFe2vulLO4KvSvHPdNI30xA"
consumer_secret = "Zbu0zBP8g4sdS5LX4XrI9y3ddNdGfj0woSxxFgxiX5wrMNpC9X"
access_token = "3329105651-NI0NPXV2HUCRTXPueHdEhzRCoKPNwwf3vxOd5yj"
access_token_secret = "obFHhsKlQ7KlXAXOqz7c5zMf3qvYDSsfvtnw84cFBqV4N"
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.secure = True
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
#INITIALIZATION
l = "leifErikson.txt"
leif = open (l)
print("Leif Erikson is in da house")
lines = leif.readlines()
for line in lines:
li = line.split(' ')
random.shuffle(li)
api.update_status(status = li)
print(li)
time.sleep(90)
leif.close()
</prev>








[[File:My_robot_azu.png | 150x150px | thumb | left]]




Line 10: Line 54:




== Midterm Bot ==
This is a bot that takes a song from the band Interpol called Leif Erikson. It tries to take line by line from the lyrics and re-arrange them. My experiment was to see if some nice combinations could be created from lyrics that are very thoughtful and metaphoric.


So far the bot is running in twitter and is working, but I still need to clean it and take it a step further, I wan to take the lyrics from the song Roland (also from interpol) and mix them in one tweet, to make ir more interesting.


This is the code
[[File:My_robot_azu.png | 150x150px | thumb | left]]

Revision as of 21:33, 16 June 2015

Hello World!


Midterm Bot

This is a bot that takes a song from the band Interpol called Leif Erikson. It tries to take line by line from the lyrics and re-arrange them. My experiment was to see if some nice combinations could be created from lyrics that are very thoughtful and metaphoric.

So far the bot is running in twitter and is working, but I still need to clean it and take it a step further, I wan to take the lyrics from the song Roland (also from interpol) and mix them in one tweet, to make ir more interesting.

This is the code

import tweepy
import sys
import time
import random
from time import sleep

#TWITTER KEYS
consumer_key = "JgAFe2vulLO4KvSvHPdNI30xA"
consumer_secret = "Zbu0zBP8g4sdS5LX4XrI9y3ddNdGfj0woSxxFgxiX5wrMNpC9X"
access_token = "3329105651-NI0NPXV2HUCRTXPueHdEhzRCoKPNwwf3vxOd5yj"
access_token_secret = "obFHhsKlQ7KlXAXOqz7c5zMf3qvYDSsfvtnw84cFBqV4N"

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.secure = True
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth)

#INITIALIZATION
l = "leifErikson.txt"

leif = open (l)
print("Leif Erikson is in da house")
lines = leif.readlines()

for line in lines:
	li = line.split(' ')
	random.shuffle(li)
	api.update_status(status = li)
	print(li)
	time.sleep(90)


leif.close()
</prev>











My robot azu.png