This file contains hidden or 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
#!/usr/bin/env python3 | |
# infundibulum.py | |
""" | |
Download data from the Octopus Energy API and store it in the mqttrunner | |
database. | |
Infundibulum is the Latin for funnel. It's used in various contexts in biology | |
including for the outer part of the suckers on an octopus's arms. |
This file contains hidden or 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
#!/usr/bin/python3 | |
# snapshot | |
""" | |
Backup a set of directories on to a new sub-directory of a specified | |
destination directory, hard linking files which are duplicates of files | |
with the same path and contents in a previous such backup. | |
""" |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
STAMP=$(date "+%Y-%m-%dT%H:%M:%S") | |
DEST=/media/ed/hitachi | |
MACHINE=$(uname -n) | |
TARGET=$DEST/$MACHINE | |
[ -d $TARGET ] || ( |
This file contains hidden or 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
#!/usr/bin/env python2.6 | |
# -*- coding: utf-8 -*- | |
import sys | |
import serial | |
import threading | |
import Queue | |
import datetime | |
import xml.dom | |
import xml.dom.minidom |
This file contains hidden or 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
edavies@bill:~$ wget --version | |
GNU Wget 1.13.4 built on linux-gnu. | |
+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl | |
Wgetrc: | |
/etc/wgetrc (system) | |
Locale: /usr/share/locale | |
Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc" | |
-DLOCALEDIR="/usr/share/locale" -I. -I../../src -I../lib |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import math | |
# Constants to reference times of day in seconds conveniently. | |
MINUTES = 60 | |
HOURS = 60 * MINUTES | |
DAYS = 24 * HOURS | |
# House dimensions (in metres) and similar parameters. |