Skip to content

Instantly share code, notes, and snippets.

🙃
Needs Coffee.

Tony Boyles AABoyles

🙃
Needs Coffee.
Block or report user

Report or block AABoyles

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View scrape_kinsa,js
// Go To https://healthweather.us/ and run this in your Browser's Developer Console.
async function loadScript(url){
let script = document.createElement("script");
script.type = "text/javascript";
await fetch(url).then(r => r.text().then(s => script.innerHTML = s));
document.body.appendChild(script);
}
loadScript("https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.1.0/papaparse.min.js")
View ListOfThingsToCoatInCopper.md
@AABoyles
AABoyles / COVID19MonthlyDeathToll.R
Last active Mar 28, 2020
Compute the Monthly Death Tolls from the JHU CSSE COVID-19 Time-Series Data
View COVID19MonthlyDeathToll.R
library(tidyverse)
library(lubridate)
raw <- read_csv('https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Deaths.csv')
processed <- raw %>%
mutate(Location = ifelse(is.na(`Province/State`), `Country/Region`, paste(`Province/State`, `Country/Region`, sep = ', '))) %>%
select(Location, `1/22/20`:`3/21/20`) %>%
pivot_longer(cols = `1/22/20`:`3/21/20`, names_to = 'Date', values_to = "Deaths") %>%
mutate(Date = mdy(Date)) %>%
@AABoyles
AABoyles / ScrapeMetaculus.js
Created Jan 21, 2020
Scrape the Metaculus API
View ScrapeMetaculus.js
let script = document.createElement('script');
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.1.0/papaparse.min.js';
document.getElementsByTagName('body')[0].append(script);
function download(text, filename='data.txt', mime='text/plain'){
let link = document.createElement('a');
link.href = window.URL.createObjectURL(new Blob([text], {type: mime}));
link.setAttribute('download', filename);
link.click();
}
View ScrapeRAZ.js
# From https://s3.us-east-2.amazonaws.com/podcast.intelligence.org/razmedia/razfeed.xml
let vals = []
document.querySelectorAll('rss channel item link').forEach(l => {
if(l.innerHTML) vals.push(l.innerHTML)
})
copy(vals.join('\n'))
# save as [urls.txt](https://gist.githubusercontent.com/AABoyles/da593afbbdea77aaa593b40f375695ca/raw/df2e2bbadc174b0cbadfdc47eafb01f1cccb7fe6/urls.txt)
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>MicrobeTrace</title>
<link rel="canonical" href="https://microbetrace.cdc.gov/" />
</head>
<body>
<noscript>
View index.html
<html>
<head>
<style>
html, body {
height: 100%;
}
</style>
</head>
<body>
<script src="https://d3js.org/d3.v5.min.js"></script>
@AABoyles
AABoyles / run.sh
Last active May 9, 2018
Set up a Mac to build MicrobeTrace
View run.sh
#!/bin/bash
# Step 1: Download Node
curl https://nodejs.org/dist/v10.0.0/node-v10.0.0-darwin-x64.tar.gz | tar -xz
# Step 2: Install Node
export PATH=/Users/`whoami`/node-v10.0.0-darwin-x64/bin:$PATH
# Step 3: Download MicrobeTrace
git clone https://github.com/CDCgov/MicrobeTRACE.git && cd MicrobeTrace
@AABoyles
AABoyles / SCF.R
Created Jan 26, 2017
SupremeCourtFill
View SCF.R
library(readr)
library(dplyr)
nominees <- read_csv("https://docs.google.com/spreadsheets/d/1xsjTL6DbfEyR57MoZD3lIG8tTU-yblRA9ehQuaoj9Wg/pub?gid=0&single=true&output=csv")
confirmations <- nominees %>%
filter(Result == "confirmed")
longConfirmations <- confirmations %>%
filter(Days > 62)
View keybase.md

Keybase proof

I hereby claim:

  • I am aaboyles on github.
  • I am aaboyles (https://keybase.io/aaboyles) on keybase.
  • I have a public key whose fingerprint is 2D01 6EB3 79A8 368C 05F4 B9EB 118A F15A CF8A 3984

To claim this, I am signing this object:

You can’t perform that action at this time.