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
# copied from https://github.com/simplegeo/python-oauth2 and modified | |
from simplegeo.shared import to_unicode | |
import hashlib, hmac, urllib | |
def escape(s): | |
"""Escape a URL including any /.""" | |
return urllib.quote(to_unicode(s).encode('utf-8'), safe='~') |
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
# copied from https://github.com/simplegeo/python-oauth2 and modified | |
from simplegeo.shared import to_unicode | |
import hashlib, hmac, urllib | |
def escape(s): | |
"""Escape a URL including any /.""" | |
return urllib.quote(to_unicode(s).encode('utf-8'), safe='~') |
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
HACK Zooko-Ofsimplegeos-MacBook-Pro:~/playground/python-simplegeo-shared$ git diff | |
diff --git a/simplegeo/shared/__init__.py b/simplegeo/shared/__init__.py | |
index 7004958..a71412b 100644 | |
--- a/simplegeo/shared/__init__.py | |
+++ b/simplegeo/shared/__init__.py | |
@@ -61,6 +61,8 @@ def is_valid_lat(x): | |
def is_valid_lon(x): | |
return is_numeric(x) and (x <= 180) and (x >= -180) | |
+DEFAULT_VALUE_OF_PRIVATE=# True or False goes here |
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 python | |
from pyutil import benchutil | |
def meas(N, cand): | |
for i in range(N): | |
r = cand == 'x'*32 | |
def meas_right(N): |