If you don't have the latest and greatest Python install it from Python.org
In a terminal:
If you don't have the latest and greatest Python install it from Python.org
In a terminal:
chord( | |
list(index_all_cases(index_name, cluster)) +\ | |
list(index_all_patents(index_name, cluster)) +\ | |
list(index_all_law_firms(index_name, cluster)) +\ | |
list(index_all_attorneys(index_name, cluster)) +\ | |
list(index_all_cpcs(index_name, cluster)), | |
)(switch_to_running_index_settings.s(index_name=index_name, cluster=cluster) |\ | |
cleanup_old_indexes.s(by_date=True, prefix=prefix, cluster=cluster)) |
I hereby claim:
To claim this, I am signing this object:
def engine_from_environ(prefix, settings, application_name=None): | |
"""Setup an SQLAlchemy engine with overrides from environment. | |
Maps KEYS_LIKE_THIS to keys.like.this""" | |
env_prefix = prefix.replace('.', '_').upper() | |
for env in os.environ: | |
if env.startswith(env_prefix): | |
key = env.replace('_', '.').lower() | |
settings[key] = os.environ[env] | |
if application_name is not None: |
from wsgiref.simple_server import make_server | |
from pyramid.config import Configurator | |
from pyramid.response import Response | |
def hello_world(request): | |
return Response('Hello %(name)s!' % request.matchdict) | |
if __name__ == '__main__': | |
config = Configurator() | |
config.add_route('hello', '/hello/{name}') |
home / sameroute.views.my_view * | |
home_again / <unknown> * |
@view_config(context=Exception) | |
def exception_view(context, request): | |
# Check to see if debug toolbar is enabled. | |
from pyramid.interfaces import ITweens | |
tweens = request.registry.queryUtility(ITweens) | |
if tweens: | |
tween_list = tweens.explicit or tweens.implicit() | |
tween_names = zip(*tween_list)[0] | |
if tween_list and 'pyramid_debugtoolbar.toolbar_tween_factory' in\ | |
tween_names: |
pip install --upgrade 'pip>=1.4.1' | |
Requirement already up-to-date: pip>=1.4.1 in /home/lex/lib/python2.7/site-packages | |
pip install --upgrade 'setuptools>=0.8' | |
Requirement already up-to-date: setuptools>=0.8 in /home/lex/lib/python2.7/site-packages | |
pip install wheel | |
Requirement already satisfied (use --upgrade to upgrade): wheel in /home/lex/lib/python2.7/site-packages | |
pip wheel -w wheelhouse -f wheelhouse -r requirements.txt | |
ERROR: 'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptools |
def forbid_user_messages(request, user): | |
"""Provide messaging to users who have an active session and become | |
disabled for some reason.""" | |
if user.inactive and not request.is_xhr: | |
# Log out inactive users. | |
headers = forget(request) | |
if user.trial_expiration: | |
error_msg = """Your Lex Machina trial has expired. | |
Please <a href="mailto:sales@lexmachina.com">contact sales</a> | |
to subscribe.""" |