Skip to content

Instantly share code, notes, and snippets.

View francisbarton's full-sized avatar

Fran Barton francisbarton

View GitHub Profile
@willf
willf / SH 1995-2024 Seasonality.md
Last active December 31, 2025 15:07
Seasonality of songs led from The Sacred Harp, 1995-2024
Month Page Title Lift Actual SongTotal
January 38t Winter 2.43x 87 642
January 223 Portuguese Hymn 2.16x 19 158
January 536 Sweet Majesty 2.13x 37 311
January 404 Youth Will Soon Be Gone 2.06x 21 183
January 311 Silver Street 2.04x 24 211
January 152 Shepherds Rejoice 2.01x 13 116
January 412 New Hosanna 1.92x 14 131
January 372 Rockport 1.86x 43 414
@matt-dray
matt-dray / bank.py
Last active August 19, 2025 00:45
Get the identity and date of the next bank holiday in England and Wales (with bunting if appropriate) from the command line with a standalone Python-script executable run by uv
#!/usr/bin/env -S uv run
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "datetime",
# "httpx",
# ]
# ///
@JBGruber
JBGruber / README.md
Last active December 20, 2025 21:58
Update all R packages using pak

Most efficient way to bring all packages on your system up to the newes version. Use with

source("https://gist.githubusercontent.com/JBGruber/f751d414ced2374b9856451531c5997d/raw/yay.r")
yay()

Limitation

Only update CRAN packages due to the usage of old.packages(). Let me know if you have a better way to find outdated packages.

@jonocarroll
jonocarroll / donut.R
Last active September 17, 2024 09:16
ts=0.07;ps=0.02;A=B=0;
while(1){ j=i=0;z=rep(0,1760);
b=rep(' ',1760); while(j < 6.28){
j=j+ts;i=0;while(i<6.28){i=i+ps;c=
sin(i);l=cos(i); d=cos(j);f=sin(j);
e=sin(A);g=cos(A );h=d+2;D=1/(c*h*e+
f*g+5);m=cos(B) ;n=sin(B);t=c*h*g-
f*e;x=as.integer (40+30*D*(l*h*m-t*n));
y=as.integer(12+ 15*D*(l*h*n+t*m));
o=as.integer(x+( 80*y));N=as.integer(
@willf
willf / leaders.md
Last active December 31, 2025 15:09
New Sacred Harp Leaders, 2023
singer n
Shawn Taylor 49
Abigail Cannon 44
Bridge Hill Kennedy 31
Bill Denney 28
Julia Zaffarano 27
Jessica Bellaire 26
Allison Langston 25
Anne Altringham 24
@wiesehahn
wiesehahn / render_pointcloud.R
Created September 10, 2023 12:14
Example how to render pointclouds in R with rayrender
##___________________________________________________
##
## Script name: render_pointcloud.R
##
## Purpose of script:
## render forest plot pointcloud with raytracing
##
## Author: Jens Wiesehahn
## Copyright (c) Jens Wiesehahn, 2023
## Email: wiesehahn.jens@gmail.com
@tomjemmett
tomjemmett / tj-dracula.omp.json
Last active July 23, 2025 13:45
my oh my posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
options(reactable.theme = reactable::reactableTheme(
color = "hsl(233, 9%, 87%)",
backgroundColor = "#002b36",
borderColor = "#eee8d5",
stripedColor = "#586e75",
highlightColor = "#6c71c4",
inputStyle = list(backgroundColor = "hsl(233, 9%, 25%)"),
selectStyle = list(backgroundColor = "hsl(233, 9%, 25%)"),
pageButtonHoverStyle = list(backgroundColor = "hsl(233, 9%, 25%)"),
pageButtonActiveStyle = list(backgroundColor = "hsl(233, 9%, 28%)")
unpack_double <- function(x) {
binary <- numToBits(x) # little-endian binary representation
structure(
list(
sign = binary[64], # 1-bit sign
exponent = binary[63:53], # 11-bit exponent
mantissa = binary[52:1] # 52-bit mantissa
),
class = "unpacked_double"
@ColinFay
ColinFay / fork-up-to-date
Last active October 9, 2020 15:59
Keep your fork up to date
# To do the first time
# git remote add upstream https://github.com/original-repo/goes-here.git
git fetch upstream
git rebase upstream/master
git push origin master --force