Cameron M. Kieffer
  • Home
  • About
  • Blog
  • Projects
  • Research
  • Contact

Hallelujah it’s raining bots

8/11/2015

0 Comments

 
[Dusk. Three 20-something white men sit around a rectangular kitchen table, several piles of white and black cards stacked in front of them. Oh and some Busch Light cans.]

This all started when no one would play Cards Against Humanity with us.  So we started pulling pairs of black and white cards off the stacks and sharing the ones that we thought were funny. “Someone should make a Twitter bot that automatically posts random combinations of these,” I thought aloud.  No one responded because that is a stupid thing to say at a party. When we finally finished all of the black cards I went home and did it (two days later) anyway.
To be fair this HAS been done before. @CAH_bot is a fine example of one. And its about 1600 tweets ahead of me.  But I did it anyway because the world deserves more Twitter bots (and because I didn’t find that account until after I did all this work).

How did I do it? Well I’m glad you asked.  After I tracked down some text lists of the cards, I imported them into Excel and used its RANDBETWEEN() and INDIRECT() functions to pull cards from each list and paste them together.  Once I copied them into a new Notepad document I used the code in the appropriately titled “How to Write a Twitter Bot with Python and tweepy” tutorial to automatically post to Twitter. All I had to do then was create a Twitter account and away I went.

So here it is: @bot_CAH

This little guy is more of a rough approximation of a Twitter bot.  First, I should probably write up some Python that automatically generates the posts.  Also it currently posts every 15 minutes, but only when I am using my Surface.  So it won’t completely spam your Twitter feed.  In a perfect world I would have it post every hour from a constantly running Raspberry Pi (basically just a tiny $35 computer that’s useful for things like this).

This bot works in a completely different way from my first foray into Twitter automation.  My other bot, @PH_papers, is based off this post and uses dlvr.it to automatically update the account based off a Google Alerts style search from PubMed.  I would recommend you follow it if you are interested in hearing about the most up-to-date Pulmonary Hypertension research.  So far most of my followers are doctors from Mexico. That’s how you know you’ve made it. 
In closing I would just like to say that this was a fun little experiment and that it has helped to reveal some deep truths about the universe.

White people like Kanye West

— CAH Bot (@bot_CAH) August 11, 2015
0 Comments

    Archives

    January 2022
    November 2021
    July 2021
    May 2021
    April 2021
    May 2020
    April 2020
    January 2020
    July 2019
    May 2018
    March 2018
    September 2017
    February 2017
    October 2016
    May 2016
    April 2016
    February 2016
    November 2015
    October 2015
    August 2015
    May 2015
    April 2015
    January 2015

    Categories

    All
    AAAS
    Artificial Intelligence
    Billboard
    Chinese
    Data Is Beautiful
    Election2016
    Football
    Google Trends
    Healthcare
    InkScape
    Instagram
    Interstate
    Language
    Machine Learning
    Map
    Music
    Neural Networks
    Omaha
    Papa Cam
    Pharmacology
    Podcast
    Policy
    Python
    R
    Running
    SNAP
    Spanish
    Sports
    Star Trek
    Super Bowl
    Taylor Swift
    Toastmasters
    TwitterBot
    Washington D.C.

    RSS Feed

Home

About

Research

Projects

Blog

Contact
Copyright © 2018
  • Home
  • About
  • Blog
  • Projects
  • Research
  • Contact