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
""" | |
db -- provides database schema | |
""" | |
import sqlalchemy as sa | |
metadata = sa.MetaData() | |
kladr = sa.Table('kladr', metadata, | |
sa.Column('na_me', sa.Unicode(40)), | |
sa.Column('socr', sa.Unicode(10)), |
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 | |
""" | |
Move DBF data (as single table) to RDBMS using SQLAlchemy | |
""" | |
import os | |
import ydbf | |
import sqlalchemy as sa | |
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 | |
# 2009 Yury Yurevich <anarresti@altlinux.org>, <the.pythy@gmail.com> | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation, version 2 | |
# of the License. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
# encoding: utf-8 | |
""" | |
Logging facilities | |
""" | |
import sys | |
import logging | |
FUNC_LOGGERS = {} | |
MOD_LOGGERS = {} |
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
"""Security enchancement middleware | |
Allows to use `public` decorator for few public views instead of | |
`login_required` for almost everything. | |
Maybe we should contribute this to Django -Alex | |
(c) Alex Lebedev <me@alexlebedev.com>, Februray 2009 | |
""" | |
import re |
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() |
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
#!/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
$ 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
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']] |
OlderNewer