This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT 'localhost:9200/pictures/picture/1' -d '{ "user" : "senthil", "Title" : "trying out Elastic Search"}' | |
curl -XPUT 'localhost:9200/pictures/interaction/_mapping' -d '{ "interaction" : { "_parent" : { "type" : "picture" } } }' | |
curl -XPUT 'localhost:9200/pictures/interaction/1?parent=1' -d '{ "tag" : "tree" }' | |
curl -XPUT 'localhost:9200/pictures/interaction/2?parent=1' -d '{ "tag" : "house" }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//simple | |
{ | |
"picture_url" : "http://foobar.com/1234", | |
"text" : "some text" | |
"user_name" : "John" | |
"created_at" : 2012-2-29 | |
} | |
//embedded | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"query" : { | |
"has_child" : { | |
"type" : "interaction", | |
"query" : { | |
"term" : { | |
"text" : "tree" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'bitcask' | |
gem 'bert' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tor is leaking memory. Restart when necessary. | |
check process tor with pidfile /var/run/tor/tor.pid | |
start program = "/usr/sbin/tor -f /etc/tor/torrc" | |
stop program = "/bin/sh -c '/bin/kill -s SIGTERM `cat /var/run/tor/tor.pid` && rm /var/run/tor/tor.pid'" | |
if mem > 64 MB for 3 cycles then restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Configuration file for a typical Tor user | |
## Last updated 16 July 2009 for Tor 0.2.2.1-alpha. | |
## (May or may not work for much older or much newer versions of Tor.) | |
## | |
## Lines that begin with "## " try to explain what's going on. Lines | |
## that begin with just "#" are disabled commands: you can enable them | |
## by removing the "#" symbol. | |
## | |
## See 'man tor', or https://www.torproject.org/tor-manual.html, | |
## for more options you can use in this file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
/* | |
#include "ccv.h" | |
*/ | |
import "C" | |
import ( | |
"fmt" | |
"unsafe" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: pi | |
user: pi | |
sudo: yes | |
tasks: | |
- name: install java | |
action: apt pkg=openjdk-6-jre state=installed | |
- name: install JNA | |
action: apt pkg=libjna-java state=installed | |
- name: move patched lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!obj:pylearn2.train.Train { | |
"dataset": !obj:pylearn2.datasets.cifar10.CIFAR10 &dataset { | |
"which_set" : 'train' | |
}, | |
"model": !obj:pylearn2.models.autoencoder.DenoisingAutoencoder { | |
"nvis" : 3072, | |
"nhid" : 400, | |
"irange" : 0.05, | |
"corruptor": !obj:pylearn2.corruption.BinomialCorruptor { | |
"corruption_level": 0.5, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BRANCH_NAME=$(git symbolic-ref --short HEAD | sed "s/^feature_\([0-9]*\).*/\1/") | |
if [ -n "$BRANCH_NAME" ]; then | |
sed -i.bak -e "1s/^/[#$BRANCH_NAME] /" $1 | |
fi |