Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧
I may be slow to respond.

Christophe Bismuth cbismuth

🎧
I may be slow to respond.
  • TF1
  • Paris, France
  • 12:04 (UTC +01:00)
  • Twitter @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 November 28, 2018 17:51
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 November 28, 2018 17:50
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 October 29, 2018 14:32
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
Last active December 30, 2020 21:50
ExifTool command line to cleanup picture folders
View exif-others.sh
#!/usr/bin/env bash
set -e
set -u
export INPUT_DIR="${HOME}/Pictures/#sync/incoming"
export OUTPUT_DIR="${HOME}/Pictures/#sync/timestamps"
export REMOTE_DIR="${HOME}/Pictures/#sync/remote"
fdupes --recurse --noempty --nohidden --delete --noprompt ${INPUT_DIR}
@cbismuth
cbismuth / elasticsearch-issue-27178.sh
Last active October 15, 2018 07:33
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 October 4, 2018 15:26
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 September 28, 2018 08:48
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'
@cbismuth
cbismuth / elasticsearch-issue-33384.sh
Last active September 24, 2018 15:07
cURL recreation script to reproduce Elaticsearch issue #33384
View elasticsearch-issue-33384.sh
#!/usr/bin/env bash
# elasticsearch-issue-33384.sh
# cURL recreation script to reproduce Elaticsearch issue #33384
NL1="\n"
NL2="${NL1}${NL1}"
NC='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'