This file contains hidden or 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
| revision = '1975ea83b712' | |
| down_revision = None | |
| from alembic import op | |
| import sqlalchemy as sa | |
| def upgrade(): | |
| pass | |
| def downgrade(): |
This file contains hidden or 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
| <title>{% block title %}{% endblock %}</title> | |
| <ul> | |
| {% for user in users %} | |
| <li><a href="{{ user.url }}">{{ user.username }}</a></li> | |
| {% endfor %} | |
| </ul> |
This file contains hidden or 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
| class UserForm(Form): | |
| name = TextField(validators=[DataRequired(), Length(max=100)]) | |
| email = TextField(validators=[DataRequired(), Length(max=255)]) |
This file contains hidden or 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
| class Entity(Base): | |
| __tablename__ = 'entity' | |
| id = Column(Integer, Sequence('id_seq'), primary_key=True) | |
| name = Column(String(50)) | |
| def __init__(self, name): | |
| self.name = name | |
| def __repr__(self): | |
| return "<Entity('%d', '%s')>" % (self.id, self.name) |
This file contains hidden or 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
| avelino@klm ~ $ ab -n10000 -c500 http://127.0.0.1:8080/ | |
| This is ApacheBench, Version 2.3 <$Revision: 1604373 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking 127.0.0.1 (be patient) | |
| Completed 1000 requests | |
| Completed 2000 requests | |
| Completed 3000 requests | |
| Completed 4000 requests |
This file contains hidden or 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
| avelino@klm ~ $ ab -n10000 -c500 http://127.0.0.1:8080/ | |
| This is ApacheBench, Version 2.3 <$Revision: 1604373 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking 127.0.0.1 (be patient) | |
| Completed 1000 requests | |
| Completed 2000 requests | |
| Completed 3000 requests | |
| Completed 4000 requests |
This file contains hidden or 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
| ab -n10000 -c500 http://localhost:8080/ Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz 8GB RAM |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| func main() { | |
| http.HandleFunc("/", viewHandler) | |
| http.ListenAndServe(":8080", nil) |
This file contains hidden or 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
| import falcon | |
| class ThingsResource: | |
| def on_get(self, req, resp): | |
| resp.status = falcon.HTTP_200 | |
| resp.body = ("Hello World") | |
| app = falcon.API() | |
| things = ThingsResource() |
This file contains hidden or 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
| "------------------------------------------------------------------------------ | |
| " NeoComplete | |
| "------------------------------------------------------------------------------ | |
| " Disable AutoComplPop. | |
| let g:neocomplete#enable_auto_select = 1 | |
| let g:acp_enableAtStartup = 1 | |
| " Use neocomplete. | |
| let g:neocomplete#enable_at_startup = 1 |