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
# coding: utf-8 | |
import os | |
import random | |
import inspect | |
from functools import partial | |
from itertools import product | |
class Context(object): | |
def __init__(self): |
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
while True: | |
print raw_input("Echo?") |
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
pwhash/tests | |
├── __init__.py | |
├── __pycache__ | |
├── test_algorithms.py | |
├── test_commoncrypto.py | |
├── test_config.py | |
├── test_hashers.py | |
├── test_openssl.py | |
├── test_packaging | |
│ ├── __init__.py |
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
# coding: utf-8 | |
""" | |
pythonic.tests.test_checkers | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
:copyright: 2013 by Daniel Neuhäuser | |
:license: BSD, see LICENSE.rst for more details | |
""" | |
import os |
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 flask import Flask, request | |
app = Flask(__name__) | |
@app.route("/") | |
def index(): | |
return "<br>".join("%s = %r" % item for item in request.args.items()) | |
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 __future__ import print_function | |
from collections import OrderedDict | |
from prepareable import Prepareable | |
from six import with_metaclass, iteritems | |
class FooMeta(with_metaclass(Prepareable, type)): | |
def __new__(cls, name, bases, attributes): |
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 flask import Flask | |
from package.db import db | |
app = Flask(__name__) | |
db.init_app(app) |
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
[program:apostle] | |
directory=/var/www/ | |
command=/var/www/env/bin/gunicorn apostle | |
user=www-data | |
autostart=True | |
autorestart=True | |
redirect_stderr=True |
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 flask import Flask, stream_with_context, json, Response | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
def gen(): | |
yield json.dumps({'foo': 'spam'}) | |
yield json.dumps({'bar': 'eggs'}) |
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 flask import Flask, url_for | |
app = Flask(__name__) | |
@app.route('/', defaults={'page_no': 1}) | |
@app.route('/<int:page_no>') | |
def main(page_no): | |
print url_for('main', page_no=2) | |
return unicode(page_no) |
OlderNewer