News: California may end tyrannical daylight savings

Book reviews for February 2016

Updated on Friday, February 24, 2017
Sand (Sand, #1-5) by Hugh Howey

Sand (Sand, #1-5) by Hugh Howey

4/5

Very good, I was rather hoping Howey was a one hit wonder but now I see that I'm going to have to read the whole cannon.

 

Cockroaches (Harry Hole, #2) by Jo Nesbø

Cockroaches (Harry Hole, #2) by Jo Nesbø

4/5

Finally the #2 Hole has been translated. It's a good one. Sad because it's saying goodbye all over again.

 

The Sellout by Paul Beatty

The Sellout by Paul Beatty

4/5

Starts with a black guy called Me in the Supreme Court for slavery and gets progressively more weird and funny from there. Excellent.

 

Fortune Smiles by Adam Johnson

Fortune Smiles by Adam Johnson

5/5

Stonking collection of perfect short stories. After I finished each one I was gutted that it wasn't turned into a whole book.

 

(Related: #Resist; Go-arounds: LEGO and Legislative Service; The Harvard Business Review Fallacy)

(You might also like: Open letter to Nancy Pelosi; Lands End; Stumpoceros)

(All Book Reviews)

Get an email when your security camera sees something new (Apps Script + Cloud Vision)

Updated on Saturday, February 12, 2022

Get an email when your security camera sees something new (Apps Script + Cloud Vision)

Nest (previously DropCam) can email you when it detects activity but that gets boring quickly. How about an email only when it sees something totally new?

The script below downloads a frame from a web cam and then calls the Google Cloud Vision API to label features. It keeps a record of everything that has previously been seen and only sends an email when a new feature is detected. You could easily tweak this to email on a specific feature (i.e. every time your dog is spotted), or to count the number of times a feature appears. I'm using a Nest cam but any security camera that has a publicly visible image download URL will work.

There is a bit of setup to get this working. Create a new Apps Script project in Google Drive and paste the code above in. You'll need to provide you own values for the three variables at the top.

OAuthCreds is the contents of the JSON format private key file for a Google Developer Console project. Go to the console, create a new project and enable the Cloud Vision API. You'll also need to enable billing (more on this below) - a trial account will work fine for this. Once the API is enabled create a service account under Credentials and download the JSON file. Just paste the contents of this into the script.

That's the hard part over. Now enter the URL of the image to monitor (see this post for instructions on finding this for a Nest / DropCam device) as MonitorImageUrl and your email address for SendEmailTo.

One last thing - follow the instructions here to reference the OAuth2 for Apps Script library.

Once this is all done run the script (the main() function) and authorize it. You should get an email with a picture attached and a list of the labels detected together with a confidence score from 0 to 1. If this doesn't happen check the logs (under the View menu).

You can now schedule the script to run repeatedly (Resources -> Current project's triggers). You get up to 1,000 units a month for free so once an hour should be safe. If you need more frequent updates check the Cloud Vision pricing guide for details.

After a few runs you should only get an email when something new is detected. If you're seeing too many wild guesses then add a filter on the score to exclude low confidence features.

Enjoy, and leave a comment if you have problems (or modify this in interesting ways).

(Previously)

More Google Apps Script Projects

(All Code Posts)

Mandelbrot Spin Zoom

Updated on Saturday, February 19, 2022

Mandelbrot Spin Zoom

Zooming into the Mandelbrot Set is always fun but I feel it's often a bit static and would be enlivened by a good spin so you can corkscrew your way down. Enjoy:

This was cloud rendered over two weeks using a Google Compute Engine high CPU instance (on a free trial, thanks Google).

I used the coordinates from a video posted by metafis on YouTube and a palette approach posted by Alex Russell on Stack Overflow.

The music is Flaming Memories generated by JukeDeck.

(Related: Capture DropCam (Nest Cam) frames to Google Drive; Top 5 reasons to hate the Facebook like button; Style Transfer for Time Lapse Photography)

(You might also like: Bald Eagle; Chinese New Year; Richards Fire Road)

(All Etc Posts)

West of West Portal

Updated on Saturday, February 19, 2022

West of West Portal

This timelapse contains edited highlights from January 2015 to January 2016. I have a Nest Cam (previously DropCam) pointed at the Pacific from the back of my house. To create the footage I grab a frame every 20 seconds and save it to Google Drive using Google Apps Script. I fire up a program about once a week that creates a daily timelapse movie from the frames.

The music on the video is from the excellent JukeDeck. This particular track was randomly but happily called California Battle.

As well as the conventional timelapses I'm creating a couple of different videos from all of the footage. More over the next few months.

(Previously)

(Related: West Portal Timelapse of Timelapses; Capture DropCam (Nest Cam) frames to Google Drive; Time Zone Time Lapse)

(You might also like: Every House I've Ever Lived In; GGNRA Dog Management Round 3; SETIcon 2)

(More Timelapses)

Bayview Rise

Updated on Monday, May 10, 2021

Bayview Rise

Bayview Rise is a large work of art created by Laura Haddad and Tom Drugan installed at Port Pier 92 in the Bayview district of San Francisco.

(Related: San Francisco November 2016 Propositions; San Francisco Shoreline Timelapse; Save Mount Davidson)

(You might also like: Sawmill Flats; Google I/O 2016; Converting Blogger ATOM export to BlogML)

(Recent Photos)

Book reviews for January 2016

Updated on Friday, February 24, 2017
Starhawk (The Academy, #7) by Jack McDevitt

Starhawk (The Academy, #7) by Jack McDevitt

3/5

It's a prequel - how Hutch became Hutch - and because of that it's a bit limited in scope. Comfortable filler with a few good moments - worth reading for completeists.

 

(Related: Kindle: Figure out sorting!; Going Chrome; Get ITHCWY By Email)

(You might also like: Catfood: Klout and Follower; Out of Office Hours; Geotagging posts in BlogEngine.NET)

(All Book Reviews)

News: Wisdom teeth removal is rarely necessary

News: Case made for 'ninth planet'

Shapefile Update

Updated on Sunday, May 23, 2021

A few people have asked for 3D shape support in my ESRI Shapefile library. I've never got around to it, but CodePlex user ekleiman has forked a version in his ESRI Shapefile to Image Convertor that supports PointZ, PolygonZ and PolyLineZ shapes. If that's what you need please check it out.

(Related: ESRI Shapefile Reader in .NET; Export Google Fit Daily Steps, Weight and Distance to a Google Sheet; Catfood Software Support)

(You might also like: LEGO Management; Summer Solstice 2019; Vernal (Spring) Equinox 2022)

(All Code Posts)

I Thought He Came With You is Robert Ellison's blog.

Newsletter