Skip to content

Instantly share code, notes, and snippets.

View scruss's full-sized avatar
💭
🦆

Stewart Russell scruss

💭
🦆
View GitHub Profile
@scruss
scruss / hp7470a.py
Created February 21, 2014 20:20
Approximation of a HP7470a driver for Chiplotle
"""
* This file is part of chiplotle.
*
* http://music.columbia.edu/cmc/chiplotle
*
* HP7470A class contributed by scruss - 2014-02-21
"""
from chiplotle.plotters.drawingplotter import _DrawingPlotter
@scruss
scruss / hpgl-shapely_hatch.py
Created April 15, 2014 02:53
hpgl-shapely_hatch - simple Shapely/HP-GL hatching function demo
#!/usr/bin/python
# -*- coding: utf-8 -*-
# hpgl-shapely_hatch - simple Shapely/HP-GL hatching function demo
# scruss — 2014-04-14 — WTFPL (srsly)
from shapely.geometry import box, MultiLineString, Point, LineString
from shapely.affinity import rotate, scale
from shapely import speedups
from math import sqrt
@scruss
scruss / selfie.sh
Created June 24, 2014 00:53
selfie simulator simulator ...
#!/bin/bash
# strongly influenced by Interstellar Selfie Simulator
# scruss - 2014-06-23
anytopnm "$1" |\
pnmscale -xsize 160 |\
pnmhisteq |\
ppmdither -red 4 -green 4 -blue 4 |\
ppmtopgm |\
pnmremap -mapfile <(echo P3 4 1 255 108 108 78 142 139 97 195 196 165 227 230 201) |\
@scruss
scruss / keybase.md
Created September 18, 2014 04:35
keybase.md

Keybase proof

I hereby claim:

  • I am scruss on github.
  • I am scruss (https://keybase.io/scruss) on keybase.
  • I have a public key whose fingerprint is 2DED C39B A8DB 30AB EA61 4AFE 0DA7 7A09 56EA 3459

To claim this, I am signing this object:

@scruss
scruss / scarboro_neighbs.geojson
Created October 25, 2014 15:02
overpass export of scarboro neighbourhoods
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Verifying that +scruss is my blockchain ID. https://onename.com/scruss
@scruss
scruss / mandlsm.f
Created June 22, 2016 01:10
a sample Fortran-77 program that produces a greyscale Mandelbrot set in PGM format to stdout
program mandlsm
*
*
*
implicit none
integer nx,ny,maxiter,ix,iy,mslsm,j
parameter (nx=512,ny=512,maxiter=256)
external mslsm
integer mset(nx,ny)
real cx,cy,xmin,xmax,ymin,ymax
@scruss
scruss / glebe-houses-4326.geojson
Created October 22, 2016 14:45
Sample house outlines converted from Ottawa open data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@scruss
scruss / OttawaBFOMapData.md
Last active October 23, 2016 01:26
Ottawa 2000 Scale data mapping notes
@scruss
scruss / Greg Annandale's photo locations for Raspberry Pi Foundation's PIXEL wallpaper.kml
Last active November 12, 2016 18:10
Greg Annandale's photo locations for Raspberry Pi Foundation's PIXEL wallpaper KML
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Greg Annandale&apos;s photo locations for Raspberry Pi Foundation&apos;s PIXEL wallpaper</name>
<description>Please note photo licence: https://raw.githubusercontent.com/raspberrypi/pixel-wallpaper/master/license.txt</description>
<StyleMap id="Photo1">
<Pair>
<key>normal</key>
<styleUrl>#Photo</styleUrl>
</Pair>