Here's a quick'n'dirty work around to install torch-svm:
Clone the repo
git clone git@github.com:koraykv/torch-svm.git && cd torch-svm
# ------- | |
# cfsm | |
# ------- | |
# see: http://www.mindrot.org/projects/cfsm/ | |
# Build (tested on Mac OS X 10.9.3) | |
cvs -d :ext:anoncvs@anoncvs.mindrot.org:/cvs checkout cfsm mtemplate | |
make -C mtemplate | |
make -C cfsm CPPFLAGS='-D_FORTIFY_SOURCE=0' | |
mkdir /usr/local/share/cfsm |
Here's a quick'n'dirty work around to install torch-svm:
Clone the repo
git clone git@github.com:koraykv/torch-svm.git && cd torch-svm
# http://stedolan.github.io/jq/ | |
json='{"foo": {"genre":"deep house"}, "bar": {"genre": "progressive house"}, "baz": {"genre": "dubstep"}}' | |
echo "$json" | jq '[to_entries | .[] | select(.value.genre | contains("house"))] | from_entries' | |
# { | |
# "bar": { | |
# "genre": "progressive house" | |
# }, | |
# "foo": { | |
# "genre": "deep house" |
require 'rubygems' | |
require 'Rmagick' | |
include Magick | |
# In pixels | |
SQUARE_SIZE = 20 | |
CORNER = 2 | |
SPIKE_OFFSET, SPIKE_WIDTH, SPIKE_HEIGHT = 7, 4, 6 |
#import "MSImageView.h" | |
#import <Three20Network/TTURLCache.h> | |
#import <Three20Network/TTURLImageResponse.h> | |
#import <Three20Network/TTURLRequest.h> | |
#import "MSGlobals.h" | |
@implementation MSImageView |
# ImageMagick `identify` format features is handy | |
# e.g. to obtain the width x height of a given image (360x480) | |
# | |
# See http://www.imagemagick.org/script/escape.php | |
# for a complete list of supported format characters | |
identify -format "%wx%h" myimage.jpg |
# -E is for preprocessor only | |
# -dM tells GCC to generate a list of #define directives | |
# e.g. | |
# #define __APPLE__ 1 | |
# #define __SSE2__ 1 | |
# #define __GNUC__ 4 | |
# ... | |
gcc -E -dM - < /dev/null |
$ nslookup | |
> set q=MX | |
> github.com | |
Server: 212.27.40.240 | |
Address: 212.27.40.240#53 | |
Non-authoritative answer: | |
github.com mail exchanger = 10 ALT1.ASPMX.L.GOOGLE.com. | |
... |
# `head -c bytes` | |
# e.g. for a 1kb file: | |
cat /dev/random | head -c 1024 > data.bin |
#include <stdio.h> | |
#include <tcbdb.h> | |
#include <tcutil.h> | |
int main(int argc, char *argv[]) { | |
TCBDB *db = tcbdbnew(); | |
tcbdbopen(db, "list.db", BDBOWRITER | BDBOCREAT | BDBOTRUNC); | |
/* The B+ Tree database features record duplication for a given key | |
(see `tcbdbputdup`) which means we can easily append data for a |