Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am yannbrrd on github.
  • I am yannbarraud (https://keybase.io/yannbarraud) on keybase.
  • I have a public key ASD1MKi73lBhtz4y7XFVSmE5jA0jaMOsytrUTm2Hk7i3Mwo

To claim this, I am signing this object:

@YannBrrd
YannBrrd / LowerCaseNormalize.py
Last active August 29, 2015 14:04
LowerCaseNormalize for python
def remove_accents(input_str):
nkfd_form = unicodedata.normalize('NFKD', unicode(input_str.lower()))
return u"".join([c for c in nkfd_form if not unicodedata.combining(c)])
@YannBrrd
YannBrrd / Type mapping
Last active January 1, 2016 14:59
Basic multifiled mapping for deduplication & search
curl -XPUT 'http://localhost:9200/product/' -d '{
"settings" : {
"number_of_shards" : 5,
"number_of_replicas" : 0
},
"mappings": {
"product_type": {
"dynamic_templates": [
{
"strings": {
@YannBrrd
YannBrrd / app.js
Last active December 17, 2015 06:49
Pagination using ElasticJS
// app.js
angular.module('cs_demo', [
'controllers',
'elasticjs.service',
'ui.bootstrap'
]);