Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel M. Drucker dmd

View GitHub Profile
View gist:86e3ca7f41819f0ae4f767dacd2be2c9
#!/usr/bin/env python3
import requests
import codecs
import csv
r = requests.get('https://raw.githubusercontent.com/nytimes/covid-19-data/master/us-counties.csv')
data = list(csv.reader(codecs.iterdecode(r.iter_lines(), 'utf-8')))
m = [d for d in data if d[1:3] == ["Middlesex", "Massachusetts"]]
s = [d for d in data if d[1:3] == ["Suffolk", "Massachusetts"]]
n = [d for d in data if d[1:3] == ["Norfolk", "Massachusetts"]]
View gist:0be57778ff059eb06529b1a7e122e969
#!/usr/bin/env python3
# this is a utility for Daniel to make it easier
# to move tapes into the mailslot for sending to Iron Mountain
from sh import mtx, bconsole, echo
import sys
import re
tape_device = "/dev/tape/by-serial/bs_sch-STK_SL150_464970G+1304SY0600-sch"
View gist:43c468414bb25b259eecad3e413c5042
# Logfile created on 2020-07-20 12:43:36 -0400 by logger.rb/66358
D, [2020-07-20T12:43:36.782798 #53424] DEBUG -- : User asserted this is a SINGLE_FILE_BACKUP
D, [2020-07-20T12:43:36.806225 #53424] DEBUG -- : Guessed Notes Version: 13
D, [2020-07-20T12:43:36.806329 #53424] DEBUG -- : Backup is valid, ripping notes
D, [2020-07-20T12:43:36.806356 #53424] DEBUG -- : Apple Backup: Ripping notes from Note Store version 13
D, [2020-07-20T12:43:36.807489 #53424] DEBUG -- : Rip Account: Calling rip_account on Account ID 1
D, [2020-07-20T12:43:36.807536 #53424] DEBUG -- : Rip Account: Using server_record_column of ZSERVERRECORDDATA
D, [2020-07-20T12:43:36.807554 #53424] DEBUG -- : Rip Account: Query is SELECT ZICCLOUDSYNCINGOBJECT.ZNAME, ZICCLOUDSYNCINGOBJECT.Z_PK, ZICCLOUDSYNCINGOBJECT.ZSERVERRECORDDATA, ZICCLOUDSYNCINGOBJECT.ZCRYPTOITERATIONCOUNT, ZICCLOUDSYNCINGOBJECT.ZCRYPTOVERIFIER, ZICCLOUDSYNCINGOBJECT.ZCRYPTOSALT, ZICCLOUDSYNCINGOBJECT.ZIDENTIFIER FROM ZICCLOUDSYNCINGOBJECT WHERE ZICCLOUDSYNCINGOBJECT.Z_PK=?
D
View gist:33040bde154aecf203530be146a5e95c
VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 17 2020 17:49:10)
macOS version
Included patches: 1-503, 505-680, 682-2292
Compiled by root@apple.com
Normal version without GUI. Features included (+) or not (-):
+acl -farsi -mouse_sysmouse -tag_any_white
-arabic +file_in_path -mouse_urxvt -tcl
+autocmd +find_in_path +mouse_xterm -termguicolors
+autochdir +float +multi_byte +terminal
-autoservername +folding +multi_lang +terminfo
View gist:b74f0f4fc6b78480c2cf0281078d52c9
It seems like a silly question to ask, from some perspectives - as in, why not disney? It's one of the most popular tourist destinations on earth, so it hardly seems like anyone would need to come up with an excuse to go. But people do ask, and wonder especially why anyone would go there as an adult, without kids in tow. And especially why someone who is very much not a mass-media person, not especially invested in popular culture.
I have a few reasons.
Depth
Disney World - and the Magic Kingdom in particular - is a masterpiece of fractal complexity and artistry. Every square inch of the park has had decades of thought put into it. The closer you pay attention, the more little clever details you find, which is why I'm not going to be bored with this as my 4th visit in the last 5 years.
Contagiously Happy Atmosphere
They call it "The Happiest Place On Earth", and they're not kidding. They don't actually pump drugs into the air, but they don't need to - Disney are the absolute world masters of psychologica
View gist:e6a269eb38ce90cf100f17ee905d2995
#!/usr/bin/expect
trap {
set rows [stty rows]
set cols [stty columns]
stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH
set dest [lindex $argv 0];
# are we already on vpn?
View gist:ab20210301f9c09b9ed221447486225b
( 1/22) [CC] ../tmp/core/dwi/gradient.o
( 2/22) [CC] ../tmp/core/formats/tiff.o
( 3/22) [CC] ../tmp/core/image_io/mosaic.o
( 4/22) [CC] ../tmp/core/file/json_utils.o
( 5/22) [CC] ../tmp/core/formats/mrtrix_sparse_legacy.o
( 6/22) [CC] ../tmp/core/file/dicom/study.o
( 8/22) [CC] ../tmp/core/file/name_parser.o
( 7/22) [CC] ../tmp/core/app.o
(10/22) [CC] ../tmp/core/file/dicom/series.o
(11/22) [CC] ../tmp/core/math/stats/import.o
@dmd
dmd / .vimrc
Created Apr 19, 2020
loooooong startup
View .vimrc
set nocp
" Plugins
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $HOME/.vimrc
endif
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
View gist:06c143631a293febdcc8cc0b5dc340e1
nmap <S-Up> v<Up>
nmap <S-Down> v<Down>
nmap <S-Left> v<Left>
nmap <S-Right> v<Right>
vmap <S-Up> <Up>
vmap <S-Down> <Down>
vmap <S-Left> <Left>
vmap <S-Right> <Right>
View gist:bb65ae09cb37417306837670eb0f0bd4
Title Author
Delta-V Daniel Suarez
The Quantum Garden Derek Künksen
Children of Ruin Adrian Tchaikovsky
Children of Time Adrian Tchaikovsky
Recursion Blake Crouch
Come Tumbling Down Seanan McGuire
The Secret Chapter Genevieve Cogman
last tango in cyberspace steven kotler
instantiation greg egan
You can’t perform that action at this time.