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
import sys | |
from types import ModuleType | |
__path__ = [] | |
LAZY_PREFIX = "__lazy__" | |
class OnDemandModule(ModuleType): | |
def __init__(self, name): | |
ModuleType.__init__(self, name) | |
object.__setattr__(self, "__module", None) |
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
""" | |
Nested Imports Mechanism, a la Java | |
=================================== | |
Usage:: | |
import nimp | |
nimp.install() | |
# also, nimp.uninstall() |
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
$filter = array( | |
'fid' => _customfilter_map_filter_id('2'), | |
'type' => base64_decode('bXl3aWtp'), | |
'name' => base64_decode('TXlXaWtp'), | |
'cache' => 1, | |
'description' => base64_decode('DQoqKmJvbGQqKg0KLy9pdGFsaWMvLw0KX191bmRlcmxpbmVfXw0KLS1kZWxldGVkLS0NCmBgbW9ub2BgDQpcKmVzY2FwZWRcXA0KPSBoMQ0KPT0gaDINCj09PSBoMw0KW1tjb2RlIExBTkddXS4uLltbL2NvZGVdXQ0KW1tsaW5rIFVSTF1dIHRleHQgW1svbGlua11dDQpbW2ltZyBVUkxdXSBhbHQgdGV4dCBbWy9pbWddXQ0K'), | |
'shorttip' => base64_decode('Kipib2xkKioNCi8vaXRhbGljLy8NCl9fdW5kZXJsaW5lX18NCi0tZGVsZXRlZC0tDQpgYG1vbm9gYA0KXCplc2NhcGVkXFwNCj0gaDENCj09IGgyDQo9PT0gaDMNCltbY29kZSBMQU5HXV0uLi5bWy9jb2RlXV0NCltbbGluayBVUkxdXSB0ZXh0IFtbL2xpbmtdXQ0KW1tpbWcgVVJMXV0gYWx0IHRleHQgW1svaW1nXV0NCg=='), | |
'longtip' => base64_decode('Kipib2xkKioNCi8vaXRhbGljLy8NCl9fdW5kZXJsaW5lX18NCi0tZGVsZXRlZC0tDQpgYG1vbm9gYA0KXCplc2NhcGVkXFwNCj0gaDENCj09IGgyDQo9PT0gaDMNCltbY29kZSBMQU5HXV0uLi5bWy9jb2RlXV0NCltbbGluayBVUkxdXSB0ZXh0IFtbL2xpbmtdXQ0KW1tpbWcgVVJMXV0gYWx0IHRleHQgW1svaW1nXV0NCltbcnRsXV0uLltbL3J0bF1dDQpbW2x0cl1dL |
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 struct import Struct as _Struct | |
from io import BytesIO | |
from collections import OrderedDict | |
from types import GeneratorType | |
class Construct(object): | |
__slots__ = [] | |
def parse(self, stream): | |
raise NotImplementedError() |
NewerOlder