Skip to content

Instantly share code, notes, and snippets.

View ocuil's full-sized avatar
🏠
Working from home

Ale ocuil

🏠
Working from home
View GitHub Profile
@ocuil
ocuil / esrally_job_example.yml
Created November 21, 2023 13:31
How to run ES Rally as k8s Job
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rally-benchmarks-volume
spec:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
@ocuil
ocuil / deduplicate.py
Created July 6, 2021 20:18
python deduplicate docs stored in elasticsearch
# This code come from https://www.elastic.co/es/blog/how-to-find-and-remove-duplicate-documents-in-elasticsearch
# Just add the step to clear duplicate docs :-)
# Thanks @elastic !!! =)
import hashlib
from elasticsearch import Elasticsearch
es = Elasticsearch(
cloud_id="XXXXXXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY",
http_auth=("USER", "PASSWORD"),