Skip to content

Instantly share code, notes, and snippets.

View tkphd's full-sized avatar
🏳️‍🌈

Trevor Keller tkphd

🏳️‍🌈
View GitHub Profile
@tkphd
tkphd / HPL.dat
Created June 28, 2019 20:52
HPL config
HPLinpack benchmark input file
Innovative Computing Laboratory, University of Tennessee
HPL.out output file name (if any)
6 device out (6=stdout,7=stderr,file)
1 # of problems sizes (N)
5040 Ns
1 # of NBs
128 NBs
0 PMAP process mapping (0=Row-,1=Column-major)
1 # of process grids (P x Q)
@tkphd
tkphd / HPL.dat
Created June 28, 2019 22:14
HPL config for multi-node tests
HPLinpack benchmark input file
Innovative Computing Laboratory, University of Tennessee
HPL.out output file name (if any)
6 device out (6=stdout,7=stderr,file)
1 # of problems sizes (N)
17400 Ns
1 # of NBs
128 NBs
0 PMAP process mapping (0=Row-,1=Column-major)
1 # of process grids (P x Q)
@tkphd
tkphd / banking.R
Created May 7, 2020 21:20
Simple scripts to play with scope in R and Python
# Ross is a programmer for Megabank, working on a new smartphone app that
# helps users transfer money between accounts. He's relatively new to R,
# the language preferred by the top brass, and is not entirely sure of
# the difference between all the operators available for assigning
# values to variables. Specifically, there's this "scoped assignment" thing
# that sure looks like a harpoon to Ross. What's it for?
# Ross opens a bank account, then uses the app to perform a series of
# transactions. Because he's no fool, he does so in the lobby of a
# Megabank branch, and the bank teller informs him after each step what
@tkphd
tkphd / Moire-sine.ipynb
Created September 13, 2021 15:38
Moiré Patterns with the Sine Function
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tkphd
tkphd / children.py
Last active April 1, 2022 18:19
How often would 983 births produce 453 girls? With a male ratio of 51.47%, I see it in 0.80% of 100,000 samples. Low, but not extraordinary.
#!/usr/bin/env python3
import numpy as np
import matplotlib.pyplot as plt
from numpy.random import default_rng
rng = default_rng()
n = int(100_000)
N = int(1_000_000_000)
pop = int(983) # children born in Kiev
@tkphd
tkphd / the-quiet-year.py
Created January 22, 2023 23:19
Random card generator for The Quiet Year
#!/usr/bin/python3
# -*- coding: utf-8 -*-
about = """
A random card generator for The Quiet Year, which ends when 🂮 is drawn.
"""
fleet = """
short game: remove 5 cards from each suit; drop 🃎 but keep 🂮
"""