I hereby claim:
- I am vivekchand on github.
- I am vivekchand (https://keybase.io/vivekchand) on keybase.
- I have a public key ASBDuH1RaT5yxCGweALy46nTb0moMt26dbQ8KT3xx7gFHAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from pyelasticsearch import ElasticSearch, ElasticHttpNotFoundError | |
from pyparsing import * | |
import unittest | |
ELASTICSEARCH_INDEX = 'myindex' | |
ELASTICSEARCH_URL = 'http://localhost:9200/' | |
es = ElasticSearch(ELASTICSEARCH_URL) |
{ | |
"mappings":{ | |
"item":{ | |
"properties":{ | |
"productName":{ | |
"fields":{ | |
"partial":{ | |
"search_analyzer":"full_name", | |
"index_analyzer":"partial_name", | |
"type":"string" |
M[16],X=16,W,k;main(){T(system("stty cbreak") | |
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i | |
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M | |
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<< | |
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k) | |
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d | |
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X] | |
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4; | |
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4|| | |
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2 |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2