Skip to content

Instantly share code, notes, and snippets.

⚔️
Load average: 233.0

Alphadelta14

  • AlphaServ Computing Solutions
  • Massachusetts, USA
Block or report user

Report or block Alphadelta14

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Alphadelta14
Alphadelta14 / cyargs.py
Created Apr 12, 2018
Cython breaks passing kwargs to functions with one args
View cyargs.py
from __future__ import print_function
def func_one_arg(a):
print('one arg')
def func_one_kwarg(a=1):
print('one kwarg')
View callback.py
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)
View entities.out
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
View test_inline.py
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'
@Alphadelta14
Alphadelta14 / twitter_oauth.php
Last active Nov 26, 2016
IPS [bad] twitter oauth
View twitter_oauth.php
<?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
View flow1.py
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)
View test_argpasser.py
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',
View docker run.man
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]]
View stdout
PLAY [localhost] **************************************************************
GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
ok: [localhost]
TASK: [mylib | Test library out] **********************************************
<localhost> REMOTE_MODULE testlib something=else hello=world
ok: [localhost] => {"argv": ["/home/alpha/.ansible/tmp/ansible-tmp-1472124073.82-220477884547431/testlib", "/home/alpha/.ansible/tmp/ansible-tmp-1472124073.82-220477884547431/arguments"], "data": "something=else hello=world "}
You can’t perform that action at this time.