Skip to content

Instantly share code, notes, and snippets.


Eana Hufwe blueset

View GitHub Profile
blueset /
Last active Apr 17, 2022
A rough JSON parser in Python
import re
from typing import Any, Tuple, Union
"""A very rough JSON parser.
Implementing the standard outlined in
Number parsing is handled by Python.
>>> data, _ = parse_json('{"key": ["value", -1e20, true, false, null]}')
>>> assert data == {"key": ["value", -1e20, True, False, None]}
import subprocess
import requests
# MAC address of device running this script
self_mac = "00:11:22:33:44:55"
# MAC address of devices to check
to_monitor = {"66:77:88:99:aa:bb", "cc:dd:ee:ff:00:11"}
# MAC address of device which must be in the LAN for notifications to be sent
blueset /
Last active May 26, 2021
Plltxe: Sync Tweets (and Toots) to a Telegram Channel Using Account Activity API (and WebSocket)
View fig0.puml
skinparam monochrome true
skinparam backgroundColor #fefefe
skinparam sequenceReferenceAlign center
skinparam sequenceMessageAlign center
actor User
== Send message ==
blueset / Material Amber.palette
Created Jan 23, 2020
Material Color palettes for Sip (2.2.3 or later)
View Material Amber.palette
{"sip": {"build": "223", "version": "2.2.3"}, "index": 2, "name": "Material Amber", "colors": [{"blue": 0.034370001405477524, "id": "7D57DD3E-EBF9-9D4D-DC8A-A3ED77454871", "createdAt": "2020-01-23 06:02:58", "red": 0.9921799898147583, "name": "Amber A700", "green": 0.6087899804115295, "alpha": 1}, {"createdAt": "2020-01-23 06:02:58", "red": 0.9943900108337402, "alpha": 1, "name": "Amber A400", "green": 0.7259799838066101, "id": "69AAA373-3087-7536-6D87-7224A53A0A97", "blue": 0.03618999943137169}, {"blue": 0.19728000462055206, "green": 0.8167200088500977, "createdAt": "2020-01-23 06:02:58", "name": "Amber A200", "alpha": 1, "red": 0.9962700009346008, "id": "F5946576-6396-6379-9AB2-22E7FE19ACE1"}, {"alpha": 1, "blue": 0.4251199960708618, "createdAt": "2020-01-23 06:02:58", "red": 0.9976599812507629, "id": "C4325271-1539-9DFA-AF9E-E7901BCEEC53", "green": 0.8826199769973755, "name": "Amber A100"}, {"alpha": 1, "createdAt": "2020-01-23 06:02:58", "id": "10126CB6-670B-BFA8-80E5-5E3323056DC2", "green": 0.34540000557
blueset / config.yaml
Created Aug 31, 2019
Rotational logger sample
View config.yaml
# ...
version: 1
disable_existing_loggers: false
format: '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
blueset /
Created Aug 18, 2019
Sphinx(-intl?) bug reproduction
source_suffix = '.rst'
master_doc = 'index'
blueset /
Created Apr 15, 2019
COMP30024 2019 S1 Project B: GUI Player (β)
  • A GUI player for COMP30024 2019 S1 Project B in UniMelb.
  • Written in Python.
  • Adapted from by Matt Farrugia (
  • Written with Tkinter, require Tk support to run.


The same server serves as both a server and a client. Its behaviour depends on how it is started.

blueset /
Last active Apr 3, 2019
COMP30024 2019 S1 Project A: Sequence Visualizer (β)
  • A sequence visualizer for COMP30024 2019 S1 Project A in UniMelb.
  • Written in Python.
  • Works in all ANSI compatible terminals.


Pipe the move sequence into stdin and the path to board description JSON as the first argument.

Things you might want to adjust

SPEED = 1.5 # number of seconds per frame