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 | |
set -e | |
if [ ! -e /tmp/aggergate ]; then | |
time nice /home/crowdtube/crowdtube/bin/aggergate.py | |
fi | |
if [ ! -e /tmp/rank ]; then | |
time nice /home/crowdtube/crowdtube/bin/rank.py |
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 remove_offset(x, y): | |
if y < 0: | |
return (x + abs(y)) | |
else: | |
return (x - y) |
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
----------------------------- | |
KARAOKE BUILDER STUDIO | |
www.KaraokeBuilder.com | |
----------------------------- | |
HEADERV2 | |
'--- Template Information --- | |
'Palette Colours (0-15) |
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
<head> | |
<meta property="og:site_name" content="Lucky Voice" /> | |
<title>Lucky Voice - Welcome</title> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<!-- Main stylesheet --> | |
<link href="http://cdn.shopify.com/s/files/1/0034/5362/assets/styles.css?100005" rel="stylesheet" type="text/css" media="all" /> | |
<!--[if IE 6]><link href="http://cdn.shopify.com/s/files/1/0034/5362/assets/ie6.css?100005" rel="stylesheet" type="text/css" media="all" /><![endif]--> |
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
/* Draggable lists */ | |
ul.reorderable { | |
position: relative; | |
z-index: 1; | |
border-top: 1px solid lighten(@mute, 10%); | |
border-bottom: 1px solid lighten(@mute, 10%); | |
li { | |
.unselectable; | |
position: relative; |
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 datetime | |
import decimal | |
import functools | |
import re | |
from dateutil import rrule | |
from django.utils import simplejson | |
from project.utils.dt import utils as dt_utils | |
from project.utils.misc import is_iterator |
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
(* Stunnel configuration file module for Augeas *) | |
module StunnelConfig = | |
autoload xfm | |
let comment = IniFile.comment IniFile.comment_re IniFile.comment_default | |
let sep = IniFile.sep "=" "=" | |
let setting = "chroot" | |
| "compression" |
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 contextlib | |
import fcntl | |
import os | |
@contextlib.contextmanager | |
def locked_file(path, mode='w'): | |
"""Context manager which will lock (and return a descriptor to) the passed file path on entry. The lock is | |
always released on exit. Will block until the lock is obtained.""" | |
assert os.path.exists(path) |
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 optparse | |
import sys | |
from boto.s3.connection import S3Connection | |
def sign(bucket, path, access_key, secret_key, https, expiry): | |
c = S3Connection(access_key, secret_key) | |
return c.generate_url( | |
expires_in=long(expiry), |
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 | |
"""reindent [-d][-r][-v] [path ...] | |
-d (--dryrun) Dry run. Analyze, but don't make any changes to, files. | |
-r (--recurse) Recurse. Search for all .py files in subdirectories too. | |
-n (--nobackup) No backup. Does not make a '.bak' file before reindenting. | |
-v (--verbose) Verbose. Print informative msgs; else no output. | |
-h (--help) Help. Print this usage information and exit. |