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
# use ssh url instead of anonymous | |
[url "[email protected]:brainbot-com/"] | |
insteadOf = https://github.com/brainbot-com/ |
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
# save this as ~/.config/pep8 | |
[pep8] | |
ignore = E401,E501,E126,E123,E128,E127,E124,E122 | |
exclude = .svn,CVS,.bzr,.hg,.git,.tox,build |
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 smtplib | |
_from = "[email protected]" | |
_to = "[email protected]" | |
s = smtplib.SMTP("brainbot.com", 25) | |
s.set_debuglevel(True) | |
s.ehlo() |
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/buildout -c | |
[buildout] | |
extends = buildout.cfg | |
develop += | |
../fscrawler | |
[versions] | |
fscrawler= |
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 pytest, py, os | |
@pytest.fixture(autouse=True) | |
def chdir_tmpdir(request, tmpdir): | |
"""autouse fixture that chdirs to tmpdir""" | |
cwd = py.path.local(".") | |
tmpdir.chdir() | |
request.addfinalizer(cwd.chdir) |
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
# Copyright (c) 2007-2009 PediaPress GmbH | |
# See README.rst for additional licensing information. | |
"""custom json encoder/decoder, which can handle metabook objects""" | |
from mwlib import metabook | |
try: | |
import simplejson as json | |
except ImportError: |
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
# allow to silence error reporting for certain 'expected exceptions' | |
# gevent prints a error report including a traceback for each failed | |
# greenlet. this is at times useful, but you're currently forced to | |
# either handle exceptions in those greenlets or live with the traceback | |
# on stderr. | |
# patch_gevent introduces a class variable 'expected_exceptions' to | |
# gevent's greenlet class. This is a tuple of exceptions for which no | |
# error report should be printed to stderr. |
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
.file "greenlet.c" | |
.text | |
.p2align 4,,15 | |
.type green_is_gc, @function | |
green_is_gc: | |
.LFB148: | |
.cfi_startproc | |
cmpq $-1, 24(%rdi) | |
je .L3 | |
xorl %eax, %eax |
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
if __name__ == "__main__": | |
import sys, os | |
os.environ["PYTHONPATH"] = ":".join(sys.path) | |
idxcfg = config['wpde_idx'] | |
ew = ElasticWeb(webcfg=WebConfig(), idxcfg=idxcfg) |
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/buildout -c | |
[buildout] | |
extends = buildout.cfg | |
develop += | |
../fscrawler | |
eggs += | |
pympler | |
fscrawler |