This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the first iteration of a helpful gist irc roebit. | |
Try the following commands: | |
!gists - lists the last 5 gists pasted in the channel | |
!gists kaptin - list the last 5 gists pasted by kaptin | |
!search <search term> - search the last 5 gists with the search terms in the description | |
I'm welcome to questions and suggestions. | |
-Kaptin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pythonic | |
def map(source, func): | |
dest = [] | |
for x in source: | |
dest.append(func(x)) | |
return dest | |
# list comprehension | |
def map(source, func): | |
return [func(x) for x in source] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# kaptin, safe from desg | |
def map(source, func): | |
return __builtins__.map(func, source) | |
# sixthgear | |
def mop(source, func): | |
return map(func, source) | |
# pythonic | |
def map(source, func): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"testing" | |
) | |
func Nop() { | |
} | |
type Stupid interface { |
OlderNewer