Skip to content

Instantly share code, notes, and snippets.

Christophe Bismuth cbismuth

View GitHub Profile
View dendrogram.py
# Perform the necessary imports
import matplotlib.pyplot as plt
from scipy.cluster.hierarchy import linkage, dendrogram
# Calculate the linkage: mergings
mergings = linkage(samples, method='single')
# Plot the dendrogram
dendrogram(mergings,
labels=country_names,
View pipeline.py
# Import pipeline
from sklearn.pipeline import Pipeline
# Import classifiers
from sklearn.linear_model import LogisticRegression
from sklearn.multiclass import OneVsRestClassifier
# Import CountVectorizer
from sklearn.feature_extraction.text import CountVectorizer
@cbismuth
cbismuth / elasticsearch-issue-34142.log
Last active Nov 28, 2018
cURL recreation script output to reproduce Elaticsearch issue #34142
View elasticsearch-issue-34142.log
[11-28-18 18:51:17] Delete [attachment] pipeline
{"acknowledged":true}
[11-28-18 18:51:17] Create [attachment] pipeline
{"acknowledged":true}
[11-28-18 18:51:17] Delete [index1] index
{"acknowledged":true}
[11-28-18 18:51:17] Create [index1] index
@cbismuth
cbismuth / elasticsearch-issue-34142.sh
Last active Nov 28, 2018
cURL recreation script to reproduce Elaticsearch issue #34142
View elasticsearch-issue-34142.sh
#!/usr/bin/env bash
# elasticsearch-issue-34142.sh
# cURL recreation script to reproduce Elaticsearch issue #34142
# https://github.com/elastic/elasticsearch/issues/34142
NL1="\n"
NL2="${NL1}${NL1}"
NC='\033[0m'
RED='\033[0;31m'
@cbismuth
cbismuth / elasticsearch-issue-34522.sh
Last active Oct 29, 2018
cURL recreation script to reproduce Elaticsearch issue #34522
View elasticsearch-issue-34522.sh
#!/usr/bin/env bash
# elasticsearch-issue-34522.sh
# cURL recreation script to reproduce Elaticsearch issue #34522
# https://github.com/elastic/elasticsearch/issues/34522
NL1="\n"
NL2="${NL1}${NL1}"
NC='\033[0m'
RED='\033[0;31m'
@cbismuth
cbismuth / exif-others.sh
Created Oct 22, 2018
ExifTool command line to cleanup picture folders
View exif-others.sh
#!/usr/bin/env bash
set -e
set -u
fdupes --recurse --noempty --nohidden --delete --noprompt .
exiftool -progress -d "exif/%Y%m%d%H%M%S%%-c.%%ue" "-filename<filemodifydate" "-filename<createdate" "-filename<datetimeoriginal" .
View exif-others.sh
#!/usr/bin/env bash
set -e
set -u
fdupes --recurse --noempty --nohidden --delete --noprompt .
exiftool -progress -d "exif/%Y%m%d%H%M%S%%-c.%%ue" "-filename<filemodifydate" "-filename<createdate" "-filename<datetimeoriginal" .
@cbismuth
cbismuth / elasticsearch-issue-27178.sh
Last active Oct 15, 2018
cURL recreation script to reproduce Elaticsearch issue #27178
View elasticsearch-issue-27178.sh
#!/usr/bin/env bash
# elasticsearch-issue-27178.sh
# cURL recreation script to reproduce Elaticsearch issue #27178
# https://github.com/elastic/elasticsearch/issues/27178
NL1="\n"
NL2="${NL1}${NL1}"
NC='\033[0m'
RED='\033[0;31m'
@cbismuth
cbismuth / elasticsearch-issue-28309.sh
Last active Oct 4, 2018
cURL recreation script to reproduce Elaticsearch issue #28309
View elasticsearch-issue-28309.sh
#!/usr/bin/env bash
# elasticsearch-issue-28309.sh
# cURL recreation script to reproduce Elaticsearch issue #28309
# https://github.com/elastic/elasticsearch/issues/28309
NL1="\n"
NL2="${NL1}${NL1}"
NC='\033[0m'
RED='\033[0;31m'
@cbismuth
cbismuth / elasticsearch-issue-28390.sh
Last active Sep 28, 2018
cURL recreation script to reproduce Elaticsearch issue #28390
View elasticsearch-issue-28390.sh
#!/usr/bin/env bash
# elasticsearch-issue-28390.sh
# cURL recreation script to reproduce Elaticsearch issue #28390
NL1="\n"
NL2="${NL1}${NL1}"
NC='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
You can’t perform that action at this time.