Skip to content

Instantly share code, notes, and snippets.

@brian-from-fl
brian-from-fl / README
Last active August 29, 2015 14:21
Convert binary digit strings to text
This started out as a simple Python 3 script that reads the 8-bit binary
string form of one or more bytes, assumes they are a UTF-8 sequence, and
prints the resulting string. It now can go both ways, converting robot
into human, and also converting human back into robot.
To get a copy of the files in this Gist via git, go to the directory
into which you'd prefer to place the robot subdirectory tree that
contains the git repository. Then:
$ git clone https://gist.github.com/32d92f7a7ee13761f711.git robot
@brian-from-fl
brian-from-fl / Overview of Facet Combinations
Last active December 20, 2015 14:09
ElasticSearch facets with combination hierarchies
If the term facet contains "fields" : [ "field1", "field2", ... ]
instead of just "field" : "field_name" then the individual counts for
each field are grouped under that one facet's name. But otherwise, there
is no combining and grouping. For instance, there are no counts of
(married and female). A combination of a script and some form of
post-processing is needed for this.
My inspiration for the solution came
from http://elasticsearch-users.115913.n3.nabble.com/facet-and-grouping-td4020055.html
(specifically, Sujoy's comment).