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 sqlalchemy import create_engine | |
engine = create_engine('sqlite:///:memory:', echo=True) | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
from sqlalchemy import Column, Integer, String, Float | |
class User(Base): | |
__tablename__ = 'users' |
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
upstream appname { | |
#server unix:/tmp/gunicorn.sock fail_timeout=0; | |
# For a TCP configuration: | |
server 127.0.0.1:5000 fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name www.appname.com; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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
; Sample supervisor config file. | |
; | |
; For more information on the config file, please see: | |
; http://supervisord.org/configuration.html | |
; | |
; Note: shell expansion ("~" or "$HOME") is not supported. Environment | |
; variables can be expanded using this syntax: "%(ENV_HOME)s". | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) |
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 sqlalchemy import create_engine | |
engine = create_engine('sqlite:///:memory', echo=True) | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.ext.hybrid import hybrid_property | |
Base = declarative_base() | |
from sqlalchemy import Column, Integer, String, Float | |
class Order(Base): | |
__tablename__ = 'orders' | |
order_id = Column(Integer, primary_key=True) | |
order_reference_code = Column(String) |
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
App = this.App || {}; | |
App.Photos = Backbone.Collection.extend({ | |
url: "/backlift/toc/photos" | |
}); | |
App.Captions = Backbone.Collection.extend({ | |
url: "/backliftapp/captions", | |
forFile: function(file) { | |
return this.find(function(item) { |
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
-App | |
|-- app | |
| |-- __init__.py | |
| |-- static | |
| | |-- css | |
| | `-- js | |
| |-- templates | |
| | |-- users | |
| | | |-- login.jinja2 | |
| | |-- view1.jinja2 |
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
mport os | |
import unittest | |
from mock import Mock | |
from pyramid import testing | |
from paste.deploy.loadwsgi import appconfig | |
from sqlalchemy import engine_from_config | |
from sqlalchemy.orm import sessionmaker |
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
# Usage: | |
# source iterm2.zsh | |
# iTerm2 window/tab color commands | |
# Requires iTerm2 >= Build 1.0.0.20110804 | |
# http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes | |
tab-color() { | |
echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
echo -ne "\033]6;1;bg;green;brightness;$2\a" | |
echo -ne "\033]6;1;bg;blue;brightness;$3\a" |
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
Hi Jason, | |
I've chaired PyOhio for the last three years, and we'd love to see more conferences. With PyCon being capped, and with us only able to accept a third of the talk proposals we received this year, there is increasing demand for more get togethers where we can share and learn from one another. | |
I am not a board member of the PSF, so I can only speak to my experience in answering some of your questions. I don't speak for the PSF. | |
As for needing to be a 501, no you don't need to be. PyOhio only incorporated last year (this is our sixth year) and is still waiting on 501 status (we got caught up in the 501 scandal too). What incorporating does is gives you a structure to do things under rather than having individuals, and it helpful once you've reached critical mass. But you don't need it to start generally. 501 status makes paying taxes easier, otherwise if you have money in the bank at the end of the year, you have to pay taxes. Also, some sponsors prefer that because they can use funds from a differen |