Skip to content

Instantly share code, notes, and snippets.

# use ssh url instead of anonymous
[url "git@github.com:brainbot-com/"]
insteadOf = https://github.com/brainbot-com/
# save this as ~/.config/pep8
[pep8]
ignore = E401,E501,E126,E123,E128,E127,E124,E122
exclude = .svn,CVS,.bzr,.hg,.git,.tox,build
#! /usr/bin/env python
import smtplib
_from = "ralf@pediapress.com"
_to = "schmir@gmail.com"
s = smtplib.SMTP("brainbot.com", 25)
s.set_debuglevel(True)
s.ehlo()
#! bin/buildout -c
[buildout]
extends = buildout.cfg
develop +=
../fscrawler
[versions]
fscrawler=
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)
# 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:
# 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.
.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
if __name__ == "__main__":
import sys, os
os.environ["PYTHONPATH"] = ":".join(sys.path)
idxcfg = config['wpde_idx']
ew = ElasticWeb(webcfg=WebConfig(), idxcfg=idxcfg)
#! bin/buildout -c
[buildout]
extends = buildout.cfg
develop +=
../fscrawler
eggs +=
pympler
fscrawler