I hereby claim:
- I am inklesspen on github.
- I am inklesspen (https://keybase.io/inklesspen) on keybase.
- I have a public key whose fingerprint is 0E94 44CD 2880 C204 4E57 6956 01F0 E464 7644 5757
To claim this, I am signing this object:
[logging.main] | |
version = 1 | |
[logging.main.formatters.generic] | |
"()" = "formatter.JSONFormatter" | |
[logging.main.handlers.console] | |
formatter = "generic" | |
class = "logging.StreamHandler" | |
stream = "ext://sys.stdout" |
# Needs JS/CSS from https://github.com/yesmeck/jquery-jsonview/ | |
from pyramid_debugtoolbar.panels import DebugPanel | |
class JSONRPCPanel(DebugPanel): | |
name = 'jsonrpc' | |
template = 'fnordapp:templates/jsonrpc_panel.dbtmako' | |
title = 'JSON-RPC calls' | |
nav_title = 'JSON-RPC' |
# sqlacodegen with --noclasses produces tables that look like this: | |
t_match_matchrelationship = Table( | |
'match_matchrelationship', metadata, | |
Column('id', BigInteger, primary_key=True, server_default=text("nextval('match_matchrelationship_id_seq'::regclass)")), | |
Column('created_on', DateTime(True), nullable=False, index=True), | |
Column('opportunity_id', ForeignKey(u'opportunities_opportunity.id'), nullable=False, index=True), | |
Column('transaction_profile_id', ForeignKey(u'transaction_profile.transaction_data_id'), index=True), | |
Column('score', BigInteger, nullable=False), | |
Column('sent_date', DateTime(True), index=True), | |
Column('pursued_on', DateTime(True)), |
from sqlalchemy import ( | |
Column, | |
Index, | |
Integer, | |
Text, | |
) | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import engine_from_config |
from pyramid.config import Configurator | |
from sqlalchemy import engine_from_config | |
from .models import ( | |
DBSession, | |
Base, | |
) | |
def main(global_config, **settings): |
from pyramid.response import Response | |
from pyramid.view import view_config | |
from sqlalchemy.exc import DBAPIError | |
from .models import ( | |
DBSession, | |
MyModel, | |
) |
from sqlalchemy import ( | |
Column, | |
Index, | |
Integer, | |
Text, | |
) | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import ( |
jon@astyanax:~$ python | |
Python 2.7.9 (default, Dec 10 2014, 23:46:04) | |
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import urllib | |
>>> urllib.urlopen('https://coveralls.io/r/inklesspen/montague') | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 87, in urlopen | |
return opener.open(url) |
>>> markupsafe.escape(u"Hello {tag}there{end}").format(tag="<a href='...'>", end="</a>") | |
Markup('Hello <a href='...'>there</a>') | |
>>> markupsafe.escape(u"Hello {tag}there{end}").format(tag=markupsafe.Markup("<a href='...'>"), end=markupsafe.Markup("</a>")) | |
Markup("Hello <a href='...'>there</a>") |
I hereby claim:
To claim this, I am signing this object: