Skip to content

Instantly share code, notes, and snippets.

require 'face'
client = Face.get_client(api_key: 'XXX', api_secret: 'XXX')
# training skybiometry to recognize Johnny Depp
resp = client.faces_detect(urls: %w[http://topmostcelebrities.blogsome.com/wp-admin/images/Johnny%20Depp-0.jpg])
client.tags_save(uid: 'johnnydepp@celebs', tids: resp['photos'][0]['tags'][0]['tid'])
client.faces_train uids: 'johnnydepp@celebs'
# trying to recognize it from other pic
client.faces_recognize(uids: 'all@celebs', urls: %w[http://images5.fanpop.com/image/photos/31400000/Johnny-johnny-depp-31410766-861-1023.jpg])
@MicahElliott
MicahElliott / rbenv-howto.md
Created April 17, 2012 18:11
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev