Skip to content

Instantly share code, notes, and snippets.

View lmmx's full-sized avatar
💡
lights, camera, action

Louis Maddox lmmx

💡
lights, camera, action
View GitHub Profile
@lmmx
lmmx / one_liner.sh
Last active May 12, 2025 22:49
Merge all dependency bot PRs (e.g. pre-commit)
PR_CMDS=$(gh search prs --limit 100 --owner $(gh api user -q '.login') --author pre-commit-ci[bot] --state open --json repository,number | jq -r '.[] | "gh pr merge \(.number) -R \(.repository.nameWithOwner) -s -d"' | awk '{printf "%s%s", (NR==1 ? "" : " && \n"), $0} END{print ""}'); echo "$PR_CMDS"; eval "$PR_CMDS"
---
# -----------------------------------------------------------------------------
# qr0001 – /Precision/UseDefiniteArticles
#
qr0001_precision_usedefinitearticles:
definition: >
Use definite article "the" rather than the
indefinite article "a."
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@skoba
skoba / covid19.py
Last active March 15, 2020 17:54
COVID-19 simuation by SEIR model
# The preprints is available from https://www.preprints.org/manuscript/202002.0179/v1
# S Susceptible
# E Exposed
# I Infected
# R Recovery
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
r0 = 3. # basic reproduction number
// gif by dave @beesandbombs
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
// post a message to Slack when a file is added to an S3 bucket
'use strict';
console.log('Loading function');
const aws = require('aws-sdk');
const https = require('https');
const s3 = new aws.S3({ apiVersion: '2006-03-01' });
@mikekasprzak
mikekasprzak / chromium.sh
Last active October 16, 2016 18:45
Gets the latest version of Chromium, and installs it in the current directory
#!/bin/bash
# chromium.sh - Runs the currently installed version of Chromium, without setuid, and in a different settings folder
.chromium-linux/chrome --user-data-dir=~/.config/chromium-canary --disable-setuid-sandbox &
@karpathy
karpathy / min-char-rnn.py
Last active May 19, 2025 10:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
%%file _chi2.c
#include <Python.h>
#include <numpy/arrayobject.h>
#include "chi2.h"
static char module_docstring[] =
"This module provides an interface for calculating chi-squared using C.";
static char chi2_docstring[] =
"Calculate the chi-squared of some data given a model.";
@timelyportfolio
timelyportfolio / Readme.md
Last active August 29, 2015 14:10
Animated Christmas SVG in R with htmltools + rvest + XML & vivus.js