Skip to content

Instantly share code, notes, and snippets.

{"layout":"odd-r","version":"1.1","hexes":{"540":{"n":"cup_540","r":0,"q":54,"colour":"#0000FF"},"550":{"n":"cup_550","r":0,"q":55,"colour":"#0000FF"},"560":{"n":"cup_560","r":0,"q":56,"colour":"#0000FF"},"570":{"n":"cup_570","r":0,"q":57,"colour":"#0000FF"},"580":{"n":"ld_580","r":0,"q":58,"colour":"#FDBB30"},"590":{"n":"grn_590","r":0,"q":59,"colour":"#6AB023"},"600":{"n":"lab_600","r":0,"q":60,"colour":"#FF0000"},"610":{"n":"ref_610","r":0,"q":61,"colour":"#00AEEF"},"620":{"n":"ref_620","r":0,"q":62,"colour":"#00AEEF"},"630":{"n":"ref_630","r":0,"q":63,"colour":"#00AEEF"},"640":{"n":"pc_640","r":0,"q":64,"colour":"#3E842D"},"S14000027":{"n":"Na h-Eileanan an Iar + Inverness, Skye and West Ross-shire","r":-1,"q":34,"region":"S92000003","colour":"#FF0000"},"S14000069":{"n":"Caithness, Sutherland and Easter Ross + Orkney and Shetland","r":0,"q":36,"region":"S92000003","colour":"#FDBB30"},"S14000060":{"n":"Aberdeen North + Aberdeen South","r":-2,"q":37,"region":"S92000003","colour":"#FFD700"},"S14000091":{"n":
@robmckinnon
robmckinnon / pc2024-mmp.hexjson
Last active July 15, 2024 20:08
hexmap test
{"layout":"odd-r","version":"1.1","hexes":{"540":{"n":"ref_540","r":0,"q":54,"colour":"#00AEEF"},"550":{"n":"ref_550","r":0,"q":55,"colour":"#00AEEF"},"560":{"n":"ref_560","r":0,"q":56,"colour":"#00AEEF"},"570":{"n":"con_570","r":0,"q":57,"colour":"#0000FF"},"580":{"n":"con_580","r":0,"q":58,"colour":"#0000FF"},"590":{"n":"con_590","r":0,"q":59,"colour":"#0000FF"},"600":{"n":"ld_600","r":0,"q":60,"colour":"#FDBB30"},"610":{"n":"ld_610","r":0,"q":61,"colour":"#FDBB30"},"620":{"n":"green_620","r":0,"q":62,"colour":"#6AB023"},"630":{"n":"other_630","r":0,"q":63,"colour":"#808080"},"640":{"n":"pc_640","r":0,"q":64,"colour":"#3E842D"},"S14000027":{"n":"Na h-Eileanan an Iar + Inverness, Skye and West Ross-shire","r":-1,"q":34,"region":"S92000003","colour":"#FF0000"},"S14000069":{"n":"Caithness, Sutherland and Easter Ross + Orkney and Shetland","r":0,"q":36,"region":"S92000003","colour":"#FDBB30"},"S14000060":{"n":"Aberdeen North + Aberdeen South","r":-2,"q":37,"region":"S92000003","colour":"#FFD700"},"S14000091":{"
@robmckinnon
robmckinnon / wards-leeds.csv
Created July 7, 2024 19:31
hexmaps test data
id name pop colour
E05001425 Guiseley and Rawdon 18253 rgb(247, 171, 45)
E05001437 Otley and Yeadon 17616 rgb(246, 166, 47)
E05001411 Adel and Wharfedale 15919 rgb(248, 186, 38)
E05001412 Alwoodley 17890 rgb(245, 150, 55)
E05001426 Harewood 15194 rgb(249, 188, 38)
E05001443 Wetherby 15753 rgb(247, 172, 45)
E05001428 Horsforth 17318 rgb(247, 172, 45)
E05001442 Weetwood 15777 rgb(246, 160, 50)
E05001434 Moortown 17595 rgb(246, 161, 50)
@robmckinnon
robmckinnon / index.html
Created August 14, 2023 14:12 — forked from tomgp/index.html
topojson neighborhoods
<!DOCTYPE html>
<meta charset="utf-8">
<title>topojson neighbourhood</title>
<style>
body{
font-family: sans-serif;
}
svg{
border:1px solid #000;
mkdir -p nz-electoral-reform/royal-commission-report-1986/pdf
cd nz-electoral-reform/royal-commission-report-1986/pdf
curl -o 01.pdf https://elections.nz/assets/Report-of-the-Royal-Commission-on-the-Electoral-System-1986/Royal-Commission-Report-Contents.pdf
curl -o 02.pdf https://elections.nz/assets/Report-of-the-Royal-Commission-on-the-Electoral-System-1986/Chapter-1-preface-and-introduction.pdf
curl -o 03.pdf https://elections.nz/assets/Report-of-the-Royal-Commission-on-the-Electoral-System-1986/Chapter-2-the-voting-system.pdf
curl -o 04.pdf https://elections.nz/assets/Report-of-the-Royal-Commission-on-the-Electoral-System-1986/Chapter-3-maori-representation-v2.pdf
@robmckinnon
robmckinnon / diatonic_scales.orca
Created January 11, 2021 22:21
Diatonic scales patch for Orca
0VC6VftV2#:tone#......#M#.#D#.#P#.#L#.#M#.#M#.#L#......................................
1Vc7VGsV1#:semitone#..#a#.#o#.#h#.#y#.#i#.#i#.#y#......................................
2VD8Vg................#j#.#r#.#r#.#d#.#x#.#n#.#c#......................................
3Vd9VAkV0#:key.index#.#o#.#i#.#y#.#i#.#o#.#o#.#r#......................................
4VEaVa................#r#.#a#.#g#.#a#.#l#.#r#.#i#......................................
5VFbVB.................................................................................
......7Xt.#To.change#.#t#.#t#.#s#.#t#.#t#.#s#.#t#......................................
.....57Xt.#mode.copy#.#t#.#s#.#t#.#t#.#t#.#t#.#t#......................................
.....a7Xs.#sequence.#.#s#.#t#.#t#.#t#.#s#.#t#.#s#......................................
.....f7Xt.#from.the.#.#t#.#t#.#t#.#s#.#t#.#s#.#t#......................................
import time
import rtmidi
from gpiozero import DistanceSensor # Import the GPIO Zero Library
# Define GPIO pins to use on the Pi
pinTrigger = 17
pinEcho = 18
midiout = rtmidi.MidiOut()
available_ports = midiout.get_ports()
@robmckinnon
robmckinnon / memory_profiler.rb
Created February 27, 2020 21:24
memory_profiler.rb in single file
# frozen_string_literal: true
# Single file copy of https://github.com/SamSaffron/memory_profiler for loading in Sonic Pi.
# Licence: https://github.com/SamSaffron/memory_profiler/blob/master/LICENSE.txt
# Copyright (c) 2013 Sam Saffron
# MIT License
module MemoryProfiler
VERSION = "0.9.14"
end