Skip to content

Instantly share code, notes, and snippets.

@ale-rinaldi
ale-rinaldi / parse-edistribuzione-data.py
Last active September 4, 2024 16:11
Python script to parse CSV files with 15-minutes precision, downloaded from the e-distribuzione (Italian energy dispatcher) private area, and import them into an InfluxDB database. It considers Daylight Saving Time changes and calculates the time slot (F1, F2 or F3) for each point.
import datetime
import os
import dateutil
import pytz
from influxdb import InfluxDBClient
def is_festivo(date: datetime.datetime):
if date.month == 1 and date.day == 1:

Keybase proof

I hereby claim:

  • I am ale-rinaldi on github.
  • I am alerinaldi (https://keybase.io/alerinaldi) on keybase.
  • I have a public key ASC9IkeA3V0qmbIUGrAkIcDJ_A5qCPlRYKyWjyl_Jm0_zwo

To claim this, I am signing this object:

@ale-rinaldi
ale-rinaldi / [email protected]
Created June 12, 2020 12:17
Icecast2 multi-instance systemd configuration
[Unit]
Description=Icecast server - %i
After=network-online.target
Wants=network.target network-online.target
[Service]
Type=idle
ExecStart=/opt/icecast/bin/icecast -c /opt/icecast/etc/%i.xml
User=icecast
Group=icecast