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 os | |
import sys | |
import signal | |
import logging | |
def multijob(jobs): | |
pids = {} |
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 com.hipmunk.pig.udfs; | |
import org.apache.pig.EvalFunc; | |
import org.apache.pig.backend.executionengine.ExecException; | |
import org.apache.pig.data.BagFactory; | |
import org.apache.pig.data.DataBag; | |
import org.apache.pig.data.DefaultBagFactory; | |
import org.apache.pig.data.Tuple; | |
import org.apache.pig.data.TupleFactory; |
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.7 | |
import matplotlib | |
matplotlib.use('Agg') | |
import matplotlib.pyplot as plt # For plotting graphs. | |
from contextlib import contextmanager | |
from collections import namedtuple | |
import urllib | |
import json |
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
#!/Users/dking/src/pypy/pypy/translator/goal/pypy-c | |
#!/usr/bin/env python2.7 | |
import sys | |
import math | |
import bisect | |
import sqlite3 | |
import os.path | |
import itertools |
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 os | |
import re | |
import sys | |
import tempfile | |
import multiprocessing | |
from optparse import OptionParser | |
from subprocess import Popen, PIPE, STDOUT |
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 pylibmc | |
print pylibmc.__file__ | |
from pylibmc import Client | |
import random | |
import sys | |
client = Client(['localhost:11211']) | |
client.behaviors.update({'cas': 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
from r2.models import * | |
from r2.lib.utils import thread_dump | |
def cc(): | |
g.cache.caches[0].clear() | |
g.cache.caches[0].flush_all() | |
cc() | |
lid = 42 |
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
""" | |
A simple LRU cache | |
""" | |
class NotFound(object): | |
pass | |
class LRUCacheEntry(object): | |
__slots__ = ('prev', # the next most recently used item | |
'next', |
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> | |
#include <mach/std_types.h> | |
#include <stdlib.h> | |
#define TUMBLERS_PER_IMAGE 15 | |
typedef enum { | |
DEFCON, | |
EIGHTEEN, // * 0xE38 + 16¢ | |
BADGE, |
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.7 | |
try: | |
import simplejson as json | |
except ImportError: | |
import json | |
import tempfile | |
import sqlite3 | |
import subprocess |
NewerOlder