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 | |
parser = argparse.ArgumentParser(description='Shift a string n chars based on step.') | |
parser.add_argument('--shift', help='shift a string of text') | |
parser.add_argument('--deshift', help='deshift a string of text') | |
parser.add_argument('--steps', type=int) | |
args = parser.parse_args() | |
steps = args.steps |
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
backend primary { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
acl purge { | |
"127.0.0.1"; | |
} | |
sub vcl_recv { |
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 gevent | |
from gevent import socket, queue | |
from gevent.ssl import wrap_socket | |
import logging | |
logger = logging.getLogger('irc') | |
logger.setLevel(logging.DEBUG) | |
ch = logging.StreamHandler() |
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 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 python2 | |
import sys | |
import pickle | |
class QueueError(Exception): | |
pass | |
class Queue: | |
def __init__(self, *args): |
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 string_process(s): | |
cs = map(ord, '{0}'.format(s)) | |
clist = ''.join(['>' + c for c in | |
['+' * n for n in | |
[(i-i%10)/10 for i in cs]]]) | |
cell_zero = ''.join(['<' * n for n in [len(cs)]]) + '-' | |
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 string, random | |
print ' '+' '.join(string.ascii_uppercase) + '\n'+' +'+''.join(['-' for x in range(52)])+'\n'+''.join([chr(x)+' | '+' '.join([chr(random.randrange(33,127)) for x in range(26)])+'\n' for x in xrange(65,91)]) |
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 | |
import sys | |
import json | |
import argparse | |
from string import uppercase, digits, letters, punctuation | |
from random import SystemRandom | |
FULL_MAP = letters + digits + punctuation |
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 random, string, time | |
TEST = False | |
def timeit(func, *args): | |
'''Simple timeit wrapper for functions.''' | |
start = time.time() | |
func(*args) | |
elapsed = time.time() - start |
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 string, random | |
CHARS = string.uppercase + ' ' | |
PROGENY = 100 | |
RATE = 0.05 | |
TARGET = 'METHINKS IT IS LIKE A WEASEL' | |
genotype = lambda s : [random.choice(s) for x in xrange(len(TARGET))] | |
phenotype = '' |
OlderNewer