Skip to content

Instantly share code, notes, and snippets.

@jlstanus
jlstanus / thermostat.lua
Last active January 20, 2022 12:19
Domoticz - Gestion thermostat Netatmo - Danfoss
-- https://www.domoticz.com/wiki/Thermostat_control
-- commandArray['SetSetPoint:MySetPointIdx']='20.5' more here: https://www.domoticz.com/wiki/LUA_commands
--------------------------------
------ Start of edit section ------
--------------------------------
local hysteresis = 0.5 --Valeur seuil pour éviter que le relai ne cesse de commuter dans les 2 sens
local thermostat = 'Living Thermostat' --Nom de l'interrupteur virtuel du thermostat
local valve_sam_droite = string.format('SetSetPoint:%s', 43) --Nom du radiateur à allumer/éteindre
local valve_sam_gauche = string.format('SetSetPoint:%s', 41)
import pandas as pd
file = open('excel.md')
data = []
for line in file.readlines():
filtered = list(filter(lambda attr: attr not in ['','\n'] , line.split('|')))
trimmed = [attr.strip() for attr in filtered]
data.append(trimmed) # provide more general splitter
data.remove(data[1])
df = pd.DataFrame(data=data)
@jlstanus
jlstanus / QGIS Processing - refuges.info API extraction
Last active August 31, 2022 19:29
Import refuges.info into QGIS.
# -*- coding: utf-8 -*-
"""
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
@jlstanus
jlstanus / sortbygpstag.py
Last active February 29, 2024 21:13
prepare data for 360 photo sharing platforms
import os
import shutil
import sys
import exifread
import gpxpy
import gpxpy.gpx
def has_gps_tags(tags):
"""
Vérifie si les métadonnées contiennent des informations de localisation GPS.