code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
#!/usr/bin/env python
#
# 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 ... | [
[
8,
0,
0.0779,
0.013,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0909,
0.0043,
0,
0.66,
0.0714,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.0952,
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/env python
#
# 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 ... | [
[
8,
0,
0.0779,
0.013,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0909,
0.0043,
0,
0.66,
0.0714,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.0952,
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/env python
#
# 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 ... | [
[
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 mapreduce.lib.graphy.backends.google_chart_api import util",
"class BaseChartEncoder(object):\n\n \"\"\"Base class for encoders which turn chart objec... |
#!/usr/bin/env python
#
# 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 ... | [
[
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,
380,
0,
1,
0,
0,
380,
0,
0
],
[
1,
0,
0.4,
0.02,
0,
0.66,
0.2222,... | [
"\"\"\"Backend which can generate charts using the Google Chart API.\"\"\"",
"from mapreduce.lib.graphy import line_chart",
"from mapreduce.lib.graphy import bar_chart",
"from mapreduce.lib.graphy import pie_chart",
"from mapreduce.lib.graphy.backends.google_chart_api import encoders",
"def _GetChartFacto... |
#!/usr/bin/env python
| [] | [] |
#!/usr/bin/env python
| [] | [] |
#!/usr/bin/env python
__version__='1.0'
| [
[
14,
0,
1,
0.5,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__='1.0'"
] |
#!/usr/bin/env python
#
# Copyright 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 o... | [] | [] |
#!/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.0042,
0.0002,
0,
0.66,
0,
141,
0,
1,
0,
0,
141,
0,
0
],
[
1,
0,
0.0044,
0.0002,
0,
0.66,
0.0244,
80,
0,
1,
0,
0,
80,
0,
0
],
[
1,
0,
0.0046,
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.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... | [
[
1,
0,
0.0042,
0.0002,
0,
0.66,
0,
141,
0,
1,
0,
0,
141,
0,
0
],
[
1,
0,
0.0044,
0.0002,
0,
0.66,
0.0244,
80,
0,
1,
0,
0,
80,
0,
0
],
[
1,
0,
0.0046,
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.3281,
0.0156,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.375,
0.0156,
0,
0.66,
0.3333,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.4219,
0.0156,
0,
0.66,
... | [
"\"\"\"Testing utils for writing tests involving Files API.\"\"\"",
"__all__ = ['TestFileServiceStub']",
"from google.appengine.api import apiproxy_stub",
"class TestFileServiceStub(apiproxy_stub.APIProxyStub):\n \"\"\"A FileServiceStub to be used with tests.\n\n Doesn't perform any kind of file validation ... |
#!/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.1235,
0.0059,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1353,
0.0059,
0,
0.66,
0.0556,
777,
0,
1,
0,
0,
777,
0,
0
],
[
14,
0,
0.1529,
0.0059,
0,
0.6... | [
"\"\"\"Blobstore-specific Files API calls.\"\"\"",
"from __future__ import with_statement",
"__all__ = ['create', 'get_blob_key', 'get_file_name']",
"import urllib",
"from mapreduce.lib.files import file as files",
"from google.appengine.api import datastore",
"from google.appengine.ext import blobstore... |
#!/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.3281,
0.0156,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.375,
0.0156,
0,
0.66,
0.3333,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.4219,
0.0156,
0,
0.66,
... | [
"\"\"\"Testing utils for writing tests involving Files API.\"\"\"",
"__all__ = ['TestFileServiceStub']",
"from google.appengine.api import apiproxy_stub",
"class TestFileServiceStub(apiproxy_stub.APIProxyStub):\n \"\"\"A FileServiceStub to be used with tests.\n\n Doesn't perform any kind of file validation ... |
#!/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.1235,
0.0059,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1353,
0.0059,
0,
0.66,
0.0556,
777,
0,
1,
0,
0,
777,
0,
0
],
[
14,
0,
0.1529,
0.0059,
0,
0.6... | [
"\"\"\"Blobstore-specific Files API calls.\"\"\"",
"from __future__ import with_statement",
"__all__ = ['create', 'get_blob_key', 'get_file_name']",
"import urllib",
"from mapreduce.lib.files import file as files",
"from google.appengine.api import datastore",
"from google.appengine.ext import blobstore... |
#!/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 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 o... | [
[
8,
0,
0.0226,
0.007,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0348,
0.0035,
0,
0.66,
0.0345,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0383,
0.0012,
0,
0.66,
... | [
"\"\"\"Model classes which are used to communicate between parts of implementation.\n\nThese model classes are describing mapreduce, its current state and\ncommunication messages. They are either stored in the datastore or\nserialized to/from json and passed around with other means.\n\"\"\"",
"__all__ = [\"JsonMi... |
#!/usr/bin/env python
#
# Copyright 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 o... | [
[
8,
0,
0.1809,
0.0106,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2234,
0.0106,
0,
0.66,
0.5,
272,
0,
0,
0,
0,
0,
5,
0
],
[
3,
0,
0.6277,
0.7553,
0,
0.66,
... | [
"\"\"\"API allowing control over some mapreduce implementation details.\"\"\"",
"__all__ = [\"Hooks\"]",
"class Hooks(object):\n \"\"\"Allows subclasses to control some aspects of mapreduce execution.\n\n control.start_map accepts an optional \"hooks\" argument that can be passed a\n subclass of this class.\... |
webapp2_config = {}
webapp2_config['webapp2_extras.sessions'] = {
'secret_key': '5023a64-ea7-463-wc1-8b04387a51a',
}
FACEBOOK_APP_ID = '16435577607006'
MONTAO_FACEBOOK_APP_ID = '18798577897046'
FACEBOOK_APP_SECRET = '64234409f1eb45661e1049d5b139cb0'
MONTAO_FACEBOOK_APP_SECRET = '512a7e72503093d59ff965ababd42c'
... | [
[
14,
0,
0.0303,
0.0303,
0,
0.66,
0,
866,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.1515,
0.0909,
0,
0.66,
0.0769,
0,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.2424,
0.0303,
0,
0.6... | [
"webapp2_config = {}",
"webapp2_config['webapp2_extras.sessions'] = {\n 'secret_key': '5023a64-ea7-463-wc1-8b04387a51a',\n}",
"FACEBOOK_APP_ID = '16435577607006'",
"MONTAO_FACEBOOK_APP_ID = '18798577897046'",
"FACEBOOK_APP_SECRET = '64234409f1eb45661e1049d5b139cb0'",
"MONTAO_FACEBOOK_APP_SECRET = '512a... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Facebook Application ID and Secret.
FACEBOOK_APP_ID = '164355773607006'
MONTAO_FACEBOOK_APP_ID = '187978577897046'
FACEBOOK_APP_SECRET = '64234409f15eb45661e1049d5b139cb0'
MONTAO_FACEBOOK_APP_SECRET = '512a97e72503093d5c9ff965ababd42c'
CAPTCHA_PUB_KEY = '6LckUsMSAAAAAGcZR3... | [
[
14,
0,
0.1667,
0.0333,
0,
0.66,
0,
591,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2,
0.0333,
0,
0.66,
0.0909,
635,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2667,
0.0333,
0,
0.66... | [
"FACEBOOK_APP_ID = '164355773607006'",
"MONTAO_FACEBOOK_APP_ID = '187978577897046'",
"FACEBOOK_APP_SECRET = '64234409f15eb45661e1049d5b139cb0'",
"MONTAO_FACEBOOK_APP_SECRET = '512a97e72503093d5c9ff965ababd42c'",
"CAPTCHA_PUB_KEY = '6LckUsMSAAAAAGcZR3JZw6Dusn4wKBBfZxHXh8w5'",
"CAPTCHA_PRV_KEY = '6LckUsMSAA... |
#!/usr/bin/python
# -*- coding: utf-8 -*
location_map_india = {
101: {
'name': 'Andaman & Nicobar Islands',
'lat': 11.96,
'long': 92.69,
'radius': 294200,
},
108: {
'name': 'Andhra Pradesh',
'lat': 17.04,
'long': 80.09,
'radius': 294200,
... | [
[
14,
0,
0.507,
0.9907,
0,
0.66,
0,
181,
0,
0,
0,
0,
0,
6,
0
]
] | [
"location_map_india = {\n 101: {\n 'name': 'Andaman & Nicobar Islands',\n 'lat': 11.96,\n 'long': 92.69,\n 'radius': 294200,\n },\n 108: {"
] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
r""" A JSON data encoder and decoder.
This Python module implements the JSON (http://json.org/) data
encoding format; a subset of ECMAScript (aka JavaScript) for encoding
primitive data types (numbers, strings, booleans, lists, and
associative arrays) in a language-n... | [
[
8,
0,
0.0276,
0.0519,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0542,
0.0005,
0,
0.66,
0.027,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0547,
0.0005,
0,
0.66,... | [
"r\"\"\" A JSON data encoder and decoder.\n\n This Python module implements the JSON (http://json.org/) data\n encoding format; a subset of ECMAScript (aka JavaScript) for encoding\n primitive data types (numbers, strings, booleans, lists, and\n associative arrays) in a language-neutral simple text-based syntax.\n\... |
# -*- coding: utf-8 -*-
import logging
import os
import cgi
import util
from main import Ad
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from google.appengine.api import u... | [
[
1,
0,
0.0417,
0.0208,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0625,
0.0208,
0,
0.66,
0.0667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0833,
0.0208,
0,
... | [
"import logging",
"import os",
"import cgi",
"import util",
"from main import Ad",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp import template",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.ext import db",
"from google.appengi... |
# -*- coding: utf-8 -*-
import webapp2
from webapp2_extras import jinja2
from engineauth import models
import ndb
class Jinja2Handler(webapp2.RequestHandler):
"""
BaseHandler for all requests all other handlers will
extend this handler
"""
@webapp2.cached_property
def jinja2(self):
... | [
[
1,
0,
0.027,
0.0135,
0,
0.66,
0,
123,
0,
1,
0,
0,
123,
0,
0
],
[
1,
0,
0.0405,
0.0135,
0,
0.66,
0.1429,
151,
0,
1,
0,
0,
151,
0,
0
],
[
1,
0,
0.0541,
0.0135,
0,
0... | [
"import webapp2",
"from webapp2_extras import jinja2",
"from engineauth import models",
"import ndb",
"class Jinja2Handler(webapp2.RequestHandler):\n \"\"\"\n BaseHandler for all requests all other handlers will\n extend this handler\n\n \"\"\"\n @webapp2.cached_property\n def jinj... |
import decimal
import logging
import urllib
import urllib2
from google.appengine.api import urlfetch
# hack to enable urllib to work with Python
import os
os.environ['foo_proxy'] = 'bar'
import json
import settings
class Pay( object ):
def __init__( self, amount, return_url, cancel_url, remote_address, secondary... | [
[
1,
0,
0.0066,
0.0066,
0,
0.66,
0,
349,
0,
1,
0,
0,
349,
0,
0
],
[
1,
0,
0.0132,
0.0066,
0,
0.66,
0.0833,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0197,
0.0066,
0,
... | [
"import decimal",
"import logging",
"import urllib",
"import urllib2",
"from google.appengine.api import urlfetch",
"import os",
"os.environ['foo_proxy'] = 'bar'",
"import json",
"import settings",
"class Pay( object ):\n def __init__( self, amount, return_url, cancel_url, remote_address, seconda... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.1753,
0.0103,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1959,
0.0103,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2165,
0.0103,
0,
0.66,... | [
"\"\"\"Unit tests for geocell.py.\"\"\"",
"__author__ = 'api.roman.public@gmail.com (Roman Nurik)'",
"import unittest",
"import geocell",
"import geotypes",
"class GeocellTests(unittest.TestCase):\n def test_compute(self):\n # a valid geocell\n cell = geocell.compute(geotypes.Point(37, -122), 14)\n... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.4146,
0.0244,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4634,
0.0244,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5122,
0.0244,
0,
0.66,
... | [
"\"\"\"Defines common geo math functions used throughout the library.\"\"\"",
"__author__ = 'api.roman.public@gmail.com (Roman Nurik)'",
"import math",
"import geotypes",
"RADIUS = 6378135",
"def distance(p1, p2):\n \"\"\"Calculates the great circle distance between two points (law of cosines).\n\n Args... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.1453,
0.0085,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1624,
0.0085,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1795,
0.0085,
0,
0.66,... | [
"\"\"\"Defines utility functions used throughout the geocell/GeoModel library.\"\"\"",
"__author__ = 'api.roman.public@gmail.com (Roman Nurik)'",
"import geocell",
"import geomath",
"import geotypes",
"def merge_in_place(*lists, **kwargs):\n \"\"\"Merges an arbitrary number of pre-sorted lists in-place, ... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.4359,
0.0256,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4872,
0.0256,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5385,
0.0256,
0,
0.66,... | [
"\"\"\"Unit tests for geomath.py.\"\"\"",
"__author__ = 'api.roman.public@gmail.com (Roman Nurik)'",
"import unittest",
"import geomath",
"import geotypes",
"class GeomathTests(unittest.TestCase):\n def test_distance(self):\n # known distances using GLatLng from the Maps API\n calc_dist = geomath.d... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.2537,
0.0149,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2836,
0.0149,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3134,
0.0149,
0,
0.66,... | [
"\"\"\"Unit tests for geotypes.py.\"\"\"",
"__author__ = 'api.roman.public@gmail.com (Roman Nurik)'",
"import unittest",
"import geotypes",
"class PointTests(unittest.TestCase):\n def test_Point(self):\n # an invalid point\n self.assertRaises(ValueError, geotypes.Point, 95, 0)\n self.assertRaises(... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.0889,
0.1071,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1456,
0.0021,
0,
0.66,
0.0323,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1499,
0.0021,
0,
0.66,... | [
"\"\"\"Defines the notion of 'geocells' and exposes methods to operate on them.\n\nA geocell is a hexadecimal string that defines a two dimensional rectangular\nregion inside the [-90,90] x [-180,180] latitude/longitude space. A geocell's\n'resolution' is its length. For most practical purposes, at high resolutions... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.17,
0.01,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.19,
0.01,
0,
0.66,
0.3333,
777,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.33,
0.23,
0,
0.66,
0.6667,... | [
"\"\"\"Defines some useful geo types such as points and boxes.\"\"\"",
"__author__ = 'api.roman.public@gmail.com (Roman Nurik)'",
"class Point(object):\n \"\"\"A two-dimensional point in the [-90,90] x [-180,180] lat/lon space.\n\n Attributes:\n lat: A float in the range [-90,90] indicating the point's lat... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.3617,
0.0213,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4043,
0.0213,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4468,
0.0213,
0,
0.66,
... | [
"\"\"\"Unit tests for util.py.\"\"\"",
"__author__ = 'api.roman.public@gmail.com (Roman Nurik)'",
"import unittest",
"import util",
"class MergeInPlaceTests(unittest.TestCase):\n def test_merge_in_place(self):\n self.assertEquals([], util.merge_in_place())\n\n # test massive list merge\n list1 = [... |
#!/usr/bin/python2.5
#
# Copyright 2009 Roman Nurik
#
# 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... | [
[
8,
0,
0.0621,
0.0163,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0752,
0.0033,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0817,
0.0033,
0,
0.66,... | [
"\"\"\"Defines the GeoModel class for running basic geospatial queries on\nsingle-point geographic entities in Google App Engine.\n\nTODO(romannurik): document how bounding box and proximity queries work.\n\"\"\"",
"__author__ = 'api.roman.public@gmail.com (Roman Nurik)'",
"import copy",
"import logging",
"... |
#!/usr/bin/python
# -*- coding: utf-8 -*
location_map_br_11 = {
2: {
'name': '- Zona Centro',
'lat': -22.90,
'long': -43.21,
'radius': 294200,
},
1: {
'name': '- Zona Norte',
'lat': -23.55,
'long': -46.64,
'radius': 294200,
},
1... | [
[
14,
0,
0.5082,
0.9891,
0,
0.66,
0,
927,
0,
0,
0,
0,
0,
6,
10
]
] | [
"location_map_br_11 = {\n 2: {\n 'name': '- Zona Centro',\n 'lat': -22.90,\n 'long': -43.21,\n 'radius': 294200,\n },\n 1: {"
] |
import decimal
from google.appengine.ext import db
class Profile(db.Model):
'''extra user details'''
owner = db.UserProperty()
paypal_email = db.EmailProperty() # for payment
@staticmethod
def from_user( u ):
return Profile.all().filter( "owner = ", u ).get()
class Item(db.Model):
'''an item for sa... | [
[
1,
0,
0.0222,
0.0222,
0,
0.66,
0,
349,
0,
1,
0,
0,
349,
0,
0
],
[
1,
0,
0.0667,
0.0222,
0,
0.66,
0.25,
167,
0,
1,
0,
0,
167,
0,
0
],
[
3,
0,
0.1889,
0.1778,
0,
0.... | [
"import decimal",
"from google.appengine.ext import db",
"class Profile(db.Model):\n '''extra user details'''\n owner = db.UserProperty()\n paypal_email = db.EmailProperty() # for payment\n\n @staticmethod\n def from_user( u ):\n return Profile.all().filter( \"owner = \", u ).get()",
" '''extra user... |
import base64
import quopri
from webob import multidict
def from_fieldstorage(cls, fs):
obj = cls()
if fs.list:
# fs.list can be None when there's nothing to parse
for field in fs.list:
if field.filename:
obj.add(field.name, field)
else:
... | [
[
1,
0,
0.0096,
0.0096,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.0192,
0.0096,
0,
0.66,
0.0714,
269,
0,
1,
0,
0,
269,
0,
0
],
[
1,
0,
0.0385,
0.0096,
0,
... | [
"import base64",
"import quopri",
"from webob import multidict",
"def from_fieldstorage(cls, fs):\n\n obj = cls()\n if fs.list:\n # fs.list can be None when there's nothing to parse\n for field in fs.list:\n if field.filename:\n obj.add(field.name, field)",
" ... |
#!/usr/bin/python
# -*- coding: utf-8 -*
location_map_india_municipality = {
1: {
'name': 'Adilabad',
'lat': -23.55,
'long': -46.64,
'radius': 294200,
},
2: {
'name': 'Anantapur',
'lat': -22.90,
'long': -43.21,
'radius': 294200,
},
... | [
[
14,
0,
0.5099,
0.9703,
0,
0.66,
0,
410,
0,
0,
0,
0,
0,
6,
0
]
] | [
"location_map_india_municipality = {\n 1: {\n 'name': 'Adilabad',\n 'lat': -23.55,\n 'long': -46.64,\n 'radius': 294200,\n },\n 2: {"
] |
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.0063,
0.0063,
0,
0.66,
0,
526,
0,
1,
0,
0,
526,
0,
0
],
[
3,
0,
0.022,
0.0126,
0,
0.66,
0.1667,
933,
0,
0,
0,
0,
645,
0,
0
],
[
3,
0,
0.0409,
0.0126,
0,
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... |
__all__ = (
'BaseForm',
'Form',
)
class BaseForm(object):
"""
Base Form Class. Provides core behaviour like field construction,
validation, and data and error proxying.
"""
def __init__(self, fields, prefix=''):
"""
:param fields:
A dict or sequence of 2-tuples... | [
[
14,
0,
0.0087,
0.0139,
0,
0.66,
0,
272,
0,
0,
0,
0,
0,
8,
0
],
[
3,
0,
0.2448,
0.4514,
0,
0.66,
0.25,
103,
0,
12,
0,
0,
186,
0,
25
],
[
8,
1,
0.0295,
0.0139,
1,
0... | [
"__all__ = (\n 'BaseForm',\n 'Form',\n)",
"class BaseForm(object):\n \"\"\"\n Base Form Class. Provides core behaviour like field construction,\n validation, and data and error proxying.\n \"\"\"\n\n def __init__(self, fields, prefix=''):\n \"\"\"",
" \"\"\"\n Base Form Class.... |
from cgi import escape
__all__ = (
'CheckboxInput', 'FileInput', 'HiddenInput', 'ListWidget', 'PasswordInput',
'RadioInput', 'Select', 'SubmitInput', 'TableWidget', 'TextArea',
'TextInput', 'Option'
)
def html_params(**kwargs):
"""
Generate HTML parameters from inputted keyword arguments.
T... | [
[
1,
0,
0.0038,
0.0038,
0,
0.66,
0,
934,
0,
1,
0,
0,
934,
0,
0
],
[
14,
0,
0.0226,
0.0189,
0,
0.66,
0.0625,
272,
0,
0,
0,
0,
0,
8,
0
],
[
2,
0,
0.0792,
0.0792,
0,
0... | [
"from cgi import escape",
"__all__ = (\n 'CheckboxInput', 'FileInput', 'HiddenInput', 'ListWidget', 'PasswordInput',\n 'RadioInput', 'Select', 'SubmitInput', 'TableWidget', 'TextArea',\n 'TextInput', 'Option'\n)",
"def html_params(**kwargs):\n \"\"\"\n Generate HTML parameters from inputted keywo... |
from wtforms.widgets.core import *
# Compatibility imports
from wtforms.widgets.core import html_params, Input, HTMLString
| [
[
1,
0,
0.25,
0.25,
0,
0.66,
0,
163,
0,
1,
0,
0,
163,
0,
0
],
[
1,
0,
1,
0.25,
0,
0.66,
1,
163,
0,
3,
0,
0,
163,
0,
0
]
] | [
"from wtforms.widgets.core import *",
"from wtforms.widgets.core import html_params, Input, HTMLString"
] |
from .. import widgets
from .core import StringField, BooleanField
__all__ = (
'BooleanField', 'TextAreaField', 'PasswordField', 'FileField',
'HiddenField', 'SubmitField', 'TextField'
)
class TextField(StringField):
"""
Legacy alias for StringField
"""
class TextAreaField(TextField):
"""
... | [
[
1,
0,
0.0185,
0.0185,
0,
0.66,
0,
0,
0,
1,
0,
0,
0,
0,
0
],
[
1,
0,
0.037,
0.0185,
0,
0.66,
0.125,
864,
0,
2,
0,
0,
864,
0,
0
],
[
14,
0,
0.1204,
0.0741,
0,
0.66,... | [
"from .. import widgets",
"from .core import StringField, BooleanField",
"__all__ = (\n 'BooleanField', 'TextAreaField', 'PasswordField', 'FileField',\n 'HiddenField', 'SubmitField', 'TextField'\n)",
"class TextField(StringField):\n \"\"\"\n Legacy alias for StringField\n \"\"\"",
" \"\"\"... |
from wtforms.fields.core import *
from wtforms.fields.simple import *
# Compatibility imports
from wtforms.fields.core import Label, Field, _unset_value, SelectFieldBase, Flags
| [
[
1,
0,
0.1667,
0.1667,
0,
0.66,
0,
746,
0,
1,
0,
0,
746,
0,
0
],
[
1,
0,
0.5,
0.1667,
0,
0.66,
0.5,
377,
0,
1,
0,
0,
377,
0,
0
],
[
1,
0,
1,
0.1667,
0,
0.66,
1... | [
"from wtforms.fields.core import *",
"from wtforms.fields.simple import *",
"from wtforms.fields.core import Label, Field, _unset_value, SelectFieldBase, Flags"
] |
"""
A provided CSRF implementation which puts CSRF data in a session.
This can be used fairly comfortably with many `request.session` type
objects, including the Werkzeug/Flask session store, Django sessions, and
potentially other similar objects which use a dict-like API for storing
session keys.
The basic concept i... | [
[
8,
0,
0.1087,
0.2029,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2319,
0.0145,
0,
0.66,
0.125,
993,
0,
1,
0,
0,
993,
0,
0
],
[
1,
0,
0.2464,
0.0145,
0,
0.66,... | [
"\"\"\"\nA provided CSRF implementation which puts CSRF data in a session.\n\nThis can be used fairly comfortably with many `request.session` type\nobjects, including the Werkzeug/Flask session store, Django sessions, and\npotentially other similar objects which use a dict-like API for storing\nsession keys.",
"i... |
from wtforms.form import Form
from wtforms.validators import ValidationError
from .fields import CSRFTokenField
class SecureForm(Form):
"""
Form that enables CSRF processing via subclassing hooks.
"""
csrf_token = CSRFTokenField()
def __init__(self, formdata=None, obj=None, prefix='', csrf_conte... | [
[
1,
0,
0.0196,
0.0196,
0,
0.66,
0,
719,
0,
1,
0,
0,
719,
0,
0
],
[
1,
0,
0.0392,
0.0196,
0,
0.66,
0.3333,
237,
0,
1,
0,
0,
237,
0,
0
],
[
1,
0,
0.0784,
0.0196,
0,
... | [
"from wtforms.form import Form",
"from wtforms.validators import ValidationError",
"from .fields import CSRFTokenField",
"class SecureForm(Form):\n \"\"\"\n Form that enables CSRF processing via subclassing hooks.\n \"\"\"\n csrf_token = CSRFTokenField()\n\n def __init__(self, formdata=None, ob... |
from wtforms.fields import HiddenField
class CSRFTokenField(HiddenField):
current_token = None
def _value(self):
"""
We want to always return the current token on render, regardless of
whether a good or bad token was passed.
"""
return self.current_token
def popul... | [
[
1,
0,
0.0556,
0.0556,
0,
0.66,
0,
77,
0,
1,
0,
0,
77,
0,
0
],
[
3,
0,
0.6111,
0.8333,
0,
0.66,
1,
393,
0,
2,
0,
0,
651,
0,
0
],
[
14,
1,
0.2778,
0.0556,
1,
0.66,
... | [
"from wtforms.fields import HiddenField",
"class CSRFTokenField(HiddenField):\n current_token = None\n\n def _value(self):\n \"\"\"\n We want to always return the current token on render, regardless of\n whether a good or bad token was passed.\n \"\"\"",
" current_token = No... |
from wtforms.ext.csrf.form import SecureForm
| [
[
1,
0,
1,
1,
0,
0.66,
0,
131,
0,
1,
0,
0,
131,
0,
0
]
] | [
"from wtforms.ext.csrf.form import SecureForm"
] |
import decimal
from wtforms import fields, widgets
class ReferencePropertyField(fields.SelectFieldBase):
"""
A field for ``db.ReferenceProperty``. The list items are rendered in a
select.
:param reference_class:
A db.Model class which will be used to generate the default query
to make... | [
[
1,
0,
0.0096,
0.0096,
0,
0.66,
0,
349,
0,
1,
0,
0,
349,
0,
0
],
[
1,
0,
0.0288,
0.0096,
0,
0.66,
0.25,
212,
0,
2,
0,
0,
212,
0,
0
],
[
3,
0,
0.3798,
0.6731,
0,
0.... | [
"import decimal",
"from wtforms import fields, widgets",
"class ReferencePropertyField(fields.SelectFieldBase):\n \"\"\"\n A field for ``db.ReferenceProperty``. The list items are rendered in a\n select.\n\n :param reference_class:\n A db.Model class which will be used to generate the default... |
"""
Form generation utilities for App Engine's ``db.Model`` class.
The goal of ``model_form()`` is to provide a clean, explicit and predictable
way to create forms based on ``db.Model`` classes. No malabarism or black
magic should be necessary to generate a form for models, and to add custom
non-model related fields: ... | [
[
8,
0,
0.1026,
0.2031,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2052,
0.0022,
0,
0.66,
0.0333,
212,
0,
4,
0,
0,
212,
0,
0
],
[
1,
0,
0.2074,
0.0022,
0,
0.66... | [
"\"\"\"\nForm generation utilities for App Engine's ``db.Model`` class.\n\nThe goal of ``model_form()`` is to provide a clean, explicit and predictable\nway to create forms based on ``db.Model`` classes. No malabarism or black\nmagic should be necessary to generate a form for models, and to add custom\nnon-model re... |
"""
A DateTimeField and DateField that use the `dateutil` package for parsing.
"""
from dateutil import parser
from wtforms.fields import Field
from wtforms.validators import ValidationError
from wtforms.widgets import TextInput
__all__ = (
'DateTimeField', 'DateField',
)
class DateTimeField(Field):
"""
... | [
[
8,
0,
0.027,
0.0405,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0541,
0.0135,
0,
0.66,
0.1429,
696,
0,
1,
0,
0,
696,
0,
0
],
[
1,
0,
0.0811,
0.0135,
0,
0.66,... | [
"\"\"\"\nA DateTimeField and DateField that use the `dateutil` package for parsing.\n\"\"\"",
"from dateutil import parser",
"from wtforms.fields import Field",
"from wtforms.validators import ValidationError",
"from wtforms.widgets import TextInput",
"__all__ = (\n 'DateTimeField', 'DateField',\n)",
... |
"""
Useful form fields for use with SQLAlchemy ORM.
"""
import operator
from wtforms import widgets
from wtforms.fields import SelectFieldBase
from wtforms.validators import ValidationError
try:
from sqlalchemy.orm.util import identity_key
has_identity_key = True
except ImportError:
has_identity_key = Fal... | [
[
8,
0,
0.011,
0.0165,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.022,
0.0055,
0,
0.66,
0.1111,
616,
0,
1,
0,
0,
616,
0,
0
],
[
1,
0,
0.033,
0.0055,
0,
0.66,
... | [
"\"\"\"\nUseful form fields for use with SQLAlchemy ORM.\n\"\"\"",
"import operator",
"from wtforms import widgets",
"from wtforms.fields import SelectFieldBase",
"from wtforms.validators import ValidationError",
"try:\n from sqlalchemy.orm.util import identity_key\n has_identity_key = True\nexcept ... |
"""
Tools for generating forms based on SQLAlchemy models.
"""
import inspect
from wtforms import fields as f
from wtforms import validators
from wtforms.form import Form
__all__ = (
'model_fields', 'model_form',
)
def converts(*args):
def _inner(func):
func._converter_for = frozenset(args)
... | [
[
8,
0,
0.0092,
0.0138,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0184,
0.0046,
0,
0.66,
0.1,
878,
0,
1,
0,
0,
878,
0,
0
],
[
1,
0,
0.0276,
0.0046,
0,
0.66,
... | [
"\"\"\"\nTools for generating forms based on SQLAlchemy models.\n\"\"\"",
"import inspect",
"from wtforms import fields as f",
"from wtforms import validators",
"from wtforms.form import Form",
"__all__ = (\n 'model_fields', 'model_form',\n)",
"def converts(*args):\n def _inner(func):\n fun... |
"""
Useful form fields for use with the Django ORM.
"""
import operator
import warnings
from wtforms import widgets
from wtforms.fields import SelectFieldBase
from wtforms.validators import ValidationError
__all__ = (
'ModelSelectField', 'QuerySetSelectField',
)
class QuerySetSelectField(SelectFieldBase):
... | [
[
8,
0,
0.0202,
0.0303,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0404,
0.0101,
0,
0.66,
0.125,
616,
0,
1,
0,
0,
616,
0,
0
],
[
1,
0,
0.0505,
0.0101,
0,
0.66,... | [
"\"\"\"\nUseful form fields for use with the Django ORM.\n\"\"\"",
"import operator",
"import warnings",
"from wtforms import widgets",
"from wtforms.fields import SelectFieldBase",
"from wtforms.validators import ValidationError",
"__all__ = (\n 'ModelSelectField', 'QuerySetSelectField',\n)",
"cla... |
"""
Template tags for easy WTForms access in Django templates.
"""
import re
from django import template
from django.conf import settings
from django.template import Variable
register = template.Library()
class FormFieldNode(template.Node):
def __init__(self, field_var, html_attrs):
self.field_var = fi... | [
[
8,
0,
0.027,
0.0405,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0541,
0.0135,
0,
0.66,
0.125,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0811,
0.0135,
0,
0.66,
... | [
"\"\"\"\nTemplate tags for easy WTForms access in Django templates.\n\"\"\"",
"import re",
"from django import template",
"from django.conf import settings",
"from django.template import Variable",
"register = template.Library()",
"class FormFieldNode(template.Node):\n def __init__(self, field_var, h... |
"""
Tools for generating forms based on Django models.
"""
from wtforms import fields as f
from wtforms import Form
from wtforms import validators
from wtforms.ext.django.fields import ModelSelectField
__all__ = (
'model_fields', 'model_form',
)
class ModelConverterBase(object):
def __init__(self, converter... | [
[
8,
0,
0.0117,
0.0175,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0234,
0.0058,
0,
0.66,
0.1111,
212,
0,
1,
0,
0,
212,
0,
0
],
[
1,
0,
0.0292,
0.0058,
0,
0.66... | [
"\"\"\"\nTools for generating forms based on Django models.\n\"\"\"",
"from wtforms import fields as f",
"from wtforms import Form",
"from wtforms import validators",
"from wtforms.ext.django.fields import ModelSelectField",
"__all__ = (\n 'model_fields', 'model_form',\n)",
"class ModelConverterBase(... |
import re
__all__ = (
'Email', 'email', 'EqualTo', 'equal_to', 'IPAddress', 'ip_address',
'Length', 'length', 'NumberRange', 'number_range', 'Optional', 'optional',
'Required', 'required', 'Regexp', 'regexp', 'URL', 'url', 'AnyOf',
'any_of', 'NoneOf', 'none_of', 'MacAddress', 'mac_address', 'UUID'
)
... | [
[
1,
0,
0.0027,
0.0027,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
14,
0,
0.0179,
0.0165,
0,
0.66,
0.0357,
272,
0,
0,
0,
0,
0,
8,
0
],
[
3,
0,
0.0398,
0.0165,
0,
0... | [
"import re",
"__all__ = (\n 'Email', 'email', 'EqualTo', 'equal_to', 'IPAddress', 'ip_address',\n 'Length', 'length', 'NumberRange', 'number_range', 'Optional', 'optional',\n 'Required', 'required', 'Regexp', 'regexp', 'URL', 'url', 'AnyOf',\n 'any_of', 'NoneOf', 'none_of', 'MacAddress', 'mac_address'... |
"""
WTForms
=======
WTForms is a flexible forms validation and rendering library for python web
development.
:copyright: Copyright (c) 2010 by Thomas Johansson, James Crasta and others.
:license: BSD, see LICENSE.txt for details.
"""
from wtforms import validators, widgets
from wtforms.fields import *
from wtforms.fo... | [
[
8,
0,
0.3438,
0.625,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.6875,
0.0625,
0,
0.66,
0.2,
212,
0,
2,
0,
0,
212,
0,
0
],
[
1,
0,
0.75,
0.0625,
0,
0.66,
... | [
"\"\"\"\nWTForms\n=======\n\nWTForms is a flexible forms validation and rendering library for python web\ndevelopment.\n\n:copyright: Copyright (c) 2010 by Thomas Johansson, James Crasta and others.",
"from wtforms import validators, widgets",
"from wtforms.fields import *",
"from wtforms.form import Form",
... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0182,
0.0091,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0242,
0.001,
0,
0.66,
0.0323,
426,
0,
5,
0,
0,
426,
0,
0
],
[
1,
0,
0.0252,
0.001,
0,
0.66,
... | [
"\"\"\"Locale dependent formatting and parsing of dates and times.\n\nThe default locale for the functions in this module is determined by the\nfollowing environment variables, in that order:\n\n * ``LC_TIME``,\n * ``LC_ALL``, and\n * ``LANG``",
"from datetime import date, datetime, time, timedelta, tzinfo",
"i... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0766,
0.0239,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0957,
0.0048,
0,
0.66,
0.0667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1005,
0.0048,
0,
0.66... | [
"\"\"\"Low-level locale data access.\n\n:note: The `Locale` class, which uses this module under the hood, provides a\n more convenient interface for accessing the locale data.\n\"\"\"",
"import os",
"import pickle",
"try:\n import threading\nexcept ImportError:\n import dummy_threading as threadin... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0177,
0.0013,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0203,
0.0013,
0,
0.66,
0.0769,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0215,
0.0013,
0,
0.66... | [
"\"\"\"Core locale representation and locale data access.\"\"\"",
"import os",
"import pickle",
"from babel import localedata",
"__all__ = ['UnknownLocaleError', 'Locale', 'default_locale', 'negotiate_locale',\n 'parse_locale']",
"__docformat__ = 'restructuredtext en'",
"_global_data = None",
... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0362,
0.0132,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0461,
0.0022,
0,
0.66,
0.0667,
426,
0,
2,
0,
0,
426,
0,
0
],
[
1,
0,
0.0482,
0.0022,
0,
0.66... | [
"\"\"\"Reading and writing of files in the ``gettext`` PO (portable object)\nformat.\n\n:see: `The Format of PO Files\n <http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files>`_\n\"\"\"",
"from datetime import date, datetime",
"import os",
"import re",
"from babel import __version__ as VERS... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0325,
0.0162,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0433,
0.0018,
0,
0.66,
0.0526,
688,
0,
1,
0,
0,
688,
0,
0
],
[
7,
0,
0.0478,
0.0072,
0,
0.66... | [
"\"\"\"Basic infrastructure for extracting localizable messages from source files.\n\nThis module defines an extensible system for collecting localizable message\nstrings from a variety of sources. A native extractor for Python source files\nis builtin, extractors for other sources can be added using very simple pl... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.1375,
0.05,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.175,
0.0083,
0,
0.66,
0.2,
80,
0,
1,
0,
0,
80,
0,
0
],
[
1,
0,
0.1833,
0.0083,
0,
0.66,
0.... | [
"\"\"\"Writing of files in the ``gettext`` MO (machine object) format.\n\n:since: version 0.9\n:see: `The Format of MO Files\n <http://www.gnu.org/software/gettext/manual/gettext.html#MO-Files>`_\n\"\"\"",
"import array",
"import struct",
"__all__ = ['write_mo']",
"__docformat__ = 'restructuredtext en... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2010 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software... | [
[
1,
0,
0.0302,
0.0022,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0324,
0.0022,
0,
0.66,
0.0909,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0346,
0.0022,
0,
... | [
"from datetime import datetime",
"import doctest",
"from StringIO import StringIO",
"import unittest",
"import sys",
"from babel.messages.catalog import Catalog, Message",
"from babel.messages import pofile",
"from babel.util import FixedOffsetTimezone, LOCALTZ",
"class ReadPoTestCase(unittest.TestC... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.0263,
0.0019,
0,
0.66,
0,
220,
0,
1,
0,
0,
220,
0,
0
],
[
1,
0,
0.0281,
0.0019,
0,
0.66,
0.1,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.03,
0.0019,
0,
0.66,... | [
"import codecs",
"import doctest",
"from StringIO import StringIO",
"import sys",
"import unittest",
"from babel.messages import extract",
"class ExtractPythonTestCase(unittest.TestCase):\n\n def test_nested_calls(self):\n buf = StringIO(\"\"\"\\\nmsg1 = _(i18n_arg.replace(r'\\\"', '\"'))\nmsg... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: sw=4 ts=4 fenc=utf-8
# =============================================================================
# $Id: setup.py 114 2007-06-14 21:17:14Z palgarvio $
# =============================================================================
# $URL: http://svn.edgewall... | [
[
1,
0,
0.6786,
0.0357,
0,
0.66,
0,
182,
0,
2,
0,
0,
182,
0,
0
],
[
8,
0,
0.875,
0.2857,
0,
0.66,
1,
234,
3,
6,
0,
0,
0,
0,
2
]
] | [
"from setuptools import setup, find_packages",
"setup(\n name = 'TestProject',\n version = '0.1',\n license = 'BSD',\n author = 'Foo Bar',\n author_email = 'foo@bar.tld',\n packages = find_packages(),\n)"
] |
# -*- coding: utf-8 -*-
# file1.py for tests
from gettext import gettext as _
def foo():
# TRANSLATOR: This will be a translator coment,
# that will include several lines
print _('bar')
| [
[
1,
0,
0.5,
0.125,
0,
0.66,
0,
723,
0,
1,
0,
0,
723,
0,
0
],
[
2,
0,
0.8125,
0.5,
0,
0.66,
1,
528,
0,
0,
0,
0,
0,
0,
2
],
[
8,
1,
1,
0.125,
1,
0.8,
0,
535,... | [
"from gettext import gettext as _",
"def foo():\n # TRANSLATOR: This will be a translator coment,\n # that will include several lines\n print(_('bar'))",
" print(_('bar'))"
] |
# -*- coding: utf-8 -*-
# file2.py for tests
from gettext import ngettext
def foo():
# Note: This will have the TRANSLATOR: tag but shouldn't
# be included on the extracted stuff
print ngettext('foobar', 'foobars', 1)
| [
[
1,
0,
0.4444,
0.1111,
0,
0.66,
0,
723,
0,
1,
0,
0,
723,
0,
0
],
[
2,
0,
0.8333,
0.4444,
0,
0.66,
1,
528,
0,
0,
0,
0,
0,
0,
2
],
[
8,
1,
1,
0.1111,
1,
0.77,
0,... | [
"from gettext import ngettext",
"def foo():\n # Note: This will have the TRANSLATOR: tag but shouldn't\n # be included on the extracted stuff\n print(ngettext('foobar', 'foobars', 1))",
" print(ngettext('foobar', 'foobars', 1))"
] |
# -*- coding: utf-8 -*-
# This file won't normally be in this directory.
# It IS only for tests
from gettext import ngettext
def foo():
# Note: This will have the TRANSLATOR: tag but shouldn't
# be included on the extracted stuff
print ngettext('FooBar', 'FooBars', 1)
| [
[
1,
0,
0.5455,
0.0909,
0,
0.66,
0,
723,
0,
1,
0,
0,
723,
0,
0
],
[
2,
0,
0.8636,
0.3636,
0,
0.66,
1,
528,
0,
0,
0,
0,
0,
0,
2
],
[
8,
1,
1,
0.0909,
1,
0.3,
0,
... | [
"from gettext import ngettext",
"def foo():\n # Note: This will have the TRANSLATOR: tag but shouldn't\n # be included on the extracted stuff\n print(ngettext('FooBar', 'FooBars', 1))",
" print(ngettext('FooBar', 'FooBars', 1))"
] |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.2188,
0.0156,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.2344,
0.0156,
0,
0.66,
0.1429,
723,
0,
1,
0,
0,
723,
0,
0
],
[
1,
0,
0.25,
0.0156,
0,
0.... | [
"import doctest",
"import gettext",
"import unittest",
"from StringIO import StringIO",
"from babel.messages import mofile, Catalog",
"class WriteMoTestCase(unittest.TestCase):\n\n def test_sorting(self):\n # Ensure the header is sorted to the first entry so that its charset\n # can be ap... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.56,
0.04,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.6,
0.04,
0,
0.66,
0.25,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.68,
0.04,
0,
0.66,
0.5,
... | [
"import doctest",
"import unittest",
"from babel.messages import plurals",
"def suite():\n suite = unittest.TestSuite()\n suite.addTest(doctest.DocTestSuite(plurals))\n return suite",
" suite = unittest.TestSuite()",
" suite.addTest(doctest.DocTestSuite(plurals))",
" return suite",
"... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.053,
0.0038,
0,
0.66,
0,
739,
0,
1,
0,
0,
739,
0,
0
],
[
1,
0,
0.0568,
0.0038,
0,
0.66,
0.125,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0606,
0.0038,
0,
0.... | [
"import copy",
"import datetime",
"import doctest",
"import unittest",
"from babel.messages import catalog",
"class MessageTestCase(unittest.TestCase):\n\n def test_python_format(self):\n assert catalog.PYTHON_FORMAT.search('foo %d bar')\n assert catalog.PYTHON_FORMAT.search('foo %s bar')... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.4828,
0.0345,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
2,
0,
0.7241,
0.3793,
0,
0.66,
0.5,
425,
0,
0,
1,
0,
0,
0,
13
],
[
1,
1,
0.6034,
0.069,
1,
0.32,
... | [
"import unittest",
"def suite():\n from babel.messages.tests import catalog, extract, frontend, mofile, \\\n plurals, pofile, checkers\n suite = unittest.TestSuite()\n suite.addTest(catalog.suite())\n suite.addTest(extract.suite())\n suite.addTest(frontend.suite(... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software consists of v... | [
[
8,
0,
0.0852,
0.017,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1023,
0.0057,
0,
0.66,
0.0667,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.1136,
0.0057,
0,
0.66,... | [
"\"\"\"A simple JavaScript 1.5 lexer which is used for the JavaScript\nextractor.\n\"\"\"",
"import re",
"from babel.util import itemgetter",
"operators = [\n '+', '-', '*', '%', '!=', '==', '<', '>', '<=', '>=', '=',\n '+=', '-=', '*=', '%=', '<<', '>>', '>>>', '<<=', '>>=',\n '>>>=', '&', '&=', '|'... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0891,
0.023,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1092,
0.0057,
0,
0.66,
0.1111,
808,
0,
1,
0,
0,
808,
0,
0
],
[
1,
0,
0.1149,
0.0057,
0,
0.66,... | [
"\"\"\"Various routines that help with validation of translations.\n\n:since: version 0.9\n\"\"\"",
"from itertools import izip",
"from babel.messages.catalog import TranslationError, PYTHON_FORMAT",
"from babel.util import set",
"_string_format_compatibilities = [\n set(['i', 'd', 'u']),\n set(['x', ... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0549,
0.0039,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0627,
0.0039,
0,
0.66,
0.1429,
40,
0,
2,
0,
0,
40,
0,
0
],
[
1,
0,
0.0667,
0.0039,
0,
0.66,
... | [
"\"\"\"Plural form definitions.\"\"\"",
"from babel.core import default_locale, Locale",
"from babel.util import itemgetter",
"LC_CTYPE = default_locale('LC_CTYPE')",
"PLURALS = {\n # Afar\n # 'aa': (),\n # Abkhazian\n # 'ab': (),\n # Avestan\n # 'ae': (),\n # Afrikaans - From Pootle's ... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.875,
0.0625,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
1,
0.0625,
0,
0.66,
1,
375,
0,
1,
0,
0,
375,
0,
0
]
] | [
"\"\"\"Support for ``gettext`` message catalogs.\"\"\"",
"from babel.messages.catalog import *"
] |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.1918,
0.0137,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.2055,
0.0137,
0,
0.66,
0.2,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.2329,
0.0137,
0,
0.66,... | [
"import doctest",
"import unittest",
"from babel import localedata",
"class MergeResolveTestCase(unittest.TestCase):\n\n def test_merge_items(self):\n d = {1: 'foo', 3: 'baz'}\n localedata.merge(d, {1: 'Foo', 2: 'Bar'})\n self.assertEqual({1: 'Foo', 2: 'Bar', 3: 'baz'}, d)\n\n def t... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.2642,
0.0189,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.283,
0.0189,
0,
0.66,
0.1429,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3019,
0.0189,
0,
0... | [
"import doctest",
"import os",
"import unittest",
"from babel import core",
"from babel.core import default_locale",
"class DefaultLocaleTest(unittest.TestCase):\n \n def setUp(self):\n self._old_locale_settings = self._current_locale_settings()\n \n def tearDown(self):\n self._s... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.56,
0.04,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.6,
0.04,
0,
0.66,
0.25,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.68,
0.04,
0,
0.66,
0.5,
... | [
"import doctest",
"import unittest",
"from babel import util",
"def suite():\n suite = unittest.TestSuite()\n suite.addTest(doctest.DocTestSuite(util))\n return suite",
" suite = unittest.TestSuite()",
" suite.addTest(doctest.DocTestSuite(util))",
" return suite",
"if __name__ == '__... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.56,
0.04,
0,
0.66,
0,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.6,
0.04,
0,
0.66,
0.25,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.68,
0.04,
0,
0.66,
0.5,
... | [
"import doctest",
"import unittest",
"from babel import support",
"def suite():\n suite = unittest.TestSuite()\n suite.addTest(doctest.DocTestSuite(support))\n return suite",
" suite = unittest.TestSuite()",
" suite.addTest(doctest.DocTestSuite(support))",
" return suite",
"if __name... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
1,
0,
0.4667,
0.0333,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
2,
0,
0.7167,
0.4,
0,
0.66,
0.5,
425,
0,
0,
1,
0,
0,
0,
15
],
[
1,
1,
0.5667,
0.0333,
1,
0.37,
... | [
"import unittest",
"def suite():\n from babel.tests import core, dates, localedata, numbers, support, util\n from babel.messages import tests as messages\n suite = unittest.TestSuite()\n suite.addTest(core.suite())\n suite.addTest(dates.suite())\n suite.addTest(localedata.suite())\n suite.add... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
7,
0,
0.1046,
0.0327,
0,
0.66,
0,
0,
0,
1,
0,
0,
0,
0,
0
],
[
1,
1,
0.098,
0.0065,
1,
0.54,
0,
349,
0,
1,
0,
0,
349,
0,
0
],
[
14,
1,
0.1046,
0.0065,
1,
0.54,
... | [
"try:\n from decimal import Decimal\n have_decimal = True\nexcept ImportError:\n have_decimal = False",
" from decimal import Decimal",
" have_decimal = True",
" have_decimal = False",
"import doctest",
"import unittest",
"from babel import numbers",
"class FormatDecimalTestCase(unit... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0378,
0.0027,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0432,
0.0027,
0,
0.66,
0.0333,
220,
0,
1,
0,
0,
220,
0,
0
],
[
1,
0,
0.0459,
0.0027,
0,
0.66... | [
"\"\"\"Various utility classes and functions.\"\"\"",
"import codecs",
"from datetime import timedelta, tzinfo",
"import os",
"import re",
"try:\n set = set\nexcept NameError:\n from sets import Set as set",
" set = set",
" from sets import Set as set",
"import textwrap",
"import time"... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0407,
0.0127,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0509,
0.0025,
0,
0.66,
0.0909,
426,
0,
3,
0,
0,
426,
0,
0
],
[
1,
0,
0.0534,
0.0025,
0,
0.66... | [
"\"\"\"Several classes and functions that help with integrating and using Babel\nin applications.\n\n.. note: the code in this module is not used by Babel itself\n\"\"\"",
"from datetime import date, datetime, time",
"import gettext",
"from babel.core import Locale",
"from babel.dates import format_date, fo... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2008 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software... | [
[
8,
0,
0.5256,
0.359,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.7436,
0.0256,
0,
0.66,
0.3333,
40,
0,
1,
0,
0,
40,
0,
0
],
[
14,
0,
0.7949,
0.0256,
0,
0.66,
... | [
"\"\"\"Integrated collection of utilities that assist in internationalizing and\nlocalizing applications.\n\nThis package is basically composed of two major parts:\n\n * tools to build and work with ``gettext`` message catalogs\n * a Python interface to the CLDR (Common Locale Data Repository), providing\n access... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | [
[
8,
0,
0.0308,
0.0154,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0445,
0.0017,
0,
0.66,
0.0303,
526,
0,
1,
0,
0,
526,
0,
0
],
[
1,
0,
0.0462,
0.0017,
0,
0.66... | [
"\"\"\"Locale dependent formatting and parsing of numeric data.\n\nThe default locale for the functions in this module is determined by the\nfollowing environment variables, in that order:\n\n * ``LC_NUMERIC``,\n * ``LC_ALL``, and\n * ``LANG``",
"import math",
"import re",
"try:\n from decimal import Decim... |
'''Base classes and helpers for building zone specific tzinfo classes'''
from datetime import datetime, timedelta, tzinfo
from bisect import bisect_right
try:
set
except NameError:
from sets import Set as set
import pytz
from pytz.exceptions import AmbiguousTimeError, NonExistentTimeError
__all__ = []
_time... | [
[
8,
0,
0.0018,
0.0018,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0053,
0.0018,
0,
0.66,
0.0526,
426,
0,
3,
0,
0,
426,
0,
0
],
[
1,
0,
0.0071,
0.0018,
0,
0.66... | [
"'''Base classes and helpers for building zone specific tzinfo classes'''",
"from datetime import datetime, timedelta, tzinfo",
"from bisect import bisect_right",
"try:\n set\nexcept NameError:\n from sets import Set as set",
" set",
" from sets import Set as set",
"import pytz",
"from pyt... |
#!/usr/bin/env python
'''
$Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $
'''
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from datetime import datetime, timedelta
from struct import unpack, calcsize
from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo
fro... | [
[
8,
0,
0.0219,
0.0219,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
7,
0,
0.0547,
0.0292,
0,
0.66,
0.1,
0,
0,
1,
0,
0,
0,
0,
0
],
[
1,
1,
0.0511,
0.0073,
1,
0.22,
0... | [
"'''\n$Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $\n'''",
"try:\n from cStringIO import StringIO\nexcept ImportError:\n from io import StringIO",
" from cStringIO import StringIO",
" from io import StringIO",
"from datetime import datetime, timedelta",
"from struct import unpack, calc... |
"""
A pytz version that runs smoothly on Google App Engine.
Based on http://appengine-cookbook.appspot.com/recipe/caching-pytz-helper/
To use, add pytz to your path normally, but import it from the gae module:
from pytz.gae import pytz
Applied patches:
- The zoneinfo dir is removed fr... | [
[
8,
0,
0.134,
0.2577,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.268,
0.0103,
0,
0.66,
0.0833,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2784,
0.0103,
0,
0.66,
... | [
"\"\"\"\n A pytz version that runs smoothly on Google App Engine.\n\n Based on http://appengine-cookbook.appspot.com/recipe/caching-pytz-helper/\n\n To use, add pytz to your path normally, but import it from the gae module:\n\n from pytz.gae import pytz",
"import os",
"import logging",
"import... |
'''
Reference tzinfo implementations from the Python docs.
Used for testing against as they are only correct for the years
1987 to 2006. Do not use these for real code.
'''
from datetime import tzinfo, timedelta, datetime
from pytz import utc, UTC, HOUR, ZERO
# A class building tzinfo objects for fixed-offset time zo... | [
[
8,
0,
0.0236,
0.0394,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0551,
0.0079,
0,
0.66,
0.0588,
426,
0,
3,
0,
0,
426,
0,
0
],
[
1,
0,
0.063,
0.0079,
0,
0.66,... | [
"'''\nReference tzinfo implementations from the Python docs.\nUsed for testing against as they are only correct for the years\n1987 to 2006. Do not use these for real code.\n'''",
"from datetime import tzinfo, timedelta, datetime",
"from pytz import utc, UTC, HOUR, ZERO",
"class FixedOffset(tzinfo):\n \"\"... |
'''
Custom exceptions raised by pytz.
'''
__all__ = [
'UnknownTimeZoneError', 'InvalidTimeError', 'AmbiguousTimeError',
'NonExistentTimeError',
]
class UnknownTimeZoneError(KeyError):
'''Exception raised when pytz is passed an unknown timezone.
>>> isinstance(UnknownTimeZoneError(), LookupError)... | [
[
8,
0,
0.0417,
0.0625,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1354,
0.0833,
0,
0.66,
0.2,
272,
0,
0,
0,
0,
0,
5,
0
],
[
3,
0,
0.3646,
0.2917,
0,
0.66,
... | [
"'''\nCustom exceptions raised by pytz.\n'''",
"__all__ = [\n 'UnknownTimeZoneError', 'InvalidTimeError', 'AmbiguousTimeError',\n 'NonExistentTimeError',\n ]",
"class UnknownTimeZoneError(KeyError):\n '''Exception raised when pytz is passed an unknown timezone.\n\n >>> isinstance(UnknownTimeZoneE... |
'''
datetime.tzinfo timezone definitions generated from the
Olson timezone database:
ftp://elsie.nci.nih.gov/pub/tz*.tar.gz
See the datetime section of the Python Library Reference for information
on how to use these modules.
'''
# The Olson database is updated several times a year.
OLSON_VERSION = '2011n'
VERSI... | [
[
8,
0,
0.0033,
0.0059,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0078,
0.0007,
0,
0.66,
0.0227,
781,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0085,
0.0007,
0,
0.66... | [
"'''\ndatetime.tzinfo timezone definitions generated from the\nOlson timezone database:\n\n ftp://elsie.nci.nih.gov/pub/tz*.tar.gz\n\nSee the datetime section of the Python Library Reference for information\non how to use these modules.",
"OLSON_VERSION = '2011n'",
"VERSION = OLSON_VERSION",
"__version__ =... |
import logging, email
from google.appengine.ext import webapp
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.api import mail
class LogSenderHandler(InboundMailHandler):
def receive(self, mail_message):
... | [
[
1,
0,
0.0588,
0.0588,
0,
0.66,
0,
715,
0,
2,
0,
0,
715,
0,
0
],
[
1,
0,
0.1176,
0.0588,
0,
0.66,
0.2,
167,
0,
1,
0,
0,
167,
0,
0
],
[
1,
0,
0.1765,
0.0588,
0,
0.6... | [
"import logging, email",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.mail_handlers import InboundMailHandler",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.api import mail",
"class LogSenderHandler(InboundMailHandler):\n def receiv... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# PythonTidy.py
# 2006 Oct 27 . ccr
'''PythonTidy.py cleans up, regularizes, and reformats the text of
Python scripts.
===========================================
Copyright © 2006 Charles Curtis Rhode
===========================================
This program is free software... | [
[
8,
0,
0.0131,
0.0234,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0251,
0.0002,
0,
0.66,
0.0055,
777,
0,
1,
0,
0,
777,
0,
0
],
[
14,
0,
0.0255,
0.0002,
0,
0.6... | [
"'''PythonTidy.py cleans up, regularizes, and reformats the text of\nPython scripts.\n\n===========================================\nCopyright © 2006 Charles Curtis Rhode\n===========================================\n\nThis program is free software; you can redistribute it and/or modify",
"from __future__ import ... |
#! /usr/bin/env python
# coding=utf-8
#############################################################################
# #
# File: listfiles.py #
# ... | [
[
1,
0,
0.0664,
0.0039,
0,
0.66,
0,
709,
0,
1,
0,
0,
709,
0,
0
],
[
1,
0,
0.0703,
0.0039,
0,
0.66,
0.0357,
857,
0,
1,
0,
0,
857,
0,
0
],
[
1,
0,
0.0742,
0.0039,
0,
... | [
"import wsgiref.handlers",
"import urlparse",
"import StringIO",
"import logging",
"import base64",
"import zlib",
"import gzip",
"import tarfile",
"import re",
"import traceback",
"import os",
"import sys",
"from google.appengine.ext import webapp",
"from google.appengine.ext import db",
... |
# settings for app
#PAYPAL_ENDPOINT = 'https://svcs.sandbox.paypal.com/AdaptivePayments/' # sandbox
PAYPAL_ENDPOINT = 'https://svcs.paypal.com/AdaptivePayments/' # production
#PAYPAL_PAYMENT_HOST = 'https://www.sandbox.paypal.com/au/cgi-bin/webscr' # sandbox
PAYPAL_PAYMENT_HOST = 'https://www.paypal.com/webscr' # pro... | [
[
14,
0,
0.1538,
0.0385,
0,
0.66,
0,
873,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2692,
0.0385,
0,
0.66,
0.0714,
34,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3462,
0.0385,
0,
0.... | [
"PAYPAL_ENDPOINT = 'https://svcs.paypal.com/AdaptivePayments/' # production",
"PAYPAL_PAYMENT_HOST = 'https://www.paypal.com/webscr' # production",
"PAYPAL_USERID = 'niklasro_api1.gmail.com'",
"PAYPAL_PASSWORD = 'NWCX5S6XYC6GFMSK'",
"PAYPAL_SIGNATURE = 'AFcWxV21C7fd0v3bYYYRCpSSRl31AIQmaEQDERPGWrpM6EgaoIDy0E... |
#!/usr/bin/env python
# -*- coding: latin-1 -*-
import logging
from google.appengine.ext import webapp
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.api import xmpp
from google.appengine.ext.webapp import xmpp_han... | [
[
1,
0,
0.1034,
0.0345,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.1379,
0.0345,
0,
0.66,
0.125,
167,
0,
1,
0,
0,
167,
0,
0
],
[
1,
0,
0.1724,
0.0345,
0,
0... | [
"import logging",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.mail_handlers import InboundMailHandler",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.api import xmpp",
"from google.appengine.ext.webapp import xmpp_handlers",
"from go... |
import wsgiref.handlers
from google.appengine.ext import webapp
from main import BaseHandler
from google.appengine.ext.webapp import util
class HomeHandler(BaseHandler):
def get(self):
self.render(u'example',)
application = webapp.WSGIApplication([ (r"/example", HomeHandler)])
| [
[
1,
0,
0.1,
0.1,
0,
0.66,
0,
709,
0,
1,
0,
0,
709,
0,
0
],
[
1,
0,
0.2,
0.1,
0,
0.66,
0.2,
167,
0,
1,
0,
0,
167,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.4,
62... | [
"import wsgiref.handlers",
"from google.appengine.ext import webapp",
"from main import BaseHandler",
"from google.appengine.ext.webapp import util",
"class HomeHandler(BaseHandler):\n def get(self):\n self.render(u'example',)",
" def get(self):\n self.render(u'example',)",
" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.