ls satyarth.me

about contact archive projects

ls projects

trophallaxis.wav cactus_juice.mp4

Supa Bot šŸ”„FirešŸ”„: I Spit That

A bot that tweets in the style of Supa Hot Fire

I wrote a bot that replies to peopleā€™s tweets in the style of Supa Hot Fire. While the primary goal was dank memes, it also served as a nice introduction to natual language processing and the Twitter API.

Update: The bot got banned. RIP in peace.

How it works

When running, the bot gets a stream of tweets containing ā€˜Iā€™ or ā€˜weā€™ via Twitterā€™s streaming API. It looks for tweets in the stream in the format of a personal pronoun followed by a verb (for example *ā€I like turtlesā€). When it gets a hit, it restructures the sentence (ā€œTurtles: I like thatā€*) and tweets it back at the tweeter. Then it chills out for up to an hour.

It uses Tweepy as a Twitter API wrapper and NLTK to chunk and tag tweets.