Skip to content

Instantly share code, notes, and snippets.

Avatar

Dave Howcroft dmhowcroft

View GitHub Profile
View loading-ltla-covid-data.R
# 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",
@dmhowcroft
dmhowcroft / 2020-coling-emnlp-header.tex
Created Apr 21, 2020
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
View 2020-coling-emnlp-header.tex
% COLING specific
% \documentclass[11pt]{article}
% \usepackage{coling2020}
% \usepackage{url}
% \colingfinalcopy % Uncomment this line for the final submission
% EMNLP specific
@dmhowcroft
dmhowcroft / thesis_progress.sh
Last active May 9, 2019
Tweaked version of de Lhoneux's thesis progress script
View thesis_progress.sh
#!/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 / 2017_inlg_hackathon-notes.md
Last active Sep 12, 2017
Working notes from the hackathon in 2017
View 2017_inlg_hackathon-notes.md

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 / bobp-python.md
Created Jul 18, 2017 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.
View bobp-python.md

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-06-20_letter-to-senator-rubio-re-the-ahca.md
Created Jun 20, 2017
A letter to Marco Rubio. Consider the text as released into the public domain and feel free to adapt it to your needs.
View 2017-06-20_letter-to-senator-rubio-re-the-ahca.md

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 / bus.py
Created May 16, 2016 — forked from interrogator/bus.py
Tells you when the next bus is coming
View bus.py
#!/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