I hereby claim:
- I am bsmithyman on github.
- I am bsmithyman (https://keybase.io/bsmithyman) on keybase.
- I have a public key ASBOa1GAD4sXYNqt3C8cl8KaXBx0A4erRUGsaYDCE_3j0Ao
To claim this, I am signing this object:
HC_KAISER = { | |
1: 1.24, | |
2: 2.94, | |
3: 4.53, | |
4: 6.31, | |
5: 7.91, | |
6: 9.42, | |
7: 10.95, | |
8: 12.53, | |
9: 14.09, |
body | |
{ | |
background-color: #3f3f3f; | |
margin: 8px; | |
padding: 0; | |
} | |
#content | |
{ | |
width: 898px; |
I hereby claim:
To claim this, I am signing this object:
import json | |
import os | |
from oauth2client.service_account import ServiceAccountCredentials | |
import httplib2 | |
GCP_CREDENTIALS_FILE = os.getenv('GCP_CREDENTIALS_FILE', 'client-secret.json') | |
GCS_UPLOAD_URL_PATTERN = 'https://www.googleapis.com/upload/storage'+ \ | |
'/v1/b/{bucket}/o?uploadType=resumable' | |
def get_upload_url(bucket, filename, content_length, content_type='application/octet-stream'): |
Licensed under GNU Lesser General Public License | |
Originally part of 'pygeo' (also by Brendan Smithyman). | |
https://www.gnu.org/licenses/lgpl.html |
import contextlib | |
import os.path | |
from pycallgraph import PyCallGraph | |
from pycallgraph.output import GraphvizOutput | |
@contextlib.contextmanager | |
def graph_stack(filename): | |
'Generate a call graph for the enclosed context' | |
go = GraphvizOutput(output_file=filename) | |
go.output_type = os.path.splitext(filename)[-1][1:] |
#!/bin/sh | |
< $1 grep \\citation | cut -c 10- | sed -e "s/[{},]/\n/g" | sed -e "/^$/d" | sort -u |
amodulename = 'modulename' | |
try: | |
import pyximport | |
pyximport.install() | |
except: | |
print('Cython import failed; {0} will use the legacy (pure Python) mode.'.format(amodulename)) | |
from modulenamevanilla import class1, class2, class3 | |
else: | |
try: |
import re | |
parser = re.compile('(?:[0-9\.]+)') | |
lambda x: [float(item) for item in parser.findall(repr(x))] |
class Blorgle(object): | |
@property | |
def incompatible(self): | |
import inspect | |
frame = inspect.currentframe() | |
print('Current') | |
print(frame.f_locals.get('self', None)) | |
print('Previous') | |
print(frame.f_back.f_locals.get('self', None)) | |
print('2Prev') |