Skip to content

Instantly share code, notes, and snippets.

View kshaffer's full-sized avatar

Kris Shaffer kshaffer

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kshaffer on github.
  • I am krisshaffer (https://keybase.io/krisshaffer) on keybase.
  • I have a public key ASAcPbuDkhJLGRkyH782IbMGvjYb1dIzDwWWU2zJIdNmzAo

To claim this, I am signing this object:

@kshaffer
kshaffer / most_common_letters.R
Created March 3, 2017 01:08
Count the frequency of letters in some famous books
library(dplyr)
library(tibble)
library(gutenbergr)
# List authors in Project Gutenberg, by number of works (descending)
gutenberg_works() %>%
group_by(author) %>%
summarize(count = n()) %>%
arrange(desc(count))
@kshaffer
kshaffer / ComposerErrors
Last active December 25, 2015 13:49
Composer errors when installing Marca
When running
app/console doctrine:fixtures:load
I get the following error:
PHP Fatal error: Cannot redeclare class Marca\DocBundle\DataFixtures\ORM\AdditionalFixtures\LoadMarkupsetData in /home/shaffer/public/marca.local/public/src/Marca/DocBundle/DataFixtures/ORM/AdditionalFixtures/UGAMarkupSet.php on line 19
Fatal error: Cannot redeclare class Marca\DocBundle\DataFixtures\ORM\AdditionalFixtures\LoadMarkupsetData in /home/shaffer/public/marca.local/public/src/Marca/DocBundle/DataFixtures/ORM/AdditionalFixtures/UGAMarkupSet.php on line 19
@kshaffer
kshaffer / rhythmgen.py
Created January 23, 2013 20:16
A Python module that will spit out a random 4–8 bar compound-meter rhythmic exercise in Lilypond code. Once I add more rhythmic options and make it generate the whole Lilypond score, I'll make a proper repo.
# rhythmgen
# Python module for generating practice rhyhm exercises in Lilypond code
# usage:
# >>> from rhythmgen import *
# >>> randomLine(compoundBeats,randomCompoundTop(),randomBottom(),randomLength())
# then copy and paste the code into a Lilypond file with a percussion staff
# Copyright (C) 2013 Kris P. Shaffer