This file contains 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
""" | |
Utility functions for OpenSSL. | |
""" | |
import sys | |
from OpenSSL import crypto | |
from OpenSSL import SSL |
This file contains 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
<tav> Foo Hello *bar* Yes | |
<jeffarch> Oh Yes! Foo Bar |
This file contains 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 get_canonical_plexname(plexname): | |
"""Return a canonicalised form of a plexname.""" | |
if not isinstance(plexname, unicode): | |
plexname = unicode(plexname, 'utf-8') | |
# @/@ this has lotsa skope for optimisation. also, need to choose between: | |
# NFKD(toCasefold(NFKD(toCasefold(NFD(X))))) | |
# NFD(toCasefold(NFD(X))) |
This file contains 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
$ cd third_party/generic/ | |
$ rm -rf pypy | |
$ svn co svn+ssh://codespeak.net/svn/pypy/trunk pypy >> /dev/null | |
# all set to go -- if something changes on svn, just svn up ... | |
# likewise, one can make changes in the codespeak repo and svn commit... | |
$ svn up >> /dev/null | |
$ git-status |
This file contains 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
# This file has been placed into the Public Domain by: | |
# | |
# Your Name <[email protected]> | |
# | |
# See documentation/license.txt for more info. | |
"""Documentation string.""" |
This file contains 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 decimal import Decimal | |
def profit(price, current, bid_increase=Decimal('0.15'), bid_price=Decimal('0.75')): | |
price, current = Decimal(price), Decimal(current) | |
bids = current / bid_increase | |
total = (bids * bid_price) | |
if current < price: current = 0 | |
profit = total - price + current | |
# print "# of bids:", bids | |
# print "profit:", profit |
This file contains 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
$ plexnet --test --summary | |
-------------------------------------------------------------------------------- | |
Doctest Summary | |
-------------------------------------------------------------------------------- | |
1 plexnet.util secure 33 PASSED | |
2 plexnet.core builtins 8 PASSED | |
capbase 14 PASSED |
This file contains 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
[translation:ERROR] Error: | |
[translation:ERROR] Traceback (most recent call last): | |
[translation:ERROR] File "third_party/generic/pypy/pypy/translator/goal/translate.py", line 273, in main | |
[translation:ERROR] drv.proceed(goals) | |
[translation:ERROR] File "/Users/tav/work/third_party/generic/pypy/pypy/translator/driver.py", line 704, in proceed | |
[translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) | |
[translation:ERROR] File "/Users/tav/work/third_party/generic/pypy/pypy/translator/tool/taskengine.py", line 116, in _execute | |
[translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) | |
[translation:ERROR] File "/Users/tav/work/third_party/generic/pypy/pypy/translator/driver.py", line 267, in _do | |
[translation:ERROR] res = func() |
This file contains 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
[user] | |
email = [email protected] | |
name = tav | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[github] | |
user = tav |
This file contains 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
# ctypes/macholib/dyld.py needs to be monkeypatched with: | |
def dyld_default_search(name, env=None): | |
yield name | |
framework = framework_info(name) | |
if framework is not None: | |
fallback_framework_path = dyld_fallback_framework_path(env) | |
for path in fallback_framework_path: |
OlderNewer