Skip to content

Instantly share code, notes, and snippets.

View dmhowcroft's full-sized avatar

Dave Howcroft dmhowcroft

View GitHub Profile
@dmhowcroft
dmhowcroft / bus.py
Created May 16, 2016 16:55 — forked from interrogator/bus.py
Tells you when the next bus is coming
#!/usr/bin/python
def nextbus(where = 'guess', nbus = 5, walking_time = 3):
"""
tells you when the next bus is from home or to uni
where: 'h'/'u'/'guess': home, uni, or try to guess based on wifi connection name
walking_time: don't show buses less than n mins from now
nbus: show next n buses
@dmhowcroft
dmhowcroft / 2017-06-20_letter-to-senator-rubio-re-the-ahca.md
Created June 20, 2017 07:27
A letter to Marco Rubio. Consider the text as released into the public domain and feel free to adapt it to your needs.

Dear Senator Rubio,

Thank you for serving our State in your capacity as one of our Senators.

I am sorry to say that today I am contacting you because I am appalled by the behavior of our Republican party with respect to the AHCA. The lack of transparency and oversight is completely unbecoming of one of our major parties, and it is completely unacceptable in a democracy where the outcomes of this bill will affect so many lives.

Therefore, I demand that you and your colleagues immediately release the details of the Senate's alterations to the AHCA and that there be public hearings wherein we can assess the impact of this bill.

The ACA is not perfect, but it needs to be reformed NOT repealed. We need to ensure that there is a genuinely affordable option. ($5k per annum deductibles are not acceptable for anyone earning less than 30k a year.) We need to ensure that the states cannot individually undo the protections provided by the ACA that ensure a basic level of access to preventative care as well as catas

@dmhowcroft
dmhowcroft / bobp-python.md
Created July 18, 2017 15:31 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@dmhowcroft
dmhowcroft / 2017_inlg_hackathon-notes.md
Last active September 12, 2017 06:05
Working notes from the hackathon in 2017

Notes for team Ice Cream at the 2017 INLG Hackathon

For getting AMR representations into DAG data structures in python, we'll use the isi-nlp/bolinas repo.

Using isi-nlp/bolinas to get AMR datastructures for AMR corpora

  1. Download the AMR corpus for the Little Prince with metadata from https://amr.isi.edu/download/amr-bank-struct-v1.6.txt
@dmhowcroft
dmhowcroft / thesis_progress.sh
Last active May 9, 2019 14:56
Tweaked version of de Lhoneux's thesis progress script
#!/usr/bin/env bash
# Assumes PDF and tex filepath differ only in the extension
#
# Usage:
# thesis_progress.sh [FILENAME [TARGET_PAGECOUNT]]
#
# FILENAME is your thesis PDF (def: thesis.pdf)
# TARGET_PAGECOUNT is the number of pages you want to write (def: 180)
#
@dmhowcroft
dmhowcroft / 2020-coling-emnlp-header.tex
Created April 21, 2020 10:26
header to use if you're working on any papers which you might submit to EMNLP or COLING depending on timing or how the paper evolves
% COLING specific
% \documentclass[11pt]{article}
% \usepackage{coling2020}
% \usepackage{url}
% \colingfinalcopy % Uncomment this line for the final submission
% EMNLP specific
# This is based on https://github.com/publichealthengland/coronavirus-dashboard-api-python-sdk/issues/3
library("reticulate")
pybuiltins <- import_builtins()
cov19 <- import("uk_covid19")
api <- cov19$Cov19API(filters=list('areaType=ltla'),
structure = list("areaType"= "areaType",
"areaName"= "areaName",
"areaCode"= "areaCode",
"specimenDate"= "date",
% Adapted from https://github.com/acl-org/ACLPUB/blob/master/templates/proceedings/cd.tex.head
% and https://github.com/acl-org/ACLPUB/blob/master/templates/proceedings/citation-stamp.tex
\documentclass[11pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} % fonts to encode unicode
\usepackage{times}
\usepackage{pdfpages} % can also use [draft] option
\usepackage{hyperref} % hyperlinked table of contents, etc.