Skip to content

Instantly share code, notes, and snippets.

View capalmer1013's full-sized avatar

Chris Palmer capalmer1013

View GitHub Profile
@JoeDuncko
JoeDuncko / capitalizeFirstLetterOfEveryFileInThisDirectory.sh
Created October 25, 2021 01:07
Capitalize first letter of every file in this directory macOS zsh
# Reanme the files to start with a capital letter and end with a 2,
# see https://stackoverflow.com/questions/3011625/git-mv-and-only-change-case-of-directory
for f in *; do git mv --force "./$f" "./${(C)f[1]}${f[2,-1]}2"; done
# Remove the 2
for f in *; do git mv --force "./$f" "./${f%?}"; done
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active December 18, 2025 05:55
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bkaradzic
bkaradzic / orthodoxc++.md
Last active December 25, 2025 23:58
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@xavriley
xavriley / README.md
Created June 28, 2015 10:05
Binary rhythms in Sonic Pi

Binary Rhythms

Take an example of 8 quavers in a bar of 4/4. How many possible combinations of beats and rests are there?

If we represent the bar as an array and each beat as 1 it might look something like this

[0, 0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0, 1]
[0, 0, 0, 0, 0, 0, 1, 0]
@hrldcpr
hrldcpr / tree.md
Last active January 7, 2026 08:16
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!