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 bash | |
| # exit on error (errexit) | |
| set -e | |
| # pass ERR trap to subshells (errtrace) | |
| set -E | |
| # Callback function for when set -e (ERREXIT) is triggered) | |
| # This shows a small stacktrace for the current shell along with the failing | |
| # function call. | |
| function _show_traceback() { |
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 -r -u certifi-2018.10.15.orig/certifi/core.py certifi-2018.10.15/certifi/core.py | |
| --- certifi-2018.10.15.orig/certifi/core.py 2018-01-18 15:27:24.000000000 -0500 | |
| +++ certifi-2018.10.15/certifi/core.py 2018-12-13 11:08:30.834151536 -0500 | |
| @@ -19,9 +19,7 @@ | |
| def where(): | |
| - f = os.path.dirname(__file__) | |
| - | |
| - return os.path.join(f, 'cacert.pem') |
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
| from __future__ import print_function | |
| def func_one_arg(a): | |
| print('one arg') | |
| def func_one_kwarg(a=1): | |
| print('one kwarg') |
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 BoundCondition(ConditionalMixin): | |
| def __init__(self, build=None, suite=None, callback=None): | |
| self.bound_build = build | |
| self.bound_suite = suite | |
| self.bound_callback = callback | |
| ConditionalMixin.__init__(self) | |
| @staticmethod | |
| def build(build_inst): | |
| condition = BoundCondition(build=build_inst) |
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
| In [18]: expr | |
| Out[18]: re.compile(r'&(zwnj|aring|gt|yen|ograve|Chi|bull|pound|Egrave|trade|Ntilde|upsih|Yacute|Atilde|radic|otimes|aelig|oelig|equiv|Psi|auml|cup|Epsilon|otilde|Eta|lt|rsquo|Icirc|Eacute|Lambda|yacute|Prime|prime|psi|Kappa|rsaquo|Tau|uacute|sigmaf|lrm|lceil|Alpha|cedil|atilde|theta|not|kappa|AElig|oslash|acute|zwj|laquo|dArr|rdquo|ge|Igrave|hArr|micro|lsaquo|euro|shy|sdot|supe|nbsp|lfloor|lArr|Auml|larr|brvbar|Otilde|szlig|clubs|agrave|Ocirc|ndash|Theta|Pi|OElig|Scaron|thetasym|egrave|sub|iexcl|frac12|ordf|sum|prop|Uuml|ntilde|sup|asymp|uml|prod|nsub|reg|Oslash|THORN|yuml|infin|Mu|le|thinsp|ecirc|bdquo|Sigma|Aring|tilde|nabla|mdash|uarr|permil|tau|Ugrave|fnof|Agrave|chi|forall|circ|eth|rceil|iuml|gamma|lambda|harr|rang|xi|dagger|divide|Ouml|Ograve|image|alefsym|rlm|igrave|Yuml|sube|alpha|frasl|ETH|lowast|Nu|plusmn|Euml|sup1|sup2|frac34|Aacute|cent|oline|Beta|perp|emsp|loz|pi|iota|empty|euml|notin|Upsilon|para|epsilon|Delta|weierp|there4|part|icirc|delta|omicron|upsilon|copy|Iuml|Oacute|Xi|ensp |
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
| def test_partitioning(): | |
| expr = re.compile(r'\*(.*)\*') | |
| children = [docutils.nodes.Text('hello *world* goodbye')] | |
| left, matched, right = inline.re_partition(children, expr) | |
| print(left, matched, right) | |
| assert len(left) == len(right) == 1 | |
| assert len(matched) == 2 | |
| assert len(matched[0]) == len(matched[1]) == 1 | |
| assert left[0] == 'hello ' | |
| assert right[0] == ' goodbye' |
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
| <?php | |
| /** | |
| * Send Request | |
| * | |
| * @param string $method HTTP Method | |
| * @param string $url URL | |
| * @param array $params Parameters | |
| * @param string $token OAuth Token | |
| * @return \IPS\Http\Response | |
| * @throws \IPS\Http\Request\Exception |
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
| def main(): | |
| if product_one_env(): | |
| build = build_one() | |
| deploy = deploy_one(build) | |
| run_one(deploy, build) | |
| elif product_two_env(): | |
| build = build_two() | |
| deploy = deploy_two(build) | |
| run_two(deploy, build) |
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
| def test_parseable(): | |
| parser = ArgumentPasserParser() | |
| parser.add_optional_bool('-n') | |
| parser.add_optional_bool('--rm') | |
| parser.add_optional_bool('--detach') | |
| parser.add_optional_bool('--interactive') | |
| parser.add_argument('image') | |
| parser.add_argument('command', nargs=argparse.REMAINDER) | |
| args = parser.parse_args(['--interactive', |
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
| DOCKER(1) JUNE 2014 DOCKER(1) | |
| NAME | |
| docker-run - Run a command in a new container | |
| SYNOPSIS | |
| docker run [-a|--attach[=[]]] [--add-host[=[]]] | |
| [--blkio-weight[=[BLKIO-WEIGHT]]] [--blkio-weight-device[=[]]] | |
| [--cpu-shares[=0]] [--cap-add[=[]]] [--cap-drop[=[]]] | |
| [--cgroup-parent[=CGROUP-PATH]] [--cidfile[=CIDFILE]] [--cpu-period[=0]] |
NewerOlder