Skip to content

Instantly share code, notes, and snippets.

View ajmontag's full-sized avatar

Andrew Montag ajmontag

View GitHub Profile
@ajmontag
ajmontag / Egyptian Braces
Created August 22, 2013 16:51
Useful regexes
# find things like this {
# other stuff
# }
\w+.*\{\s*$
# read temperature from DS18B20
# https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/hardware
# TODO command line args for time to run/num iterations
# TODO command line args for output file
# TODO run this on startup so I can run it with no network connection
import re
import datetime
import os
@ajmontag
ajmontag / scd30-read.py
Created May 24, 2020 01:28
Read from SCD30 Sensor on Raspberry PI
#!/usr/bin/env python
# coding=utf-8
#
# Based on https://github.com/UnravelTEC/Raspi-Driver-SCD30
# Copyright © 2018 UnravelTEC
# Michael Maier <michael.maier+github@unraveltec.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or