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
;Copyright 2004, 2005, 2008 Alex Walters. | |
on *:text:!dice help:*:{ | |
notice $nick !dice <pool> <target> [action] (Botch 1) | |
notice $nick !sdice <pool> <target> [action] (10's rerolled, Botch 1) | |
notice $nick !xdice <pool> <target> [action] (9's rerolled, Botch 1) | |
notice $nick !nwod <pool> [action] (10's rerolled, target 8) | |
notice $nick !9nwod <pool> [action] (9's rerolled, target 8) | |
notice $nick !8nwod <pool> [action] (8's rerolled, target 8) | |
notice $nick !cnwod [action] (10's rerolled, target 10, Botch 1) | |
} |
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
# Punich those who import * | |
__all__ = type('__all__', (object,), {'__getitem__': lambda self, index: __import__('types').FunctionType(compile('raise ImportError("Loli Haet \'from foo import *\'")', __name__, 'single'), globals())()})() |
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
import os.path | |
import tempfile | |
import StringIO | |
import os | |
import sys | |
class AtomicOpen(StringIO.StringIO, object): | |
"""A file-like context manager for atomicly writing files | |
""" |
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
import argparse | |
import logging | |
import os | |
import sys | |
def kill_it( | |
base_path=os.getcwd(), | |
thumbsdb='Thumbs.db', | |
unlink=True, |
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
""" | |
Today I learned... How both super and method binding works. /hack | |
""" | |
import functools | |
import types | |
class Duper(object): | |
""" | |
A very simplistic reimplementation of super(). |
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
if __name__ == '__main__': | |
import sys | |
import os | |
if sys.flags.interactive and os.environ['PYTHONSTARTUP']: | |
execfile(os.environ['PYTHONSTARTUP'], globals()) |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import argparse | |
import collections | |
import datetime | |
import operator | |
import os.path | |
import struct | |
import sys |
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
def comp(): | |
import readline | |
import sys | |
try: | |
# python >= 3.something | |
del sys.__interactivehook__ | |
except AttributeError: | |
pass | |
try: |
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/sh | |
""":" | |
which python3 >/dev/null 2>&1 && exec python3 "$0" "$@" | |
which python >/dev/null 2>&1 && exec python "$0" "$@" | |
which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" | |
echo "Error: configure wrapper requires python" | |
exec echo "Either install python, or use cmake directly" | |
":""" |
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 <Python.h> | |
#include <windows.h> | |
#ifdef _CONSOLE | |
char script[] = "from collector import run\nimport sys\nsys.exit(run(sys.argv[1:]))"; | |
int | |
wmain(int argc, wchar_t *argv[]) | |
#else | |
char script[] = "from collector import run_gui\nimport sys\nsys.exit(run_gui(sys.argv[1:]))"; |
OlderNewer