Skip to content

Instantly share code, notes, and snippets.

View 2trc's full-sized avatar

Remi Tassing 2trc

View GitHub Profile
@2trc
2trc / eneo_coupures.py
Created November 2, 2021 14:18
Collecting ENEO Alerts/outages/coupures
import requests
import logging
import time
import datetime
import csv
logging.basicConfig(filename='logs/eneo_coupures.log',
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
@2trc
2trc / service-discovery.py
Created December 17, 2015 11:54
Replace template with config parameters
#!/usr/bin/python
########
## Remi Tassing
##
## Customize properties based on template and configuration file
##
import argparse
import json
curl -XDELETE 'localhost:9200/my-index'
curl -XPUT 'localhost:9200/my-index' -d '{
"mappings": {
"my-type": {
"properties": {
"message": {
"type": "string"
}
}