code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
class DummyUser(object): def get_and_delete_messages(self): pass class NeedsUserObject(object): def process_request(self, request): request.user = DummyUser()
[ [ 3, 0, 0.2778, 0.4444, 0, 0.66, 0, 248, 0, 1, 0, 0, 186, 0, 0 ], [ 2, 1, 0.3889, 0.2222, 1, 0.77, 0, 980, 0, 1, 0, 0, 0, 0, 0 ], [ 3, 0, 0.8333, 0.4444, 0, 0.66, ...
[ "class DummyUser(object):\n\n def get_and_delete_messages(self):\n pass", " def get_and_delete_messages(self):\n pass", "class NeedsUserObject(object):\n\n def process_request(self, request):\n request.user = DummyUser()", " def process_request(self, request):\n request...
# -*- coding: utf-8 -*- """ jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from itertools import chain, imap from jinja2.nodes import EvalContext, _context_function_types from jinja2.utils import Markup, partial, soft_unicode, escape, miss...
[ [ 8, 0, 0.0109, 0.0164, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0201, 0.0018, 0, 0.66, 0.05, 808, 0, 2, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0219, 0.0018, 0, 0.66, ...
[ "\"\"\"\n jinja2.runtime\n ~~~~~~~~~~~~~~\n\n Runtime helpers.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD.", "from itertools import chain, imap", "from jinja2.nodes import EvalContext, _context_function_types", "from jinja2.utils import Markup, partial, soft_unicode, escape, mi...
# -*- coding: utf-8 -*- """ jinja2.bccache ~~~~~~~~~~~~~~ This module implements the bytecode cache system Jinja is optionally using. This is useful if you have very complex template situations and the compiliation of all those templates slow down your application too much. Situations whe...
[ [ 8, 0, 0.0299, 0.0498, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0565, 0.0033, 0, 0.66, 0.0667, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0598, 0.0033, 0, 0.66...
[ "\"\"\"\n jinja2.bccache\n ~~~~~~~~~~~~~~\n\n This module implements the bytecode cache system Jinja is optionally\n using. This is useful if you have very complex template situations and\n the compiliation of all those templates slow down your application too\n much.", "from os import path, li...
# -*- coding: utf-8 -*- """ jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from cStringIO import StringIO from itertools import chain from copy import deepcopy from jinja2 import nodes from j...
[ [ 8, 0, 0.0036, 0.0055, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0067, 0.0006, 0, 0.66, 0.0417, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.0073, 0.0006, 0, 0.66...
[ "\"\"\"\n jinja2.compiler\n ~~~~~~~~~~~~~~~\n\n Compiles nodes into python code.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "from cStringIO import StringIO", "from itertools import chain", "from copy import deepcopy", "from jinja2 import nodes...
# -*- coding: utf-8 -*- """ jinja2.meta ~~~~~~~~~~~ This module implements various functions that exposes information about templates that might be interesting for various kinds of applications. :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details. :license: BSD, see LICENSE fo...
[ [ 8, 0, 0.0637, 0.098, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1176, 0.0098, 0, 0.66, 0.2, 436, 0, 1, 0, 0, 436, 0, 0 ], [ 1, 0, 0.1275, 0.0098, 0, 0.66, ...
[ "\"\"\"\n jinja2.meta\n ~~~~~~~~~~~\n\n This module implements various functions that exposes information about\n templates that might be interesting for various kinds of applications.\n\n :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details.", "from jinja2 import nodes", "from ji...
# -*- coding: utf-8 -*- """ jinja2.testsuite.tests ~~~~~~~~~~~~~~~~~~~~~~ Who tests the tests? :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Markup, Environment env = Environm...
[ [ 8, 0, 0.0645, 0.0968, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1183, 0.0108, 0, 0.66, 0.1667, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.129, 0.0108, 0, 0.66, ...
[ "\"\"\"\n jinja2.testsuite.tests\n ~~~~~~~~~~~~~~~~~~~~~~\n\n Who tests the tests?\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import unittest", "from jinja2.testsuite import JinjaTestCase", "from jinja2 import Markup, Environment", "env = Env...
# -*- coding: utf-8 -*- """ jinja2.testsuite.debug ~~~~~~~~~~~~~~~~~~~~~~ Tests the debug system. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import sys import unittest from jinja2.testsuite import JinjaTestCase, filesystem_loader from jinja2 import E...
[ [ 8, 0, 0.1, 0.15, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1833, 0.0167, 0, 0.66, 0.1429, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2, 0.0167, 0, 0.66, 0....
[ "\"\"\"\n jinja2.testsuite.debug\n ~~~~~~~~~~~~~~~~~~~~~~\n\n Tests the debug system.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import sys", "import unittest", "from jinja2.testsuite import JinjaTestCase, filesystem_loader", "from jinja2 imp...
# -*- coding: utf-8 -*- """ jinja2.testsuite.doctests ~~~~~~~~~~~~~~~~~~~~~~~~~ The doctests. Collects all tests we want to test from the Jinja modules. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest import doctest def suite(): f...
[ [ 8, 0, 0.2241, 0.3448, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4138, 0.0345, 0, 0.66, 0.3333, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.4483, 0.0345, 0, 0.66, ...
[ "\"\"\"\n jinja2.testsuite.doctests\n ~~~~~~~~~~~~~~~~~~~~~~~~~\n\n The doctests. Collects all tests we want to test from\n the Jinja modules.\n\n :copyright: (c) 2010 by the Jinja Team.", "import unittest", "import doctest", "def suite():\n from jinja2 import utils, sandbox, runtime, meta,...
# -*- coding: utf-8 -*- """ jinja2.testsuite.utils ~~~~~~~~~~~~~~~~~~~~~~ Tests utilities jinja uses. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import gc import unittest import pickle from jinja2.testsuite import JinjaTestCase from jinja2.utils imp...
[ [ 8, 0, 0.0732, 0.1098, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1341, 0.0122, 0, 0.66, 0.1111, 92, 0, 1, 0, 0, 92, 0, 0 ], [ 1, 0, 0.1463, 0.0122, 0, 0.66, ...
[ "\"\"\"\n jinja2.testsuite.utils\n ~~~~~~~~~~~~~~~~~~~~~~\n\n Tests utilities jinja uses.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import gc", "import unittest", "import pickle", "from jinja2.testsuite import JinjaTestCase", "from jinja2....
# -*- coding: utf-8 -*- """ jinja2.testsuite.ext ~~~~~~~~~~~~~~~~~~~~ Tests for the extensions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment, DictLoader...
[ [ 8, 0, 0.0132, 0.0198, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0242, 0.0022, 0, 0.66, 0.0357, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0264, 0.0022, 0, 0.66...
[ "\"\"\"\n jinja2.testsuite.ext\n ~~~~~~~~~~~~~~~~~~~~\n\n Tests for the extensions.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import re", "import unittest", "from jinja2.testsuite import JinjaTestCase", "from jinja2 import Environment, DictL...
# -*- coding: utf-8 -*- """ jinja2.testsuite.inheritance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the template inheritance feature. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Env...
[ [ 8, 0, 0.0264, 0.0396, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0485, 0.0044, 0, 0.66, 0.0769, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0573, 0.0044, 0, 0.66, ...
[ "\"\"\"\n jinja2.testsuite.inheritance\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n Tests the template inheritance feature.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import unittest", "from jinja2.testsuite import JinjaTestCase", "from jinja2 import Env...
# -*- coding: utf-8 -*- """ jinja2.testsuite.core_tags ~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the core tags like for and if. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment...
[ [ 8, 0, 0.0211, 0.0316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0386, 0.0035, 0, 0.66, 0.125, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0456, 0.0035, 0, 0.66, ...
[ "\"\"\"\n jinja2.testsuite.core_tags\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n Test the core tags like for and if.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import unittest", "from jinja2.testsuite import JinjaTestCase", "from jinja2 import Environment...
# -*- coding: utf-8 -*- """ jinja2.testsuite.filters ~~~~~~~~~~~~~~~~~~~~~~~~ Tests for the jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Markup, Environment en...
[ [ 8, 0, 0.0169, 0.0253, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0309, 0.0028, 0, 0.66, 0.1667, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0337, 0.0028, 0, 0.66, ...
[ "\"\"\"\n jinja2.testsuite.filters\n ~~~~~~~~~~~~~~~~~~~~~~~~\n\n Tests for the jinja filters.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import unittest", "from jinja2.testsuite import JinjaTestCase", "from jinja2 import Markup, Environment", ...
# -*- coding: utf-8 -*- """ jinja2.testsuite.loader ~~~~~~~~~~~~~~~~~~~~~~~ Test the loaders. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import tempfile import shutil import unittest from jinja2.testsuite import JinjaTestCase, dic...
[ [ 8, 0, 0.0316, 0.0474, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0579, 0.0053, 0, 0.66, 0.0833, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0632, 0.0053, 0, 0.66...
[ "\"\"\"\n jinja2.testsuite.loader\n ~~~~~~~~~~~~~~~~~~~~~~~\n\n Test the loaders.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import os", "import sys", "import tempfile", "import shutil", "import unittest", "from jinja2.testsuite import Ji...
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
[ [ 8, 0, 0.0088, 0.0143, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0165, 0.0011, 0, 0.66, 0.0128, 616, 0, 1, 0, 0, 616, 0, 0 ], [ 1, 0, 0.0176, 0.0011, 0, 0.66...
[ "\"\"\"\n jinja2.nodes\n ~~~~~~~~~~~~\n\n This module implements additional nodes derived from the ast base node.\n\n It also provides some node tree helper functions like `in_lineno` and\n `get_nodes` used by the parser and translator in order to normalize", "import operator", "from itertools im...
# -*- coding: utf-8 -*- """ jinja2.tests ~~~~~~~~~~~~ Jinja test functions. Used with the "is" operator. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re from jinja2.runtime import Undefined try: from collections import Mapping as MappingType ...
[ [ 8, 0, 0.0373, 0.0559, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0683, 0.0062, 0, 0.66, 0.0435, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0745, 0.0062, 0, 0.66...
[ "\"\"\"\n jinja2.tests\n ~~~~~~~~~~~~\n\n Jinja test functions. Used with the \"is\" operator.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import re", "from jinja2.runtime import Undefined", "try:\n from collections import Mapping as MappingT...
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
[ [ 8, 0, 0.1471, 0.25, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2794, 0.0147, 0, 0.66, 0.25, 436, 0, 1, 0, 0, 436, 0, 0 ], [ 1, 0, 0.2941, 0.0147, 0, 0.66, ...
[ "\"\"\"\n jinja2.optimizer\n ~~~~~~~~~~~~~~~~\n\n The jinja optimizer is currently trying to constant fold a few expressions\n and modify the AST in place so that it should be easier to evaluate it.\n\n Because the AST does not contain all the scoping information and the", "from jinja2 import nodes...
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean a...
[ [ 8, 0, 0.1875, 0.2812, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.7188, 0.5938, 0, 0.66, 1, 350, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "\"\"\"\n jinja.constants\n ~~~~~~~~~~~~~~~\n\n Various constants.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "LOREM_IPSUM_WORDS = u'''\\\na ac accumsan ad adipiscing aenean aliquam aliquet amet ante aptent arcu at\nauctor augue bibendum blandit cla...
# -*- coding: utf-8 -*- """ jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
[ [ 8, 0, 0.0222, 0.036, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0416, 0.0028, 0, 0.66, 0.0435, 616, 0, 1, 0, 0, 616, 0, 0 ], [ 1, 0, 0.0443, 0.0028, 0, 0.66,...
[ "\"\"\"\n jinja2.sandbox\n ~~~~~~~~~~~~~~\n\n Adds a sandbox layer to Jinja as it was the default behavior in the old\n Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the\n default behavior is easier to use.", "import operator", "from jinja2.environment import Environment",...
import gc import unittest from jinja2._markupsafe import Markup, escape, escape_silent class MarkupTestCase(unittest.TestCase): def test_markup_operations(self): # adding two strings should escape the unsafe one unsafe = '<script type="application/x-some-script">alert("foo");</script>' sa...
[ [ 1, 0, 0.0125, 0.0125, 0, 0.66, 0, 92, 0, 1, 0, 0, 92, 0, 0 ], [ 1, 0, 0.025, 0.0125, 0, 0.66, 0.1667, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0375, 0.0125, 0, 0.66,...
[ "import gc", "import unittest", "from jinja2._markupsafe import Markup, escape, escape_silent", "class MarkupTestCase(unittest.TestCase):\n\n def test_markup_operations(self):\n # adding two strings should escape the unsafe one\n unsafe = '<script type=\"application/x-some-script\">alert(\"fo...
# -*- coding: utf-8 -*- """ markupsafe._constants ~~~~~~~~~~~~~~~~~~~~~ Highlevel implementation of the Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ HTML_ENTITIES = { 'AElig': 198, 'Aacute': 193, 'Acirc': 194, 'Agrave': 1...
[ [ 8, 0, 0.0225, 0.0337, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5243, 0.9551, 0, 0.66, 1, 955, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "\"\"\"\n markupsafe._constants\n ~~~~~~~~~~~~~~~~~~~~~\n\n Highlevel implementation of the Markup string.\n\n :copyright: (c) 2010 by Armin Ronacher.\n :license: BSD, see LICENSE for more details.", "HTML_ENTITIES = {\n 'AElig': 198,\n 'Aacute': 193,\n 'Acirc': 194,\n 'Agrave': 192,\n ...
# -*- coding: utf-8 -*- """ jinja2._markupsafe._bundle ~~~~~~~~~~~~~~~~~~~~~~~~~~ This script pulls in markupsafe from a source folder and bundles it with Jinja2. It does not pull in the speedups module though. :copyright: Copyright 2010 by the Jinja team, see AUTHORS. :license: BSD, see ...
[ [ 8, 0, 0.1429, 0.2245, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2653, 0.0204, 0, 0.66, 0.1667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2857, 0.0204, 0, 0.66...
[ "\"\"\"\n jinja2._markupsafe._bundle\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n This script pulls in markupsafe from a source folder and\n bundles it with Jinja2. It does not pull in the speedups\n module though.", "import sys", "import os", "import re", "def rewrite_imports(lines):\n for idx, line...
# -*- coding: utf-8 -*- """ markupsafe ~~~~~~~~~~ Implements a Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re from itertools import imap __all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent'] _striptags_re = re.compile...
[ [ 8, 0, 0.0267, 0.04, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0489, 0.0044, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0533, 0.0044, 0, 0.66, ...
[ "\"\"\"\n markupsafe\n ~~~~~~~~~~\n\n Implements a Markup string.\n\n :copyright: (c) 2010 by Armin Ronacher.\n :license: BSD, see LICENSE for more details.", "import re", "from itertools import imap", "__all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent']", "_striptags_re = re.comp...
# -*- coding: utf-8 -*- """ markupsafe._native ~~~~~~~~~~~~~~~~~~ Native Python implementation the C module is not compiled. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from jinja2._markupsafe import Markup def escape(s): """Convert the characters...
[ [ 8, 0, 0.1333, 0.2, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2444, 0.0222, 0, 0.66, 0.25, 409, 0, 1, 0, 0, 409, 0, 0 ], [ 2, 0, 0.4556, 0.3111, 0, 0.66, ...
[ "\"\"\"\n markupsafe._native\n ~~~~~~~~~~~~~~~~~~\n\n Native Python implementation the C module is not compiled.\n\n :copyright: (c) 2010 by Armin Ronacher.\n :license: BSD, see LICENSE for more details.", "from jinja2._markupsafe import Markup", "def escape(s):\n \"\"\"Convert the characters ...
# -*- coding: utf-8 -*- """ jinja2.loaders ~~~~~~~~~~~~~~ Jinja loader classes. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import weakref from types import ModuleType from os import path try: from hashlib import sha1 except Imp...
[ [ 8, 0, 0.0133, 0.02, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0244, 0.0022, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0267, 0.0022, 0, 0.66, ...
[ "\"\"\"\n jinja2.loaders\n ~~~~~~~~~~~~~~\n\n Jinja loader classes.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import os", "import sys", "import weakref", "from types import ModuleType", "from os import path", "try:\n from hashlib impo...
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ class TemplateError(Exception): """Baseclass for all template errors.""" def __init__(self, message=None): i...
[ [ 8, 0, 0.042, 0.0629, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.1364, 0.0979, 0, 0.66, 0.1111, 179, 0, 2, 0, 0, 645, 0, 4 ], [ 8, 1, 0.0979, 0.007, 1, 0.13, ...
[ "\"\"\"\n jinja2.exceptions\n ~~~~~~~~~~~~~~~~~\n\n Jinja exceptions.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "class TemplateError(Exception):\n \"\"\"Baseclass for all template errors.\"\"\"\n\n def __init__(self, message=None):\n i...
# -*- coding: utf-8 -*- """ jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. Nutshell -------- Here a small example of a Jinja2 template:: {% ...
[ [ 8, 0, 0.2174, 0.3913, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4203, 0.0145, 0, 0.66, 0.1, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4348, 0.0145, 0, 0.66, ...
[ "\"\"\"\n jinja2\n ~~~~~~\n\n Jinja2 is a template engine written in pure Python. It provides a\n Django inspired non-XML syntax but supports inline expressions and\n an optional sandboxed environment.", "__docformat__ = 'restructuredtext en'", "__version__ = '2.6'", "from jinja2.environment i...
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import imap, groupby from jinja2....
[ [ 8, 0, 0.0059, 0.0089, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0109, 0.001, 0, 0.66, 0.0123, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0119, 0.001, 0, 0.66, ...
[ "\"\"\"\n jinja2.filters\n ~~~~~~~~~~~~~~\n\n Bundled jinja filters.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import re", "import math", "from random import choice", "from operator import itemgetter", "from itertools import imap, groupby"...
# -*- coding: utf-8 -*- """ jinja2.defaults ~~~~~~~~~~~~~~~ Jinja default filters and tags. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner # defaults for the parser / lexer BLOCK_START_STRING ...
[ [ 8, 0, 0.15, 0.225, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.275, 0.025, 0, 0.66, 0.0667, 677, 0, 3, 0, 0, 677, 0, 0 ], [ 14, 0, 0.375, 0.025, 0, 0.66, ...
[ "\"\"\"\n jinja2.defaults\n ~~~~~~~~~~~~~~~\n\n Jinja default filters and tags.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner", "BLOCK_START_STRING = '{%'", "BLOCK_END_STRING = '%}'", ...
# -*- coding: utf-8 -*- """ jinja2._stringdefs ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project, original implementation from Pygments. :co...
[ [ 8, 0, 0.0615, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1231, 0.0077, 0, 0.66, 0.0278, 924, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1385, 0.0077, 0, 0.66, ...
[ "\"\"\"\n jinja2._stringdefs\n ~~~~~~~~~~~~~~~~~~\n\n Strings of all Unicode characters of a certain category.\n Used for matching in Unicode-aware languages. Run to regenerate.\n\n Inspired by chartypes_create.py from the MoinMoin project, original", "Cc = u'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x0...
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2 import nodes from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError from jinja2.utils impo...
[ [ 8, 0, 0.0067, 0.01, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0123, 0.0011, 0, 0.66, 0.1429, 436, 0, 1, 0, 0, 436, 0, 0 ], [ 1, 0, 0.0134, 0.0011, 0, 0.66, ...
[ "\"\"\"\n jinja2.parser\n ~~~~~~~~~~~~~\n\n Implements the template parser.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "from jinja2 import nodes", "from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError", "from jinja2.utils im...
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
[ [ 8, 0, 0.069, 0.1034, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1264, 0.0115, 0, 0.66, 0.3333, 990, 0, 1, 0, 0, 990, 0, 0 ], [ 3, 0, 0.3333, 0.3563, 0, 0.66,...
[ "\"\"\"\n jinja2.visitor\n ~~~~~~~~~~~~~~\n\n This module implements a visitor for the nodes.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD.", "from jinja2.nodes import Node", "class NodeVisitor(object):\n \"\"\"Walks the abstract syntax tree and call visitor functions for every\...
from google.appengine.ext.remote_api import handler from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app import logging import re MY_SECRET_KEY = 'mytopsecret' cookie_re = re.compile('^"([^:]+):.*"$') class ApiCallHandler(handler.ApiCallHandler): def CheckIsAdmin(s...
[ [ 1, 0, 0.0385, 0.0385, 0, 0.66, 0, 61, 0, 1, 0, 0, 61, 0, 0 ], [ 1, 0, 0.0769, 0.0385, 0, 0.66, 0.125, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.1154, 0.0385, 0, 0.6...
[ "from google.appengine.ext.remote_api import handler", "from google.appengine.ext import webapp", "from google.appengine.ext.webapp.util import run_wsgi_app", "import logging", "import re", "MY_SECRET_KEY = 'mytopsecret'", "cookie_re = re.compile('^\"([^:]+):.*\"$')", "class ApiCallHandler(handler.Api...
#!/usr/bin/python # This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. The original code had the following copyright and # license. # # /* jsmin.c # 2007-05-22 # # Copyright (c) 2002 Douglas Crockford (www.crockford.com) # # Permission is hereby granted,...
[ [ 1, 0, 0.1473, 0.0045, 0, 0.66, 0, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 2, 0, 0.1719, 0.0357, 0, 0.66, 0.1429, 275, 0, 1, 1, 0, 0, 0, 6 ], [ 14, 1, 0.1607, 0.0045, 1, 0...
[ "from StringIO import StringIO", "def jsmin(js):\n ins = StringIO(js)\n outs = StringIO()\n JavascriptMinify().minify(ins, outs)\n str = outs.getvalue()\n if len(str) > 0 and str[0] == '\\n':\n str = str[1:]\n return str", " ins = StringIO(js)", " outs = StringIO()", " Java...
#!/usr/bin/python # -*- coding: utf-8 -* location_map_br = { 1: { 'name': 'São Paulo'.decode('utf-8'), 'lat': -23.55, 'long': -46.64, 'radius': 294200, }, 2: { 'name': 'Rio De Janeiro', 'lat': -22.90, 'long': -43.21, 'radius': 294200, ...
[ [ 14, 0, 0.5087, 0.9884, 0, 0.66, 0, 918, 0, 0, 0, 0, 0, 6, 7 ] ]
[ "location_map_br = {\n 1: {\n 'name': 'São Paulo'.decode('utf-8'),\n 'lat': -23.55,\n 'long': -46.64,\n 'radius': 294200,\n },\n 2: {" ]
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ [ 1, 0, 0.0627, 0.0035, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0662, 0.0035, 0, 0.66, 0.0556, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0697, 0.0035, 0, ...
[ "import os", "import urllib", "import urlparse", "from google.appengine.ext import db", "OPENID_PATH_PREFIX = '/_openid/'", "OPENID_LOGIN_PATH = OPENID_PATH_PREFIX + 'login'", "OPENID_FINISH_PATH = OPENID_PATH_PREFIX + 'finish'", "OPENID_LOGOUT_PATH = OPENID_PATH_PREFIX + 'logout'", "OPENID_STATIC_P...
# -*- coding: utf-8 -*- """ engineauth.models ==================================== Auth related models. :copyright: 2011 by Rodrigo Moraes. :license: Apache Sotware License, see LICENSE for details. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. ...
[ [ 8, 0, 0.0156, 0.025, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0292, 0.0021, 0, 0.66, 0.0909, 882, 0, 1, 0, 0, 882, 0, 0 ], [ 1, 0, 0.0312, 0.0021, 0, 0.66,...
[ "\"\"\"\n engineauth.models\n ====================================\n\n Auth related models.\n\n :copyright: 2011 by Rodrigo Moraes.\n :license: Apache Sotware License, see LICENSE for details.", "from engineauth import config", "import ndb", "from webapp2_extras import securecookie", "from we...
from engineauth import utils try: from appengine_config import engineauth as user_config except ImportError: user_config = None default_config = { 'base_uri': '/auth', 'login_uri': '/login', 'success_uri': '/', 'secret_key': 'CHANGE_TO_A_SECRET_KEY', # We add this here for testing only 'use...
[ [ 1, 0, 0.0161, 0.0161, 0, 0.66, 0, 882, 0, 1, 0, 0, 882, 0, 0 ], [ 7, 0, 0.0565, 0.0645, 0, 0.66, 0.3333, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.0484, 0.0161, 1, 0.27...
[ "from engineauth import utils", "try:\n from appengine_config import engineauth as user_config\nexcept ImportError:\n user_config = None", " from appengine_config import engineauth as user_config", " user_config = None", "default_config = {\n 'base_uri': '/auth',\n 'login_uri': '/login',\n...
def load_config(default_values, user_values): if user_values is None: return default_values config = {} for k, v in user_values.items(): if k in default_values: if isinstance(v, dict): cloned = user_values[k].copy() for key, value in default_valu...
[ [ 2, 0, 0.4194, 0.6774, 0, 0.66, 0, 914, 0, 2, 1, 0, 0, 0, 5 ], [ 4, 1, 0.1452, 0.0645, 1, 0.82, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 13, 2, 0.1613, 0.0323, 2, 0.72, ...
[ "def load_config(default_values, user_values):\n if user_values is None:\n return default_values\n config = {}\n for k, v in user_values.items():\n if k in default_values:\n if isinstance(v, dict):\n cloned = user_values[k].copy()", " if user_values is None:\n ...
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth2 import OAuth2Strategy class FacebookStrategy(OAuth2Strategy): @property def options(self): return { 'provider': 'facebook', 'site_uri': 'https://graph.facebo...
[ [ 1, 0, 0.0135, 0.0135, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.027, 0.0135, 0, 0.66, 0.25, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0405, 0.0135, 0, 0.6...
[ "from __future__ import absolute_import", "import json", "from engineauth.models import User", "from engineauth.strategies.oauth2 import OAuth2Strategy", "class FacebookStrategy(OAuth2Strategy):\n\n @property\n def options(self):\n return {\n 'provider': 'facebook',\n 'sit...
from __future__ import absolute_import from engineauth import models from engineauth.strategies.base import BaseStrategy from google.appengine.api import users __author__ = 'kyle.finley@gmail.com (Kyle Finley)' def _abstract(): raise NotImplementedError('You need to override this function') class AppEngineOp...
[ [ 1, 0, 0.0189, 0.0189, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0566, 0.0189, 0, 0.66, 0.1667, 882, 0, 1, 0, 0, 882, 0, 0 ], [ 1, 0, 0.0755, 0.0189, 0, ...
[ "from __future__ import absolute_import", "from engineauth import models", "from engineauth.strategies.base import BaseStrategy", "from google.appengine.api import users", "__author__ = 'kyle.finley@gmail.com (Kyle Finley)'", "def _abstract():\n raise NotImplementedError('You need to override this func...
from __future__ import absolute_import from apiclient.oauth import FlowThreeLegged from engineauth.strategies.base import BaseStrategy import httplib2 import cPickle as pickle __author__ = 'kyle.finley@gmail.com (Kyle Finley)' def _abstract(): raise NotImplementedError('You need to override this function') cla...
[ [ 1, 0, 0.0128, 0.0128, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0256, 0.0128, 0, 0.66, 0.1429, 791, 0, 1, 0, 0, 791, 0, 0 ], [ 1, 0, 0.0385, 0.0128, 0, ...
[ "from __future__ import absolute_import", "from apiclient.oauth import FlowThreeLegged", "from engineauth.strategies.base import BaseStrategy", "import httplib2", "import cPickle as pickle", "__author__ = 'kyle.finley@gmail.com (Kyle Finley)'", "def _abstract():\n raise NotImplementedError('You need ...
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth2 import OAuth2Strategy class GithubStrategy(OAuth2Strategy): @property def options(self): return { 'provider': 'github', 'site_uri': 'https://api.github.comm'...
[ [ 1, 0, 0.0133, 0.0133, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0267, 0.0133, 0, 0.66, 0.25, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.04, 0.0133, 0, 0.66...
[ "from __future__ import absolute_import", "import json", "from engineauth.models import User", "from engineauth.strategies.oauth2 import OAuth2Strategy", "class GithubStrategy(OAuth2Strategy):\n\n @property\n def options(self):\n return {\n 'provider': 'github',\n 'site_ur...
from __future__ import absolute_import from apiclient.discovery import build from engineauth.models import User from engineauth.strategies.oauth2 import OAuth2Strategy from google.appengine.api import memcache import httplib2 class GoogleStrategy(OAuth2Strategy): @property def options(self): return ...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.075, 0.025, 0, 0.66, 0.1667, 78, 0, 1, 0, 0, 78, 0, 0 ], [ 1, 0, 0.1, 0.025, 0, 0.66, ...
[ "from __future__ import absolute_import", "from apiclient.discovery import build", "from engineauth.models import User", "from engineauth.strategies.oauth2 import OAuth2Strategy", "from google.appengine.api import memcache", "import httplib2", "class GoogleStrategy(OAuth2Strategy):\n\n @property\n ...
""" engineauth.strategies.password ============================ OAuth2 Authentication Strategy :copyright: (c) 2011 Kyle Finley. :license: Apache Sotware License, see LICENSE for details. :copyright: (c) 2010 Google Inc. :license: Apache Software License, see LICENSE for details. """ from ...
[ [ 8, 0, 0.0845, 0.1549, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.169, 0.0141, 0, 0.66, 0.1667, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1831, 0.0141, 0, 0.66,...
[ "\"\"\"\n engineauth.strategies.password\n ============================\n\n OAuth2 Authentication Strategy\n :copyright: (c) 2011 Kyle Finley.\n :license: Apache Sotware License, see LICENSE for details.", "from __future__ import absolute_import", "from engineauth import models", "from engineau...
""" engineauth.strategies.oauth2 ============================ OAuth2 Authentication Strategy :copyright: (c) 2011 Kyle Finley. :license: Apache Sotware License, see LICENSE for details. :copyright: (c) 2010 Google Inc. :license: Apache Software License, see LICENSE for details. """ from __...
[ [ 8, 0, 0.0845, 0.1549, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.169, 0.0141, 0, 0.66, 0.125, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1831, 0.0141, 0, 0.66, ...
[ "\"\"\"\n engineauth.strategies.oauth2\n ============================\n\n OAuth2 Authentication Strategy\n :copyright: (c) 2011 Kyle Finley.\n :license: Apache Sotware License, see LICENSE for details.", "from __future__ import absolute_import", "import cPickle as pickle", "from engineauth.stra...
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth import OAuthStrategy class TwitterStrategy(OAuthStrategy): @property def options(self): return { 'provider': 'twitter', 'request_token_uri': 'https://api.twi...
[ [ 1, 0, 0.013, 0.013, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.026, 0.013, 0, 0.66, 0.25, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0519, 0.013, 0, 0.66, ...
[ "from __future__ import absolute_import", "import json", "from engineauth.models import User", "from engineauth.strategies.oauth import OAuthStrategy", "class TwitterStrategy(OAuthStrategy):\n\n @property\n def options(self):\n return {\n 'provider': 'twitter',\n 'request_...
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth import OAuthStrategy class LinkedInStrategy(OAuthStrategy): @property def options(self): return { 'provider': 'linkedin', 'request_token_uri': 'https://api.l...
[ [ 1, 0, 0.0128, 0.0128, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0256, 0.0128, 0, 0.66, 0.25, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0513, 0.0128, 0, 0....
[ "from __future__ import absolute_import", "import json", "from engineauth.models import User", "from engineauth.strategies.oauth import OAuthStrategy", "class LinkedInStrategy(OAuthStrategy):\n\n @property\n def options(self):\n return {\n 'provider': 'linkedin',\n 'reques...
from exceptions import Exception class ValidationError(Exception): pass class NotSupportedError(Exception): pass
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 63, 0, 1, 0, 0, 63, 0, 0 ], [ 3, 0, 0.75, 0.25, 0, 0.66, 0.5, 60, 0, 0, 0, 0, 645, 0, 0 ], [ 3, 0, 1, 0.25, 0, 0.66, 1, 135,...
[ "from exceptions import Exception", "class ValidationError(Exception): pass", "class NotSupportedError(Exception): pass" ]
class Address(object): """ Address used in a payment gateway transaction. """ def __init__(self, first_name=None, last_name=None, company=None, address1=None, address2=None, city=None, state_province=None, postal_code=None, country=None, phone=None, fax=None): ...
[ [ 3, 0, 0.1797, 0.3529, 0, 0.66, 0, 149, 0, 2, 0, 0, 186, 0, 3 ], [ 8, 1, 0.0196, 0.0196, 1, 0.95, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.1536, 0.2484, 1, 0.95, ...
[ "class Address(object):\n \"\"\"\n Address used in a payment gateway transaction.\n \"\"\"\n def __init__(self, first_name=None, last_name=None, company=None, \n address1=None, address2=None, city=None, state_province=None,\n postal_code=None, country=None, phone=None, fa...
""" Abstract interfacing with online payment gateways. """
[ [ 8, 0, 1, 1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\" Abstract interfacing with online payment gateways. \"\"\"" ]
from base import AbstractGateway, GatewayRequest, GatewayResponse import urllib from quix.pay.transaction import CreditCard class AimGateway(AbstractGateway): """ Interface to the Authorize.Net Advanced Integration Method (AIM) payment gateway. The authentication login and password corresponds t...
[ [ 1, 0, 0.0025, 0.0025, 0, 0.66, 0, 47, 0, 3, 0, 0, 47, 0, 0 ], [ 1, 0, 0.005, 0.0025, 0, 0.66, 0.3333, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0099, 0.0025, 0, 0.6...
[ "from base import AbstractGateway, GatewayRequest, GatewayResponse", "import urllib", "from quix.pay.transaction import CreditCard", "class AimGateway(AbstractGateway):\n \"\"\" \n Interface to the Authorize.Net Advanced Integration Method (AIM) payment\n gateway.\n \n The authentication login ...
from base import AbstractGateway from authorizenet import AimGateway from quix.pay.transaction import CreditCard class AimEmulationGateway(AimGateway): """ Interface to the QuantamGateway using Authorize.Net Emulation. The QuantamGateway provides a basic emulation mode of the Authorize.Net paymen...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 47, 0, 1, 0, 0, 47, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.25, 35, 0, 1, 0, 0, 35, 0, 0 ], [ 1, 0, 0.125, 0.0417, 0, 0.66, ...
[ "from base import AbstractGateway", "from authorizenet import AimGateway", "from quix.pay.transaction import CreditCard", "class AimEmulationGateway(AimGateway):\n \"\"\" \n Interface to the QuantamGateway using Authorize.Net Emulation.\n \n The QuantamGateway provides a basic emulation mode of th...
import base from xml.etree import ElementTree class XmlMessengerGateway(base.Gateway): test_url = 'https://dev.psigate.com:7989/Messenger/XMLMessenger' live_url = 'https://secure.psigate.com:7934/Messenger/XMLMessenger' def authorize(self, card, amount, order_num=None, description=None): """ Submi...
[ [ 1, 0, 0.012, 0.012, 0, 0.66, 0, 47, 0, 1, 0, 0, 47, 0, 0 ], [ 1, 0, 0.0241, 0.012, 0, 0.66, 0.5, 601, 0, 1, 0, 0, 601, 0, 0 ], [ 3, 0, 0.5241, 0.9639, 0, 0.66, ...
[ "import base", "from xml.etree import ElementTree", "class XmlMessengerGateway(base.Gateway):\n test_url = 'https://dev.psigate.com:7989/Messenger/XMLMessenger'\n live_url = 'https://secure.psigate.com:7934/Messenger/XMLMessenger'\n\n def authorize(self, card, amount, order_num=None, description=None):...
from exceptions import NotImplementedError import urllib2 from quix.pay.transaction import CreditCard class AbstractGateway(object): """ Abstract class for interfacing with payment gateways. """ test_mode = False request_timeout = 30 use_test_url = False use_test_mode = False @pr...
[ [ 1, 0, 0.0047, 0.0047, 0, 0.66, 0, 63, 0, 1, 0, 0, 63, 0, 0 ], [ 1, 0, 0.0094, 0.0047, 0, 0.66, 0.2, 345, 0, 1, 0, 0, 345, 0, 0 ], [ 1, 0, 0.0189, 0.0047, 0, 0.66,...
[ "from exceptions import NotImplementedError", "import urllib2", "from quix.pay.transaction import CreditCard", "class AbstractGateway(object):\n \"\"\"\n Abstract class for interfacing with payment gateways. \n \"\"\"\n test_mode = False\n request_timeout = 30\n use_test_url = False\n use...
def gateway_factory(name): if name == 'AimGateway': import authorizenet return authorizenet.AimGateway() if name == 'AimEmulationGateway': import quantam return quantam.AimEmulationGateway() if name == 'XmlMessengerGateway': import psigate return psigate.XmlMe...
[ [ 2, 0, 0.55, 1, 0, 0.66, 0, 97, 0, 1, 1, 0, 0, 0, 3 ], [ 4, 1, 0.3, 0.3, 1, 0.42, 0, 0, 0, 0, 0, 0, 0, 0, 1 ], [ 1, 2, 0.3, 0.1, 2, 0.55, 0, 35, 0, ...
[ "def gateway_factory(name):\n if name == 'AimGateway':\n import authorizenet\n return authorizenet.AimGateway()\n if name == 'AimEmulationGateway':\n import quantam\n return quantam.AimEmulationGateway()\n if name == 'XmlMessengerGateway':", " if name == 'AimGateway':\n ...
""" Python module namespace for Quixotix Software, LLC """ try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
[ [ 8, 0, 0.1429, 0.1429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.6429, 0.8571, 0, 0.66, 1, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.4286, 0.1429, 1, 0.07, 0, ...
[ "\"\"\" Python module namespace for Quixotix Software, LLC \"\"\"", "try:\n import pkg_resources\n pkg_resources.declare_namespace(__name__)\nexcept ImportError:\n import pkgutil\n __path__ = pkgutil.extend_path(__path__, __name__)", " import pkg_resources", " pkg_resources.declare_namespace...
#USE_I18N = True # Valid languages ''' LANGUAGES = ( ('en', _('English')), ('fr', _('French')), ('zh_TW', _('Chinese')), ('pt_BR', _('Brazilian')), ('pt', _('Portuguese')), ('es', _('Spanish')), ('es_AR', _('Argentinean Spanish')), ('sv', _('Swedish')), ('is', _('I...
[ [ 8, 0, 0.43, 0.72, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.82, 0.02, 0, 0.66, 0.5, 450, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.93, 0.16, 0, 0.66, 1, 64...
[ "'''\nLANGUAGES = (\n ('en', _('English')),\n ('fr', _('French')),\n ('zh_TW', _('Chinese')),\n ('pt_BR', _('Brazilian')),\n ('pt', _('Portuguese')), \n ('es', _('Spanish')),", "LANGUAGE_CODE = 'en'", "INSTALLED_APPS = (\n 'django.contrib.admin',\n 'django.contrib.contenttypes...
import urllib2, urllib API_SSL_SERVER="https://api-secure.recaptcha.net" API_SERVER="http://api.recaptcha.net" VERIFY_SERVER="api-verify.recaptcha.net" class RecaptchaResponse(object): def __init__(self, is_valid, error_code=None): self.is_valid = is_valid self.error_code = error_code def displayh...
[ [ 1, 0, 0.0094, 0.0094, 0, 0.66, 0, 345, 0, 2, 0, 0, 345, 0, 0 ], [ 14, 0, 0.0189, 0.0094, 0, 0.66, 0.1667, 666, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0283, 0.0094, 0, ...
[ "import urllib2, urllib", "API_SSL_SERVER=\"https://api-secure.recaptcha.net\"", "API_SERVER=\"http://api.recaptcha.net\"", "VERIFY_SERVER=\"api-verify.recaptcha.net\"", "class RecaptchaResponse(object):\n def __init__(self, is_valid, error_code=None):\n self.is_valid = is_valid\n self.erro...
# -*- coding: utf-8 -*- from datetime import datetime from webapp2_extras.i18n import lazy_gettext as _ from webapp2_extras import i18n from webapp2_extras import i18n from webapp2_extras.i18n import lazy_gettext as _ import datetime from datetime import date, datetime, time from babel.dates import format_date, format...
[ [ 1, 0, 0.0081, 0.0041, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0122, 0.0041, 0, 0.66, 0.037, 13, 0, 1, 0, 0, 13, 0, 0 ], [ 1, 0, 0.0163, 0.0041, 0, 0.6...
[ "from datetime import datetime", "from webapp2_extras.i18n import lazy_gettext as _", "from webapp2_extras import i18n", "from webapp2_extras import i18n", "from webapp2_extras.i18n import lazy_gettext as _", "import datetime", "from datetime import date, datetime, time", "from babel.dates import form...
#!/usr/bin/env python from google.appengine.ext import webapp from google.appengine.api import users import google.appengine.ext.webapp.util class LoginRequiredHandler(webapp.RequestHandler): def get(self): continue_url, = self.request.get('continue',allow_multiple=True) self.redirect(users.create...
[ [ 1, 0, 0.25, 0.0833, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.3333, 0.0833, 0, 0.66, 0.25, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.4167, 0.0833, 0, 0.66...
[ "from google.appengine.ext import webapp", "from google.appengine.api import users", "import google.appengine.ext.webapp.util", "class LoginRequiredHandler(webapp.RequestHandler):\n def get(self):\n continue_url, = self.request.get('continue',allow_multiple=True)\n self.redirect(users.create_...
"""Tests for eventloop.py.""" import logging import os import time import unittest from google.appengine.api import apiproxy_stub_map from google.appengine.datastore import datastore_rpc from . import eventloop from . import test_utils class EventLoopTests(test_utils.NDBTest): def setUp(self): super(EventLoo...
[ [ 8, 0, 0.0064, 0.0064, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0192, 0.0064, 0, 0.66, 0.0909, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0256, 0.0064, 0, 0.66...
[ "\"\"\"Tests for eventloop.py.\"\"\"", "import logging", "import os", "import time", "import unittest", "from google.appengine.api import apiproxy_stub_map", "from google.appengine.datastore import datastore_rpc", "from . import eventloop", "from . import test_utils", "class EventLoopTests(test_ut...
"""Higher-level Query wrapper. There are perhaps too many query APIs in the world. The fundamental API here overloads the 6 comparisons operators to represent filters on property values, and supports AND and OR operations (implemented as functions -- Python's 'and' and 'or' operators cannot be overloaded, and the '&'...
[ [ 8, 0, 0.0394, 0.0781, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0794, 0.0006, 0, 0.66, 0.0227, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.0806, 0.0006, 0, 0.6...
[ "\"\"\"Higher-level Query wrapper.\n\nThere are perhaps too many query APIs in the world.\n\nThe fundamental API here overloads the 6 comparisons operators to\nrepresent filters on property values, and supports AND and OR\noperations (implemented as functions -- Python's 'and' and 'or'\noperators cannot be overload...
"""A torture test to ferret out problems with multi-threading.""" import sys import threading from . import tasklets from . import context def main(): num = 10 try: num = int(sys.argv[1]) except Exception: pass threads = [] for i in range(num): t = threading.Thread(target=one_thread, args=(i, ...
[ [ 8, 0, 0.0238, 0.0238, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0714, 0.0238, 0, 0.66, 0.125, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0952, 0.0238, 0, 0.66,...
[ "\"\"\"A torture test to ferret out problems with multi-threading.\"\"\"", "import sys", "import threading", "from . import tasklets", "from . import context", "def main():\n num = 10\n try:\n num = int(sys.argv[1])\n except Exception:\n pass\n threads = []\n for i in range(num):", " num = 1...
"""An event loop. This event loop should handle both asynchronous App Engine RPC objects (specifically urlfetch, memcache and datastore RPC objects) and arbitrary callback functions with an optional time delay. Normally, event loops are singleton objects, though there is no enforcement of this requirement. The API h...
[ [ 8, 0, 0.021, 0.0385, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0455, 0.0035, 0, 0.66, 0.0455, 193, 0, 1, 0, 0, 193, 0, 0 ], [ 1, 0, 0.049, 0.0035, 0, 0.66, ...
[ "\"\"\"An event loop.\n\nThis event loop should handle both asynchronous App Engine RPC objects\n(specifically urlfetch, memcache and datastore RPC objects) and arbitrary\ncallback functions with an optional time delay.\n\nNormally, event loops are singleton objects, though there is no\nenforcement of this requirem...
"""Tests for stats.py.""" import datetime import os import unittest from google.appengine.api import datastore from . import stats from . import test_utils class StatsTests(test_utils.NDBTest): def setUp(self): """Setup test infrastructure.""" super(StatsTests, self).setUp() self.PopulateStatEntitie...
[ [ 8, 0, 0.003, 0.003, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.009, 0.003, 0, 0.66, 0.1111, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.012, 0.003, 0, 0.66, ...
[ "\"\"\"Tests for stats.py.\"\"\"", "import datetime", "import os", "import unittest", "from google.appengine.api import datastore", "from . import stats", "from . import test_utils", "class StatsTests(test_utils.NDBTest):\n\n def setUp(self):\n \"\"\"Setup test infrastructure.\"\"\"\n super(Sta...
"""Polymorphic models and queries. The standard NDB Model class only supports 'functional polymorphism'. That is, you can create a subclass of Model, and then subclass that class, as many generations as necessary, and those classes will share all the same properties and behaviors of their base classes. However, subcl...
[ [ 8, 0, 0.0347, 0.0653, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0735, 0.0041, 0, 0.66, 0.2, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0816, 0.0041, 0, 0.66, ...
[ "\"\"\"Polymorphic models and queries.\n\nThe standard NDB Model class only supports 'functional polymorphism'.\nThat is, you can create a subclass of Model, and then subclass that\nclass, as many generations as necessary, and those classes will share\nall the same properties and behaviors of their base classes. H...
"""Tests for query.py.""" import datetime import unittest from google.appengine.api import datastore_errors from google.appengine.api import users from . import model from . import query from . import tasklets from . import test_utils class QueryTests(test_utils.NDBTest): def setUp(self): super(QueryTests, ...
[ [ 8, 0, 0.001, 0.001, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0029, 0.001, 0, 0.66, 0.0909, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0038, 0.001, 0, 0.66, ...
[ "\"\"\"Tests for query.py.\"\"\"", "import datetime", "import unittest", "from google.appengine.api import datastore_errors", "from google.appengine.api import users", "from . import model", "from . import query", "from . import tasklets", "from . import test_utils", "class QueryTests(test_utils.N...
"""Tests for key.py.""" import base64 import pickle import unittest from google.appengine.api import datastore_errors from google.appengine.api import datastore_types from google.appengine.datastore import entity_pb from . import eventloop from . import key from . import model from . import tasklets from . import te...
[ [ 8, 0, 0.0023, 0.0023, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0069, 0.0023, 0, 0.66, 0.0714, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0093, 0.0023, 0, 0.66...
[ "\"\"\"Tests for key.py.\"\"\"", "import base64", "import pickle", "import unittest", "from google.appengine.api import datastore_errors", "from google.appengine.api import datastore_types", "from google.appengine.datastore import entity_pb", "from . import eventloop", "from . import key", "from ....
"""Model and Property classes and associated stuff. A model class represents the structure of entities stored in the datastore. Applications define model classes to indicate the structure of their entities, then instantiate those model classes to create entities. All model classes must inherit (directly or indirectl...
[ [ 8, 0, 0.0462, 0.0921, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0928, 0.0003, 0, 0.66, 0.0147, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0934, 0.0003, 0, 0.66,...
[ "\"\"\"Model and Property classes and associated stuff.\n\nA model class represents the structure of entities stored in the\ndatastore. Applications define model classes to indicate the\nstructure of their entities, then instantiate those model classes\nto create entities.\n\nAll model classes must inherit (direct...
"""Some tests for datastore_rpc.py.""" import unittest from google.appengine.api import apiproxy_stub_map from google.appengine.datastore import datastore_rpc from . import model from . import test_utils class PendingTests(test_utils.NDBTest): """Tests for the 'pending RPC' management.""" def testBasicSetup1(...
[ [ 8, 0, 0.012, 0.012, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0361, 0.012, 0, 0.66, 0.125, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0602, 0.012, 0, 0.66, 0...
[ "\"\"\"Some tests for datastore_rpc.py.\"\"\"", "import unittest", "from google.appengine.api import apiproxy_stub_map", "from google.appengine.datastore import datastore_rpc", "from . import model", "from . import test_utils", "class PendingTests(test_utils.NDBTest):\n \"\"\"Tests for the 'pending RPC...
"""The Key class, and associated utilities. A Key encapsulates the following pieces of information, which together uniquely designate a (possible) entity in the App Engine datastore: - an application id (a string) - a namespace (a string) - a list of one or more (kind, id) pairs where kind is a string and id is eit...
[ [ 8, 0, 0.0454, 0.0895, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0921, 0.0013, 0, 0.66, 0.0556, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0947, 0.0013, 0, 0.66,...
[ "\"\"\"The Key class, and associated utilities.\n\nA Key encapsulates the following pieces of information, which together\nuniquely designate a (possible) entity in the App Engine datastore:\n\n- an application id (a string)\n- a namespace (a string)\n- a list of one or more (kind, id) pairs where kind is a string ...
"""Low-level utilities used internally by NDB. These are not meant for use by code outside NDB. """ import logging import os import sys import threading __all__ = [] DEBUG = True # Set to False for some speedups def logging_debug(*args): # NOTE: If you want to see debug messages, set the logging level # manu...
[ [ 8, 0, 0.0155, 0.0248, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0373, 0.0062, 0, 0.66, 0.0588, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0435, 0.0062, 0, 0.66...
[ "\"\"\"Low-level utilities used internally by NDB.\n\nThese are not meant for use by code outside NDB.\n\"\"\"", "import logging", "import os", "import sys", "import threading", "__all__ = []", "DEBUG = True # Set to False for some speedups", "def logging_debug(*args):\n # NOTE: If you want to see d...
"""Tests for model.py.""" import datetime import difflib import os import pickle import re import unittest from google.appengine.api import datastore_errors from google.appengine.api import datastore_types from google.appengine.api import memcache from google.appengine.api import namespace_manager from google.appengi...
[ [ 8, 0, 0.0003, 0.0003, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0009, 0.0003, 0, 0.66, 0.0312, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0012, 0.0003, 0, 0.66...
[ "\"\"\"Tests for model.py.\"\"\"", "import datetime", "import difflib", "import os", "import pickle", "import re", "import unittest", "from google.appengine.api import datastore_errors", "from google.appengine.api import datastore_types", "from google.appengine.api import memcache", "from google...
#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
[ [ 8, 0, 0.2308, 0.0154, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2615, 0.0154, 0, 0.66, 0.3333, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2923, 0.0154, 0, 0.66,...
[ "\"\"\"Django middleware for NDB.\"\"\"", "__author__ = 'James A. Morrison'", "from ndb import eventloop, tasklets", "class NdbDjangoMiddleware(object):\n \"\"\"Django middleware for NDB.\n\n To use NDB with django, add\n\n 'ndb.NdbDjangoMiddleware',\n\n to the MIDDLEWARE_CLASSES entry in your Django se...
"""Tests for metadata.py.""" import unittest from google.appengine.api import namespace_manager from . import metadata from . import model from . import test_utils class MetadataTests(test_utils.NDBTest): def setUp(self): super(MetadataTests, self).setUp() class Foo(model.Model): name = model.Stri...
[ [ 8, 0, 0.0093, 0.0093, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0278, 0.0093, 0, 0.66, 0.125, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0463, 0.0093, 0, 0.66, ...
[ "\"\"\"Tests for metadata.py.\"\"\"", "import unittest", "from google.appengine.api import namespace_manager", "from . import metadata", "from . import model", "from . import test_utils", "class MetadataTests(test_utils.NDBTest):\n\n def setUp(self):\n super(MetadataTests, self).setUp()\n class F...
"""NDB -- A new datastore API for the Google App Engine Python runtime.""" __version__ = '0.9.5+' __all__ = [] from tasklets import * __all__ += tasklets.__all__ from model import * # This implies key.* __all__ += model.__all__ from query import * __all__ += query.__all__ from context import * __all__ += context...
[ [ 8, 0, 0.0588, 0.0588, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1765, 0.0588, 0, 0.66, 0.1667, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2941, 0.0588, 0, 0.66...
[ "\"\"\"NDB -- A new datastore API for the Google App Engine Python runtime.\"\"\"", "__version__ = '0.9.5+'", "__all__ = []", "from tasklets import *", "from model import * # This implies key.*", "from query import *", "from context import *" ]
"""Tests for polymodel.py. See issue 35. http://goo.gl/iHkCm """ import pickle import unittest from google.appengine.api import namespace_manager from google.appengine.api import datastore_types from . import polymodel from . import model from . import test_utils PolyModel = polymodel.PolyModel class PolyModel...
[ [ 8, 0, 0.008, 0.0128, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0192, 0.0032, 0, 0.66, 0.0769, 848, 0, 1, 0, 0, 848, 0, 0 ], [ 1, 0, 0.0224, 0.0032, 0, 0.66,...
[ "\"\"\"Tests for polymodel.py.\n\nSee issue 35. http://goo.gl/iHkCm\n\"\"\"", "import pickle", "import unittest", "from google.appengine.api import namespace_manager", "from google.appengine.api import datastore_types", "from . import polymodel", "from . import model", "from . import test_utils", "...
"""Models and helper functions for access to app's datastore metadata. These entities cannot be created by users, but are created as results of __namespace__, __kind__ and __property__ metadata queries. A simplified API is also offered: ndb.metadata.get_namespaces(): A list of namespace names. ndb.metadata.get_k...
[ [ 8, 0, 0.0369, 0.0701, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0775, 0.0037, 0, 0.66, 0.1111, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 3, 0, 0.1033, 0.0332, 0, 0.66, ...
[ "\"\"\"Models and helper functions for access to app's datastore metadata.\n\nThese entities cannot be created by users, but are created as results of\n__namespace__, __kind__ and __property__ metadata queries.\n\nA simplified API is also offered:\n\n ndb.metadata.get_namespaces(): A list of namespace names.", "...
VERSION = '1.5.30'
[ [ 14, 0, 1, 1, 0, 0.66, 0, 557, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "VERSION = '1.5.30'" ]
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import with_statement import os from google.appengine.api.users import is_current_user_admin, \ UserNotFoundError import time import cgi import geo.geotypes import main from main import Ad import captcha import facebookconf from google.appengine import api ...
[ [ 1, 0, 0.0071, 0.0024, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0118, 0.0024, 0, 0.66, 0.0164, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0153, 0.0047, 0, ...
[ "from __future__ import with_statement", "import os", "from google.appengine.api.users import is_current_user_admin, \\\n UserNotFoundError", "import time", "import cgi", "import geo.geotypes", "import main", "from main import Ad", "import captcha", "import facebookconf", "from google.appengi...
#!/usr/bin/env python import imageshack import sys if __name__ == "__main__": if len(sys.argv)!=3: print "Usage upload.py <devkey> <filename/url>" sys.exit(1) u = imageshack.Uploader(sys.argv[1]) try: if sys.argv[2].startswith("http://"): print u.uploadURL(sys.argv[2]...
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 115, 0, 1, 0, 0, 115, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 509, 0, 1, 0, 0, 509, 0, 0 ] ]
[ "import imageshack", "import sys" ]
#!/usr/bin/env python import yfrog import sys if __name__ == "__main__": if len(sys.argv)<4: print "Usage upload.py <username> <password> <filename/url> [<text>] [<source>]" sys.exit(1) u = yfrog.Uploader() if len(sys.argv)>=5: msg = sys.argv[4] else: msg = None if...
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 901, 0, 1, 0, 0, 901, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 509, 0, 1, 0, 0, 509, 0, 0 ] ]
[ "import yfrog", "import sys" ]
#!/usr/bin/env python ''' Client API library to upload images and videos to yfrog.com Using Yfrog public API, as described here: http://yfrog.com/api.php ''' import urllib2_file import urllib2 import socket from mimetypes import guess_type from xml.dom.minidom import parseString from os.path import exists API_UR...
[ [ 8, 0, 0.0301, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0556, 0.0046, 0, 0.66, 0.0909, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 1, 0, 0.0602, 0.0046, 0, 0.66,...
[ "'''\nClient API library to upload images and videos to yfrog.com\n\nUsing Yfrog public API, as described here:\n\nhttp://yfrog.com/api.php\n\n'''", "import urllib2_file", "import urllib2", "import socket", "from mimetypes import guess_type", "from xml.dom.minidom import parseString", "from os.path impo...
''' yfrog api ''' from upload import *
[ [ 8, 0, 0.1667, 0.1667, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.1667, 0, 0.66, 1, 920, 0, 1, 0, 0, 920, 0, 0 ] ]
[ "''' yfrog api '''", "from upload import *" ]
#!/usr/bin/env python ''' Client API library to upload images and videos to imageshack.us Using "Unified upload API" as described here: http://reg.imageshack.us/content.php?page=developerpublic ''' import urllib2_file import urllib2 import socket import httplib from mimetypes import guess_type from xml.dom.minido...
[ [ 8, 0, 0.0258, 0.0317, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0476, 0.004, 0, 0.66, 0.0714, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 1, 0, 0.0516, 0.004, 0, 0.66, ...
[ "'''\nClient API library to upload images and videos to imageshack.us\n\nUsing \"Unified upload API\" as described here:\n\nhttp://reg.imageshack.us/content.php?page=developerpublic\n\n'''", "import urllib2_file", "import urllib2", "import socket", "import httplib", "from mimetypes import guess_type", "...
#!/usr/bin/env python ''' Client API library for chuncked video uploading to imageshack.us Using "Streaming upload API" as described here: http://code.google.com/p/imageshackapi/wiki/StreamingAPI ''' import os import urllib import httplib import urllib2 from urlparse import urlparse from os.path import exists fro...
[ [ 8, 0, 0.0369, 0.0455, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0682, 0.0057, 0, 0.66, 0.0588, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0739, 0.0057, 0, 0.66...
[ "'''\nClient API library for chuncked video uploading to imageshack.us\n\nUsing \"Streaming upload API\" as described here:\n\nhttp://code.google.com/p/imageshackapi/wiki/StreamingAPI\n\n'''", "import os", "import urllib", "import httplib", "import urllib2", "from urlparse import urlparse", "from os.pat...
''' imageshack api ''' from upload import * from chuncked_upload import Uploader as ChunkedUploader
[ [ 8, 0, 0.25, 0.25, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.75, 0.25, 0, 0.66, 0.5, 920, 0, 1, 0, 0, 920, 0, 0 ], [ 1, 0, 1, 0.25, 0, 0.66, 1, 977, ...
[ "''' imageshack api '''", "from upload import *", "from chuncked_upload import Uploader as ChunkedUploader" ]
""" Trivia game for talkers and MU*s TODO: * Pickle scores in case connection is lost and game can restart gracefully """ import os from time import sleep import random import sys import cPickle import unicodedata from lyntin import exported from lyntin.modules import modutils #Number of credits to hand out #...
[ [ 8, 0, 0.0165, 0.0297, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0363, 0.0033, 0, 0.66, 0.027, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0396, 0.0033, 0, 0.66,...
[ "\"\"\"\n\nTrivia game for talkers and MU*s\n\nTODO: \n\n * Pickle scores in case connection is lost and game can restart gracefully", "import os", "from time import sleep", "import random", "import sys", "import cPickle", "import unicodedata", "from lyntin import exported", "from lyntin.modules imp...
from django.db import models class Hotel(models.Model): name = models.CharField(max_length=100) country = models.CharField(max_length=100) address = models.CharField(max_length=200) rooms_empty = models.IntegerField(max_length=100) discription = models.CharField(max_length=200) #pictures = mo...
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 3, 0, 0.6071, 0.8571, 0, 0.66, 1, 782, 0, 0, 0, 0, 996, 0, 5 ], [ 14, 1, 0.2857, 0.0714, 1, 0.18, ...
[ "from django.db import models", "class Hotel(models.Model):\n name = models.CharField(max_length=100)\n country = models.CharField(max_length=100)\n address = models.CharField(max_length=200)\n rooms_empty = models.IntegerField(max_length=100)\n discription = models.CharField(max_length=200)", " ...
from django.test import TestCase # Create your tests here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ] ]
[ "from django.test import TestCase" ]
__author__ = 'esraa' from django.conf.urls import patterns, include, url from search import views #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', #url(r'^$', 'final_project.views.index'), url(r'^hotel_list/$', views.hotel_list ,name ='hotel_list' ) #url(r'^search/...
[ [ 14, 0, 0.0476, 0.0476, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1429, 0.0476, 0, 0.66, 0.3333, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 1, 0, 0.1905, 0.0476, 0, 0...
[ "__author__ = 'esraa'", "from django.conf.urls import patterns, include, url", "from search import views", "urlpatterns = patterns('',\n #url(r'^$', 'final_project.views.index'),\n\n url(r'^hotel_list/$', views.hotel_list ,name ='hotel_list' )\n\n\n\n #url(r'^search/details/$', 'search.views.details')...
from django.shortcuts import render from django.shortcuts import render_to_response from django.template import RequestContext from search.models import Hotel def hotel_list(request): hotel_info = Hotel.objects.raw("SELECT * from hotel") hotel_data = { "hotel_detail" : hotel_info } print hot...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0.25, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.66,...
[ "from django.shortcuts import render", "from django.shortcuts import render_to_response", "from django.template import RequestContext", "from search.models import Hotel", "def hotel_list(request):\n\n hotel_info = Hotel.objects.raw(\"SELECT * from hotel\")\n\n hotel_data = {\n \"hotel_detail\" ...
from django.contrib import admin # Register your models here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ] ]
[ "from django.contrib import admin" ]
from django.db import models # Create your models here. class SearchForm(models.Model): country_name = models.CharField(max_length=100) date_start = models.DateField(null=True) date_end = models.DateField(null=True) address_hotel = models.CharField(max_length=200) hotel_name = models.CharField(max...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 3, 0, 0.6667, 0.7333, 0, 0.66, 1, 968, 0, 0, 0, 0, 996, 0, 6 ], [ 14, 1, 0.4, 0.0667, 1, 0.57, ...
[ "from django.db import models", "class SearchForm(models.Model):\n country_name = models.CharField(max_length=100)\n date_start = models.DateField(null=True)\n date_end = models.DateField(null=True)\n address_hotel = models.CharField(max_length=200)\n hotel_name = models.CharField(max_length=100)\n...
__author__ = 'esraa' from django import forms class roomsform(forms.Form): country = forms.CharField(max_length=100) date_checkin = forms.DateField() date_checkout = forms.DateField()
[ [ 14, 0, 0.1111, 0.1111, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.4444, 0.1111, 0, 0.66, 0.5, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 3, 0, 0.8333, 0.4444, 0, 0.66...
[ "__author__ = 'esraa'", "from django import forms", "class roomsform(forms.Form):\n country = forms.CharField(max_length=100)\n date_checkin = forms.DateField()\n date_checkout = forms.DateField()", " country = forms.CharField(max_length=100)", " date_checkin = forms.DateField()", " date...
from django.test import TestCase # Create your tests here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ] ]
[ "from django.test import TestCase" ]
__author__ = 'esraa' from django.conf.urls import patterns, include, url from searchform import views #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', #url(r'^$', 'final_project.views.index'), # url(r'^/searchroom/search_list/$', views.search_list ,name ='search_list' ), ...
[ [ 14, 0, 0.0435, 0.0435, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1739, 0.0435, 0, 0.66, 0.3333, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 1, 0, 0.2174, 0.0435, 0, 0...
[ "__author__ = 'esraa'", "from django.conf.urls import patterns, include, url", "from searchform import views", "urlpatterns = patterns('',\n #url(r'^$', 'final_project.views.index'),\n\n # url(r'^/searchroom/search_list/$', views.search_list ,name ='search_list' ),\n url(r'^search_list$', views.search_l...
from django.shortcuts import render from django.shortcuts import render_to_response from django.template import RequestContext from searchform.models import SearchForm from searchform.forms import roomsform def search_list(request): rooms_info = SearchForm.objects.raw("SELECT id, hotel_name, address_hotel, countr...
[ [ 1, 0, 0.0333, 0.0333, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0667, 0.0333, 0, 0.66, 0.1667, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.1, 0.0333, 0, 0.6...
[ "from django.shortcuts import render", "from django.shortcuts import render_to_response", "from django.template import RequestContext", "from searchform.models import SearchForm", "from searchform.forms import roomsform", "def search_list(request):\n rooms_info = SearchForm.objects.raw(\"SELECT id, ho...
from django.contrib import admin # Register your models here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ] ]
[ "from django.contrib import admin" ]