Skip to content

Instantly share code, notes, and snippets.

View howardjp's full-sized avatar

James Howard howardjp

View GitHub Profile
#!/bin/sh
#
# Script by Wesley J. Landaker <wjl@icecavern.net>
# posted to git@vger.kernel.org on 5 Feb 2010.
#
# Besides the error checking, this just creates a new ref
# and clears the index so you can start from a clean slate.
# No actual files are deleted from the work-tree.
if [ $# -ne 1 ]; then

Keybase proof

I hereby claim:

  • I am howardjp on github.
  • I am howardjp (https://keybase.io/howardjp) on keybase.
  • I have a public key whose fingerprint is 8A21 4303 B9A6 301A 92E0 A55D 2B98 80E1 E660 2099

To claim this, I am signing this object:

{
"name": "morse",
"keywords": "morse, led, buzzer",
"description": "Encode text as Morse code",
"repository":
{
"type": "git",
"url": "https://github.com/markfickett/arduinomorse.git"
},
"frameworks": "arduino",
{
"name": "Bitlash",
"keywords": "command line, EEPROM, editor, interpreter",
"description": "a programmable command shell for arduino",
"repository":
{
"type": "git",
"url": "https://github.com/billroy/bitlash.git"
},
"frameworks": "arduino",

Keybase proof

I hereby claim:

  • I am howardjp on github.
  • I am howardjp (https://keybase.io/howardjp) on keybase.
  • I have a public key whose fingerprint is BCC7 A7FF 558D 4B21 B3E3 CD3D 7E1A DF3E 1835 8791

To claim this, I am signing this object:

@howardjp
howardjp / MarylandCountyLegislatures.csv
Created October 29, 2018 13:01
Maryland Legislatures Analysis
County GovernmentType Population2010 LegislatorCount AnalyticTarget
Allegany Code Home Rule 75087 3 FALSE
Anne Arundel Charter 537656 7 FALSE
Baltimore City Charter 620961 15 FALSE
Baltimore County Charter 805029 7 FALSE
Calvert Commissioners 88737 5 FALSE
Caroline Code Home Rule 33066 3 FALSE
Carroll Commissioners 167134 5 FALSE
Cecil Charter 101108 5 FALSE
Charles Code Home Rule 146551 5 FALSE
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@howardjp
howardjp / bootCI.R
Last active November 15, 2018 01:37
Parallel implementation of bootCI for the R DCchoice package
## Computing a bootsrap confidence interval
bootCI.parallel <- function (obj, nboot = 1000, CI = 0.95, individual = NULL, threads = 1) {
## Manage any potential incorrect inputs, error out as approrpiate
if(!inherits(obj, c("sbchoice", "dbchoice", "oohbchoice")))
stop("the object must be sbchoice, dbchoice, or oohbchoice class")
if(CI > 1 | CI < 0)
stop("CI must be between 0 and 1")
if(!is.null(threads) && !is.numeric(threads))
stop("threads must be an integer or NULL for autodetection")
@howardjp
howardjp / 0x18358791.asc
Last active November 13, 2018 18:29
James Howard's public key (jh@jameshoward.us)
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEVoAa3xYJKwYBBAHaRw8BAQdAjmFdyF84L4mnsxlWQePC1nlWmCfvFa/AnA7L
cSFSrJG0GEphbWVzIFBhdHJpY2sgSG93YXJkLCBJSYh8BBMWCgAkAhsBBQsJCAcD
BRUKCQgLBRYCAwEAAh4BAheABQJYErV1AhkBAAoJEH4a3z4YNYeRVuwBAKFslfxr
/fWgttA4m6/AQ7FJ0APdOyMDRbm/b4ZJEJ8eAP478Bla7UMZgzYhQ5hQs9qFlNKd
hh5BfYMqVZnKKLnSA7QsSmFtZXMgUGF0cmljayBIb3dhcmQsIElJIDxqaEBqYW1l
c2hvd2FyZC51cz6IeQQTFgoAIQUCVoAcVwIbAQULCQgHAwUVCgkICwUWAgMBAAIe
AQIXgAAKCRB+Gt8+GDWHkUxPAQCPuEdmr9Dq/Y6z1iMWGk3v17PzcJQhzcCIw+bP
oC0SEwD7BRCwvIRETDDK226t1toDmUJ6EQ5yo5BmqD9BEQ1g+gO0L0phbWVzIFBh
@howardjp
howardjp / ggplot-dcchoice.R
Created November 26, 2018 14:59
This is a mostly ggplot-ish implementation of the plot for dbchoice and sbchoice models in the DCchoice package.
### This is a mostly ggplot-ish implementation of the plot for dbchoice
### and sbchoice models in the DCchoice package.
ggplot.dbchoice <- function(x, ...) {
minbid <- min(x$bid)
maxbid <- max(x$bid)
bidseq <- seq(minbid, maxbid, by = (maxbid - minbid) / 100)
b <- x$coefficients
npar <- length(b)