Talk to her

I recently bought an Amazon Echo and I’ve been having a lot of fun asking Alexa to tell me about the weather, play my favorite songs, and set timers in the kitchen—all hands free.

I haven’t hacked with it yet, but my buddy Kunal Batra wrote a cool Swift app that puts Alexa in your Mac’s system tray. Unlike the Echo, MacLexa is entirely software based and only listens when you press the option key.

screenshot of MacLexa recording when option key is pressed

Whenever you record a command, it’s sent to Alexa for processing and returns a voice response. Try downloading the binary and asking Alexa to tell you a joke.

MacLexa also lets you process audio client-side and is a great tool for demoing your Alexa hacks without any Amazon hardware.

Follow the instructions in the readme, create an Alexa app, and talk to her.

Comments :)

Scratch that

I don’t care for the lotto, but I do love scratch off games like McDonald’s Monopoly. There’s something about scratching off the silver paint and revealing a secret message underneath.

Scratch offs are a neat UI mechanic and thanks to Cooltechworks, you can use them in your next Android app. Their ScratchView library lets you create scratch offs with image or text:

ScratchView ScratchImageView demo ScratchView ScratchTextViewdemo

ScratchView also has methods that can tell you whether the image/text has been revealed, force a scratch off event, or listen for a completed scratch off and fire off a callback.

Whether you use it in a captcha or to create interactive coupons, ScratchView is a fun way to make your app more interactive.

Comments :)

Process this language

Billing itself as “a cool way to use natural language in JavaScript,” NLP Compromise is a simple interface for NLP that you can use in the browser or server side.

Where would you use NLP in JavaScript? Maybe you’re writing a bot in node and you want it to have a great grasp of the English language. Or correcting poorly inputted text. Or manipulating and normalizing prose. Once you start experimenting, you’ll find tons of uses.

NLP Compromise can pluralize nouns:

// "geese"

Conjugate verbs and change tense:

//  gerund: 'running',
//  past: 'ran',
//  infinitive: 'run',
//  present: 'runs',
//  actor: 'runner',
//  future: 'will run',
//  perfect: 'have ran',
//  pluperfect: 'had ran',
//  future_perfect: 'will have ran'

nlp.text("Neal sits at home").to_past()[0].text();
// Neal sat at home

Identify acronyms:

// false
// false
// true

Negate phrases:

nlp.statement('Neal is going to win').negate().text();
// Neal isn't going to win

NLP Compromise also has plugin support and a bunch more API methods. Install it and get to hacking!!

Comments :)

Snap, shift, and pop

Hackathons are neat, but there’s some really exciting code coming out of game jams like Ludum Dare. For LD35, Brice Thomas built a really unique 2D platformer in Lua with the LÖVE engine.

What’s neat about the game, Snap & Shift, is the camera mechanic. In addition to the WASD keyboard controls, your mouse acts like a camera shutter. Whenever you snap an item in the scene, it transforms, opening up or blocking your path.

Snap & Shift demo

Play Snap & Shift on Windows and OSX.

Comments :)

Colorizing classic movies

Back in the 80s, Ted Turner scandalized the film world by colorizing tons of classic films. Setting aside the artistic implications of modifying an epic like Citizen Kane, colorization required a lot of manual labor back then.

Fortunately, it’s 2016 and we’ve got way better resources now. At least, that’s what Andrea Kimball and Mike Bartoli thought when they decided to colorize Jean-Luc Godard’s 1960 film Breathless at the 5C Hackathon.

Combining GPU power, Python, and a pre-trained CNN, Autocolorization implements a deep learning algorithm that can colorize, denoise, and upscale b&w frames from full motion video.

It’s not perfect, but it’s a damn good start and an excellent demo. Everything you need to run Autocolorization is packaged up in a Docker container, so go nuts and colorize your favorite Fellini!

Comments :)

2016 Neal Shyam