Solving Mysteries with Google Reverse Image Search

Each year, Digital Ocean sends a bunch of stickers with their Hacktoberfest t-shirts. This year, I didn’t recognize one of them:

mystery.png

After a few days tangled up in wondering and unanswered tweets, I remembered Google’s Reverse Image Search which I’d learned about in their Data Journalism Fundamentals course. Check it out–I dropped the image into the search box and …

mysterySolved.png

Twillio. I don’t know what they do or make but I know it’s their logo.

I’ll bet you could totally drop pictures of people in and find them. I’ll bet you could draw something you remember and find it … and I’m so gonna try that. There are a couple books I read as a kid that I can’t remember any real details about but I remember the cover vividly! If I can reproduce, maybe the ReverseImage box can help! Dude … sketch artists and facial recognition!

Wow … The Girl with the Dragon Tattoo would have been a much shorter book if Lisbeth and what’s-his-Millenium had used this. I wonder if it can find individual components and suggest them as … something to focus on … I’ll bet that would be a relatively easy thing to code.

Like … you know how Sherlock and other androids identify things like … dirt on someone’s collar, dry skin or whatever … and those observations become clues? It would be great to evolve some machine learning to automate what poor Deckard did in Blade Runner with that photo … all that zooming and panning before he noticed the scale.

Update: Watched Searching on Thanksgiving evening in which a Dad uses Reverse Image Search to solve an missing person and/or murder case.

Advertisements

My First Cron Job(s)

Learning from this great “Automated Tasks” page at CentOS.org

Normally, I prefer stuff like this in a well-written tutorial (see below awesomeness from DigitalOcean) but the above is … wow.

Tangent Sidebar: You know what’s kind of irritating? How I use DigitalOcean documentation all the time — not just because it’s higher in the Google results but it is so much better than the documentation of my actual host. Far more subjects, ridiculously specific, much better written, and far more accurate.

Two cases in point:

The latter is especially useful today because I keep getting emails from Let’s Encrypt reminding me to renew my shizzle.

But, as it turns out, none of those told me exactly what I needed but this did:

How to run PHP scripts from cron jobs

That’s my host. I’m very proud of them. And if their customer support is ever consistently good or consistently “not bad,” I’ll totally apologize. Interestingly, that tute gave me the final piece I needed but if I hadn’t read the other tutes first I’d still have no idea what to do because it only gave the final step, not the first several. That’s my host.

The first three (the good) tutorials taught me how to write a line in the crontab using the columns:

  • minute
  • hour
  • day
  • month
  • dayofweek
  • command

“How to Use Cron …” even gave me the “shortcut” of using @weekly instead of 00**0.

But Newbie: Intro to Cron which I think — sincerely and seriously — is a beautifully designed page, gave me the best tip in telling me to look for the following folders in my /etc directory:

  • cron.daily
  • cron.hourly
  • cron.monthly
  • cron.weekly

Dude. Just drop a script in one of those and viola!

And … and … earlier, one of those tutorials stated, “Cron is a daemon …” and I wondered, “What is a daemon?” That Newbie tute said,

Cron is a daemon, which means that it only needs to be started once, and will lay dormant until it is required. A Web server is a daemon, it stays dormant until it gets asked for a web page. The cron daemon, or crond, stays dormant until a time specified in one of the config files, or crontabs.

I wish cogNiTioN wrote every tutorial on all of the sites and I wish all of the sites were designed like that one.

Okay, so I write a line in my crontab telling it to change directories to where I keep a certain php file, then use php to run that file. Like so …

00 16 * * * user-name cd /my/directory/path; php -q myfile.php

It’s almost 3:30pm now so in a little over half an hour, I’ll check to see if it worked. I’d love that. I’m rather sick of trying to remember to do this particular task.

I had it change directories first because from what I understand, the relative paths in the file would get all confused and fail if the little crontab tried to run the commands from /etc.

If you’re still reading and you care, it’s a script that will go grab popularity scores from Spotify for a bunch of artists I’m tracking.

Another nifty thing I think is interesting is … I did a magical “save as” on the php file I’ve been using for this task and realized, wow, the crontab doesn’t need all of the html, css, jquery, etc. because that’s for me to see so I know the script worked. Not only do I know it worked but the crontab couldn’t care less so I stripped it all out of a new, dedicated file. I also rewrote (or, rather, wrote a new script based on) the script I’ve been using because part of the original added rows to a table that the crontab wouldn’t look at even if it existed. Because the crontab doesn’t have eyes. And doesn’t care.