Skip to content

Instantly share code, notes, and snippets.

View mutoso's full-sized avatar

Alastair Feille mutoso

View GitHub Profile
from sys import argv
from mutagen.easyid3 import EasyID3
import os
audio = EasyID3(argv[1])
new_path = audio['artist'][0] + '/' + audio['album'][0] + '/' + '%02d' % int(audio['tracknumber'][0]) + ' - ' + audio['title'][0] + '.mp3'
# Don't complain if the directory already exists
try:
from num2words import num2words
def alphaonly(my_str):
return ''.join([c for c in my_str if c.isalpha()])
for i in xrange(1,2147483647):
print "#define " + alphaonly(num2words(i)).upper() + " " + str(i)
# xrange goes up to (not including) 2147483647, so print this at the end
print '#define TWOBILLIONONEHUNDREDANDFORTYSEVENMILLIONFOURHUNDREDANDEIGHTYTHREETHOUSANDSIXHUNDREDANDFORTYSEVEN 2147483647'

Keybase proof

I hereby claim:

  • I am mutoso on github.
  • I am mutoso (https://keybase.io/mutoso) on keybase.
  • I have a public key whose fingerprint is 1439 4066 4407 F58B 0835 4810 45D2 2B99 05AE 41A5

To claim this, I am signing this object:

Mozilla Public License Version 2.0

1. Definitions

1.1. "Contributor"

means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.

1.2. "Contributor Version"

means the combination of the Contributions of others (if any) used

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
void bark()
{
printf("BARK!\n");
}
@mutoso
mutoso / GPL.md
Created January 10, 2013 07:58 — forked from jnrbsn/GPL.md

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.