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
| """ | |
| generalizing the polymorphic many-to-many relation example. | |
| """ | |
| __author__ = 'scott torborg (scotttorborg.com)' | |
| from sqlalchemy import * | |
| from sqlalchemy.orm import * | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.ext.associationproxy import _AssociationList |
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
| """ | |
| a polymorphic many-to-many association with referential integrity and clean | |
| collection access! (at least in one direction) sqlalchemy is the shit. | |
| """ | |
| __author__ = 'scott torborg (scotttorborg.com)' | |
| from sqlalchemy import * | |
| from sqlalchemy.orm import * | |
| from sqlalchemy.ext.declarative import declarative_base |
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
| """ | |
| query for a database obect which relates to a specific set of other objects. | |
| """ | |
| __author__ = 'scott torborg (scotttorborg.com)' | |
| from sqlalchemy import * | |
| from sqlalchemy.orm import * | |
| from sqlalchemy.ext.declarative import declarative_base |
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
| """ | |
| what's the fastest way to test for order-insensitive equality of two lists of | |
| integers? | |
| running timing tests for compare_sets: | |
| comparing equal shuffled lists takes 1.289612 | |
| comparing equal unshuffled lists takes 1.226031 | |
| comparing unequal lists takes 0.660738 | |
| running timing tests for compare_sort: | |
| comparing equal shuffled lists takes 2.248559 |
NewerOlder