Skip to content

Instantly share code, notes, and snippets.

@jbm9
jbm9 / 20220107_ucsf_covid_with_vs_for_data.csv
Created January 8, 2022 09:36
An extract of the UCSF Covid case data (dates may be off-by-one), from https://twitter.com/SaraMurrayMD/status/1479574202906656768
date with_nonicu for_nonicu with_icu_novent for_icu_novent with_icu_yesvent for_icu_yesvent
2021-07-12 12:00:00 0 1 0 1 4 3
2021-07-13 12:00:00 0 4 0 1 4 3
2021-07-14 12:00:00 0 4 0 3 4 3
2021-07-15 12:00:00 0 3 0 3 5 4
2021-07-16 12:00:00 0 2 0 4 5 4
2021-07-17 12:00:00 0 2 0 4 3 4
2021-07-18 12:00:00 0 3 0 4 3 5
2021-07-19 12:00:00 0 3 0 5 5 5
2021-07-20 12:00:00 0 3 0 4 4 6
@jbm9
jbm9 / crash_b210.py
Created December 16, 2016 21:25
A quick gnuradio sketch that crashes reliably
#!/usr/bin/env python
#
# The gist of it is: try to run a trivial spectrum-snarfing spectrum
# analyzer kind of thing. It will crash at some point pretty quickly
# on my B210.
#
# Sample run at the bottom
import time
@jbm9
jbm9 / picker.html
Created November 6, 2015 22:40
Finds the number of leap seconds between UTC and TAI given a date
<html>
<head>
<link href="css/page.css" rel="stylesheet" type="text/css">
<title>TAI Picker</title>
<script>
function tai_offset_of(d) {
// d: Date object
// Returns the TAI offset at that time
@jbm9
jbm9 / decide.py
Last active August 29, 2015 14:07
Makes arbitrary decisions for you
#!/usr/bin/env python
#
# Usage:
# decide.py ==> yes/no, 50/50
# decide.py 0.1 ==> gives a 10% chance of yes
# decide.py foo bar 3xbaz ==> gives a choice from foo bar baz baz baz
#
import sys
import random