Skip to content

Instantly share code, notes, and snippets.

@atx
atx / makekeyboardpcb.py
Created July 22, 2018 10:54
Script which eats JSONs from http://www.keyboard-layout-editor.com/ and spits out a KiCad PCB
#! /usr/bin/env python2
from __future__ import print_function, with_statement, division, generators
import argparse
import collections
import json
import pcbnew
@atx
atx / __README.md
Last active August 29, 2023 22:17
My grafana dashboard for prometheus-tor_exporter

Don't forget to modify the __inputs key to match your data source setup. You should also replace the string your.instance.here with the instance name associated with your metrics.

@atx
atx / main.py
Created August 1, 2019 11:50
Hacky script to export Mozilla webthings gateway values to influxdb
#! /usr/bin/env python3
import argparse
import asyncio
import configparser
import datetime
import influxdb
import json
import pathlib
import requests
@atx
atx / hspbatt.py
Last active October 21, 2019 20:59
Hacky way of displaying headset battery level by sniffing the raw bluetooth traffic and dumping it to a file
#! /usr/bin/env python3
import argparse
import pathlib
import pyshark
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-o", "--output", type=lambda s: pathlib.Path(s).expanduser(), required=True)
@atx
atx / dpssigrokcal.py
Last active June 17, 2020 20:31
Hacky script which combines `sigrok-cli` and `dpsctl.py` to calibrate OpenDPS. Will likely need modifications before use. Note: The current calibration is currently untested, it looks like the DPS needs nonzero load resistor in order to measure current and I do not have any at hand.
#! /usr/bin/env python3
import argparse
import subprocess
import pathlib
import time
import scipy.stats
import numpy as np