This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import sqlite3 | |
import csv | |
import argparse | |
import re | |
from datetime import datetime | |
def pe(*x, **y): print(*x, *y, file=sys.stderr) | |
def pf(*x, **y): print(*x, *y, flush=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# CC-By 2023 jaggz.h {over at} gmail.com | |
# https://github.com/jaggzh/ | |
# | |
# Gist URL: | |
# https://gist.github.com/jaggzh/b76b555afc8143935bd5b365bf53143d | |
# | |
# Outputs values for command-line provided resistances or temperatures | |
# Usage: therm [options] <values> [options] | |
# eg: therm <resistance>k [<resistance2>k ...] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# gist-paste url: | |
# gist-paste -u https://gist.github.com/jaggzh/6e3d4d97fa93aa76320ea7b389140ff0 | |
from transformers import WhisperProcessor, WhisperForConditionalGeneration | |
from datasets import load_dataset | |
# This is the directory created by run_speech_recognition_seq2seq.py | |
whdir="whisper-custom-en" | |
# NOTE! For loading large datasets, like common-voice, seq2seq's hf mozilla commonvoice loader (at least for v11) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# gist url: | |
# gist-paste -u https://gist.github.com/jaggzh/218c2640f87a414854d262a5e127ed95 | |
use strict; | |
use warnings; | |
use Device::SerialPort; | |
use Getopt::Std; | |
use Time::HiRes qw(time sleep); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Return (print) the name of the last file in the current dir | |
# by jaggz.h {who is at} gmail.com | |
# CC0 | |
# | |
# gist url: | |
# https://gist.github.com/jaggzh/835dc4d235cdeafd261b3a3f2769636e | |
# | |
# To use in shell conveniently you can bind a key to it (I use ^B) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Copyright (C) 2016, jaggz.h {who is at} gmail.com | |
# If you look or use this code, any further than this and the following line, | |
# you agree to all the terms and conditions outlined below in code. | |
# Otherwise, it's free to use, but if you make money off it, you must submit | |
# to me your first-born child.. nevermind. I don't want it. Go ahead | |
# and use it (the code) however you wish; I wish you well in life. | |
# gist-paste -u https://gist.github.com/jaggzh/70c77cf1959c2cc41f2eeee2c7e0541f | |
use strict; | |
use warnings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/jaggzh/8982a842784cabdb6cf1b5df4a7810da | |
-------------------------------------------------------- | |
Location: Key West, Florida. Person B was in a public park, with a public shower. Park had a shallow water pool with a fountain, and a sign had a rule saying "no bathing". B claims it was unclear if this rule applied to a shower. B was rinsing a t-shirt in the shower and someone called the police and they arrested B (a male) saying the shower was for children. This was not posted. B was in jail for a day before being informed they were "corrupting public morals." The sign actually stated, "The Splash Pad is designed for recreational purposes and not for bathing" The shower was not in the splash pad, but the police claimed the rules applied to the shower as well. | |
B is seeking damages. They were locked up in jail for a week. Caught covid in jail. Lights were on 24h/day in jail. They didn't sleep for a week, got sick, constipated, etc. They had $47 which was taken and not returned. They wer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# gist-paste -u https://gist.github.com/jaggzh/68ade8171e8d7983f63d3017762699e1 rewrap-paragraphs | |
use v5.36; | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use Lingua::EN::Sentence qw(get_sentences add_acronyms); | |
use utf8; | |
use bansi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void loop() { | |
unsigned long cmicros = micros(); | |
unsigned long cmillis = millis(); | |
static unsigned long last_read = cmillis; | |
static unsigned long last_print = cmillis; | |
#define BB 300 | |
unsigned long buf_us[BB+1]; | |
float buf_v[BB+1]; | |
float pbuf_v[BB+1]; | |
float pbuf_slv[BB+1]; |