Bleps always cheer me up, so I decided to create a Mastodon bot that posted one blep a day. (A blep is a picture of an animal with a tiny bit of its tongue sticking out, and Mastodon is a decentralized alternative to Twitter.)
Creating a Mastodon bot in Python was surprisingly easy, thanks to the Mastodon.py library. I’ve documented all the steps here, along with links to tutorials for each library or builtin feature that I used.
Have you created any Mastodon or Twitter bots? Let me know in the comments!
I wanted to get some data off an agent listing website and into a spreadsheet. I’d been meaning to play around with python for web scraping and this was the perfect excuse: There were just enough results that it would take longer to manually copy and paste them than to write a little python program. (I never want to automate something that will take less time to do than to automate, as long as I’m only going to do it once or twice…)
One of the amazing things about being a DBA/developer in 2016 is the sheer amount of freely available, downloadable data to play with. One fun publicly available data sets is the American Social Security Administration names data. It contains all names for which SSNs were issued for each year, with the number of occurrences (although names with <5 occurrences are not included to protect individual privacy).
I had a large-ish CSV to load and a problem: line breaks inside some of the delimited fields.
if you like to scp:
# If not running interactively, don't do anything
[[ $- == *i* ]] || return
Otherwise scp will fail without error – it’s a known bug.
A RAC DBA needs to keep at least two sets of environment variables handy: one for the Grid/ASM home, and one for the database home. Here's how I set up my .bashrc to make that easy.
In my work for Oracle RAC Support, I have noticed that people sometimes identify the wrong background process trace files… for example, uploading an old LMON trace file instead of the current one. Here are some one-liners to identify the current background traces. Read more