This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fetches data from https://www.energidataservice.dk/tso-electricity/elspotprices | |
# API documentation http://docs.ckan.org/en/latest/api/index.html#making-an-api-request | |
from datetime import datetime, timedelta | |
import time | |
import requests | |
from influxdb import InfluxDBClient | |
import paho.mqtt.client as mqtt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function printDiv(divName){ | |
var printContents = document.getElementById(divName).innerHTML; | |
var originalContents = document.body.innerHTML; | |
document.body.innerHTML = printContents; | |
window.print(); | |
document.body.innerHTML = originalContents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ftp_sync - copy directory and file structure | |
// based on http://www.php.net/manual/es/function.ftp-get.php#90910 | |
// main function witch is called recursivly | |
function ftp_sync($dir, $conn_id) { | |
if ($dir !== '.') { | |
if (ftp_chdir($conn_id, $dir) === FALSE) { | |
echo 'Change dir failed: ' . $dir . PHP_EOL; | |
return; |