Alexa Skills - get custom slot names using Flask-Ask

by @edent | # # # # # | Read ~137 times.
Alexa Skills Page.

Amazon encourages developers to use Flask-Ask - the handy Python library for working with Alexa. Sadly, the project has been abandoned. They no longer take pull requests, you can't raise bugs against it, and the documentation is incomplete. So this is how I solved an annoying problem - how to get the name of a… Continue reading →

Extracting your data from Untappd

by @edent | # # # # # # | 3 comments | Read ~1,121 times.

I rate every pint I taste using the Untappd app. Think of it like TripAdvisor for lager, stout, cider, bitter, and all manner of other beery goodness. Seriously, I've reviewed over 600 different drinks Recently, I decided to see if I could self-host my beer check-ins. The first step - extracting my own data from… Continue reading →

Convert WebVTT to a Transcript using Python

by @edent | # # # # # | 1 comment | Read ~846 times.
YouTube showing subtitles.

I want to convert YouTube's auto-generated subtitles into a plain transcript. Why is this so hard? This blog post gives a more detailed explanation than my answer to this StackOverflow question. Here's what the subtitles look like when you view a video: And here's what the code which generates those subtitles looks like: 00:00:00.930 -->… Continue reading →

How to detect 3D video?

by @edent | # # # # | Read ~153 times.
Still from the moview Finding Nemo. The image is split side by side.

Here's an interesting conundrum. My TV can automatically detect when 3D video is being played and offers to switch into 3D mode - but how does the detection work? This post will give you a few strategies for detecting 3D images using Python. Firstly, some terminology. 3D videos are usually saved either as Side-By-Side images,… Continue reading →

Reconstructing 3D Models from The Last Jedi

by @edent | # # # # # | 3 comments | Read ~2,863 times.
Different depth maps of various accuracy

A quick tutorial in how to recover 3D information from your favourite 3D movies. In this example, we'll be using Star Wars - The Last Jedi. tl;dr? Here's the end result (this video is silent): Grab the code on GitHub. Let's go! Take a screenshot of your favourite scene. Something with a clearly defined foreground… Continue reading →

Adjusting timestamps on images with Python

by @edent | # # # # # | Read ~1,240 times.
A cute penguin.

As ever, mostly notes to myself. I have a bunch of old images which don't have any timestamp associated with them. This quick Python script will add a DateTime EXIF metadata tag to an image. This uses piexif which can be installed using pip install piexif This simple script reads a photo, adds a timestamp,… Continue reading →

Long Exposures - Creating Average Frames From Movies

by @edent | # # # # | 3 comments | Read ~7,298 times.

I read a Guardian article about an artist who set up an analogue camera in front of their TV, set it to long exposure, and set a movie playing. The result was a rather wonderful collection of images. You can see more of Jason Shulman's works Is there a way to automate this process? Yes!… Continue reading →

Replacing IFTTT - Part 1: RSS & Tumblr

by @edent | # # # # | 5 comments | Read ~474 times.

I've grown to loath IFTTT. What started out as a cool way to plug internet things together has being an opaque an uncommunicative company with no real interest in customer service. That's not surprising, I suppose, its paying customers are the companies who can't be bothered to develop a proper API and so just shove… Continue reading →

Which Twitter User Receives The Most Citations on Wikipedia?

by @edent | # # # | 3 comments | Read ~285 times.

I few days ago, I was somewhat surprised to find that one of my Tweets had been used as a citation in Wikipedia! I began to wonder - how often are Tweets used in citations? It's possible to search for your own Tweets using this (somewhat obscure) link: https://en.wikipedia.org/w/index.php?title=Special%3ALinkSearch&target=twitter.com%2Fedent Just edit the end of it… Continue reading →

Track deletions on Twitter - AKA build your own Politwoops

by @edent | # # # | Read ~703 times.

Twitter, as part of its never-ending quest to alienate users and appease the rich and powerful, have shut down Politwoops accounts. Politwoops monitored politicians' Twitter accounts and noted when they deleted a tweet. Most of the time deletions were done for the same reason we all deleted content - mispellings, broken links, etc - but… Continue reading →