Skip to content

Instantly share code, notes, and snippets.

View deleted's full-sized avatar

Ted Scharff deleted

View GitHub Profile

Keybase proof

I hereby claim:

  • I am deleted on github.
  • I am leted (https://keybase.io/leted) on keybase.
  • I have a public key ASAkKaNeWPqzKVo7rC2QqIlPr-TKYQPL2S2XosWvX6018Ao

To claim this, I am signing this object:

@deleted
deleted / db__db.go
Created September 1, 2017 18:49
go-swagger & gorp models
package db
import (
"database/sql"
"log"
_ "github.com/mattn/go-sqlite3" // registers sqlite driver
gorp "gopkg.in/gorp.v1"
)
@deleted
deleted / index.html
Last active October 30, 2015 17:17
Wages vs Number of Jobs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Wages vs. Number of Jobs</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<style type="text/css">
body {
margin: 0;
@deleted
deleted / stripgif.py
Last active September 29, 2015 21:37
Create animated gifs from a given Planet Labs imaging strip using the public API.
#!/usr/bin/env python
import argparse
from functools import partial
from io import BytesIO
import requests
from requests.auth import HTTPBasicAuth
import imageio
import scipy
from scipy.misc import imread
@deleted
deleted / planagrams
Last active August 29, 2015 14:13 — forked from msmoot/planagrams
#!/usr/bin/env python
# An anagram is a word formed by rearranging the letters of another, like "topside" and
# "deposit". In some cases, there might be as many (or more) anagrams than there are
# characters, like "post", "spot", "stop" and "tops".
#
# Write a program to find all of the anagrams in a dictionary in which there are at
# least 4 letters in the word and at least as many anagrams as there are letters.
#
# The dictionary will be a file on disk with one line per word. Your operating system
# likely already has such a file in /usr/dict/words or /usr/share/dict/words.
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the serial monitor
This example code is in the public domain.
*/
// digital pin 2 has a pushbutton attached to it. Give it a name:
int pushButton = 0;
long lastTime = millis();
// vim:set ft=c:
HardwareSerial uart = HardwareSerial();
int LED_PIN = 11;
int counter = 0;
void setup(){
uart.begin(19200);
Serial.begin(19200);
}
@deleted
deleted / thing.py
Last active December 19, 2015 19:09
import time
import vidplay
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(4, GPIO.IN)
GPIO.setup(22, GPIO.IN)
GPIO.setwarnings(False)
vidplayer = vidplay.Vidplay()
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#define bit(A) (1 << A)
#define sbi(p,b) { p |= (unsigned char)bit(b); }
#define cbi(p,b) { p &= (unsigned char)~bit(b); }
#define tbi(p,b) { p ^= (unsigned char)bit(b); }
#define gbi(p,b) (p & (unsigned char)bit(b))
//#define BENCHMARK
def statRecursive(node, isRoot=True):
for subnode in node.subnodes:
if subnode.isDirectory:
statRecursive(subnode, False)
else:
GlobalHandler.trigger('result', stat(subnode))
if isRoot:
GlobalHandler.trigger('end_recursion')