Skip to content

Instantly share code, notes, and snippets.

@jer-tx
jer-tx / csvrenderer.py
Created November 2, 2015 17:51
Custom CSV renderer for Python Pyramid
###
# Individual file
###
import StringIO
import csv
class CSVRenderer(object):
def __init__(self, info):
pass
@jer-tx
jer-tx / restquery.py
Last active December 13, 2015 20:34
Simple class to query against Force.com REST API in Python
import json
import pprint
import urllib
import urllib2
class Salesforce(object):
@staticmethod
def query(query):
consumer_key = 'key'
consumer_secret = 'secret'
@jer-tx
jer-tx / captcha.py
Created February 24, 2016 20:48
Python Google reCaptcha request
import urllib
import json
class Captcha(object):
@staticmethod
def query(captcha, ip):
# Google captcha endpoint
google = 'https://www.google.com/recaptcha/api/siteverify'
@jer-tx
jer-tx / __init__.py
Created May 1, 2020 07:38
Pyramid memory issue with NDB datastore library
from pyramid.config import Configurator
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
with Configurator(settings=settings) as config:
config.include('.routes')
config.include('pyramid_chameleon')
### Keybase proof
I hereby claim:
* I am jer-tx on github.
* I am jer_tx (https://keybase.io/jer_tx) on keybase.
* I have a public key ASCxYfMw-xJI0Iil8pj44NPrpaeAmT--dpLjuVQL0ar1iAo
To claim this, I am signing this object: