Mary Dickson Diaz

Code, Life, Learning

Tag: bots

badge of honor

The bad news: my achievement bot got banned! (a twitter ban on a benevolent bot is actually a badge of honor in twitterbot land, so I’m not too broken up about it)

The good news: I discovered this fact while updating my resume! I added some projects that I’m proud of and can talk about, which makes the idea of chatting with tech recruiters less horrifying.

I haven’t had time to blog which is a bummer for me, but not unexpected. In the meantime though, you can enjoy my lightning talk about Markov Chains, which I used to create Bookmerge.

Back in a jiffy 🙂

py-ladies and finding my people

Tonight I attended my first py-ladies meetup (long loooonng overdue). I’ve been lurking this group for awhile and less so in recent months as I identified less as a py-lady and more as a rubyist, but they got me out with the lure of… can you guess? TWITTERBOTS. Oh yes. I will shower and take the #7 bus and show up for some juicy bot talk.

And so I arrived, freakishly on-time for cocktail hour (I meant to sort of slither in just in time for the talk because despite years of getting paid to successfully network I am painfully introverted and bad at intro-chat). And despite any awkwardness I met many lovely ladies and enjoyed a great talk by Elizabeth Uselton, a first cohort Ada Academy graduate. I’ll post a link to her presentation if it’s shared with me. My favorite was her description of a bot she created, “Cathy,” to gently troll her classmates through the persona of “your mom’s friend on facebook who likes the Seahawks, yoga, and everything you post, but not creepy-like.”

Some links (not-bot):

Continue reading

protest bots

I have to share this great new tool from dream team Darius Kazemi and DeRay Mckesson:

Screen Shot 2015-07-17 at 1.58.22 PM

If you follow, it will say something aspirational about you. Later, it will become a tool for prominent social activists to respond to onslaughts of people asking the same questions, trolling, or parroting misinformation.

I’ve been pretty sad the past few days following the Sandra Bland story, so I’m thrilled to see this marriage of technology and activism as something somewhat “in my wheelhouse” and hope it will lead to more projects and collaborations.

Also notable:

  • Block Together — required for intermediate+ Twitter users. Share your blocked accounts with trusted contacts and follow theirs for automatic blocks of hateful, misogynistic accounts (see this tweet to get started).

mission unlocked

Hey friends,

After compiling all these great twitter bot resources I’ve been on a bot kick, creating two new ones in the past few days. I should probably diversify my projects some more, but in the meantime it’s such a great way to learn and practice code, git, and tools to deploy.

CHALLENGE #1: Can you do it in JavaScript?

answer = #achievementunlocked

Darius Kazemi is something of a legend in botland (he’s the creator of the Harry Potter sorting bot, among others), and has posted a tutorial for a simple example bot that re-tweets a hashtag once an hour.  I have, in my pile of unfinished projects, big plans for the twitter handle *unlock achievemt* but I got stuck awhile back when I couldn’t figure out how to auto upload pictures. So in the meantime, I’ve set it to re-tweet something from the #achievementunlocked hashtag once an hour, with pretty great results:

Screen Shot 2015-04-18 at 12.36.49 AM

Continue reading

top bot

OK, you want to talk bots? Let’s talk bots! First, let’s go back…

WAAAAAY back. A few weeks ago, I got a nice mention on Twitter from a procrastinating grad student who found my tutorial and used it to set up Ecce , a Publilius Syrus twitterbot (I had to wikipedia that).

Continue reading

week 2, what it do?

Hi everyone, Mary here, checking in for a Python – Week 2 update.

BUT FIRST: it is Friday at 3:30, I have a monster headache, and my ongoing lack of internet at home has made pretty much everything more difficult this week. However, you have come to this here website and by God, you shall have content!

Continue reading

changing environments

What a week!

Personal update: Josh and I signed a mountain of paperwork yesterday and are just waiting… waiting… for JUST GOT final notification that we’ve closed on a house here in Seattle. This process has been nail-biting right up until very end. I sold my house in Houston back in October and we were outbid on a house in Seattle earlier this winter. That turned out to be a blessing because it enabled me to leave my job and for us to still qualify for a (smaller) loan on Josh’s income alone. All in all, we’ll be paying half as much each month on our mortgage as we’re currently paying in rent, and moving from a land of faceless high-rise condos to a wonderfully diverse neighborhood with an invested community. Anyway, the house buying process is a lot different from 2010, when I bought my house in Houston. More paperwork, more disclosures, and more “we’re all set just waiting on this oooooone little make-or-break thing….” It may sounds nuts but trust me that rent here is no joke, and *buying a house* is going to *save us money* in both the short and long-term. Crazy, I know.

So, that’s been taking up a lot of my time and mental energy. But we’re excited!!

No new work to share… but elsewhere online, here’s some stuff I’m paying attention to: Continue reading

finishing the bot

finishing the bot
how you have to finish the bot…
how you watch the rest of the world from a window–
while you finish the bot

mapping out a .py
what you feel for twitter’s API
what you feel when errors that come through heroku go

“tweet status update failed on third try…”

I have been watching Stephen Sondheim musicals basically non-stop and this song seems most appropriate for the past few days. “Oh there’s a new lecture out…. BOT.” “I should get started on that javascript pre-work…. BOTBOTBOT.” “It’s 2:30 in the morning…. BOOOOOOOTTTT”

twitterscreenshot

My bot is now deployed and fully-functioning out in The Cloud, thanks to Joel!

>>Ok I have a twitter bot and I want to run it but not from my personal computer, help

The above link tells the story of how I went from here (functioning bot, living on my laptop) to here (functioning bot, living on GitHub/running on heroku). First, you’ll need to install heroku and follow the directions to get started, here. After that, follow Joel’s directions and you’re golden.

I hope you didn’t have other things to do today.

UPDATE 6/25/15

This is part 2 of the tutorial.

Part 1: Build a Twitter Bot with Python

Part 3: Top Bot

build a twitter bot with python

This year I set out to learn how to make twitter bots, accounts that automatically interact with twitter in some way, whether through tweeting set content at regular intervals, watching for and responding to code words, or responding in a certain way when tweeted at. I learned the basics of Twitter API interaction at UW’s Community Data Science Workshop last November, and have since been inspired by other people doing cool stuff with bots.

Witness:

For more great examples, check out 52bot project.

A few nights ago, as I was reading about the reunion of the women of Bletchley Park, I clicked through to the Honour Roll and found a database that looked like it might translate well into a twitterbot. Using a subset of data and some internet tutorials, a test bot took maybe an hour or two tops to set up (and I was so thrilled when it worked!). The time-consuming part has been 1) finding a way to reliably keep it tweeting; and 2) pulling and cleaning up the full dataset to fit twitter’s 140 character limit (in my test run, I just told twitter “print the first 140 characters and ignore the rest” but for the full deployment, I wanted to edit the longer bios to make them fit).

Ok, so without further ado, here’s the bot:

And here’s how I made it!: Continue reading

© 2023 Mary Dickson Diaz

Theme by Anders NorenUp ↑