code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/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.0128, 0.0006, 0, 0.66, 0, 141, 0, 1, 0, 0, 141, 0, 0 ], [ 1, 0, 0.0134, 0.0006, 0, 0.66, 0.0476, 80, 0, 1, 0, 0, 80, 0, 0 ], [ 1, 0, 0.014, 0.0006, 0, 0.6...
[ "from google.net.proto import ProtocolBuffer", "import array", "import dummy_thread as thread", "__pychecker__ = \"\"\"maxreturns=0 maxbranches=0 no-callinit\n unusednames=printElemNumber,debug_strs no-special\"\"\"", "if hasattr(ProtocolBuffer, 'ExtendableProtocolMessage'):\n _extension_...
#!/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...
[ [ 8, 0, 0.1963, 0.0093, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2243, 0.0093, 0, 0.66, 0.1111, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.243, 0.0093, 0, 0.66,...
[ "\"\"\"Files API Shuffler interface\"\"\"", "import logging", "from google.appengine.api.files import file as files", "from google.appengine.api.files import blobstore", "from google.appengine.api.files import file_service_pb", "from google.appengine.runtime import apiproxy_errors", "__all__ = [\n ...
#!/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...
[ [ 8, 0, 0.0298, 0.0014, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0341, 0.0014, 0, 0.66, 0.0286, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0355, 0.0014, 0, 0.66...
[ "\"\"\"Stubs for File service.\"\"\"", "import base64", "import datetime", "import hashlib", "import os", "import random", "import string", "import StringIO", "import tempfile", "import time", "from google.appengine.api import apiproxy_stub", "from google.appengine.api import datastore", "fr...
#!/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.0037, 0.0002, 0, 0.66, 0, 141, 0, 1, 0, 0, 141, 0, 0 ], [ 1, 0, 0.0039, 0.0002, 0, 0.66, 0.0213, 80, 0, 1, 0, 0, 80, 0, 0 ], [ 1, 0, 0.0041, 0.0002, 0, 0....
[ "from google.net.proto import ProtocolBuffer", "import array", "import dummy_thread as thread", "__pychecker__ = \"\"\"maxreturns=0 maxbranches=0 no-callinit\n unusednames=printElemNumber,debug_strs no-special\"\"\"", "if hasattr(ProtocolBuffer, 'ExtendableProtocolMessage'):\n _extension_...
#!/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...
[ [ 8, 0, 0.0627, 0.003, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0836, 0.003, 0, 0.66, 0.0357, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.0925, 0.003, 0, 0.66, ...
[ "\"\"\"Google Storage specific Files API calls.\"\"\"", "from __future__ import with_statement", "__all__ = ['create']", "import os", "import re", "from urllib import urlencode", "from xml.dom import minidom", "from google.appengine.api import app_identity", "from google.appengine.api import urlfetc...
#!/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...
[ [ 8, 0, 0.2877, 0.0137, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3288, 0.0137, 0, 0.66, 0.25, 272, 0, 0, 0, 0, 0, 5, 0 ], [ 1, 0, 0.3699, 0.0137, 0, 0.66, ...
[ "\"\"\"Testing utils for writing tests involving Files API.\"\"\"", "__all__ = ['TestFileServiceStub']", "from google.appengine.api import apiproxy_stub", "from google.appengine.api.files import file_service_pb", "class TestFileServiceStub(apiproxy_stub.APIProxyStub):\n \"\"\"A FileServiceStub to be used w...
#!/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...
[ [ 8, 0, 0.1257, 0.006, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1377, 0.006, 0, 0.66, 0.0526, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 14, 0, 0.1557, 0.006, 0, 0.66, ...
[ "\"\"\"Blobstore-specific Files API calls.\"\"\"", "from __future__ import with_statement", "__all__ = ['create', 'get_blob_key', 'get_file_name']", "import hashlib", "import urllib", "from google.appengine.api import datastore", "from google.appengine.api import namespace_manager", "from google.appen...
#!/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.0204, 0.0204, 0, 0.66, 0, 80, 0, 1, 0, 0, 80, 0, 0 ], [ 2, 0, 0.2653, 0.4286, 0, 0.66, 0.3333, 889, 0, 2, 1, 0, 0, 0, 2 ], [ 8, 1, 0.1633, 0.1837, 1, 0.03...
[ "import array", "def crc_update(crc, data):\n \"\"\"Update CRC-32C checksum with data.\n\n Args:\n crc: 32-bit checksum to update as long.\n data: byte array, string or iterable over bytes.\n\n Returns:", " \"\"\"Update CRC-32C checksum with data.\n\n Args:\n crc: 32-bit checksum to update as long...
#!/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...
[ [ 8, 0, 0.7778, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.8889, 0.037, 0, 0.66, 0.25, 107, 0, 1, 0, 0, 107, 0, 0 ], [ 1, 0, 0.9259, 0.037, 0, 0.66, ...
[ "\"\"\"Appengine Files API.\"\"\"", "from file import *", "import blobstore", "import gs", "import shuffler" ]
#!/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...
[ [ 8, 0, 0.2222, 0.0463, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3333, 0.0093, 0, 0.66, 0.2, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.3519, 0.0093, 0, 0.66, ...
[ "\"\"\"Logging utilities for use by applications.\n\nClasses defined here:\n AppLogsHandler: StreamHandler subclass\n\"\"\"", "import logging", "from google.appengine import runtime", "from google.appengine.api import logservice", "NEWLINE_REPLACEMENT = \"\\0\"", "class AppLogsHandler(logging.Handler):\n...
#!/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...
[ [ 8, 0, 0.1296, 0.0062, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.179, 0.0062, 0, 0.66, 0.1111, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.2037, 0.0062, 0, 0.66,...
[ "\"\"\"Base class for implementing API proxy stubs.\"\"\"", "from __future__ import with_statement", "import random", "import threading", "from google.appengine.api import apiproxy_rpc", "from google.appengine.api import request_info", "from google.appengine.runtime import apiproxy_errors", "MAX_REQUE...
#!/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...
[ [ 8, 0, 0.321, 0.0123, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.358, 0.0123, 0, 0.66, 0.125, 61, 0, 1, 0, 0, 61, 0, 0 ], [ 1, 0, 0.3827, 0.0123, 0, 0.66, ...
[ "\"\"\"A wrapper around the generated Groc parser and lexer.\"\"\"", "import google", "import antlr3", "import GrocLexer", "import GrocParser", "class GrocException(Exception):\n \"\"\"An error occurred while parsing the groc input string.\"\"\"", " \"\"\"An error occurred while parsing the groc input...
#!/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...
[ [ 8, 0, 0.0532, 0.0216, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0681, 0.0017, 0, 0.66, 0.0714, 917, 0, 1, 0, 0, 917, 0, 0 ], [ 1, 0, 0.0698, 0.0017, 0, 0.66...
[ "\"\"\"Implementation of scheduling for Groc format schedules.\n\nA Groc schedule looks like '1st,2nd monday 9:00', or 'every 20 mins'. This\nmodule takes a parsed schedule (produced by Antlr) and creates objects that\ncan produce times that match this schedule.\n\nA parsed schedule is one of two types - an Interva...
#!/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...
[ [ 8, 0, 1, 0.0588, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"this file is needed to make this a package\"" ]
#!/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.0079, 0.0004, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0083, 0.0004, 0, 0.66, 0.0204, 218, 0, 1, 0, 0, 218, 0, 0 ], [ 1, 0, 0.0088, 0.0004, 0, ...
[ "import sys", "from antlr3 import *", "from antlr3.compat import set, frozenset", "HIDDEN = BaseRecognizer.HIDDEN", "THIRD=13", "SEPTEMBER=36", "WEDNESDAY=22", "JULY=34", "APRIL=31", "DIGITS=8", "OCTOBER=37", "MAY=32", "DAY=19", "MARCH=30", "EOF=-1", "MONTH=27", "FRIDAY=24", "UNKNO...
#!/usr/bin/python2.4 # # Copyright 2008 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...
[ [ 8, 0, 0.1393, 0.0082, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1557, 0.0082, 0, 0.66, 0.0833, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1639, 0.0082, 0, 0.66...
[ "\"\"\"Code related to line charts.\"\"\"", "import copy", "import warnings", "from google.appengine._internal.graphy import common", "class LineStyle(object):\n\n \"\"\"Represents the style for a line on a line chart. Also provides some\n convenient presets.\n\n Object attributes (Passed directly to th...
#!/usr/bin/python2.4 # # Copyright 2008 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...
[ [ 8, 0, 0.1224, 0.0729, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0.2005, 0.0729, 0, 0.66, 0.2, 545, 0, 1, 0, 0, 0, 0, 2 ], [ 8, 1, 0.1771, 0.0156, 1, 0.37, ...
[ "\"\"\"This module contains various formatters which can help format a chart\nobject. To use these, add them to your chart's list of formatters. For\nexample:\n chart.formatters.append(InlineLegend)\n chart.formatters.append(LabelSeparator(right=8))\n\nFeel free to write your own formatter. Formatters are just...
def _IsColor(color): """Try to determine if color is a hex color string. Labels that look like hex colors will match too, unfortunately.""" if not isinstance(color, basestring): return False color = color.strip('#') if len(color) != 3 and len(color) != 6: return False hex_letters = '0123456789abcdef...
[ [ 2, 0, 0.5385, 1, 0, 0.66, 0, 459, 0, 1, 1, 0, 0, 0, 4 ], [ 8, 1, 0.1923, 0.1538, 1, 0.82, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 4, 1, 0.3462, 0.1538, 1, 0.82, 0.1667...
[ "def _IsColor(color):\n \"\"\"Try to determine if color is a hex color string.\n Labels that look like hex colors will match too, unfortunately.\"\"\"\n if not isinstance(color, basestring):\n return False\n color = color.strip('#')\n if len(color) != 3 and len(color) != 6:\n return False", " \"\"\"Tr...
#!/usr/bin/python2.4 # # Copyright 2008 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...
[ [ 8, 0, 0.0994, 0.0058, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1111, 0.0058, 0, 0.66, 0.125, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.117, 0.0058, 0, 0.66, ...
[ "\"\"\"Code related to bar charts.\"\"\"", "import copy", "import warnings", "from google.appengine._internal.graphy import common", "from google.appengine._internal.graphy import util", "class BarsStyle(object):\n \"\"\"Style of a series of bars in a BarChart\n\n Object Attributes:\n color: Hex str...
#!/usr/bin/python2.4 # # Copyright 2008 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...
[ [ 8, 0, 0.0413, 0.0024, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0461, 0.0024, 0, 0.66, 0.1, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.0485, 0.0024, 0, 0.66, ...
[ "\"\"\"Code common to all chart types.\"\"\"", "import copy", "import warnings", "from google.appengine._internal.graphy import formatters", "from google.appengine._internal.graphy import util", "class Marker(object):\n\n \"\"\"Represents an abstract marker, without position. You can attach these to\n ...
#!/usr/bin/python2.4 # # Copyright 2008 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...
[ [ 8, 0, 0.0955, 0.0056, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1067, 0.0056, 0, 0.66, 0.2, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.118, 0.0056, 0, 0.66, ...
[ "\"\"\"Code for pie charts.\"\"\"", "import warnings", "from google.appengine._internal.graphy import common", "from google.appengine._internal.graphy import util", "class Segment(common.DataSeries):\n \"\"\"A single segment of the pie chart.\n\n Object attributes:\n size: relative size of the segment\...
#!/usr/bin/python2.4 # # Copyright 2008 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...
[ [ 8, 0, 0.0783, 0.013, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0913, 0.0043, 0, 0.66, 0.0714, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0957, 0.0043, 0, 0.66,...
[ "\"\"\"Utility functions for working with the Google Chart API.\n\nNot intended for end users, use the methods in __init__ instead.\"\"\"", "import cgi", "import string", "import urllib", "LONG_NAMES = dict(\n client_id='chc',\n size='chs',\n chart_type='cht',\n axis_type='chxt',\n axis_label='chxl',\n...
#!/usr/bin/python2.4 # # Copyright 2008 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...
[ [ 8, 0, 0.0419, 0.007, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0488, 0.0023, 0, 0.66, 0.1429, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0512, 0.0023, 0, 0.66,...
[ "\"\"\"Display objects for the different kinds of charts.\n\nNot intended for end users, use the methods in __init__ instead.\"\"\"", "import warnings", "from google.appengine._internal.graphy.backends.google_chart_api import util", "class BaseChartEncoder(object):\n\n \"\"\"Base class for encoders which tur...
#!/usr/bin/python2.4 # # Copyright 2008 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...
[ [ 8, 0, 0.34, 0.02, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.38, 0.02, 0, 0.66, 0.1111, 542, 0, 1, 0, 0, 542, 0, 0 ], [ 1, 0, 0.4, 0.02, 0, 0.66, 0.2222,...
[ "\"\"\"Backend which can generate charts using the Google Chart API.\"\"\"", "from google.appengine._internal.graphy import line_chart", "from google.appengine._internal.graphy import bar_chart", "from google.appengine._internal.graphy import pie_chart", "from google.appengine._internal.graphy.backends.goog...
__version__='1.0'
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__='1.0'" ]
"""Compatibility stuff""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 mus...
[ [ 8, 0, 0.0208, 0.0208, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.7292, 0.1042, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 1, 0.7083, 0.0208, 1, 0.62, ...
[ "\"\"\"Compatibility stuff\"\"\"", "try:\n set = set\n frozenset = frozenset\nexcept NameError:\n from sets import Set as set, ImmutableSet as frozenset", " set = set", " frozenset = frozenset", " from sets import Set as set, ImmutableSet as frozenset", "try:\n reversed = reversed\nex...
""" @package antlr3.tree @brief ANTLR3 runtime package, treewizard module A utility module to create ASTs at runtime. See <http://www.antlr.org/wiki/display/~admin/2007/07/02/Exploring+Concept+of+TreeWizard> for an overview. Note that the API of the Python implementation is slightly different. """ # begin[licence] #...
[ [ 8, 0, 0.0065, 0.0114, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0637, 0.0016, 0, 0.66, 0.0556, 26, 0, 1, 0, 0, 26, 0, 0 ], [ 1, 0, 0.0654, 0.0016, 0, 0.66, ...
[ "\"\"\" @package antlr3.tree\n@brief ANTLR3 runtime package, treewizard module\n\nA utility module to create ASTs at runtime.\nSee <http://www.antlr.org/wiki/display/~admin/2007/07/02/Exploring+Concept+of+TreeWizard> for an overview. Note that the API of the Python implementation is slightly different.\n\n\"\"\"", ...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
[ [ 8, 0, 0.0175, 0.0175, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5789, 0.0175, 0, 0.66, 0.125, 648, 0, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6667, 0.0175, 0, 0.66,...
[ "\"\"\"ANTLR3 runtime package\"\"\"", "EOF = -1", "DEFAULT_CHANNEL = 0", "HIDDEN_CHANNEL = 99", "EOR_TOKEN_TYPE = 1", "DOWN = 2", "UP = 3", "MIN_TOKEN_TYPE = UP+1", "INVALID_TOKEN_TYPE = 0" ]
""" @package antlr3.tree @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or...
[ [ 8, 0, 0.0014, 0.0025, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0168, 0.0004, 0, 0.66, 0.0417, 26, 0, 4, 0, 0, 26, 0, 0 ], [ 1, 0, 0.0172, 0.0004, 0, 0.66, ...
[ "\"\"\" @package antlr3.tree\n@brief ANTLR3 runtime package, tree module\n\nThis module contains all support classes for AST construction and tree parsers.\n\n\"\"\"", "from google.appengine._internal.antlr3.constants import UP, DOWN, EOF, INVALID_TOKEN_TYPE", "from google.appengine._internal.antlr3.recognizers...
""" @package antlr3.dottreegenerator @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary fo...
[ [ 8, 0, 0.0167, 0.0286, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1952, 0.0048, 0, 0.66, 0.25, 165, 0, 1, 0, 0, 165, 0, 0 ], [ 1, 0, 0.2, 0.0048, 0, 0.66, ...
[ "\"\"\" @package antlr3.dottreegenerator\n@brief ANTLR3 runtime package, tree module\n\nThis module contains all support classes for AST construction and tree parsers.\n\n\"\"\"", "from google.appengine._internal.antlr3.tree import CommonTreeAdaptor", "import stringtemplate3", "class DOTTreeGenerator(object):...
"""ANTLR3 exception hierarchy""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 c...
[ [ 8, 0, 0.0027, 0.0027, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0907, 0.0027, 0, 0.66, 0.0769, 26, 0, 1, 0, 0, 26, 0, 0 ], [ 3, 0, 0.103, 0.011, 0, 0.66, ...
[ "\"\"\"ANTLR3 exception hierarchy\"\"\"", "from google.appengine._internal.antlr3.constants import INVALID_TOKEN_TYPE", "class BacktrackingFailed(Exception):\n \"\"\"@brief Raised to signal failed backtrack attempt\"\"\"\n\n pass", " \"\"\"@brief Raised to signal failed backtrack attempt\"\"\"", "c...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
[ [ 8, 0, 0.0024, 0.0024, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0793, 0.0024, 0, 0.66, 0.1429, 26, 0, 3, 0, 0, 26, 0, 0 ], [ 3, 0, 0.2356, 0.2764, 0, 0.66, ...
[ "\"\"\"ANTLR3 runtime package\"\"\"", "from google.appengine._internal.antlr3.constants import EOF, DEFAULT_CHANNEL, INVALID_TOKEN_TYPE", "class Token(object):\n \"\"\"@brief Abstract token baseclass.\"\"\"\n\n def getText(self):\n \"\"\"@brief Get the text of the token.\n\n Using setter/get...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
[ [ 8, 0, 0.0007, 0.0007, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0227, 0.0007, 0, 0.66, 0.0526, 220, 0, 1, 0, 0, 220, 0, 0 ], [ 1, 0, 0.0234, 0.0007, 0, 0.66...
[ "\"\"\"ANTLR3 runtime package\"\"\"", "import codecs", "from StringIO import StringIO", "from google.appengine._internal.antlr3.constants import DEFAULT_CHANNEL, EOF", "from google.appengine._internal.antlr3.tokens import Token, EOF_TOKEN", "class IntStream(object):\n \"\"\"\n @brief Base interface ...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
[ [ 8, 0, 0.0047, 0.0047, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1549, 0.0047, 0, 0.66, 0.3333, 26, 0, 1, 0, 0, 26, 0, 0 ], [ 1, 0, 0.1596, 0.0047, 0, 0.66, ...
[ "\"\"\"ANTLR3 runtime package\"\"\"", "from google.appengine._internal.antlr3.constants import EOF", "from google.appengine._internal.antlr3.exceptions import NoViableAltException, BacktrackingFailed", "class DFA(object):\n \"\"\"@brief A DFA implemented as a set of transition tables.\n\n Any state that...
#!/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...
[]
[]
""" Common checksum routines (used in multiple localflavor/ cases, for example). """ __all__ = ['luhn',] LUHN_ODD_LOOKUP = (0, 2, 4, 6, 8, 1, 3, 5, 7, 9) # sum_of_digits(index * 2) def luhn(candidate): """ Checks a candidate number for validity according to the Luhn algorithm (used in validation of, for ...
[ [ 8, 0, 0.0909, 0.1364, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2273, 0.0455, 0, 0.66, 0.3333, 272, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.3182, 0.0455, 0, 0.66...
[ "\"\"\"\nCommon checksum routines (used in multiple localflavor/ cases, for example).\n\"\"\"", "__all__ = ['luhn',]", "LUHN_ODD_LOOKUP = (0, 2, 4, 6, 8, 1, 3, 5, 7, 9) # sum_of_digits(index * 2)", "def luhn(candidate):\n \"\"\"\n Checks a candidate number for validity according to the Luhn\n algorit...
"Commonly-used date structures" from google.appengine._internal.django.utils.translation import ugettext_lazy as _ WEEKDAYS = { 0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'), 5:_('Saturday'), 6:_('Sunday') } WEEKDAYS_ABBR = { 0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu')...
[ [ 8, 0, 0.0303, 0.0303, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0909, 0.0303, 0, 0.66, 0.125, 442, 0, 1, 0, 0, 442, 0, 0 ], [ 14, 0, 0.197, 0.1212, 0, 0.66,...
[ "\"Commonly-used date structures\"", "from google.appengine._internal.django.utils.translation import ugettext_lazy as _", "WEEKDAYS = {\n 0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'),\n 5:_('Saturday'), 6:_('Sunday')\n}", "WEEKDAYS_ABBR = {\n 0:_('Mon'), 1:_('Tue')...
import imp import os import sys def module_has_submodule(package, module_name): """See if 'module' is in 'package'.""" name = ".".join([package.__name__, module_name]) try: # None indicates a cached miss; see mark_miss() in Python/import.c. return sys.modules[name] is not None except K...
[ [ 1, 0, 0.0159, 0.0159, 0, 0.66, 0, 201, 0, 1, 0, 0, 201, 0, 0 ], [ 1, 0, 0.0317, 0.0159, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0476, 0.0159, 0, ...
[ "import imp", "import os", "import sys", "def module_has_submodule(package, module_name):\n \"\"\"See if 'module' is in 'package'.\"\"\"\n name = \".\".join([package.__name__, module_name])\n try:\n # None indicates a cached miss; see mark_miss() in Python/import.c.\n return sys.modules...
""" termcolors.py """ color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = dict([(color_names[x], '3%s' % x) for x in range(8)]) background = dict([(color_names[x], '4%s' % x) for x in range(8)]) RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink': '5', 'rever...
[ [ 8, 0, 0.0101, 0.0152, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0253, 0.0051, 0, 0.66, 0.0769, 708, 0, 0, 0, 0, 0, 8, 0 ], [ 14, 0, 0.0303, 0.0051, 0, 0.66...
[ "\"\"\"\ntermcolors.py\n\"\"\"", "color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white')", "foreground = dict([(color_names[x], '3%s' % x) for x in range(8)])", "background = dict([(color_names[x], '4%s' % x) for x in range(8)])", "RESET = '0'", "opt_dict = {'bold': '1', 'un...
"""Thread-local objects (Note that this module provides a Python version of thread threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the local class from threading.) Thread-local objects support the management of thread-local dat...
[ [ 8, 0, 0.2812, 0.5583, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6146, 0.0833, 0, 0.66, 0.25, 595, 0, 1, 0, 0, 186, 0, 10 ], [ 14, 1, 0.5792, 0.0042, 1, 0.23...
[ "\"\"\"Thread-local objects\n\n(Note that this module provides a Python version of thread\n threading.local class. Depending on the version of Python you're\n using, there may be a faster one available. You should always import\n the local class from threading.)\n\nThread-local objects support the management of t...
""" Code used in a couple of places to work with the current thread's environment. Current users include i18n and request prefix handling. """ try: import threading currentThread = threading.currentThread except ImportError: def currentThread(): return "no threading"
[ [ 8, 0, 0.2083, 0.3333, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.7083, 0.5, 0, 0.66, 1, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.5833, 0.0833, 1, 0.99, 0, ...
[ "\"\"\"\nCode used in a couple of places to work with the current thread's environment.\nCurrent users include i18n and request prefix handling.\n\"\"\"", "try:\n import threading\n currentThread = threading.currentThread\nexcept ImportError:\n def currentThread():\n return \"no threading\"", " ...
""" PHP date() style date formatting See http://www.php.net/date for format strings Usage: >>> import datetime >>> d = datetime.datetime.now() >>> df = DateFormat(d) >>> print df.format('jS F Y H:i') 7th October 2003 11:39 >>> """ import re import time import calendar from google.appengine._internal.django.utils.date...
[ [ 8, 0, 0.0227, 0.042, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.049, 0.0035, 0, 0.66, 0.0714, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0524, 0.0035, 0, 0.66, ...
[ "\"\"\"\nPHP date() style date formatting\nSee http://www.php.net/date for format strings\n\nUsage:\n>>> import datetime\n>>> d = datetime.datetime.now()\n>>> df = DateFormat(d)", "import re", "import time", "import calendar", "from google.appengine._internal.django.utils.dates import MONTHS, MONTHS_3, MONT...
import datetime import time from google.appengine._internal.django.utils.tzinfo import LocalTimezone from google.appengine._internal.django.utils.translation import ungettext, ugettext def timesince(d, now=None): """ Takes two datetime objects and returns the time between d and now as a nicely formatted s...
[ [ 1, 0, 0.0145, 0.0145, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.029, 0.0145, 0, 0.66, 0.2, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.058, 0.0145, 0, 0.66,...
[ "import datetime", "import time", "from google.appengine._internal.django.utils.tzinfo import LocalTimezone", "from google.appengine._internal.django.utils.translation import ungettext, ugettext", "def timesince(d, now=None):\n \"\"\"\n Takes two datetime objects and returns the time between d and now...
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
[ [ 1, 0, 0.2605, 0.0084, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 7, 0, 0.2899, 0.0336, 0, 0.66, 0.0909, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.2857, 0.0084, 1, 0.55...
[ "import os, sys, time", "try:\n import thread\nexcept ImportError:\n import dummy_thread as thread", " import thread", " import dummy_thread as thread", "try:\n import threading\nexcept ImportError:\n pass", " import threading", "RUN_RELOADER = True", "_mtimes = {}", "_win = (sy...
import re import sys import urllib from email.Utils import formatdate from google.appengine._internal.django.utils.encoding import smart_str, force_unicode from google.appengine._internal.django.utils.functional import allow_lazy ETAG_MATCH = re.compile(r'(?:W/)?"((?:\\.|[^"])*)"') def urlquote(url, safe='/'): "...
[ [ 1, 0, 0.0077, 0.0077, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0154, 0.0077, 0, 0.66, 0.0588, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0231, 0.0077, 0, ...
[ "import re", "import sys", "import urllib", "from email.Utils import formatdate", "from google.appengine._internal.django.utils.encoding import smart_str, force_unicode", "from google.appengine._internal.django.utils.functional import allow_lazy", "ETAG_MATCH = re.compile(r'(?:W/)?\"((?:\\\\.|[^\"])*)\"...
# License for code in this file that was taken from Python 2.5. # PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # -------------------------------------------- # # 1. This LICENSE AGREEMENT is between the Python Software Foundation # ("PSF"), and the Individual or Organization ("Licensee") accessing and # otherwise usin...
[ [ 2, 0, 0.1485, 0.0109, 0, 0.66, 0, 553, 0, 3, 1, 0, 0, 0, 2 ], [ 2, 1, 0.1485, 0.0054, 1, 0.62, 0, 144, 0, 2, 1, 0, 0, 0, 2 ], [ 13, 2, 0.1499, 0.0027, 2, 0.19, ...
[ "def curry(_curried_func, *args, **kwargs):\n def _curried(*moreargs, **morekwargs):\n return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))\n return _curried", " def _curried(*moreargs, **morekwargs):\n return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))", ...
""" Utilities for XML generation/parsing. """ from xml.sax.saxutils import XMLGenerator class SimplerXMLGenerator(XMLGenerator): def addQuickElement(self, name, contents=None, attrs=None): "Convenience method for adding an element with no children" if attrs is None: attrs = {} self.startEl...
[ [ 8, 0, 0.1429, 0.2143, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3571, 0.0714, 0, 0.66, 0.5, 759, 0, 1, 0, 0, 759, 0, 0 ], [ 3, 0, 0.75, 0.5714, 0, 0.66, ...
[ "\"\"\"\nUtilities for XML generation/parsing.\n\"\"\"", "from xml.sax.saxutils import XMLGenerator", "class SimplerXMLGenerator(XMLGenerator):\n def addQuickElement(self, name, contents=None, attrs=None):\n \"Convenience method for adding an element with no children\"\n if attrs is None: attrs...
# Performance note: I benchmarked this code using a set instead of # a list for the stopwords and was surprised to find that the list # performed /better/ than the set - maybe because it's only a small # list. stopwords = ''' i a an are as at be by for from how in is it of on or that the this to was what when where ''...
[ [ 14, 0, 0.4524, 0.6429, 0, 0.66, 0, 557, 3, 0, 0, 0, 908, 10, 1 ], [ 2, 0, 0.8929, 0.1905, 0, 0.66, 1, 492, 0, 1, 1, 0, 0, 0, 4 ], [ 8, 1, 0.8333, 0.0238, 1, 0.89,...
[ "stopwords = '''\ni\na\nan\nare\nas\nat\nbe", "def strip_stopwords(sentence):\n \"Removes stopwords - also normalizes whitespace\"\n words = sentence.split()\n sentence = []\n for word in words:\n if word.lower() not in stopwords:\n sentence.append(word)\n return u' '.join(sentenc...
""" Functions for working with "safe strings": strings that can be displayed safely without further escaping in HTML. Marking something as a "safe string" means that the producer of the string has already turned characters that should not be interpreted by the HTML engine (e.g. '<') into the appropriate entities. """ f...
[ [ 8, 0, 0.0294, 0.0504, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0588, 0.0084, 0, 0.66, 0.1111, 118, 0, 2, 0, 0, 118, 0, 0 ], [ 3, 0, 0.0798, 0.0168, 0, 0.66...
[ "\"\"\"\nFunctions for working with \"safe strings\": strings that can be displayed safely\nwithout further escaping in HTML. Marking something as a \"safe string\" means\nthat the producer of the string has already turned characters that should not\nbe interpreted by the HTML engine (e.g. '<') into the appropriate...
""" Synchronization primitives: - reader-writer lock (preference to writers) (Contributed to Django by eugene@lazutkin.com) """ try: import threading except ImportError: import dummy_threading as threading class RWLock: """ Classic implementation of reader-writer lock with preference to writers....
[ [ 8, 0, 0.046, 0.0805, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.1207, 0.046, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.1149, 0.0115, 1, 0.51, 0, ...
[ "\"\"\"\nSynchronization primitives:\n\n - reader-writer lock (preference to writers)\n\n(Contributed to Django by eugene@lazutkin.com)\n\"\"\"", "try:\n import threading\nexcept ImportError:\n import dummy_threading as threading", " import threading", " import dummy_threading as threading", ...
"Implementation of tzinfo classes for use with datetime.datetime." import time from datetime import timedelta, tzinfo from google.appengine._internal.django.utils.encoding import smart_unicode, smart_str, DEFAULT_LOCALE_ENCODING class FixedOffset(tzinfo): "Fixed offset in minutes east from UTC." def __init__(...
[ [ 8, 0, 0.013, 0.013, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.039, 0.013, 0, 0.66, 0.2, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0519, 0.013, 0, 0.66, 0....
[ "\"Implementation of tzinfo classes for use with datetime.datetime.\"", "import time", "from datetime import timedelta, tzinfo", "from google.appengine._internal.django.utils.encoding import smart_unicode, smart_str, DEFAULT_LOCALE_ENCODING", "class FixedOffset(tzinfo):\n \"Fixed offset in minutes east f...
import decimal import datetime from google.appengine._internal.django.conf import settings from google.appengine._internal.django.utils.translation import get_language, to_locale, check_for_language from google.appengine._internal.django.utils.importlib import import_module from google.appengine._internal.django.utils...
[ [ 1, 0, 0.0063, 0.0063, 0, 0.66, 0, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.0126, 0.0063, 0, 0.66, 0.0526, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0252, 0.0063, 0, ...
[ "import decimal", "import datetime", "from google.appengine._internal.django.conf import settings", "from google.appengine._internal.django.utils.translation import get_language, to_locale, check_for_language", "from google.appengine._internal.django.utils.importlib import import_module", "from google.app...
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ # Mapping of an escape character to a r...
[ [ 8, 0, 0.0122, 0.0213, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0534, 0.0366, 0, 0.66, 0.1, 775, 0, 0, 0, 0, 0, 6, 0 ], [ 3, 0, 0.0838, 0.0183, 0, 0.66, ...
[ "\"\"\"\nFunctions for reversing a regular expression (used in reverse URL resolving).\nUsed internally by Django and not intended for external use.\n\nThis is not, and is not intended to be, a complete reg-exp decompiler. It\nshould be good enough for a large class of URLS, however.\n\"\"\"", "ESCAPE_MAPPINGS = ...
import re from google.appengine._internal.django.utils.encoding import force_unicode from google.appengine._internal.django.utils.functional import allow_lazy from google.appengine._internal.django.utils.translation import ugettext_lazy from htmlentitydefs import name2codepoint # Capitalizes the first letter of a stri...
[ [ 1, 0, 0.0035, 0.0035, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0071, 0.0035, 0, 0.66, 0.0286, 610, 0, 1, 0, 0, 610, 0, 0 ], [ 1, 0, 0.0106, 0.0035, 0, ...
[ "import re", "from google.appengine._internal.django.utils.encoding import force_unicode", "from google.appengine._internal.django.utils.functional import allow_lazy", "from google.appengine._internal.django.utils.translation import ugettext_lazy", "from htmlentitydefs import name2codepoint", "capfirst = ...
import os from os.path import join, normcase, normpath, abspath, isabs, sep from google.appengine._internal.django.utils.encoding import force_unicode # Define our own abspath function that can handle joining # unicode paths to a current working directory that has non-ASCII # characters in it. This isn't necessary on...
[ [ 1, 0, 0.0222, 0.0222, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0444, 0.0222, 0, 0.66, 0.25, 79, 0, 6, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0667, 0.0222, 0, 0.66...
[ "import os", "from os.path import join, normcase, normpath, abspath, isabs, sep", "from google.appengine._internal.django.utils.encoding import force_unicode", "if os.name == 'nt':\n abspathu = abspath\nelse:\n def abspathu(path):\n \"\"\"\n Version of os.path.abspath that uses the unicode...
"""Implementation of JSONEncoder """ import re c_encode_basestring_ascii = None c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])') HAS_UTF8 = re.compile(r'[\x80-\xff]') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\f', ...
[ [ 8, 0, 0.0035, 0.0047, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.007, 0.0023, 0, 0.66, 0.0667, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 14, 0, 0.0117, 0.0023, 0, 0.66...
[ "\"\"\"Implementation of JSONEncoder\n\"\"\"", "import re", "c_encode_basestring_ascii = None", "c_make_encoder = None", "ESCAPE = re.compile(r'[\\x00-\\x1f\\\\\"\\b\\f\\n\\r\\t]')", "ESCAPE_ASCII = re.compile(r'([\\\\\"]|[^\\ -~])')", "HAS_UTF8 = re.compile(r'[\\x80-\\xff]')", "ESCAPE_DCT = {\n '\...
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
[ [ 8, 0, 0.1433, 0.2837, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3009, 0.0029, 0, 0.66, 0.2, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3066, 0.0029, 0, 0.66, ...
[ "r\"\"\"JSON (JavaScript Object Notation) <http://json.org> is a subset of\nJavaScript syntax (ECMA-262 3rd edition) used as a lightweight data\ninterchange format.\n\n:mod:`simplejson` exposes an API familiar to users of the standard library\n:mod:`marshal` and :mod:`pickle` modules. It is the externally maintaine...
"""JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scan...
[ [ 8, 0, 0.0231, 0.0308, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0462, 0.0154, 0, 0.66, 0.1667, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 7, 0, 0.0846, 0.0615, 0, 0.66...
[ "\"\"\"JSON token scanner\n\"\"\"", "import re", "try:\n from simplejson._speedups import make_scanner as c_make_scanner\nexcept ImportError:\n c_make_scanner = None", " from simplejson._speedups import make_scanner as c_make_scanner", " c_make_scanner = None", "__all__ = ['make_scanner']", ...
""" A class for storing a tree graph. Primarily used for filter constructs in the ORM. """ from google.appengine._internal.django.utils.copycompat import deepcopy class Node(object): """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being ei...
[ [ 8, 0, 0.0163, 0.0261, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0392, 0.0065, 0, 0.66, 0.5, 190, 0, 1, 0, 0, 190, 0, 0 ], [ 3, 0, 0.5229, 0.9477, 0, 0.66, ...
[ "\"\"\"\nA class for storing a tree graph. Primarily used for filter constructs in the\nORM.\n\"\"\"", "from google.appengine._internal.django.utils.copycompat import deepcopy", "class Node(object):\n \"\"\"\n A single internal node in the tree graph. A Node should be viewed as a\n connection (the root...
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import itertools # Fallback for Python 2.4, Python 2.5 def product(*args, **kwds): """ Taken from http://docs...
[ [ 8, 0, 0.0667, 0.1111, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1556, 0.0222, 0, 0.66, 0.1667, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 2, 0, 0.3444, 0.2667, 0, 0.66...
[ "\"\"\"\nProviding iterator functions that are not in all version of Python we support.\nWhere possible, we try to use the system-native version and only fall back to\nthese implementations if necessary.\n\"\"\"", "import itertools", "def product(*args, **kwds):\n \"\"\"\n Taken from http://docs.python.or...
from google.appengine._internal import django import os.path import re def get_svn_revision(path=None): """ Returns the SVN revision in the form SVN-XXXX, where XXXX is the revision number. Returns SVN-unknown if anything goes wrong, such as an unexpected format of internal SVN files. If path...
[ [ 1, 0, 0.0238, 0.0238, 0, 0.66, 0, 582, 0, 1, 0, 0, 582, 0, 0 ], [ 1, 0, 0.0476, 0.0238, 0, 0.66, 0.3333, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0714, 0.0238, 0, 0....
[ "from google.appengine._internal import django", "import os.path", "import re", "def get_svn_revision(path=None):\n \"\"\"\n Returns the SVN revision in the form SVN-XXXX,\n where XXXX is the revision number.\n\n Returns SVN-unknown if anything goes wrong, such as an unexpected\n format of inte...
from google.appengine._internal.django.conf import settings from google.appengine._internal.django.utils.safestring import mark_safe def format(number, decimal_sep, decimal_pos, grouping=0, thousand_sep=''): """ Gets a number (as a number or string), and returns it as a string, using formats definied as a...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 434, 0, 1, 0, 0, 434, 0, 0 ], [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0.5, 108, 0, 1, 0, 0, 108, 0, 0 ], [ 2, 0, 0.5426, 0.8936, 0, 0.6...
[ "from google.appengine._internal.django.conf import settings", "from google.appengine._internal.django.utils.safestring import mark_safe", "def format(number, decimal_sep, decimal_pos, grouping=0, thousand_sep=''):\n \"\"\"\n Gets a number (as a number or string), and returns it as a string,\n using fo...
"""HTML utilities suitable for global use.""" import re import string from google.appengine._internal.django.utils.safestring import SafeData, mark_safe from google.appengine._internal.django.utils.encoding import force_unicode from google.appengine._internal.django.utils.functional import allow_lazy from google.appe...
[ [ 8, 0, 0.0053, 0.0053, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0159, 0.0053, 0, 0.66, 0.0263, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0212, 0.0053, 0, 0.66...
[ "\"\"\"HTML utilities suitable for global use.\"\"\"", "import re", "import string", "from google.appengine._internal.django.utils.safestring import SafeData, mark_safe", "from google.appengine._internal.django.utils.encoding import force_unicode", "from google.appengine._internal.django.utils.functional ...
# Taken from Python 2.7 with permission from/by the original author. import sys def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" if not hasattr(package, 'rindex'): raise ValueError("'package' not set to a string") dot = len(package) for x in ...
[ [ 1, 0, 0.0556, 0.0278, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.2639, 0.3333, 0, 0.66, 0.5, 132, 0, 3, 1, 0, 0, 0, 6 ], [ 8, 1, 0.1389, 0.0278, 1, 0.01,...
[ "import sys", "def _resolve_name(name, package, level):\n \"\"\"Return the absolute name of the module to be imported.\"\"\"\n if not hasattr(package, 'rindex'):\n raise ValueError(\"'package' not set to a string\")\n dot = len(package)\n for x in xrange(level, 1, -1):\n try:\n ...
""" Fixes Python 2.4's failure to deepcopy unbound functions. """ import copy import types # Monkeypatch copy's deepcopy registry to handle functions correctly. if (hasattr(copy, '_deepcopy_dispatch') and types.FunctionType not in copy._deepcopy_dispatch): copy._deepcopy_dispatch[types.FunctionType] = copy._deepc...
[ [ 8, 0, 0.1429, 0.2143, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3571, 0.0714, 0, 0.66, 0.25, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.4286, 0.0714, 0, 0.66, ...
[ "\"\"\"\nFixes Python 2.4's failure to deepcopy unbound functions.\n\"\"\"", "import copy", "import types", "if (hasattr(copy, '_deepcopy_dispatch') and types.FunctionType not in copy._deepcopy_dispatch):\n copy._deepcopy_dispatch[types.FunctionType] = copy._deepcopy_atomic", " copy._deepcopy_dispatch...
""" The md5 and sha modules are deprecated since Python 2.5, replaced by the hashlib module containing both hash algorithms. Here, we provide a common interface to the md5 and sha constructors, depending on system version. """ import sys if sys.version_info >= (2, 5): import hashlib md5_constructor = hashlib.m...
[ [ 8, 0, 0.15, 0.25, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.35, 0.05, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.7, 0.65, 0, 0.66, 1, 0, ...
[ "\"\"\"\nThe md5 and sha modules are deprecated since Python 2.5, replaced by the\nhashlib module containing both hash algorithms. Here, we provide a common\ninterface to the md5 and sha constructors, depending on system version.\n\"\"\"", "import sys", "if sys.version_info >= (2, 5):\n import hashlib\n m...
from types import GeneratorType from google.appengine._internal.django.utils.copycompat import deepcopy class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more th...
[ [ 1, 0, 0.0021, 0.0021, 0, 0.66, 0, 209, 0, 1, 0, 0, 209, 0, 0 ], [ 1, 0, 0.0063, 0.0021, 0, 0.66, 0.125, 190, 0, 1, 0, 0, 190, 0, 0 ], [ 3, 0, 0.0888, 0.1543, 0, 0...
[ "from types import GeneratorType", "from google.appengine._internal.django.utils.copycompat import deepcopy", "class MergeDict(object):\n \"\"\"\n A simple class for creating new \"virtual\" dictionaries that actually look\n up values in more than one dictionary, passed in the constructor.\n\n If a ...
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from google.appengine._internal.django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title=u"Poynter E-Media Tidbits", ... link=u"http://www.poynter.org/column.asp?id=31", ... description=u...
[ [ 8, 0, 0.0336, 0.0645, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0699, 0.0027, 0, 0.66, 0.0714, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0726, 0.0027, 0, 0.66...
[ "\"\"\"\nSyndication feed generation library -- used for generating RSS, etc.\n\nSample usage:\n\n>>> from google.appengine._internal.django.utils import feedgenerator\n>>> feed = feedgenerator.Rss201rev2Feed(\n... title=u\"Poynter E-Media Tidbits\",", "import datetime", "import urlparse", "from google.ap...
# Python's datetime strftime doesn't handle dates before 1900. # These classes override date and datetime to support the formatting of a date # through its full "proleptic Gregorian" date range. # # Based on code submitted to comp.lang.python by Andrew Dalke # # >>> datetime_safe.date(1850, 8, 2).strftime("%Y/%m/%d was...
[ [ 1, 0, 0.1124, 0.0112, 0, 0.66, 0, 426, 0, 2, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1236, 0.0112, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1348, 0.0112, 0, ...
[ "from datetime import date as real_date, datetime as real_datetime", "import re", "import time", "class date(real_date):\n def strftime(self, fmt):\n return strftime(self, fmt)", " def strftime(self, fmt):\n return strftime(self, fmt)", " return strftime(self, fmt)", "class da...
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. import warnings from google.appengine._internal.django.conf import settings from google.appe...
[ [ 1, 0, 0.0694, 0.0139, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0833, 0.0139, 0, 0.66, 0.0526, 434, 0, 1, 0, 0, 434, 0, 0 ], [ 1, 0, 0.0972, 0.0139, 0, ...
[ "import warnings", "from google.appengine._internal.django.conf import settings", "from google.appengine._internal.django.utils.encoding import force_unicode", "from google.appengine._internal.django.utils.safestring import mark_safe, SafeData", "def ngettext(singular, plural, number):\n if number == 1: ...
""" Internationalization support. """ from google.appengine._internal.django.utils.encoding import force_unicode from google.appengine._internal.django.utils.functional import lazy, curry __all__ = ['gettext', 'gettext_noop', 'gettext_lazy', 'ngettext', 'ngettext_lazy', 'string_concat', 'activate', 'deactivat...
[ [ 8, 0, 0.0192, 0.0288, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0385, 0.0096, 0, 0.66, 0.0345, 610, 0, 1, 0, 0, 610, 0, 0 ], [ 1, 0, 0.0481, 0.0096, 0, 0.66...
[ "\"\"\"\nInternationalization support.\n\"\"\"", "from google.appengine._internal.django.utils.encoding import force_unicode", "from google.appengine._internal.django.utils.functional import lazy, curry", "__all__ = ['gettext', 'gettext_noop', 'gettext_lazy', 'ngettext',\n 'ngettext_lazy', 'string_conc...
""" This module contains helper functions for controlling caching. It does so by managing the "Vary" header of responses. It includes functions to patch the header of response objects directly and decorators that change functions to do that header-patching themselves. For information on the Vary header, see: http...
[ [ 8, 0, 0.0417, 0.0789, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0877, 0.0044, 0, 0.66, 0.0455, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0921, 0.0044, 0, 0.66...
[ "\"\"\"\nThis module contains helper functions for controlling caching. It does so by\nmanaging the \"Vary\" header of responses. It includes functions to patch the\nheader of response objects directly and decorators that change functions to do\nthat header-patching themselves.\n\nFor information on the Vary header...
import re from google.appengine._internal.django.template import Node, Variable, VariableNode, _render_value_in_context from google.appengine._internal.django.template import TemplateSyntaxError, TokenParser, Library from google.appengine._internal.django.template import TOKEN_TEXT, TOKEN_VAR from google.appengine._in...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0109, 0.0036, 0, 0.66, 0.0476, 411, 0, 4, 0, 0, 411, 0, 0 ], [ 1, 0, 0.0146, 0.0036, 0, ...
[ "import re", "from google.appengine._internal.django.template import Node, Variable, VariableNode, _render_value_in_context", "from google.appengine._internal.django.template import TemplateSyntaxError, TokenParser, Library", "from google.appengine._internal.django.template import TOKEN_TEXT, TOKEN_VAR", "f...
from google.appengine._internal.django.template import Library, Node, TemplateSyntaxError, Variable, VariableDoesNotExist from google.appengine._internal.django.template import resolve_variable from google.appengine._internal.django.core.cache import cache from google.appengine._internal.django.utils.encoding import fo...
[ [ 1, 0, 0.0159, 0.0159, 0, 0.66, 0, 411, 0, 5, 0, 0, 411, 0, 0 ], [ 1, 0, 0.0317, 0.0159, 0, 0.66, 0.1111, 411, 0, 1, 0, 0, 411, 0, 0 ], [ 1, 0, 0.0476, 0.0159, 0, ...
[ "from google.appengine._internal.django.template import Library, Node, TemplateSyntaxError, Variable, VariableDoesNotExist", "from google.appengine._internal.django.template import resolve_variable", "from google.appengine._internal.django.core.cache import cache", "from google.appengine._internal.django.util...
# This module is DEPRECATED! # # You should no longer be using django.template_loader. # # Use django.template.loader instead. from google.appengine._internal.django.template.loader import *
[ [ 1, 0, 1, 0.1429, 0, 0.66, 0, 679, 0, 1, 0, 0, 679, 0, 0 ] ]
[ "from google.appengine._internal.django.template.loader import *" ]
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ from StringIO import StringIO import decimal import yaml from google.appengine._internal.django.db import models from google.appengine._internal.django.core.serializers.python import Serializer as PythonSerializer from...
[ [ 8, 0, 0.0536, 0.0893, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.125, 0.0179, 0, 0.66, 0.1, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.1429, 0.0179, 0, 0.66, ...
[ "\"\"\"\nYAML serializer.\n\nRequires PyYaml (http://pyyaml.org/), but that's checked for in __init__.\n\"\"\"", "from StringIO import StringIO", "import decimal", "import yaml", "from google.appengine._internal.django.db import models", "from google.appengine._internal.django.core.serializers.python impo...
""" Serialize data to/from JSON """ import datetime import decimal from StringIO import StringIO from google.appengine._internal.django.core.serializers.python import Serializer as PythonSerializer from google.appengine._internal.django.core.serializers.python import Deserializer as PythonDeserializer from google.app...
[ [ 8, 0, 0.0323, 0.0484, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0806, 0.0161, 0, 0.66, 0.0909, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0968, 0.0161, 0, 0.66...
[ "\"\"\"\nSerialize data to/from JSON\n\"\"\"", "import datetime", "import decimal", "from StringIO import StringIO", "from google.appengine._internal.django.core.serializers.python import Serializer as PythonSerializer", "from google.appengine._internal.django.core.serializers.python import Deserializer a...
""" XML serializer. """ from google.appengine._internal.django.conf import settings from google.appengine._internal.django.core.serializers import base from google.appengine._internal.django.db import models, DEFAULT_DB_ALIAS from google.appengine._internal.django.utils.xmlutils import SimplerXMLGenerator from google....
[ [ 8, 0, 0.0068, 0.0102, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0169, 0.0034, 0, 0.66, 0.1111, 434, 0, 1, 0, 0, 434, 0, 0 ], [ 1, 0, 0.0203, 0.0034, 0, 0.66...
[ "\"\"\"\nXML serializer.\n\"\"\"", "from google.appengine._internal.django.conf import settings", "from google.appengine._internal.django.core.serializers import base", "from google.appengine._internal.django.db import models, DEFAULT_DB_ALIAS", "from google.appengine._internal.django.utils.xmlutils import ...
""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from google.appengine._internal.django.conf import settings from google.appengine._internal.django.core.serializers import base ...
[ [ 8, 0, 0.0211, 0.0352, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0493, 0.007, 0, 0.66, 0.1429, 434, 0, 1, 0, 0, 434, 0, 0 ], [ 1, 0, 0.0563, 0.007, 0, 0.66, ...
[ "\"\"\"\nA Python \"serializer\". Doesn't do much serializing per se -- just converts to\nand from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for\nother serializers.\n\"\"\"", "from google.appengine._internal.django.conf import settings", "from google.appengine._internal.django.cor...
""" Module for abstract serializer/unserializer base classes. """ from StringIO import StringIO from google.appengine._internal.django.db import models from google.appengine._internal.django.utils.encoding import smart_str, smart_unicode from google.appengine._internal.django.utils import datetime_safe class Seriali...
[ [ 8, 0, 0.0116, 0.0174, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0291, 0.0058, 0, 0.66, 0.1111, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.0407, 0.0058, 0, 0.66...
[ "\"\"\"\nModule for abstract serializer/unserializer base classes.\n\"\"\"", "from StringIO import StringIO", "from google.appengine._internal.django.db import models", "from google.appengine._internal.django.utils.encoding import smart_str, smart_unicode", "from google.appengine._internal.django.utils impo...
""" Interfaces for serializing Django objects. Usage:: from google.appengine._internal.django.core import serializers json = serializers.serialize("json", some_query_set) objects = list(serializers.deserialize("json", json)) To add your own serializers, use the SERIALIZATION_MODULES setting:: SERIAL...
[ [ 8, 0, 0.0769, 0.1453, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1624, 0.0085, 0, 0.66, 0.0714, 434, 0, 1, 0, 0, 434, 0, 0 ], [ 1, 0, 0.1709, 0.0085, 0, 0.66...
[ "\"\"\"\nInterfaces for serializing Django objects.\n\nUsage::\n\n from google.appengine._internal.django.core import serializers\n json = serializers.serialize(\"json\", some_query_set)\n objects = list(serializers.deserialize(\"json\", json))", "from google.appengine._internal.django.conf import settin...
""" A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by RequestContext. """ from google.appe...
[ [ 8, 0, 0.0441, 0.0784, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.098, 0.0098, 0, 0.66, 0.0909, 434, 0, 1, 0, 0, 434, 0, 0 ], [ 1, 0, 0.1078, 0.0098, 0, 0.66,...
[ "\"\"\"\nA set of request processors that return dictionaries to be merged into a\ntemplate context. Each function takes the request object as its only parameter\nand returns a dictionary to add to the context.\n\nThese are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by\nRequestContext.\n\"\"\"...
import mimetypes import os import random import time from email import Charset, Encoders from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.Header import Header from email.Utils import formatdate, getaddresses, formataddr from google.appengi...
[ [ 1, 0, 0.0031, 0.0031, 0, 0.66, 0, 583, 0, 1, 0, 0, 583, 0, 0 ], [ 1, 0, 0.0063, 0.0031, 0, 0.66, 0.0417, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0094, 0.0031, 0, ...
[ "import mimetypes", "import os", "import random", "import time", "from email import Charset, Encoders", "from email.MIMEText import MIMEText", "from email.MIMEMultipart import MIMEMultipart", "from email.MIMEBase import MIMEBase", "from email.Header import Header", "from email.Utils import formatd...
""" Email message and email sending related helper functions. """ import socket # Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of # seconds, which slows down the restart of the server. class CachedDnsName(object): def __str__(self): return self.get_fqdn() def get_fqdn(sel...
[ [ 8, 0, 0.1053, 0.1579, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2632, 0.0526, 0, 0.66, 0.3333, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 3, 0, 0.7105, 0.4211, 0, 0.66...
[ "\"\"\"\nEmail message and email sending related helper functions.\n\"\"\"", "import socket", "class CachedDnsName(object):\n def __str__(self):\n return self.get_fqdn()\n\n def get_fqdn(self):\n if not hasattr(self, '_fqdn'):\n self._fqdn = socket.getfqdn()\n return self._...
""" Dummy email backend that does nothing. """ from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): def send_messages(self, email_messages): return len(email_messages)
[ [ 8, 0, 0.2222, 0.3333, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5556, 0.1111, 0, 0.66, 0.5, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 3, 0, 0.8889, 0.3333, 0, 0.66, ...
[ "\"\"\"\nDummy email backend that does nothing.\n\"\"\"", "from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend", "class EmailBackend(BaseEmailBackend):\n def send_messages(self, email_messages):\n return len(email_messages)", " def send_messages(self, email_mess...
""" Email backend that writes messages to console instead of sending them. """ import sys import threading from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): def __init__(self, *args, **kwargs): self.stream = kwargs.pop('stream', sy...
[ [ 8, 0, 0.0541, 0.0811, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1081, 0.027, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1351, 0.027, 0, 0.66, ...
[ "\"\"\"\nEmail backend that writes messages to console instead of sending them.\n\"\"\"", "import sys", "import threading", "from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend", "class EmailBackend(BaseEmailBackend):\n def __init__(self, *args, **kwargs):\n self...
"""SMTP email backend class.""" import smtplib import socket import threading from google.appengine._internal.django.conf import settings from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend from google.appengine._internal.django.core.mail.utils import DNS_NAME from google.appengine._...
[ [ 8, 0, 0.0092, 0.0092, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0183, 0.0092, 0, 0.66, 0.125, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.0275, 0.0092, 0, 0.66,...
[ "\"\"\"SMTP email backend class.\"\"\"", "import smtplib", "import socket", "import threading", "from google.appengine._internal.django.conf import settings", "from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend", "from google.appengine._internal.django.core.mail.utils...
"""Base email backend class.""" class BaseEmailBackend(object): """ Base class for email backend implementations. Subclasses must at least overwrite send_messages(). """ def __init__(self, fail_silently=False, **kwargs): self.fail_silently = fail_silently def open(self): """Op...
[ [ 8, 0, 0.0256, 0.0256, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.5385, 0.9487, 0, 0.66, 1, 507, 0, 4, 0, 0, 186, 0, 0 ], [ 8, 1, 0.1538, 0.1282, 1, 0.1, ...
[ "\"\"\"Base email backend class.\"\"\"", "class BaseEmailBackend(object):\n \"\"\"\n Base class for email backend implementations.\n\n Subclasses must at least overwrite send_messages().\n \"\"\"\n def __init__(self, fail_silently=False, **kwargs):\n self.fail_silently = fail_silently", " ...
# Mail backends shipped with Django.
[]
[]
""" Backend for test environment. """ from google.appengine._internal.django.core import mail from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): """A email backend for use during test sessions. The test connection stores email messages...
[ [ 8, 0, 0.0833, 0.125, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2083, 0.0417, 0, 0.66, 0.3333, 505, 0, 1, 0, 0, 505, 0, 0 ], [ 1, 0, 0.25, 0.0417, 0, 0.66, ...
[ "\"\"\"\nBackend for test environment.\n\"\"\"", "from google.appengine._internal.django.core import mail", "from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend", "class EmailBackend(BaseEmailBackend):\n \"\"\"A email backend for use during test sessions.\n\n The test ...
import os from pprint import pformat from google.appengine._internal.django import http from google.appengine._internal.django.core import signals from google.appengine._internal.django.core.handlers.base import BaseHandler from google.appengine._internal.django.core.urlresolvers import set_script_prefix from google.a...
[ [ 1, 0, 0.0044, 0.0044, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0088, 0.0044, 0, 0.66, 0.1, 276, 0, 1, 0, 0, 276, 0, 0 ], [ 1, 0, 0.0175, 0.0044, 0, 0.6...
[ "import os", "from pprint import pformat", "from google.appengine._internal.django import http", "from google.appengine._internal.django.core import signals", "from google.appengine._internal.django.core.handlers.base import BaseHandler", "from google.appengine._internal.django.core.urlresolvers import se...
import hotshot, time, os from google.appengine._internal.django.core.handlers.modpython import ModPythonHandler PROFILE_DATA_DIR = "/var/log/cmsprofile" def handler(req): ''' Handler that uses hotshot to store profile data. Stores profile data in PROFILE_DATA_DIR. Since hotshot has no way (that I kn...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 974, 0, 3, 0, 0, 974, 0, 0 ], [ 1, 0, 0.0909, 0.0455, 0, 0.66, 0.3333, 196, 0, 1, 0, 0, 196, 0, 0 ], [ 14, 0, 0.1818, 0.0455, 0, ...
[ "import hotshot, time, os", "from google.appengine._internal.django.core.handlers.modpython import ModPythonHandler", "PROFILE_DATA_DIR = \"/var/log/cmsprofile\"", "def handler(req):\n '''\n Handler that uses hotshot to store profile data.\n\n Stores profile data in PROFILE_DATA_DIR. Since hotshot h...
from threading import Lock from pprint import pformat try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from google.appengine._internal.django import http from google.appengine._internal.django.core import signals from google.appengine._internal.django.core.handlers import b...
[ [ 1, 0, 0.0038, 0.0038, 0, 0.66, 0, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0075, 0.0038, 0, 0.66, 0.0833, 276, 0, 1, 0, 0, 276, 0, 0 ], [ 7, 0, 0.017, 0.0151, 0, 0.6...
[ "from threading import Lock", "from pprint import pformat", "try:\n from cStringIO import StringIO\nexcept ImportError:\n from StringIO import StringIO", " from cStringIO import StringIO", " from StringIO import StringIO", "from google.appengine._internal.django import http", "from google.ap...
from google.appengine._internal.django.dispatch import Signal request_started = Signal() request_finished = Signal() got_request_exception = Signal(providing_args=["request"])
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 20, 0, 1, 0, 0, 20, 0, 0 ], [ 14, 0, 0.6, 0.2, 0, 0.66, 0.3333, 176, 3, 0, 0, 0, 592, 10, 1 ], [ 14, 0, 0.8, 0.2, 0, 0.66, 0.6667,...
[ "from google.appengine._internal.django.dispatch import Signal", "request_started = Signal()", "request_finished = Signal()", "got_request_exception = Signal(providing_args=[\"request\"])" ]
from math import ceil class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True): self.object_list = object_list self.per_pa...
[ [ 1, 0, 0.0083, 0.0083, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 3, 0, 0.0292, 0.0167, 0, 0.66, 0.1667, 933, 0, 0, 0, 0, 645, 0, 0 ], [ 3, 0, 0.0542, 0.0167, 0, ...
[ "from math import ceil", "class InvalidPage(Exception):\n pass", "class PageNotAnInteger(InvalidPage):\n pass", "class EmptyPage(InvalidPage):\n pass", "class Paginator(object):\n def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True):\n self.object_list = objec...
""" Pages in Django can are served up with custom HTTP headers containing useful information about those pages -- namely, the content type and object ID. This module contains utility functions for retrieving and doing interesting things with these special "X-Headers" (so called because the HTTP spec demands that custo...
[ [ 8, 0, 0.2292, 0.4167, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0.75, 0.5417, 0, 0.66, 1, 146, 0, 4, 0, 0, 0, 0, 4 ], [ 8, 1, 0.6458, 0.25, 1, 0.07, 0, ...
[ "\"\"\"\nPages in Django can are served up with custom HTTP headers containing useful\ninformation about those pages -- namely, the content type and object ID.\n\nThis module contains utility functions for retrieving and doing interesting\nthings with these special \"X-Headers\" (so called because the HTTP spec dem...
""" Global Django exception and warning classes. """ class DjangoRuntimeWarning(RuntimeWarning): pass class ObjectDoesNotExist(Exception): "The requested object does not exist" silent_variable_failure = True class MultipleObjectsReturned(Exception): "The query returned multiple objects when only one w...
[ [ 8, 0, 0.023, 0.0345, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.0632, 0.023, 0, 0.66, 0.0909, 653, 0, 0, 0, 0, 973, 0, 0 ], [ 3, 0, 0.1034, 0.0345, 0, 0.66, ...
[ "\"\"\"\nGlobal Django exception and warning classes.\n\"\"\"", "class DjangoRuntimeWarning(RuntimeWarning):\n pass", "class ObjectDoesNotExist(Exception):\n \"The requested object does not exist\"\n silent_variable_failure = True", " \"The requested object does not exist\"", " silent_variable...
from optparse import make_option from google.appengine._internal.django.core.management.base import AppCommand from google.appengine._internal.django.core.management.sql import sql_all from google.appengine._internal.django.db import connections, DEFAULT_DB_ALIAS class Command(AppCommand): help = "Prints the CREA...
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.1579, 0.0526, 0, 0.66, 0.25, 329, 0, 1, 0, 0, 329, 0, 0 ], [ 1, 0, 0.2105, 0.0526, 0, 0....
[ "from optparse import make_option", "from google.appengine._internal.django.core.management.base import AppCommand", "from google.appengine._internal.django.core.management.sql import sql_all", "from google.appengine._internal.django.db import connections, DEFAULT_DB_ALIAS", "class Command(AppCommand):\n ...
import os from google.appengine._internal.django.core.management.base import NoArgsCommand from optparse import make_option class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--plain', action='store_true', dest='plain', help='Tells Django to use plain Python,...
[ [ 1, 0, 0.0145, 0.0145, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.029, 0.0145, 0, 0.66, 0.3333, 329, 0, 1, 0, 0, 329, 0, 0 ], [ 1, 0, 0.0435, 0.0145, 0, 0...
[ "import os", "from google.appengine._internal.django.core.management.base import NoArgsCommand", "from optparse import make_option", "class Command(NoArgsCommand):\n option_list = NoArgsCommand.option_list + (\n make_option('--plain', action='store_true', dest='plain',\n help='Tells Djang...
import codecs import os import sys from optparse import make_option from google.appengine._internal.django.core.management.base import BaseCommand, CommandError def has_bom(fn): f = open(fn, 'r') sample = f.read(4) return sample[:3] == '\xef\xbb\xbf' or sample.startswith(codecs.BOM_UTF16_LE) or sample.star...
[ [ 1, 0, 0.0164, 0.0164, 0, 0.66, 0, 220, 0, 1, 0, 0, 220, 0, 0 ], [ 1, 0, 0.0328, 0.0164, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0492, 0.0164, 0, ...
[ "import codecs", "import os", "import sys", "from optparse import make_option", "from google.appengine._internal.django.core.management.base import BaseCommand, CommandError", "def has_bom(fn):\n f = open(fn, 'r')\n sample = f.read(4)\n return sample[:3] == '\\xef\\xbb\\xbf' or sample.startswith(...