I hereby claim:
- I am dirn on github.
- I am dirn (https://keybase.io/dirn) on keybase.
- I have a public key whose fingerprint is 6648 1BC9 AEC6 9D44 62E6 A472 15AB 725A 8D07 7DDF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| """pytest configuration and utilities.""" | |
| import os | |
| from urllib.parse import urlparse | |
| from flask.ext.migrate import upgrade | |
| import pytest | |
| from sqlalchemy import event | |
| from sqlalchemy.orm import Session |
| def direct_to_template(blueprint, rule, template, **kwargs): | |
| """Return a view rendered directly from a template.""" | |
| def f(template, **kwargs): | |
| return render_template(template, **kwargs) | |
| endpoint = kwargs.pop('endpoint', None) | |
| if not endpoint: | |
| endpoint = os.path.basename(template).split('.')[0] | |
| blueprint.add_url_rule( |
| #!/usr/bin/env python | |
| import os | |
| import re | |
| import subprocess | |
| import sys | |
| modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
| CHECKS = [ |
| from flask import Flask, url_for | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| return url_for('view', id=5) | |
| from flask import Flask, render_template | |
| from flask.ext.admin import Admin, AdminIndexView, expose | |
| class MyHomeView(AdminIndexView): | |
| pass | |
| app = Flask(__name__) | |
| admin = Admin(app, index_view=MyHomeView(name='My Home')) |
| \set QUIET 1 | |
| -- NULL normally displays as an empty string. Make it obvious when a field is | |
| -- NULL rather than an actual empty string. | |
| \pset null [null] | |
| -- Always autocomplete keywords using uppercase. | |
| \set COMP_KEYWORD_CASE upper | |
| -- Store a database-specific history. |
| import os | |
| import requests | |
| resp = requests.get('http://api.meetup.com/2/rsvps', params={ | |
| 'event_id': 147421542, | |
| 'rsvp': 'yes', | |
| 'format': 'json', | |
| 'offset': 0, | |
| 'page': 200, | |
| 'key': os.environ.get('MEETUP_API_KEY'), | |
| }) |
| slate.configAll({ | |
| 'defaultToCurrentScreen': true, | |
| 'secondsBetweenRepeat': 0.1, | |
| 'checkDefaultsOnLoad': true, | |
| 'focusCheckWidthMax': 3000, | |
| 'orderScreensLeftToRight': true, | |
| }); | |
| // screen references | |
| var leftScreen = '0'; |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.box = "precise64" | |
| config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
| config.vm.provision :shell, :path => "bootstrap.sh" |