Skip to content

Instantly share code, notes, and snippets.

View mjard's full-sized avatar

Michael Jard mjard

  • Misadventure Games
View GitHub Profile
from collections import defaultdict
from itertools import combinations
worddict = defaultdict(list)
letters='sillystring'
for word in file('/usr/share/dict/words'):
w = word.strip().lower()
worddict["".join(sorted(w))].append(w)
#include <stdio.h>
int
main(int argc, char *argv[])
{
char c[]="wat is this, because this is a lie",*a=&c[0],*b=&c[0]+(sizeof c-1);
while(a<--b){*a=*a+*b;*b=*a-*b;*a=*a-*b;a++;}
printf("%s\n",c);
return 0;
}
#!/bin/bash
for gzip_file in *.gz; do
gzip -t $gzip_file 2> /dev/null
if [ $? -ne 0 ]; then
echo $gzip_file >&2
rm $gzip_file
fi
echo -n "."
done
echo ""
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
size(500, 425, P3D)
frameRate(30)
background(0)
noStroke()
val heart = {
val l = createGraphics(50,50,P3D)
l.beginDraw
l.noStroke
l.fill(255,0,0)