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
# -*- coding: utf-8 -*- | |
"""Mock datetime.datetime.now()""" | |
import contextlib | |
import datetime | |
@contextlib.contextmanager | |
def mock_datetime_now(*args, **kwargs): | |
"""Context manager for mocking out datetime.datetime.now() in unit tests. |
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
# -*- coding: utf-8 -*- | |
"""\ | |
============== | |
pipetestserver | |
============== | |
This recipe describes how you can create / activate and kill a temporary HTTP | |
server with a WSGI app to provide unittest resources to a client software, | |
that's the target of your application. |
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
# -*- coding: utf-8 -*- | |
""" | |
This recipe provides a context manager that stops the execution of its inner | |
code block after the timeout is gone. This recipe is stolen with some changes | |
and rewording in a less app centric vocabulary from the "rq" package. | |
https://github.com/glenfant/rq/blob/master/rq/timeouts.py. | |
Warnings: |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require "./source.rb" | |
ROOT_PATH = File.dirname(__FILE__) | |
VAGRANTFILE_API_VERSION = "2" | |
def configure_extra(config) | |
end |
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
# -*- coding: utf-8 -*- | |
""" | |
========== | |
dottedname | |
========== | |
This module may be used when you need to refer to Python objects from non | |
Python files. For example, in a configuration file. | |
Resolve a python dotted name (stolen from zope.dottedname) |
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
# -*- coding: utf-8 -*- | |
""" | |
Provided a new XQuery, we record it as extended REST resource in ML 7 server | |
""" | |
import httplib | |
import urlparse | |
import requests |
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
# -*- coding: utf-8 -*- | |
# If you need to test a REST client, this is a Python 2 recipe that runs a | |
# simple WSGI app for your tests. Any improvement suggestion is welcome. | |
# Run this with "python -m unittest testingwsgi" | |
# Put this in a testing resources module, say tests/resources.py | |
import os |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# | |
# Docker playground for MacOS and Windows | |
# ======================================= | |
# | |
# - Installs the latest Docker + Docker-compose | |
# - Uses faster NFS files sync on Mac OS | |
# - Uses faster SMB files share on Windows | |
# |
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
""" | |
================ | |
euscans.settings | |
================ | |
Provides settings customization and public configuration object | |
[DEPRECATED] I released the ``pyflexconfig`` package on PyPI that rationalizes and improves this boilerplate. | |
https://pypi.org/project/pyflexconfig/ |
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
""" | |
============== | |
marshmallow_fr | |
============== | |
Les fields de marshmallow dont les messages d'erreur sont traduits en Français. | |
Ces messages d'erreur sont basés sur marshmallow 2.15.1 et il sera peut-être nécessaire de le mettre à jour | |
au fil des évolutions de marshmallow. | |
Parametrized marshmallow fields with error messages translated into French. |