code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.0145, 0.0035, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0176, 0.0009, 0, 0.66, 0.0244, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0193, 0.0009, 0, 0.66,...
[ "\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import base64", "import clientsecrets", "import copy", "import datetime", "import httplib2", "import logging", "import os", "import sys", "im...
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.1604, 0.0472, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1981, 0.0094, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.217, 0.0094, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import os", "import stat", "import threading", "from anyjson import simplejson", "from client import Storage as BaseStorage", "from clien...
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.1371, 0.0403, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1694, 0.0081, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1855, 0.0081, 0, 0.66,...
[ "\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import oauth2client", "import base64", "import pickle", "from django.db import models", "from oauth2client.client import St...
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- # # Copyright (C) 2011 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 ...
[ [ 1, 0, 0.0738, 0.0041, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0779, 0.0041, 0, 0.66, 0.0625, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.082, 0.0041, 0, 0...
[ "import base64", "import hashlib", "import logging", "import time", "from OpenSSL import crypto", "from anyjson import simplejson", "CLOCK_SKEW_SECS = 300 # 5 minutes in seconds", "AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds", "MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds", "cla...
# Copyright (C) 2011 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 or agreed to in writ...
[ [ 8, 0, 0.1619, 0.0476, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2, 0.0095, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2286, 0.0095, 0, 0.66, ...
[ "\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from anyjson import simplejson", "TYPE_WEB = 'web'", "TYPE_INSTALL...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #...
import Cookie import datetime import time import email.utils import calendar import base64 import hashlib import hmac import re import logging # Ripped from the Tornado Framework's web.py # http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09 # # Tornado is licensed under the Apache Licen...
[ [ 1, 0, 0.006, 0.006, 0, 0.66, 0, 32, 0, 1, 0, 0, 32, 0, 0 ], [ 1, 0, 0.0119, 0.006, 0, 0.66, 0.1, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0179, 0.006, 0, 0.66, ...
[ "import Cookie", "import datetime", "import time", "import email.utils", "import calendar", "import base64", "import hashlib", "import hmac", "import re", "import logging", "class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ...
# Copyright (C) 2007 Joe Gregorio # # Licensed under the MIT License """MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.o...
[ [ 8, 0, 0.0814, 0.1105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1453, 0.0058, 0, 0.66, 0.0833, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1512, 0.0058, 0, 0.66...
[ "\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1", "__v...
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.0342, 0.0083, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0414, 0.0021, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0476, 0.0021, 0, 0.66,...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import copy", "import httplib2", "import logging", "import oauth2 as oauth", "import urllib", "import urlparse", "from anyjson import simplejson", "tr...
#!/usr/bin/python2.4 # # Copyright (C) 2010 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 l...
[ [ 8, 0, 0.0519, 0.0182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0649, 0.0026, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0701, 0.0026, 0, 0.66,...
[ "\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import...
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.2619, 0.0635, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3175, 0.0159, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3492, 0.0159, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "import threading", "from apiclient.oauth import Storage as BaseStorage", "class Storage(BaseStorage):\n \"\"\"Store and retr...
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 1, 0, 0.2679, 0.0179, 0, 0.66, 0, 629, 0, 1, 0, 0, 629, 0, 0 ], [ 1, 0, 0.2857, 0.0179, 0, 0.66, 0.2, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.3036, 0.0179, 0, 0.6...
[ "import apiclient", "import base64", "import pickle", "from django.db import models", "class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):", " __metaclass__ = models.SubfieldBase", " def db_t...
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.1259, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1556, 0.0074, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1704, 0.0074, 0, 0.66, ...
[ "\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "from google.appengine.ext import db", "from apiclient.oauth import OAuthCredentials", "...
#!/usr/bin/python2.4 # # Copyright (C) 2010 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 l...
[ [ 8, 0, 0.1545, 0.0407, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.187, 0.0081, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2114, 0.0081, 0, 0.66, ...
[ "\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from oauth2client.anyjson import simplejson", "class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass", " \"\"\"Base...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.1205, 0.1452, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2046, 0.0033, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2112, 0.0033, 0, 0.66, ...
[ "\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", ...
# Copyright (C) 2010 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 or agreed to in writ...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
[ [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, 0.66, 0.0833, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 14, 0, 0.0408, 0.0068, 0, ...
[ "import re", "import urllib", "RESERVED = \":/?#[]@!$&'()*+,;=\"", "OPERATOR = \"+./;?|!@\"", "EXPLODE = \"*+\"", "MODIFIER = \":^\"", "TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)", "VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])...
#!/usr/bin/env python # Copyright (c) 2010, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this l...
[ [ 8, 0, 0.1818, 0.0267, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2032, 0.0053, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.2219, 0.0107, 0, 0.66, ...
[ "\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"", "__author__ = 'olexiy@google.com (Olexiy Oryeshko)'", "class Error(Exception):\n \"\"\"Thrown If val...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0365, 0.0708, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.0845, 0.0205, 0, 0.66, 0.04, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0982, 0.0023, 0, 0.66, ...
[ "\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
[ [ 8, 0, 0.0318, 0.0545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0636, 0.0091, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0727, 0.0091, 0, 0.66...
[ "\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"", "__author__ = \"Joe Gregorio (joe@bitworking.org)\"", "__copyright__ = \"Copyright 2006, Joe Gregorio\"", "__contributors__ = []", "__version__ = \"1.0.0\"", "__license__ = \"MIT\"", "__history__ = \"\"\"\n\"\"\"", "import urlparse", "escape_...
# -*- coding: utf-8 -*- """ webapp2 ======= `webapp2`_ is a lightweight Python web framework compatible with Google App Engine's `webapp`_. webapp2 is `simple`_. it follows the simplicity of webapp, but improves it in some ways: it adds better URI routing and exception handling, a full featured response object and a m...
[ [ 8, 0, 0.2721, 0.5, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5294, 0.0147, 0, 0.66, 0.5, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 8, 0, 0.7794, 0.4559, 0, 0.66, ...
[ "\"\"\"\nwebapp2\n=======\n`webapp2`_ is a lightweight Python web framework compatible with Google App\nEngine's `webapp`_.\n\nwebapp2 is `simple`_. it follows the simplicity of webapp, but\nimproves it in some ways: it adds better URI routing and exception handling,", "from setuptools import setup", "setup(\n ...
class BaseAction(object): """Base interface for custom actions.""" #: Reference to :class:`Manager`. manager = None #: Action name. name = None #: ArgumentParser description. description = None #: ArgumentParser epilog. epilog = None def __init__(self, manager): raise ...
[ [ 3, 0, 0.4167, 0.7083, 0, 0.66, 0, 955, 0, 2, 0, 0, 186, 0, 2 ], [ 8, 1, 0.125, 0.0417, 1, 0.85, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.25, 0.0417, 1, 0.85, 0...
[ "class BaseAction(object):\n \"\"\"Base interface for custom actions.\"\"\"\n\n #: Reference to :class:`Manager`.\n manager = None\n #: Action name.\n name = None\n #: ArgumentParser description.", " \"\"\"Base interface for custom actions.\"\"\"", " manager = None", " name = None",...
import ConfigParser import os import textwrap import StringIO import sys import unittest import StringIO import test_utils from manage.config import Config class TestConfig(test_utils.BaseTestCase): def get_fp(self, config): return StringIO.StringIO(textwrap.dedent(config)) def test_get(self): ...
[ [ 1, 0, 0.0053, 0.0053, 0, 0.66, 0, 272, 0, 1, 0, 0, 272, 0, 0 ], [ 1, 0, 0.0106, 0.0053, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0159, 0.0053, 0, 0.6...
[ "import ConfigParser", "import os", "import textwrap", "import StringIO", "import sys", "import unittest", "import StringIO", "import test_utils", "from manage.config import Config", "class TestConfig(test_utils.BaseTestCase):\n def get_fp(self, config):\n return StringIO.StringIO(textwr...
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...
[ [ 8, 0, 0.0138, 0.0254, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0271, 0.0004, 0, 0.66, 0.0222, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0311, 0.0076, 0, 0.66...
[ "\"\"\"Command-line parsing library\n\nThis module is an optparse-inspired command-line parsing library that:\n\n - handles both optional and positional arguments\n - produces highly informative usage messages\n - supports parsers that dispatch to sub-parsers", "__version__ = '1.2.1'", "__all__ = [\n ...
# -*- coding: utf-8 -*- import StringIO import webapp2 import test_base def _norm_req(s): return '\r\n'.join(s.strip().replace('\r','').split('\n')) _test_req = """ POST /webob/ HTTP/1.0 Accept: */* Cache-Control: max-age=0 Content-Type: multipart/form-data; boundary=----------------------------deb95b63e42a Ho...
[ [ 1, 0, 0.0065, 0.0032, 0, 0.66, 0, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.0129, 0.0032, 0, 0.66, 0.1111, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0194, 0.0032, 0, ...
[ "import StringIO", "import webapp2", "import test_base", "def _norm_req(s):\n return '\\r\\n'.join(s.strip().replace('\\r','').split('\\n'))", " return '\\r\\n'.join(s.strip().replace('\\r','').split('\\n'))", "_test_req = \"\"\"\nPOST /webob/ HTTP/1.0\nAccept: */*\nCache-Control: max-age=0\nContent...
from webapp2_extras import auth from webapp2_extras.appengine.auth import models from google.appengine.ext.ndb import model import test_base class UniqueConstraintViolation(Exception): pass class User(model.Model): username = model.StringProperty(required=True) auth_id = model.StringProperty() ema...
[ [ 1, 0, 0.0046, 0.0046, 0, 0.66, 0, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.0093, 0.0046, 0, 0.66, 0.125, 845, 0, 1, 0, 0, 845, 0, 0 ], [ 1, 0, 0.0185, 0.0046, 0, 0...
[ "from webapp2_extras import auth", "from webapp2_extras.appengine.auth import models", "from google.appengine.ext.ndb import model", "import test_base", "class UniqueConstraintViolation(Exception):\n pass", "class User(model.Model):\n username = model.StringProperty(required=True)\n auth_id = mod...
import webapp2 from webapp2_extras import sessions from webapp2_extras import auth from webapp2_extras.appengine.auth import models from google.appengine.ext.ndb import model import test_base class TestAuth(test_base.BaseTestCase): def setUp(self): super(TestAuth, self).setUp() self.register_m...
[ [ 1, 0, 0.0033, 0.0033, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0067, 0.0033, 0, 0.66, 0.1429, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.0134, 0.0033, 0, ...
[ "import webapp2", "from webapp2_extras import sessions", "from webapp2_extras import auth", "from webapp2_extras.appengine.auth import models", "from google.appengine.ext.ndb import model", "import test_base", "class TestAuth(test_base.BaseTestCase):\n\n def setUp(self):\n super(TestAuth, self...
# -*- coding: utf-8 -*- import os import webapp2 from webapp2_extras import mako import test_base current_dir = os.path.abspath(os.path.dirname(__file__)) template_path = os.path.join(current_dir, 'resources', 'mako_templates') class TestMako(test_base.BaseTestCase): def test_render_template(self): app...
[ [ 1, 0, 0.0444, 0.0222, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0889, 0.0222, 0, 0.66, 0.1429, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.1111, 0.0222, 0, ...
[ "import os", "import webapp2", "from webapp2_extras import mako", "import test_base", "current_dir = os.path.abspath(os.path.dirname(__file__))", "template_path = os.path.join(current_dir, 'resources', 'mako_templates')", "class TestMako(test_base.BaseTestCase):\n def test_render_template(self):\n ...
# -*- coding: utf-8 -*- import webapp2 from webapp2_extras import sessions from webapp2_extras import sessions_memcache import test_base app = webapp2.WSGIApplication(config={ 'webapp2_extras.sessions': { 'secret_key': 'my-super-secret', }, }) class TestMemcacheSession(test_base.BaseTestCase): ...
[ [ 1, 0, 0.0147, 0.0074, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0221, 0.0074, 0, 0.66, 0.1667, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.0294, 0.0074, 0, ...
[ "import webapp2", "from webapp2_extras import sessions", "from webapp2_extras import sessions_memcache", "import test_base", "app = webapp2.WSGIApplication(config={\n 'webapp2_extras.sessions': {\n 'secret_key': 'my-super-secret',\n },\n})", "class TestMemcacheSession(test_base.BaseTestCase):...
# -*- coding: utf-8 -*- import os import webapp2 from webapp2_extras import jinja2 import test_base current_dir = os.path.abspath(os.path.dirname(__file__)) template_path = os.path.join(current_dir, 'resources', 'jinja2_templates') compiled_path = os.path.join(current_dir, 'resources', '...
[ [ 1, 0, 0.0208, 0.0104, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0417, 0.0104, 0, 0.66, 0.125, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0521, 0.0104, 0, 0...
[ "import os", "import webapp2", "from webapp2_extras import jinja2", "import test_base", "current_dir = os.path.abspath(os.path.dirname(__file__))", "template_path = os.path.join(current_dir, 'resources', 'jinja2_templates')", "compiled_path = os.path.join(current_dir, 'resources',\n ...
# -*- coding: utf-8 -*- from webapp2_extras import securecookie import test_base class TestSecureCookie(test_base.BaseTestCase): def test_secure_cookie_serializer(self): serializer = securecookie.SecureCookieSerializer('secret-key') serializer._get_timestamp = lambda: 1 value = ['a', 'b'...
[ [ 1, 0, 0.0435, 0.0217, 0, 0.66, 0, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.087, 0.0217, 0, 0.66, 0.3333, 16, 0, 1, 0, 0, 16, 0, 0 ], [ 3, 0, 0.5326, 0.7826, 0, 0.6...
[ "from webapp2_extras import securecookie", "import test_base", "class TestSecureCookie(test_base.BaseTestCase):\n def test_secure_cookie_serializer(self):\n serializer = securecookie.SecureCookieSerializer('secret-key')\n serializer._get_timestamp = lambda: 1\n\n value = ['a', 'b', 'c']\...
# -*- coding: utf-8 -*- import re from webapp2_extras import security import test_base class TestSecurity(test_base.BaseTestCase): def test_generate_random_string(self): self.assertRaises(ValueError, security.generate_random_string, None) self.assertRaises(ValueError, security.generate_random_st...
[ [ 1, 0, 0.0328, 0.0164, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0656, 0.0164, 0, 0.66, 0.25, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.0984, 0.0164, 0, 0....
[ "import re", "from webapp2_extras import security", "import test_base", "class TestSecurity(test_base.BaseTestCase):\n def test_generate_random_string(self):\n self.assertRaises(ValueError, security.generate_random_string, None)\n self.assertRaises(ValueError, security.generate_random_string,...
# -*- coding: utf-8 -*- import webapp2 from webapp2_extras import sessions import test_base app = webapp2.WSGIApplication(config={ 'webapp2_extras.sessions': { 'secret_key': 'my-super-secret', }, }) class TestSecureCookieSession(test_base.BaseTestCase): factory = sessions.SecureCookieSessionFact...
[ [ 1, 0, 0.0091, 0.0046, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0137, 0.0046, 0, 0.66, 0.2, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.0228, 0.0046, 0, 0.6...
[ "import webapp2", "from webapp2_extras import sessions", "import test_base", "app = webapp2.WSGIApplication(config={\n 'webapp2_extras.sessions': {\n 'secret_key': 'my-super-secret',\n },\n})", "class TestSecureCookieSession(test_base.BaseTestCase):\n factory = sessions.SecureCookieSessionFa...
# -*- coding: utf-8 -*- from google.appengine.ext import webapp import webapp2 import test_base # Old WSGIApplication, new RequestHandler. class NewStyleHandler(webapp2.RequestHandler): def get(self, text): self.response.out.write(text) app = webapp.WSGIApplication([ (r'/test/(.*)', NewStyleHandler...
[ [ 1, 0, 0.016, 0.008, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.032, 0.008, 0, 0.66, 0.1, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.048, 0.008, 0, 0.66, ...
[ "from google.appengine.ext import webapp", "import webapp2", "import test_base", "class NewStyleHandler(webapp2.RequestHandler):\n def get(self, text):\n self.response.out.write(text)", " def get(self, text):\n self.response.out.write(text)", " self.response.out.write(text)", ...
# -*- coding: utf-8 -*- import base64 from webapp2_extras import xsrf import test_base class TestXSRFToken(test_base.BaseTestCase): def test_verify_timeout(self): token = xsrf.XSRFToken('user@example.com', 'secret', current_time=1354160000) ...
[ [ 1, 0, 0.0312, 0.0104, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0521, 0.0104, 0, 0.66, 0.25, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.0729, 0.0104, 0, 0....
[ "import base64", "from webapp2_extras import xsrf", "import test_base", "class TestXSRFToken(test_base.BaseTestCase):\n def test_verify_timeout(self):\n token = xsrf.XSRFToken('user@example.com',\n 'secret',\n current_time=1354160000)\n ...
# -*- coding: utf-8 -*- import webapp2 from webapp2_extras import config as app_config import test_base class TestConfig(test_base.BaseTestCase): def tearDown(self): pass def test_get(self): config = app_config.Config({'foo': { 'bar': 'baz', 'doo': 'ding', }}...
[ [ 1, 0, 0.0058, 0.0029, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0115, 0.0029, 0, 0.66, 0.1667, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.0173, 0.0029, 0, ...
[ "import webapp2", "from webapp2_extras import config as app_config", "import test_base", "class TestConfig(test_base.BaseTestCase):\n def tearDown(self):\n pass\n\n def test_get(self):\n config = app_config.Config({'foo': {\n 'bar': 'baz',\n 'doo': 'ding',", " de...
# -*- coding: utf-8 -*- import os import webapp2 from webapp2_extras import users import test_base def set_current_user(email, user_id, is_admin=False): os.environ['USER_EMAIL'] = email or '' os.environ['USER_ID'] = user_id or '' os.environ['USER_IS_ADMIN'] = '1' if is_admin else '0' class LoginRequir...
[ [ 1, 0, 0.0204, 0.0102, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0408, 0.0102, 0, 0.66, 0.1111, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.051, 0.0102, 0, 0...
[ "import os", "import webapp2", "from webapp2_extras import users", "import test_base", "def set_current_user(email, user_id, is_admin=False):\n os.environ['USER_EMAIL'] = email or ''\n os.environ['USER_ID'] = user_id or ''\n os.environ['USER_IS_ADMIN'] = '1' if is_admin else '0'", " os.environ...
# -*- coding: utf-8 -*- import webapp2 from webapp2_extras.routes import (DomainRoute, HandlerPrefixRoute, RedirectRoute, NamePrefixRoute, PathPrefixRoute) import test_base class HomeHandler(webapp2.RequestHandler): def get(self, **kwargs): self.response.out.write('home sweet home') app = webapp2....
[ [ 1, 0, 0.0069, 0.0035, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0156, 0.0069, 0, 0.66, 0.125, 854, 0, 5, 0, 0, 854, 0, 0 ], [ 1, 0, 0.0242, 0.0035, 0, 0...
[ "import webapp2", "from webapp2_extras.routes import (DomainRoute, HandlerPrefixRoute,\n RedirectRoute, NamePrefixRoute, PathPrefixRoute)", "import test_base", "class HomeHandler(webapp2.RequestHandler):\n def get(self, **kwargs):\n self.response.out.write('home sweet home')", " def get(self...
# -*- coding: utf-8 -*- import webob import webob.exc import webapp2 import test_base class TestMiscellaneous(test_base.BaseTestCase): def test_abort(self): self.assertRaises(webob.exc.HTTPOk, webapp2.abort, 200) self.assertRaises(webob.exc.HTTPCreated, webapp2.abort, 201) self.assertRa...
[ [ 1, 0, 0.0154, 0.0077, 0, 0.66, 0, 787, 0, 1, 0, 0, 787, 0, 0 ], [ 1, 0, 0.0231, 0.0077, 0, 0.66, 0.2, 63, 0, 1, 0, 0, 63, 0, 0 ], [ 1, 0, 0.0385, 0.0077, 0, 0.66,...
[ "import webob", "import webob.exc", "import webapp2", "import test_base", "class TestMiscellaneous(test_base.BaseTestCase):\n\n def test_abort(self):\n self.assertRaises(webob.exc.HTTPOk, webapp2.abort, 200)\n self.assertRaises(webob.exc.HTTPCreated, webapp2.abort, 201)\n self.assert...
# -*- coding: utf-8 -*- from google.appengine.api import datastore_errors from google.appengine.api import memcache import webapp2 from webapp2_extras import sessions from webapp2_extras import sessions_ndb import test_base app = webapp2.WSGIApplication(config={ 'webapp2_extras.sessions': { 'secret_key'...
[ [ 1, 0, 0.0118, 0.0059, 0, 0.66, 0, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.0178, 0.0059, 0, 0.66, 0.125, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.0296, 0.0059, 0, 0...
[ "from google.appengine.api import datastore_errors", "from google.appengine.api import memcache", "import webapp2", "from webapp2_extras import sessions", "from webapp2_extras import sessions_ndb", "import test_base", "app = webapp2.WSGIApplication(config={\n 'webapp2_extras.sessions': {\n 'se...
# -*- coding: utf-8 -*- """ Tests for webapp2 webapp2.RequestHandler """ import os import StringIO import sys import urllib import webapp2 import test_base class BareHandler(object): def __init__(self, request, response): self.response = response response.write('I am not a RequestHandler but I w...
[ [ 8, 0, 0.0044, 0.0044, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0073, 0.0015, 0, 0.66, 0.037, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0088, 0.0015, 0, 0.66,...
[ "\"\"\"\nTests for webapp2 webapp2.RequestHandler\n\"\"\"", "import os", "import StringIO", "import sys", "import urllib", "import webapp2", "import test_base", "class BareHandler(object):\n def __init__(self, request, response):\n self.response = response\n response.write('I am not a...
import webapp2 class LazyHandler(webapp2.RequestHandler): def get(self, **kwargs): self.response.out.write('I am a laaazy view.') class CustomMethodHandler(webapp2.RequestHandler): def custom_method(self): self.response.out.write('I am a custom method.') def handle_exception(request, respo...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 3, 0, 0.3333, 0.2, 0, 0.66, 0.3333, 864, 0, 1, 0, 0, 842, 0, 1 ], [ 2, 1, 0.3667, 0.1333, 1, 0.6...
[ "import webapp2", "class LazyHandler(webapp2.RequestHandler):\n def get(self, **kwargs):\n self.response.out.write('I am a laaazy view.')", " def get(self, **kwargs):\n self.response.out.write('I am a laaazy view.')", " self.response.out.write('I am a laaazy view.')", "class Custo...
from __future__ import division from jinja2.runtime import LoopContext, TemplateReference, Macro, Markup, TemplateRuntimeError, missing, concat, escape, markup_join, unicode_join, to_string, TemplateNotFound name = 'template1.html' def root(context): l_message = context.resolve('message') if 0: yield None ...
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0.2, 185, 0, 12, 0, 0, 185, 0, 0 ], [ 14, 0, 0.2727, 0.0909, 0, 0...
[ "from __future__ import division", "from jinja2.runtime import LoopContext, TemplateReference, Macro, Markup, TemplateRuntimeError, missing, concat, escape, markup_join, unicode_join, to_string, TemplateNotFound", "name = 'template1.html'", "def root(context):\n l_message = context.resolve('message')\n ...
from protorpc import messages from protorpc import remote class BonjourRequest(messages.Message): my_name = messages.StringField(1, required=True) class BonjourResponse(messages.Message): hello = messages.StringField(1, required=True) class BonjourService(remote.Service): @remote.method(BonjourRequest, B...
[ [ 1, 0, 0.0385, 0.0385, 0, 0.66, 0, 232, 0, 1, 0, 0, 232, 0, 0 ], [ 1, 0, 0.0769, 0.0385, 0, 0.66, 0.1429, 232, 0, 1, 0, 0, 232, 0, 0 ], [ 3, 0, 0.1731, 0.0769, 0, ...
[ "from protorpc import messages", "from protorpc import remote", "class BonjourRequest(messages.Message):\n my_name = messages.StringField(1, required=True)", " my_name = messages.StringField(1, required=True)", "class BonjourResponse(messages.Message):\n hello = messages.StringField(1, required=Tru...
default_config = { 'templates_dir': 'templates', }
[ [ 14, 0, 0.6667, 1, 0, 0.66, 0, 676, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "default_config = {\n 'templates_dir': 'templates',\n}" ]
from webapp2_extras import config from webapp2_extras import i18n default_config = { 'locale': 'en_US', 'timezone': 'America/Chicago', 'required': config.REQUIRED_VALUE, } def locale_selector(store, request): return i18n.get_store().default_locale def timezone_selector(store, request): return i18...
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.1429, 0.0714, 0, 0.66, 0.25, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 14, 0, 0.4286, 0.3571, 0, 0...
[ "from webapp2_extras import config", "from webapp2_extras import i18n", "default_config = {\n 'locale': 'en_US',\n 'timezone': 'America/Chicago',\n 'required': config.REQUIRED_VALUE,\n}", "def locale_selector(store, request):\n return i18n.get_store().default_locale", " return i18n.get_store(...
# -*- coding: utf-8 -*- import random import webapp2 from webapp2 import BaseRoute, RedirectHandler, Request, Route, Router import test_base class TestRoute(test_base.BaseTestCase): def test_no_variable(self): route = Route(r'/hello', None) route, args, kwargs = route.match(Request.blank('/hello...
[ [ 1, 0, 0.0064, 0.0032, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0127, 0.0032, 0, 0.66, 0.1667, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0159, 0.0032, 0, ...
[ "import random", "import webapp2", "from webapp2 import BaseRoute, RedirectHandler, Request, Route, Router", "import test_base", "class TestRoute(test_base.BaseTestCase):\n def test_no_variable(self):\n route = Route(r'/hello', None)\n route, args, kwargs = route.match(Request.blank('/hello...
# -*- coding: utf-8 -*- import webapp2 from webapp2_extras import local_app import test_base class TestLocalApp(test_base.BaseTestCase): def test_dispatch(self): def hello_handler(request, *args, **kwargs): return webapp2.Response('Hello, World!') app = local_app.WSGIApplication([('/...
[ [ 1, 0, 0.1, 0.05, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.15, 0.05, 0, 0.66, 0.25, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.25, 0.05, 0, 0.66, 0.5, ...
[ "import webapp2", "from webapp2_extras import local_app", "import test_base", "class TestLocalApp(test_base.BaseTestCase):\n def test_dispatch(self):\n def hello_handler(request, *args, **kwargs):\n return webapp2.Response('Hello, World!')\n\n app = local_app.WSGIApplication([('/',...
# -*- coding: utf-8 -*- import webapp2 import test_base class NoStringOrUnicodeConversion(object): pass class StringConversion(object): def __str__(self): return 'foo'.encode('utf-8') class UnicodeConversion(object): def __unicode__(self): return 'bar'.decode('utf-8') class TestResp...
[ [ 1, 0, 0.006, 0.003, 0, 0.66, 0, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.0121, 0.003, 0, 0.66, 0.1429, 16, 0, 1, 0, 0, 16, 0, 0 ], [ 3, 0, 0.0227, 0.006, 0, 0.66, ...
[ "import webapp2", "import test_base", "class NoStringOrUnicodeConversion(object):\n pass", "class StringConversion(object):\n def __str__(self):\n return 'foo'.encode('utf-8')", " def __str__(self):\n return 'foo'.encode('utf-8')", " return 'foo'.encode('utf-8')", "class Un...
# -*- coding: utf-8 -*- from webapp2_extras import json import test_base class TestJson(test_base.BaseTestCase): def test_encode(self): self.assertEqual(json.encode( '<script>alert("hello")</script>'), '"<script>alert(\\"hello\\")<\\/script>"') def test_decode(self): ...
[ [ 1, 0, 0.0541, 0.027, 0, 0.66, 0, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 1, 0, 0.1081, 0.027, 0, 0.66, 0.3333, 16, 0, 1, 0, 0, 16, 0, 0 ], [ 3, 0, 0.5541, 0.7568, 0, 0.66...
[ "from webapp2_extras import json", "import test_base", "class TestJson(test_base.BaseTestCase):\n def test_encode(self):\n self.assertEqual(json.encode(\n '<script>alert(\"hello\")</script>'),\n '\"<script>alert(\\\\\"hello\\\\\")<\\\\/script>\"')\n\n def test_decode(self):\n ...
# -*- coding: utf-8 -*- """ webapp2_extras.sessions_ndb =========================== Extended sessions stored in datastore using the ndb library. App Engine-specific modules were moved to webapp2_extras.appengine. This module is here for compatibility purposes. :copyright: 2011 by tipfy.org. ...
[ [ 8, 0, 0.375, 0.6, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7, 0.05, 0, 0.66, 0.3333, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 8, 0, 0.875, 0.2, 0, 0.66, 0.6667,...
[ "\"\"\"\n webapp2_extras.sessions_ndb\n ===========================\n\n Extended sessions stored in datastore using the ndb library.\n\n App Engine-specific modules were moved to webapp2_extras.appengine.\n This module is here for compatibility purposes.", "import warnings", "warnings.warn(Deprec...
# -*- coding: utf-8 -*- """ webapp2_extras.users ==================== Helpers for google.appengine.api.users. App Engine-specific modules were moved to webapp2_extras.appengine. This module is here for compatibility purposes. :copyright: 2011 tipfy.org. :license: Apache Sotware License, s...
[ [ 8, 0, 0.375, 0.6, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7, 0.05, 0, 0.66, 0.3333, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 8, 0, 0.875, 0.2, 0, 0.66, 0.6667,...
[ "\"\"\"\n webapp2_extras.users\n ====================\n\n Helpers for google.appengine.api.users.\n\n App Engine-specific modules were moved to webapp2_extras.appengine.\n This module is here for compatibility purposes.", "import warnings", "warnings.warn(DeprecationWarning(\n 'webapp2_extras....
# -*- coding: utf-8 -*- """ webapp2_extras.auth =================== Utilities for authentication and authorization. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import logging import time import webapp2 from webapp2_extras import security from web...
[ [ 8, 0, 0.0093, 0.014, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0171, 0.0016, 0, 0.66, 0.0556, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0186, 0.0016, 0, 0.66,...
[ "\"\"\"\n webapp2_extras.auth\n ===================\n\n Utilities for authentication and authorization.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "import logging", "import time", "import webapp2", "from webapp2_extras import security", ...
# -*- coding: utf-8 -*- """ webapp2_extras.routes ===================== Extra route classes for webapp2. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import re import urllib from webob import exc import webapp2 class MultiRoute(object): """B...
[ [ 8, 0, 0.017, 0.0255, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0312, 0.0028, 0, 0.66, 0.0909, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.034, 0.0028, 0, 0.66, ...
[ "\"\"\"\n webapp2_extras.routes\n =====================\n\n Extra route classes for webapp2.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "import re", "import urllib", "from webob import exc", "import webapp2", "class MultiRoute(object):\...
# -*- coding: utf-8 -*- """ webapp2_extras.xsrf =================== Helpers for defending against cross-site request forgery attacks. :copyright: 2012 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ __author__ = 'John Lockwood' import base64 import hmac import hashli...
[ [ 8, 0, 0.0432, 0.0647, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0863, 0.0072, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1007, 0.0072, 0, 0.66, ...
[ "\"\"\"\n webapp2_extras.xsrf\n ===================\n\n Helpers for defending against cross-site request forgery attacks.\n\n :copyright: 2012 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "__author__ = 'John Lockwood'", "import base64", "import hmac", "import h...
# -*- coding: utf-8 -*- """ webapp2_extras.json =================== JSON helpers for webapp2. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ import absolute_import import base64 import urllib try: # Preference for installed libra...
[ [ 8, 0, 0.0556, 0.0833, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1019, 0.0093, 0, 0.66, 0.1, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1204, 0.0093, 0, 0.66, ...
[ "\"\"\"\n webapp2_extras.json\n ===================\n\n JSON helpers for webapp2.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "from __future__ import absolute_import", "import base64", "import urllib", "try:\n # Preference for installed...
# -*- coding: utf-8 -*- """ webapp2_extras.sessions ======================= Lightweight but flexible session support for webapp2. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import re import webapp2 from webapp2_extras import securecookie from we...
[ [ 8, 0, 0.0126, 0.0189, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0231, 0.0021, 0, 0.66, 0.0625, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0273, 0.0021, 0, 0.66...
[ "\"\"\"\n webapp2_extras.sessions\n =======================\n\n Lightweight but flexible session support for webapp2.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "import re", "import webapp2", "from webapp2_extras import securecookie", "fr...
# -*- coding: utf-8 -*- """ webapp2_extras.local_app ~~~~~~~~~~~~~~~~~~~~~~~~ This module is deprecated. The functionality is now available directly in webapp2. Previously it implemented a WSGIApplication adapted for threaded environments. :copyright: 2011 by tipfy.org. :license: Apac...
[ [ 8, 0, 0.3333, 0.5417, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.625, 0.0417, 0, 0.66, 0.25, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.7083, 0.0417, 0, 0.66, ...
[ "\"\"\"\n webapp2_extras.local_app\n ~~~~~~~~~~~~~~~~~~~~~~~~\n\n This module is deprecated. The functionality is now available\n directly in webapp2.\n\n Previously it implemented a WSGIApplication adapted for threaded", "import warnings", "import webapp2", "warnings.warn(DeprecationWarning(\n...
# -*- coding: utf-8 -*- """ webapp2_extras.local ~~~~~~~~~~~~~~~~~~~~ This module implements thread-local utilities. This implementation comes from werkzeug.local. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ try: ...
[ [ 8, 0, 0.0303, 0.0476, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.0758, 0.0433, 0, 0.66, 0.2, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.0606, 0.0043, 1, 0.95, 0...
[ "\"\"\"\n webapp2_extras.local\n ~~~~~~~~~~~~~~~~~~~~\n\n This module implements thread-local utilities.\n\n This implementation comes from werkzeug.local.", "try:\n from greenlet import getcurrent as get_current_greenlet\nexcept ImportError: # pragma: no cover\n try:\n from py.magic impo...
# -*- coding: utf-8 -*- """ webapp2_extras.config ===================== Configuration object for webapp2. This module is deprecated. See :class:`webapp2.WSGIApplication.config`. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ impor...
[ [ 8, 0, 0.0307, 0.0482, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.057, 0.0044, 0, 0.66, 0.125, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0658, 0.0044, 0, 0.66, ...
[ "\"\"\"\n webapp2_extras.config\n =====================\n\n Configuration object for webapp2.\n\n This module is deprecated. See :class:`webapp2.WSGIApplication.config`.", "from __future__ import absolute_import", "import warnings", "import webapp2", "warnings.warn(DeprecationWarning(\n 'weba...
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.sessions_ndb ===================================== Extended sessions stored in datastore using the ndb library. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ import absolute_import ...
[ [ 8, 0, 0.0513, 0.0769, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.094, 0.0085, 0, 0.66, 0.1429, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1111, 0.0085, 0, 0.66,...
[ "\"\"\"\n webapp2_extras.appengine.sessions_ndb\n =====================================\n\n Extended sessions stored in datastore using the ndb library.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "from __future__ import absolute_import", "fro...
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.users ============================== Helpers for google.appengine.api.users. :copyright: 2011 tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from google.appengine.api import users def login_required(handler_method): ...
[ [ 8, 0, 0.0857, 0.1286, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1571, 0.0143, 0, 0.66, 0.3333, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 2, 0, 0.3786, 0.3714, 0, 0.66...
[ "\"\"\"\n webapp2_extras.appengine.users\n ==============================\n\n Helpers for google.appengine.api.users.\n\n :copyright: 2011 tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "from google.appengine.api import users", "def login_required(handler_method):\n ...
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.auth.models ==================================== Auth related models. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import time try: from ndb import model except ImportError: # pragma: no cove...
[ [ 8, 0, 0.0144, 0.0216, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0264, 0.0024, 0, 0.66, 0.1429, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 7, 0, 0.0349, 0.0096, 0, 0.66...
[ "\"\"\"\n webapp2_extras.appengine.auth.models\n ====================================\n\n Auth related models.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "import time", "try:\n from ndb import model\nexcept ImportError: # pragma: no cover\...
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.auth ============================= Authentication and authorization utilities. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """
[ [ 8, 0, 0.6, 0.9, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\n webapp2_extras.appengine.auth\n =============================\n\n Authentication and authorization utilities.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details." ]
# -*- coding: utf-8 -*- """ webapp2_extras.appengine ======================== App Engine-specific modules. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """
[ [ 8, 0, 0.6, 0.9, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\n webapp2_extras.appengine\n ========================\n\n App Engine-specific modules.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details." ]
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.sessions_memcache ========================================== Extended sessions stored in memcache. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from google.appengine.api import memcache from weba...
[ [ 8, 0, 0.1176, 0.1765, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2157, 0.0196, 0, 0.66, 0.3333, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.2549, 0.0196, 0, 0.66...
[ "\"\"\"\n webapp2_extras.appengine.sessions_memcache\n ==========================================\n\n Extended sessions stored in memcache.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details.", "from google.appengine.api import memcache", "from webapp2_...
# -*- coding: utf-8 -*- """ webapp2_extras.mako =================== Mako template support for webapp2. Learn more about Mako: http://www.makotemplates.org/ :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ import absolute_import fro...
[ [ 8, 0, 0.0515, 0.0809, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0956, 0.0074, 0, 0.66, 0.125, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1103, 0.0074, 0, 0.66,...
[ "\"\"\"\n webapp2_extras.mako\n ===================\n\n Mako template support for webapp2.\n\n Learn more about Mako: http://www.makotemplates.org/", "from __future__ import absolute_import", "from mako import lookup", "import webapp2", "default_config = {\n 'template_path': 'templates',\n}",...
# -*- coding: utf-8 -*- """ webapp2_extras ============== Extra modules for webapp2. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """
[ [ 8, 0, 0.6, 0.9, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"\n webapp2_extras\n ==============\n\n Extra modules for webapp2.\n\n :copyright: 2011 by tipfy.org.\n :license: Apache Sotware License, see LICENSE for details." ]
# -*- coding: utf-8 -*- """ webapp2_extras.jinja2 ===================== Jinja2 template support for webapp2. Learn more about Jinja2: http://jinja.pocoo.org/ :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ import absolute_import i...
[ [ 8, 0, 0.0304, 0.0478, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0565, 0.0043, 0, 0.66, 0.125, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0652, 0.0043, 0, 0.66,...
[ "\"\"\"\n webapp2_extras.jinja2\n =====================\n\n Jinja2 template support for webapp2.\n\n Learn more about Jinja2: http://jinja.pocoo.org/", "from __future__ import absolute_import", "import jinja2", "import webapp2", "default_config = {\n 'template_path': 'templates',\n 'compil...
# -*- coding: utf-8 -*- """ webapp2_extras.i18n =================== Internationalization support for webapp2. Several ideas borrowed from tipfy.i18n and Flask-Babel. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import datetime import gettext as...
[ [ 8, 0, 0.0077, 0.012, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0142, 0.0011, 0, 0.66, 0.0244, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0153, 0.0011, 0, 0.66,...
[ "\"\"\"\n webapp2_extras.i18n\n ===================\n\n Internationalization support for webapp2.\n\n Several ideas borrowed from tipfy.i18n and Flask-Babel.", "import datetime", "import gettext as gettext_stdlib", "import babel", "from babel import dates", "from babel import numbers", "from...
# -*- coding: utf-8 -*- """ webapp2_extras.security ======================= Security related helpers such as secure password hashing tools and a random token generator. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. :co...
[ [ 8, 0, 0.0344, 0.055, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0642, 0.0046, 0, 0.66, 0.0385, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0734, 0.0046, 0, 0.66,...
[ "\"\"\"\n webapp2_extras.security\n =======================\n\n Security related helpers such as secure password hashing tools and a\n random token generator.\n\n :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details.", "from __future__ import division", "import hashlib", "imp...
# -*- coding: utf-8 -*- """ webapp2_extras.sessions_memcache ================================ Extended sessions stored in memcache. App Engine-specific modules were moved to webapp2_extras.appengine. This module is here for compatibility purposes. :copyright: 2011 by tipfy.org. :license: ...
[ [ 8, 0, 0.375, 0.6, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7, 0.05, 0, 0.66, 0.3333, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 8, 0, 0.875, 0.2, 0, 0.66, 0.6667,...
[ "\"\"\"\n webapp2_extras.sessions_memcache\n ================================\n\n Extended sessions stored in memcache.\n\n App Engine-specific modules were moved to webapp2_extras.appengine.\n This module is here for compatibility purposes.", "import warnings", "warnings.warn(DeprecationWarning(...
"""To test specific webapp issues.""" import os import StringIO import sys import urllib import unittest gae_path = '/usr/local/google_appengine' sys.path[0:0] = [ gae_path, os.path.join(gae_path, 'lib', 'django_0_96'), os.path.join(gae_path, 'lib', 'webob'), os.path.join(gae_path, 'lib', 'yaml', 'lib...
[ [ 8, 0, 0.0189, 0.0189, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0377, 0.0189, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0566, 0.0189, 0, 0.66...
[ "\"\"\"To test specific webapp issues.\"\"\"", "import os", "import StringIO", "import sys", "import urllib", "import unittest", "gae_path = '/usr/local/google_appengine'", "sys.path[0:0] = [\n gae_path,\n os.path.join(gae_path, 'lib', 'django_0_96'),\n os.path.join(gae_path, 'lib', 'webob'),...
import os import sys import unittest gae_path = '/usr/local/google/home/proppy/google_appengine' current_path = os.path.abspath(os.path.dirname(__file__)) tests_path = os.path.join(current_path, 'tests') sys.path[0:0] = [ current_path, tests_path, gae_path, # All libs used by webapp2 and extras. o...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.037, 0.0185, 0, 0.66, 0.1111, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0556, 0.0185, 0, 0...
[ "import os", "import sys", "import unittest", "gae_path = '/usr/local/google/home/proppy/google_appengine'", "current_path = os.path.abspath(os.path.dirname(__file__))", "tests_path = os.path.join(current_path, 'tests')", "sys.path[0:0] = [\n current_path,\n tests_path,\n gae_path,\n # All l...
from jinja2 import nodes from jinja2.ext import Extension class FragmentCacheExtension(Extension): # a set of names that trigger the extension. tags = set(['cache']) def __init__(self, environment): super(FragmentCacheExtension, self).__init__(environment) # add the defaults to the envir...
[ [ 1, 0, 0.0179, 0.0179, 0, 0.66, 0, 436, 0, 1, 0, 0, 436, 0, 0 ], [ 1, 0, 0.0357, 0.0179, 0, 0.66, 0.5, 168, 0, 1, 0, 0, 168, 0, 0 ], [ 3, 0, 0.5446, 0.9286, 0, 0.6...
[ "from jinja2 import nodes", "from jinja2.ext import Extension", "class FragmentCacheExtension(Extension):\n # a set of names that trigger the extension.\n tags = set(['cache'])\n\n def __init__(self, environment):\n super(FragmentCacheExtension, self).__init__(environment)\n\n # add the d...
# -*- coding: utf-8 -*- # # Jinja2 documentation build configuration file, created by # sphinx-quickstart on Sun Apr 27 21:42:41 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
[ [ 1, 0, 0.0875, 0.0063, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 8, 0, 0.1187, 0.0063, 0, 0.66, 0.0385, 243, 3, 1, 0, 0, 0, 0, 3 ], [ 14, 0, 0.1625, 0.0063, 0, 0...
[ "import sys, os", "sys.path.append(os.path.dirname(os.path.abspath(__file__)))", "extensions = ['sphinx.ext.autodoc', 'jinjaext']", "templates_path = ['_templates']", "source_suffix = '.rst'", "master_doc = 'index'", "project = 'Jinja2'", "copyright = '2008, Armin Ronacher'", "import pkg_resources",...
# -*- coding: utf-8 -*- """ Jinja Documentation Extensions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for automatically documenting filters and tests. :copyright: Copyright 2008 by Armin Ronacher. :license: BSD. """ import os import re import inspect import jinja2 from itertools import islice from typ...
[ [ 8, 0, 0.0311, 0.0466, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.057, 0.0052, 0, 0.66, 0.0417, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0622, 0.0052, 0, 0.66,...
[ "\"\"\"\n Jinja Documentation Extensions\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n Support for automatically documenting filters and tests.\n\n :copyright: Copyright 2008 by Armin Ronacher.\n :license: BSD.", "import os", "import re", "import inspect", "import jinja2", "from itertools import isl...
# -*- 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 Jinja template:: {% extends 'base.html' %} {% b...
[ [ 8, 0, 0.1773, 0.3273, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3455, 0.0091, 0, 0.66, 0.1429, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3636, 0.0091, 0, 0.66...
[ "\"\"\"\nJinja2\n~~~~~~\n\nJinja2 is a template engine written in pure Python. It provides a\n`Django`_ inspired non-XML syntax but supports inline expressions and\nan optional `sandboxed`_ environment.", "import sys", "from setuptools import setup, Extension, Feature", "debugsupport = Feature(\n 'optiona...
from lib2to3 import fixer_base from lib2to3.fixer_util import Name, BlankLine class FixAltUnicode(fixer_base.BaseFix): PATTERN = """ func=funcdef< 'def' name='__unicode__' parameters< '(' NAME ')' > any+ > """ def transform(self, node, results): name = results['name'] ...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 617, 0, 1, 0, 0, 617, 0, 0 ], [ 1, 0, 0.1538, 0.0769, 0, 0.66, 0.5, 500, 0, 2, 0, 0, 500, 0, 0 ], [ 3, 0, 0.6923, 0.6923, 0, 0.6...
[ "from lib2to3 import fixer_base", "from lib2to3.fixer_util import Name, BlankLine", "class FixAltUnicode(fixer_base.BaseFix):\n PATTERN = \"\"\"\n func=funcdef< 'def' name='__unicode__'\n parameters< '(' NAME ')' > any+ >\n \"\"\"\n\n def transform(self, node, results):\n nam...
from lib2to3 import fixer_base, pytree from lib2to3.fixer_util import Name, BlankLine, Name, Attr, ArgList class FixBrokenReraising(fixer_base.BaseFix): PATTERN = """ raise_stmt< 'raise' any ',' val=any ',' tb=any > """ # run before the broken 2to3 checker with the same goal # tries to rewrite it...
[ [ 1, 0, 0.0476, 0.0476, 0, 0.66, 0, 617, 0, 2, 0, 0, 617, 0, 0 ], [ 1, 0, 0.0952, 0.0476, 0, 0.66, 0.5, 500, 0, 5, 0, 0, 500, 0, 0 ], [ 3, 0, 0.619, 0.8095, 0, 0.66...
[ "from lib2to3 import fixer_base, pytree", "from lib2to3.fixer_util import Name, BlankLine, Name, Attr, ArgList", "class FixBrokenReraising(fixer_base.BaseFix):\n PATTERN = \"\"\"\n raise_stmt< 'raise' any ',' val=any ',' tb=any >\n \"\"\"\n\n # run before the broken 2to3 checker with the same goal\n...
from lib2to3 import fixer_base from lib2to3.fixer_util import Name, BlankLine # whyever this is necessary.. class FixXrange2(fixer_base.BaseFix): PATTERN = "'xrange'" def transform(self, node, results): node.replace(Name('range', prefix=node.prefix))
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 617, 0, 1, 0, 0, 617, 0, 0 ], [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0.5, 500, 0, 2, 0, 0, 500, 0, 0 ], [ 3, 0, 0.8182, 0.4545, 0, 0.6...
[ "from lib2to3 import fixer_base", "from lib2to3.fixer_util import Name, BlankLine", "class FixXrange2(fixer_base.BaseFix):\n PATTERN = \"'xrange'\"\n\n def transform(self, node, results):\n node.replace(Name('range', prefix=node.prefix))", " PATTERN = \"'xrange'\"", " def transform(self, ...
# -*- coding: utf-8 -*- """ Inline Gettext ~~~~~~~~~~~~~~ An example extension for Jinja2 that supports inline gettext calls. Requires the i18n extension to be loaded. :copyright: (c) 2009 by the Jinja Team. :license: BSD. """ import re from jinja2.ext import Extension from jinja2.lexer import...
[ [ 8, 0, 0.0833, 0.1282, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1538, 0.0128, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1667, 0.0128, 0, 0.66...
[ "\"\"\"\n Inline Gettext\n ~~~~~~~~~~~~~~\n\n An example extension for Jinja2 that supports inline gettext calls.\n Requires the i18n extension to be loaded.\n\n :copyright: (c) 2009 by the Jinja Team.", "import re", "from jinja2.ext import Extension", "from jinja2.lexer import Token, count_new...
# -*- coding: utf-8 -*- """ Django to Jinja ~~~~~~~~~~~~~~~ Helper module that can convert django templates into Jinja2 templates. This file is not intended to be used as stand alone application but to be used as library. To convert templates you basically create your own writer, add extra co...
[ [ 8, 0, 0.0469, 0.09, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0926, 0.0013, 0, 0.66, 0.0217, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0939, 0.0013, 0, 0.66, ...
[ "\"\"\"\n Django to Jinja\n ~~~~~~~~~~~~~~~\n\n Helper module that can convert django templates into Jinja2 templates.\n\n This file is not intended to be used as stand alone application but to\n be used as library. To convert templates you basically create your own", "import re", "import os", ...
from django.conf import settings settings.configure(TEMPLATE_DIRS=['templates'], TEMPLATE_DEBUG=True) from django2jinja import convert_templates, Writer writer = Writer(use_jinja_autoescape=True) convert_templates('converted', writer=writer)
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 8, 0, 0.2857, 0.1429, 0, 0.66, 0.25, 765, 3, 2, 0, 0, 0, 0, 1 ], [ 1, 0, 0.5714, 0.1429, 0, 0.66...
[ "from django.conf import settings", "settings.configure(TEMPLATE_DIRS=['templates'], TEMPLATE_DEBUG=True)", "from django2jinja import convert_templates, Writer", "writer = Writer(use_jinja_autoescape=True)", "convert_templates('converted', writer=writer)" ]
# -*- 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...