Skip to content

Instantly share code, notes, and snippets.

View stephenc's full-sized avatar
🍵
Enjoying a nice cup of tea

Stephen Connolly stephenc

🍵
Enjoying a nice cup of tea
View GitHub Profile
@stephenc
stephenc / 1.1 Download Link.txt
Created July 28, 2025 21:01
Finger Saver Lesson 6
@stephenc
stephenc / 1 urls.txt
Created July 14, 2025 21:10
Finger saver
https://www.ncei.noaa.gov/pub/data/uscrn/products/subhourly01/2025/CRNS0101-05-2025-CO_Boulder_14_W.txt
https://www.ncei.noaa.gov/pub/data/uscrn/products/subhourly01/2025/CRNS0101-05-2025-CO_Nunn_7_NNE.txt
https://www.ncei.noaa.gov/pub/data/uscrn/products/subhourly01/2025/CRNS0101-05-2025-SC_McClellanville_7_NE.txt
@stephenc
stephenc / noteStatusHistory.tsv
Last active January 5, 2025 11:02
Output of `rg 1874648152726245523 *.tsv | sort -t$'\t' -k3,3n` from CN data at https://ton.twimg.com/birdwatch-public-data/2025/01/05/
noteId noteAuthorParticipantId createdAtMillis timestampMillisOfFirstNonNMRStatus firstNonNMRStatus timestampMillisOfCurrentStatus currentStatus timestampMillisOfLatestNonNMRStatus mostRecentNonNMRStatus timestampMillisOfStatusLock lockedStatus timestampMillisOfRetroLock currentCoreStatus currentExpansionStatus currentGroupStatus currentDecidedBy currentModelingGroup timestampMillisOfMostRecentStatusChange timestampMillisOfNmrDueToMinStableCrhTime currentMultiGroupStatus currentModelingMultiGroup timestampMinuteOfFinalScoringOutput timestampMillisOfFirstNmrDueToMinStableCrhTime
noteStatusHistory-00000.tsv:1874648152726245523 D929B80B5FF339ADA3FC081819C60FFEC537198A452CBFF5D2E3B5BEDA8D1982 1735785923546 1735791828730 CURRENTLY_RATED_HELPFUL 1735869146746 NEEDS_MORE_RATINGS 1735791828730 CURRENTLY_RATED_HELPFUL CURRENTLY_RATED_HELPFUL CoreModel (v1.1) 1735806147135 -1 28931153 1735789492987
@stephenc
stephenc / README.adoc
Created January 18, 2021 20:52
Estimating the PCR test results during the backlog in Ireland

Instructions

To get the data run the following script:

curl -O https://covid.ourworldindata.org/data/owid-covid-data

To set up R you need to install the following packages:

@stephenc
stephenc / basic.r
Created November 15, 2020 21:28
A simple analysis of SARS-CoV-2 cases in Ireland with respect to Lockdown 2
library(ggplot2)
library(dplyr)
library(lubridate)
library(ggthemes)
owid <- dplyr::mutate(read.csv('owid-covid-data.csv'), Date=as.Date(date))
png("basic.png",width=1024,height=512)
ggplot(data=(owid %>% filter(iso_code=='IRL')),aes(x=Date,y=new_cases))+
geom_point()+
geom_smooth(data=(owid %>% filter(iso_code=='IRL') %>% filter(Date >= as.Date('2020-10-15'))),method=lm,color="red",fill="#69b3a2", se=TRUE)+
@stephenc
stephenc / analysis.r
Created August 15, 2020 22:04
Correllation vs Causation
library(tidyverse)
library(grid)
library(zoo)
all = read.csv("owid-covid-data.csv", header = TRUE)
irl <- all %>%
filter(iso_code == "IRL") %>%
mutate(date=as.Date(date, format="%Y-%m-%d")) %>%
mutate(cma_cases = rollmean(new_cases, k=5, fill = NA)) %>%
mutate(cma_deaths = rollmean(new_deaths, k=5, fill = NA))
@stephenc
stephenc / covid-plot.r
Last active August 15, 2020 10:33
Plots new cases and new deaths on same graph
library(tidyverse)
library(grid)
all = read.csv("owid-covid-data.csv", header = TRUE)
irl <- all %>%
filter(iso_code == "IRL") %>%
select(date,new_cases,new_deaths) %>%
mutate(date=as.Date(date, format="%Y-%m-%d"))
p1 <- ggplot(irl, aes(x=date,y=new_cases)) +
scale_x_date() +
@stephenc
stephenc / pom.xml
Created August 11, 2020 10:17
How to allow testing with a different version from the command line
<project>
...
<dependencyManagement>
<dependencies>
...
<dependency>
<groupId>com.example.foo</groupId>
<artifactId>bar</artifactId>
<version>1.2.3</version>
</dependency>
@stephenc
stephenc / DatadogStatus.puml
Created February 28, 2020 14:22
A PlantUML sprite for a status badge
sprite $DatadogStatus [200x20/16] {
56666666666666666666666666666666666666666666666666666666666666666666666666666AAAAAAAAAAAAAAAAAAAAAAA9A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
66666666666666666666666666666666666666666666666666666666666666666666666666666AAAAAAAAAAAAAAAAAAAAAAAAA00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
66666666666666666666666666666666666666666666666666666666666666666666666666666AAAAAAAAAAAAAAAAAAAAAAAAA00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
66666666666666666666666666666666666666666666666666666666666666666666666666666AAAAAAAAAAAAAAAAAAAAAAAAA00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
66666666631666666666666666666666666666666666666666666666666666666666666666666AAAAAAAAAAAAAAAAAAAAAAAAA000000000000000000000000000000000000000000000000000000000000000000000000
package myflink;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Random;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.common.functions.RuntimeContext;