Regex is one of those massive pains in the ass that’s just too helpful not to learn. I won’t pretend it’s fun. I’d put Regex at the same level of No-Dear-God-Why-Is-This-Happening as an enema or a certified letter from the IRS. But once you wrap your head around it, you’ll be wanting to use them all the time because they make everything else just… stupid easy.
Python: How to Parse CSV Files
Did you know that if you go to Google Docs and try to load a csv file with 11,920 rows and 92 columns, you’ll likely get a warning like this?
Out for the Holiday…
A Roman Room: 1900-1910
Today I’m stretching my use of the word “code” to include memory hacks.
There exists a memory technique called the Roman Room, or Method of Loci, in which you associate information you want to remember with specific places in a house or building you know. For anyone who has better recall on spacial data or visual imagery, it’s ideal. That’s me in a nutshell.
JavaScript: How to Loop All Letters in a Word Doc
Last week, I wrote a function that loops through all the characters in the first paragraph of a Google Doc. But chances are, if you’re running through all the characters in a paragraph, you’re going to need all the characters in all the paragraphs.
How the heck do you do that?
Continue reading “JavaScript: How to Loop All Letters in a Word Doc”
JavaScript: How to Automate a Google Doc
Did you know Google Docs are equipped for macros?! Meaning you can script some automation right into Google. Best thing since sliced bread.
Google Apps Script is based on JavaScript, so if you already know that, you’re well ahead of the game.
I know nothing about JavaScript. But I know other stuff. So… Consider this a beginner’s guide for users of other languages.
Python: How to Scrape Craigslist Housing Posts
I live in Miami.
And I can tell you from experience, the Craigslist housing listing page is the 8th circle of hell. Evil pits, horned demons, real estate agents posting fake listings as bait for new clients.
Who has the time to sift through all that?
Continue reading “Python: How to Scrape Craigslist Housing Posts”
PYTHON: How to Script Speech Recognition
SpeechRecognition is a module that to helps Python scripts interact with outside Speech-to-Text engines. It’s important to note here that the module doesn’t actually transcribe audio on its own—it’s more like a sports agent, connecting you with talent.
And some of that talent can be had or tried free of charge. Today, I’ll be looking exclusively at those.
PYTHON: How to Make a Blender Add-On
It’s not difficult to load Python scripts into Blender’s text editor, but there’s something reassuring about just getting them to populate in the space bar menu.
How do you get Blender to do that, you ask?
You make your script into an add-on.
PYTHON: How to Use Try and Except
You know how sometimes when the charger on your phone gets old, it won’t work unless it’s leaned at a 35 degree angle to the right while the device is hanging upside down from the cord? Duck tape. Duck tape is how I solve that problem. Same deal when the fridge handle breaks or when my rain coat gets holes or when my laptop screen gets dislodged from the body.
Duck tape.
Try and Except is the duck tape of Python. Everyone should be aware of its power.