This file contains hidden or 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
//&>/dev/null;x="\${0%.*}";[ ! "\$x" -ot "\$0" ]||(rm -f "\$x";cc -o "\$x" "\$0")&&"\$x" \$*;exit | |
#import <stdio.h> | |
int main(int argc, char* argv[]) { | |
${1:printf("${2:Hello, world!}\n"$3);} | |
return 0; | |
} |
This file contains hidden or 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
*.pyc | |
.DS_Store |
This file contains hidden or 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
{ scopeName = 'source.python'; | |
comment = ' | |
todo: | |
list comprehension / generator comprehension scope. | |
'; | |
firstLineMatch = '^#!/.*\bpython\b'; | |
fileTypes = ( 'py', 'rpy', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript' ); | |
foldingStartMarker = '^\s*(def|class)\s+([.a-zA-Z0-9_ <]+)\s*(\((.*)\))?\s*:|\{\s*$|\(\s*$|\[\s*$|^\s*"""(?=.)(?!.*""")'; | |
foldingStopMarker = '^\s*$|^\s*\}|^\s*\]|^\s*\)|^\s*"""\s*$'; |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import division, with_statement | |
import sys | |
# Demonstrating a crude method of determining a variable's names/labels. | |
def main(): | |
def getVariableNames(variable, globals, locals): | |
variables = {} |
This file contains hidden or 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
//&>/dev/null;x="${0%.*}";[ ! "$x" -ot "$0" ]||(rm -f "$x";cc -o "$x" "$0")&&"$x" $*;exit | |
#import <stdio.h> | |
#import <stdlib.h> | |
char* joinStrings(char** strings, int numStrings, char* seperator) { | |
// Handle empty case which would cause problems. | |
if (numStrings == 0) | |
return ""; | |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import Image | |
generations = [ | |
0x18, | |
0x24, | |
0x7E, | |
0x81, | |
0x42, |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
# Experimenting with creating a class without using the class statement. | |
# The classes MyA and MyB should be equivalent. | |
class MyA(object): | |
x = 5 | |
def xAndHam(self): |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import division, with_statement | |
import sys, os | |
import httplib2 | |
request = httplib2.Http().request | |
def main(): | |
queryURL = "http://mysqlgame2.appspot.com/update/queries" |
This file contains hidden or 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
[ "`git remote`" != "" ] |
This file contains hidden or 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
# Numbers that can be written in hex characters. | |
# 1 may only use as L or I exclusively in a given word. | |
# egrep -i "^([ABCDEFOLZSGT]+|[ABCDEFOIZSGT]+)$" /usr/share/dict/words | |
A | |
a | |
aa | |
aal | |
Ab | |
aba | |
abac |