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
// GQRX IQ recording: | |
// Raw interleaved IQ samples, 32-bit IEEE float @ receiver sampling rate | |
// | |
// SDRTrunk recording: | |
// WAV file, interleaved IQ samples, signed 16-bit @ receiver sampling rate | |
// | |
// 'sox' can be used to downsample and append the WAV header | |
sox -c 2 -t f32 -r 2400000 <infile> -b 16 -t wav <outfile> |
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
#!/bin/bash | |
gpspipe -w | jq -c -M '. | select( (.class == "SKY" and has("satellites") == true) or .class == "TPV")' | while IFS= read obj | |
do | |
echo $obj | |
done |
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
@state_trigger("sensor.scheduled_heating_state", state_check_now=True) | |
@service | |
def price_load_control(): | |
"""Turn OFF or ON water heater by price signal (obey overrides)""" | |
if state.get("input_select.water_heating_mode") == "auto": | |
scheduled_state = sensor.scheduled_heating_state | |
log.warning(f"Load control state: {scheduled_state}") | |
if scheduled_state == '0': | |
switch.turn_off(entity_id = "switch.storage_heater") | |
log.warning(f"Load control triggered water heater OFF") |
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
# The lambda function coerces pyubx2 into outputting JSON. Requires importing the `jsons` library | |
[[inputs.execd]] | |
command = ["gnssdump", \ | |
"port=/dev/ttyACM0", \ | |
"baudrate=921600", | |
"protfilter=2", \ | |
"verbosity=0", \ | |
"ubxhandler=lambda msg: print(jsons.dumps((lambda msg: {key:value for (key,value) in dict(msg.__dict__, **{'msg':msg.identity}).items() if not key.startswith('_') } )(msg)))", \ | |
"msgfilter=NAV-PVT"] |
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
// Hybrid wholesale price (feed-forward) and proportional (feedback) storage water heater controller. | |
// Tries to keep the tank hot and the bill low | |
// This query runs every half hour (NEM metering period) and determines for the next 18 hours (available forecast period) | |
// how much time is needed to heat the water tank and which are the cheapest times to do that | |
// Basic theory | |
// Wholesale electricity prices are volatile. Lots of renewables means low prices. The storage heater allows us to ride out | |
// expensive periods by only heating water when it's cheap. This is fine until a week of rain means we run out of hot water. |
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
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> | |
<qgis styleCategories="AllStyleCategories" minScale="1e+08" hasScaleBasedVisibilityFlag="0" version="3.8.0-Zanzibar" maxScale="0"> | |
<flags> | |
<Identifiable>1</Identifiable> | |
<Removable>1</Removable> | |
<Searchable>1</Searchable> | |
</flags> | |
<customproperties> | |
<property value="false" key="WMSBackgroundLayer"/> | |
<property value="false" key="WMSPublishDataSourceUrl"/> |
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
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> | |
<qgis styleCategories="AllStyleCategories" minScale="1e+08" hasScaleBasedVisibilityFlag="0" version="3.8.0-Zanzibar" maxScale="0"> | |
<flags> | |
<Identifiable>1</Identifiable> | |
<Removable>1</Removable> | |
<Searchable>1</Searchable> | |
</flags> | |
<customproperties> | |
<property value="false" key="WMSBackgroundLayer"/> | |
<property value="false" key="WMSPublishDataSourceUrl"/> |
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
from qgis.core import * | |
from qgis.gui import * | |
import math | |
import random | |
""" | |
Define a grid based on the interval and the bounding box of | |
the feature. Grid will minimally cover the feature and be centre aligned | |
Create a multi-point geometry at the grid intersections where |
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
class Survex < Formula | |
desc "Cave Surveying Tool" | |
homepage "https://www.survex.com" | |
url "https://survex.com/software/1.2.36/survex-1.2.36.tar.gz" | |
sha256 "8781f33daf61c5d22e52400e6130e66a1fec7557cf9aa793d0e26e9b37204ed0" | |
revision 4 | |
depends_on "wxmac" | |
depends_on "proj" | |
depends_on "ffmpeg" |
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
#!/usr/local/bin/python3 | |
import csv | |
import argparse | |
import sys | |
parser = argparse.ArgumentParser(description='Cleanup MEbank (AU) CSV files with descriptions split over multiple lines') | |
parser.add_argument('infile', nargs='?', type=argparse.FileType('r'), default=sys.stdin) | |
parser.add_argument('outfile', nargs='?', type=argparse.FileType('w'), default=sys.stdout) | |
parser.add_argument('--invertorder', action='store_true') |
NewerOlder