Skip to content

Instantly share code, notes, and snippets.

View DaveKT's full-sized avatar
πŸ““
Geeking Out

Dave DaveKT

πŸ““
Geeking Out
View GitHub Profile
# Drafted by ChatGPT with user prompt
# Not for anything real... this is part of a 2024 easter puzzle
# To Use: 1. Save file as easter2024.py to your local machine
# 2. Replace Message and Key
# 3. Select Encrypt or Decrypt
# 4. Run file 'python3 easter2024.py'
# THE MAGIC - DO NOT EDIT
def otp_encrypt_decrypt(message, key, mode):
# Convert letters to numbers (A=0, B=1, ..., Z=25)
# Author: David Kolet-Tassara
# Date: January 23, 2021
# Source code for adalogger/feather + LIS3DH breakout for mail experient
import time
import board
import busio
import math
import digitalio
import adafruit_lis3dh
@DaveKT
DaveKT / purple.py
Last active January 1, 2022 20:47
Proof of concept for data capture from a personal Purple Air sensor. This script allows the purple air owner to capture data for custom application.
# Author: David Kolet-Tassara
# Date: December 31, 2021
# Purpose: POC for data capture from a personal purple air sensor. Data downloads are available but this script
# allows the owner to capture for use automatically for custom applications.
# Requirements
# Purple Air JSON URL: purpleair json URL provided in their welcome message when you sign up your sensor.
# AQL Library: https://pypi.org/project/python-aqi/ Used to convert purple air readings to AQI
import aqi
@DaveKT
DaveKT / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Created December 9, 2021 13:33 — forked from ccstone/BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
BBEdit-TextWrangler Regular Expression Cheat-Sheet
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@DaveKT
DaveKT / main.py
Created April 23, 2018 15:40
This is the code used to run the Penn's 6th grade parachute experiment
import adafruit_sdcard
import microcontroller
import busio
import digitalio
import board
import storage
import os
import time
import sd_mountlib
import adafruit_lsm303