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
| """ | |
| test multiple layers sqlalchemy inheritance | |
| e.g. Person -> Employee -> Engineer | |
| """ | |
| from sqlalchemy import MetaData, Column, ForeignKey, types, orm | |
| 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
| #!/usr/bin/env python | |
| import os | |
| import os.path | |
| import id3reader | |
| import re | |
| SRC_ROOT = '/Users/Shared/Music' | |
| DST_ROOT = '/Users/Shared/Music-sorted' |
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
| """ | |
| demonstration of an obscure edge case / bug(?) in sqlalchemy where | |
| adding a from_self() to a query that's already been aliased once and | |
| contains a labeled literal will fail. | |
| summary | |
| 1 - from_self | |
| 2 - add a non-column entity like count() | |
| 3 - another from_self fails |
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
| #!/usr/bin/env python | |
| "Run me to check if there's any new code that doesn't have test coverage." | |
| import os | |
| import os.path | |
| import pickle | |
| import re | |
| import git |
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
| diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py | |
| index e126fe6..1862449 100644 | |
| --- a/lib/sqlalchemy/ext/associationproxy.py | |
| +++ b/lib/sqlalchemy/ext/associationproxy.py | |
| @@ -266,6 +266,33 @@ class AssociationProxy(object): | |
| 'no proxy_bulk_set supplied for custom ' | |
| 'collection_class implementation') | |
| + def _proxy_filter_operator(name): | |
| + def _wrapped_operator(self, object): |
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
| """ | |
| Demonstration of a filtering issue that was introduced in sqlalchemy r6748. | |
| In the post-r6748 behavior, the filter param False is not processed before being | |
| passed to the DBAPI. E.g. this is echoed: | |
| SELECT foos.id AS foos_id, foos.data AS foos_data FROM foos WHERE foos.data = ? | |
| (False,) | |
| Instead of this (pre-r6748): |
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
| """ | |
| Plot climb rate (in vertical ft/min) against grade. Break it up in 10-point | |
| chunks? | |
| """ | |
| from datetime import datetime | |
| from xml.dom.minidom import parse | |
| def grouper(n, iterable): |
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
| /* | |
| I found this on a customer site (for example) customersite.com. Looks like Google Analytics tracking code right? | |
| <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://customersite.com" : "http://www.customersite.com"); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); var test = unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"); </script> <script type="text/javascript"> try{ var pageTracker = _gat._getTracker("UA-xxxxxx-x"); pageTracker._trackPageview(); } catch(err) {}</script> | |
| Somehow my customer had been tricked into changing: "https://" : "http://" to: "https://customersite.com" : "http://www.customersite.com" | |
| This makes the JavaScript called from http://www.customersite.comgoogle-analytics.com which then redirects to dxwebhost.com/l.js for the JavaScript. It looks like JavaScript file then uses a CSS vulnerability to lo |
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
| <?php | |
| /** | |
| * Queue: | |
| * Manages the flow to the web servers on high traffic event sales | |
| * by placing customers into a line and then redirecting them to the | |
| * web app serves as space is opened for trans processing | |
| * | |
| * @author Marc Urbaitel <[email protected]> | |
| * @copyright In Ticketing | |
| */ |
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 asyncore | |
| import asynchat | |
| import socket | |
| class TalkHandler(asynchat.async_chat): | |
| def __init__(self, server, conn, name): | |
| asynchat.async_chat.__init__(self, conn) | |
| self.name = name | |
| self.server = server |