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
// ==UserScript== | |
// @name OmskveloVoteFix | |
// @namespace https://gist.github.com/j2a/76933e7d9c8dd7067ef4fa89cf3af75e/edit | |
// @version 0.1 | |
// @description Fix size and position of voting buttons on omskvelo.ru. | |
// @author Yury Yurevich | |
// @match http://omskvelo.ru/index.php?/topic/* | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js | |
// ==/UserScript== |
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 | |
import random | |
import redis | |
def adjust_score(score): | |
return score + random.choice([-0.5, +0.5]) | |
def store_set(set_x, key, cli): |
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
from datetime import datetime | |
import redis | |
import random | |
import sqlite3 | |
BROKER_HOST = "localhost" # Maps to redis host. | |
REDIS_PASSWORD = None | |
KEY_PREFIX = "speed_" | |
ALPHABETE = "qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM" | |
SQLITE_DB = ":memory:" |
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
diff --git a/procrustes/__init__.py b/procrustes/__init__.py | |
index a0aa83e..6c31d06 100644 | |
--- a/procrustes/__init__.py | |
+++ b/procrustes/__init__.py | |
@@ -1,7 +1,5 @@ | |
# (c) Svarga project under terms of the new BSD license | |
-__version__ = '0.1' | |
- | |
from functools import partial |
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 | |
""" | |
Bootstrap script for prepare environ for project | |
""" | |
import os | |
import subprocess | |
import optparse | |
import sys |
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
diff --git a/django_jenkins/tasks/with_coverage.py b/django_jenkins/tasks/with_coverage.py | |
index 716d269..29c234c 100644 | |
--- a/django_jenkins/tasks/with_coverage.py | |
+++ b/django_jenkins/tasks/with_coverage.py | |
@@ -29,7 +29,7 @@ class Task(BaseTask): | |
super(Task, self).__init__(test_labels, options) | |
self.test_apps = get_apps_under_test(test_labels, options['test_all']) | |
self.output_dir = options['output_dir'] | |
- self.excludes = options['coverage_excludes'] | |
+ self.excludes = options['coverage_excludes'] or [os.environ['DJANGO_SETTINGS_MODULE']] |
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 clone git://github.com/ask/celery.git | |
$ sloccount celery/celery | grep "Source Lines of Code" | |
Total Physical Source Lines of Code (SLOC) = 15,771 | |
$ rm -rf celery/celery/tests | |
$ sloccount celery/celery | grep "Source Lines of Code" | |
Total Physical Source Lines of Code (SLOC) = 10,204 |
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 | |
import os | |
import sys | |
import time | |
import signal | |
def show(sig, frame): | |
print "got signal %s" % sig | |
def exit(sig, frame): |
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
# hg redirections | |
redirects = { | |
'/': 'http://github.com/j2a', | |
'byteflow-pyo': 'http://bitbucket.org/j2a/pyo-byteflow', | |
'pytils': 'http://github.com/j2a/pytils', | |
'ydbf': 'http://github.com/j2a/ydbf', | |
'zepto': 'http://bitbucket.org/j2a/zepto', | |
} | |
import urlparse |
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
class Base(object): | |
def __init__(self, x): | |
print "Base - %s" % x | |
class Inherited(Base): | |
def __init__(self): | |
super(Inherited, self).__init__('foo') | |
print "Inherited" | |
o = Inherited() |
NewerOlder