Skip to content

Instantly share code, notes, and snippets.

View danasf's full-sized avatar

Dana Sniezko danasf

View GitHub Profile
@danasf
danasf / readme.md
Last active April 23, 2023 06:38
ESP32 Receipt Printer Storybot

Storybot

What is it?

A receipt printer connected to GPT-3 backend.

BOM

Building this device is fairly simple. You need:

@danasf
danasf / control_panel.svg
Last active June 11, 2023 16:54
Making Things From Scraps - Kids Control Panel
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danasf
danasf / NB-door-access.ino
Last active November 5, 2022 15:42
NB Front Gate 2022
#include <WiFi.h>
#include <WiFiUdp.h>
#include "FS.h"
#include "SPIFFS.h"
#include <ArduinoOTA.h>
#include <ESPmDNS.h>
#include <HTTPClient.h>
/* You only need to format SPIFFS the first time you run a
@danasf
danasf / get_nb_events.py
Created October 22, 2022 22:33
Noisebridge Events
/* */
from bs4 import BeautifulSoup
import requests,re,json
from datetime import datetime
# get current datetime
dt = datetime.now()
@danasf
danasf / esp32_doorbell.ino
Last active August 27, 2023 19:39
ESP32 Doorbell
/*
* Noisebridge ESP32 Doorbell
* https://www.noisebridge.net/wiki/Doorbell
*
* This sketch should connect to Noisebridge wifi networks, respond to doorbell button presses,
* play a tone via an attached MP3 Player and send webhook notifications to both Slack and Discord.
* */
#include <WiFi.h>
#include <WiFiUdp.h>
@danasf
danasf / noise_table.ino
Last active September 10, 2022 22:21
Noisebridge Square Table Sketch - 2022.09.07
extern "C" {
#include "osapi.h"
#include "ets_sys.h"
#include "user_interface.h"
}
// From https://github.com/miloh/esp8266ft/blob/master/square_noise_server/square_noise_server.ino
#include <lwip/udp.h>
@danasf
danasf / mobilenet-detect-example.ipynb
Last active May 1, 2020 22:07
Jetson Nano - Object Detection (headless, from a Jupyter Notebook)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danasf
danasf / sensor_data.py
Created November 21, 2018 15:58
laser dust sensor - pm 2.5 plotter
import serial
import time
import struct
import datetime
import matplotlib.pyplot as plt
# for use with sds021 sensor or similar
# https://www.aliexpress.com/item/NOVA-PM2-5-Air-particle-dust-sensor-SDS021-laser-inside-digital-output-SDS021-Laser-PM2-5/32638192686.html
# replace with your serial port
@danasf
danasf / convert_ballots.py
Last active June 8, 2018 03:44
ballot images to CSV
# converts ballot images from sf elections into a csv you can easily import into your database/spreadsheet
# this is released into the public domain. dana sniezko, 2018
# download the text file from https://sfelections.sfgov.org/june-5-2018-election-results-detailed-reports
ballot_image_file = "20180606_ballotimage.txt"
# what you want to name your output csv
output_file_name = "parsed_ballots.csv"
# from http://www.sfelections.org/results/20180605/data/20180605_4/20180605_4_masterlookup.txt
# dictionary of to precincts
@danasf
danasf / total_votes.py
Last active June 8, 2018 02:55
RCV fun time scripts
# pre-coffee code in the public domain
# this shows total 1,2,3 votes for a given candidate, it's not running RCV rounds
# for that you want https://sfelections.sfgov.org/june-5-2018-election-results-summary
total = {"001":0,"002":0,"003":0} # total by rank
# http://www.sfelections.org/results/20180605/data/20180605_4/20180605_4_masterlookup.txt
target = "0000184" # amy here!
# ballot images from https://sfelections.sfgov.org/june-5-2018-election-results-detailed-reports