code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Modbus TestKit: Implementation of Modbus protocol in python
(C)2009 - Luc Jean - luc.jean@gmail.com
(C)2009 - Apidev - http://www.apidev.fr
This is distributed under GNU LGPL license, see license.txt
"""
import unittest
import modbus_tk.modbus
import... | [
[
8,
0,
0.0158,
0.0194,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0291,
0.0024,
0,
0.66,
0.0769,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0316,
0.0024,
0,
0.66,
... | [
"\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"",
"import unittest",
"import modbus_tk.modbus",
"import threading",
"import stru... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Modbus TestKit: Implementation of Modbus protocol in python
(C)2009 - Luc Jean - luc.jean@gmail.com
(C)2009 - Apidev - http://www.apidev.fr
This is distributed under GNU LGPL license, see license.txt
"""
import unittest
import modbus_tk
import modbus... | [
[
8,
0,
0.0223,
0.0274,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0411,
0.0034,
0,
0.66,
0.0833,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.0445,
0.0034,
0,
0.66,
... | [
"\"\"\"\n Modbus TestKit: Implementation of Modbus protocol in python\n\n (C)2009 - Luc Jean - luc.jean@gmail.com\n (C)2009 - Apidev - http://www.apidev.fr\n\n This is distributed under GNU LGPL license, see license.txt\n\"\"\"",
"import unittest",
"import modbus_tk",
"import modbus_tk.modbus_tcp as modbus_tc... |
#====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you ... | [
[
1,
0,
0.3514,
0.0135,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3649,
0.0135,
0,
0.66,
0.1111,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.3784,
0.0135,
0,
... | [
"import os",
"import re",
"import tempfile",
"import shutil",
"ignore_pattern = re.compile('^(.svn|target|bin|classes)')",
"java_pattern = re.compile('^.*\\.java')",
"annot_pattern = re.compile('import org\\.apache\\.http\\.annotation\\.')",
"def process_dir(dir):\n files = os.listdir(dir)\n for... |
from SimpleXMLRPCServer import SimpleXMLRPCServer
import datetime, socket, xmlrpclib, random, array
# Create dummy AlertMe server
server = SimpleXMLRPCServer(("localhost", 8888))
# This is a basic interface to the AlertMe API for development purposes
# As such, this does not implement all the functions but poses as a... | [
[
1,
0,
0.0029,
0.0029,
0,
0.66,
0,
73,
0,
1,
0,
0,
73,
0,
0
],
[
1,
0,
0.0058,
0.0029,
0,
0.66,
0.2,
426,
0,
5,
0,
0,
426,
0,
0
],
[
14,
0,
0.0145,
0.0029,
0,
0.66... | [
"from SimpleXMLRPCServer import SimpleXMLRPCServer",
"import datetime, socket, xmlrpclib, random, array",
"server = SimpleXMLRPCServer((\"localhost\", 8888))",
"class MyFuncs:\n\tacc1 = \"test1\"\n\tpass1 = \"pass1\"\n\tmode1 = 0\n\tacc1hubs = \"Firsthouse|test1hub\"\n\n\tacc2 = \"test2\"\n\tpass2 = \"pass2\"... |
'''
Created on 21-03-2011
@author: maciek
'''
def formatString(format, **kwargs):
'''
'''
if not format: return ''
for arg in kwargs.keys():
format = format.replace("{" + arg + "}", "##" + arg + "##")
format = format.replace ("{", "{{")
format = format.replace("}", "}}")
for... | [
[
8,
0,
0.1304,
0.2174,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
2,
0,
0.6739,
0.6957,
0,
0.66,
1,
798,
0,
2,
1,
0,
0,
0,
9
],
[
8,
1,
0.413,
0.087,
1,
0.08,
0,
... | [
"'''\nCreated on 21-03-2011\n\n@author: maciek\n'''",
"def formatString(format, **kwargs):\n '''\n '''\n if not format: return ''\n \n for arg in kwargs.keys():\n format = format.replace(\"{\" + arg + \"}\", \"##\" + arg + \"##\")\n format = format.replace (\"{\", \"{{\")",
" '''\n ... |
'''
Created on 21-03-2011
@author: maciek
'''
from IndexGenerator import IndexGenerator
from optparse import OptionParser
import os
import tempfile
import shutil
import logging
logging.basicConfig(level = logging.DEBUG)
parser = OptionParser()
parser.add_option('-n', '--app-name', action='store', dest='appName', hel... | [
[
8,
0,
0.0341,
0.0568,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0682,
0.0114,
0,
0.66,
0.0303,
933,
0,
1,
0,
0,
933,
0,
0
],
[
1,
0,
0.0795,
0.0114,
0,
0.66... | [
"'''\nCreated on 21-03-2011\n\n@author: maciek\n'''",
"from IndexGenerator import IndexGenerator",
"from optparse import OptionParser",
"import os",
"import tempfile",
"import shutil",
"import logging",
"logging.basicConfig(level = logging.DEBUG)",
"parser = OptionParser()",
"parser.add_option('-n... |
'''
Created on 21-03-2011
@author: maciek
'''
from formater import formatString
import os
class IndexGenerator(object):
'''
Generates Index.html for iOS app OTA distribution
'''
basePath = os.path.dirname(__file__)
templateFile = os.path.join(basePath,"templates/index.tmpl")
releaseUrls = ""
... | [
[
8,
0,
0.0526,
0.0877,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1053,
0.0175,
0,
0.66,
0.3333,
11,
0,
1,
0,
0,
11,
0,
0
],
[
1,
0,
0.1228,
0.0175,
0,
0.66,
... | [
"'''\nCreated on 21-03-2011\n\n@author: maciek\n'''",
"from formater import formatString",
"import os",
"class IndexGenerator(object):\n '''\n Generates Index.html for iOS app OTA distribution\n '''\n basePath = os.path.dirname(__file__)\n templateFile = os.path.join(basePath,\"templates/index.... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | [
[
14,
0,
0.0297,
0.0017,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0367,
0.0017,
0,
0.66,
0.0333,
509,
0,
1,
0,
0,
509,
0,
0
],
[
8,
0,
0.0385,
0.0017,
0,
0... | [
"__author__ = 'afshar@google.com (Ali Afshar)'",
"import sys",
"sys.path.insert(0, 'lib')",
"import os",
"import httplib2",
"import sessions",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.ext import db",
"from google... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | [
[
14,
0,
0.0557,
0.0033,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0689,
0.0033,
0,
0.66,
0.0333,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0721,
0.0033,
0,
0... | [
"__author__ = 'afshar@google.com (Ali Afshar)'",
"import os",
"import httplib2",
"import sessions",
"from google.appengine.ext import db",
"from google.appengine.ext.webapp import template",
"from apiclient.discovery import build_from_document",
"from apiclient.http import MediaUpload",
"from oauth2... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | [
[
14,
0,
0.1667,
0.0556,
0,
0.66,
0,
189,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3889,
0.0556,
0,
0.66,
0.3333,
295,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.6111,
0.0556,
0,
0... | [
"manual_verstr = \"1.5\"",
"auto_build_num = \"211\"",
"verstr = manual_verstr + \".\" + auto_build_num",
"try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | [
[
8,
0,
0.3,
0.575,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.625,
0.025,
0,
0.66,
0.3333,
311,
0,
1,
0,
0,
311,
0,
0
],
[
1,
0,
0.65,
0.025,
0,
0.66,
0.6... | [
"\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | [
[
8,
0,
0.2927,
0.561,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.6098,
0.0244,
0,
0.66,
0.25,
311,
0,
1,
0,
0,
311,
0,
0
],
[
1,
0,
0.6341,
0.0244,
0,
0.66,
... | [
"\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | [
[
8,
0,
0.0451,
0.0765,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0874,
0.0027,
0,
0.66,
0.0625,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0929,
0.0027,
0,
0.66,... | [
"\"\"\"Multi-credential file store with lock support.\n\nThis module implements a JSON credential store where multiple\ncredentials can be stored in one file. That file supports locking\nboth in a single process and across processes.\n\nThe credential themselves are keyed off of:\n* client_id",
"__author__ = 'jb... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0173,
0.0042,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.021,
0.001,
0,
0.66,
0.0263,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0231,
0.001,
0,
0.66,
... | [
"\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import base64",
"import clientsecrets",
"import copy",
"import datetime",
"import httplib2",
"import logging",
"import os",
"import sys",
"im... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1848,
0.0543,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2283,
0.0109,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.25,
0.0109,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import threading",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from djan... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1491,
0.0439,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1842,
0.0088,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2018,
0.0088,
0,
0.66,... | [
"\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import oauth2client",
"import base64",
"import pickle",
"from django.db import models",
"from oauth2client.client import St... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0303,
0.0074,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0368,
0.0018,
0,
0.66,
0.0294,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0404,
0.0018,
0,
0.66,... | [
"\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use OAuth 2.0 on Google App Engine.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import base64",
"import httplib2",
"import logging",
"import pickle",
"import time",
"try: # pragma: no cover\n import simp... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | [
[
1,
0,
0.0711,
0.004,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.0751,
0.004,
0,
0.66,
0.0625,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.0791,
0.004,
0,
0.6... | [
"import base64",
"import hashlib",
"import logging",
"import time",
"from OpenSSL import crypto",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from django, should work on App Engine\n from django.utils import simplejson\n except I... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1504,
0.0442,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1858,
0.0088,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.2478,
0.0796,
0,
0.66,... | [
"\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pr... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | [
[
1,
0,
0.006,
0.006,
0,
0.66,
0,
32,
0,
1,
0,
0,
32,
0,
0
],
[
1,
0,
0.0119,
0.006,
0,
0.66,
0.1,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0179,
0.006,
0,
0.66,
... | [
"import Cookie",
"import datetime",
"import time",
"import email.utils",
"import calendar",
"import base64",
"import hashlib",
"import hmac",
"import re",
"import logging",
"class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | [
[
8,
0,
0.0814,
0.1105,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1453,
0.0058,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1512,
0.0058,
0,
0.66... | [
"\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1",
"__v... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0186,
0.0064,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0234,
0.0011,
0,
0.66,
0.0303,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0261,
0.0043,
0,
0.66... | [
"\"\"\"Classes to encapsulate a single HTTP request.\n\nThe classes implement a command pattern, with every\nobject supporting an execute() method that does the\nactuall HTTP request.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"__all__ = [\n 'HttpRequest', 'RequestMockBuilder', 'HttpMoc... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0342,
0.0083,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0414,
0.0021,
0,
0.66,
0.0476,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0476,
0.0021,
0,
0.66,... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import copy",
"import httplib2",
"import logging",
"import oauth2 as oauth",
"import urllib",
"import urlparse",
"from anyjson import simplejson",
"tr... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.0546,
0.0191,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0683,
0.0027,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0738,
0.0027,
0,
0.66,... | [
"\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.2619,
0.0635,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3175,
0.0159,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3492,
0.0159,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"import threading",
"from apiclient.oauth import Storage as BaseStorage",
"class Storage(BaseStorage):\n \"\"\"Store and retr... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
1,
0,
0.2679,
0.0179,
0,
0.66,
0,
629,
0,
1,
0,
0,
629,
0,
0
],
[
1,
0,
0.2857,
0.0179,
0,
0.66,
0.2,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.3036,
0.0179,
0,
0.6... | [
"import apiclient",
"import base64",
"import pickle",
"from django.db import models",
"class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):",
" __metaclass__ = models.SubfieldBase",
" def db_t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1259,
0.037,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1556,
0.0074,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1704,
0.0074,
0,
0.66,
... | [
"\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"from google.appengine.ext import db",
"from apiclient.oauth import OAuthCredentials",
"... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.1667,
0.0439,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2018,
0.0088,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2281,
0.0088,
0,
0.66,... | [
"\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from anyjson import simplejson",
"class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass",
" \"\"\"Base error for th... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1205,
0.1452,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2046,
0.0033,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2112,
0.0033,
0,
0.66,
... | [
"\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | [
[
1,
0,
0.0204,
0.0068,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0272,
0.0068,
0,
0.66,
0.0833,
614,
0,
1,
0,
0,
614,
0,
0
],
[
14,
0,
0.0408,
0.0068,
0,
... | [
"import re",
"import urllib",
"RESERVED = \":/?#[]@!$&'()*+,;=\"",
"OPERATOR = \"+./;?|!@\"",
"EXPLODE = \"*+\"",
"MODIFIER = \":^\"",
"TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)",
"VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | [
[
8,
0,
0.1818,
0.0267,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2032,
0.0053,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.2219,
0.0107,
0,
0.66,
... | [
"\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"",
"__author__ = 'olexiy@google.com (Olexiy Oryeshko)'",
"class Error(Exception):\n \"\"\"Thrown If val... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | [
[
8,
0,
0.0365,
0.0708,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0845,
0.0205,
0,
0.66,
0.04,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0982,
0.0023,
0,
0.66,
... | [
"\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | [
[
8,
0,
0.0318,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0636,
0.0091,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0727,
0.0091,
0,
0.66... | [
"\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"",
"__author__ = \"Joe Gregorio (joe@bitworking.org)\"",
"__copyright__ = \"Copyright 2006, Joe Gregorio\"",
"__contributors__ = []",
"__version__ = \"1.0.0\"",
"__license__ = \"MIT\"",
"__history__ = \"\"\"\n\"\"\"",
"import urlparse",
"escape_... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2012 Zdenko Podobný
# Author: Zdenko Podobný
#
# 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/LIC... | [
[
1,
0,
0.25,
0.25,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.5,
0.25,
0,
0.66,
0.5,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.75,
0.25,
0,
0.66,
1,
... | [
"import os",
"import sys",
"import ctypes"
] |
#====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you ... | [
[
1,
0,
0.3514,
0.0135,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3649,
0.0135,
0,
0.66,
0.1111,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.3784,
0.0135,
0,
... | [
"import os",
"import re",
"import tempfile",
"import shutil",
"ignore_pattern = re.compile('^(.svn|target|bin|classes)')",
"java_pattern = re.compile('^.*\\.java')",
"annot_pattern = re.compile('import org\\.apache\\.http\\.annotation\\.')",
"def process_dir(dir):\n files = os.listdir(dir)\n for... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | [
[
14,
0,
0.0557,
0.0033,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0689,
0.0033,
0,
0.66,
0.0333,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0721,
0.0033,
0,
0... | [
"__author__ = 'afshar@google.com (Ali Afshar)'",
"import os",
"import httplib2",
"import sessions",
"from google.appengine.ext import db",
"from google.appengine.ext.webapp import template",
"from apiclient.discovery import build_from_document",
"from apiclient.http import MediaUpload",
"from oauth2... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | [
[
14,
0,
0.0281,
0.0017,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0347,
0.0017,
0,
0.66,
0.0303,
509,
0,
1,
0,
0,
509,
0,
0
],
[
8,
0,
0.0364,
0.0017,
0,
0... | [
"__author__ = 'afshar@google.com (Ali Afshar)'",
"import sys",
"sys.path.insert(0, 'lib')",
"import os",
"import httplib2",
"import sessions",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.appengine.ext import db",
"from google... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | [
[
8,
0,
0.1818,
0.0267,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2032,
0.0053,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.2219,
0.0107,
0,
0.66,
... | [
"\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"",
"__author__ = 'olexiy@google.com (Olexiy Oryeshko)'",
"class Error(Exception):\n \"\"\"Thrown If val... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | [
[
1,
0,
0.0738,
0.0041,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.0779,
0.0041,
0,
0.66,
0.0625,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.082,
0.0041,
0,
0... | [
"import base64",
"import hashlib",
"import logging",
"import time",
"from OpenSSL import crypto",
"from anyjson import simplejson",
"CLOCK_SKEW_SECS = 300 # 5 minutes in seconds",
"AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds",
"MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds",
"cla... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | [
[
8,
0,
0.0437,
0.0741,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0847,
0.0026,
0,
0.66,
0.0588,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0899,
0.0026,
0,
0.66,... | [
"\"\"\"Multi-credential file store with lock support.\n\nThis module implements a JSON credential store where multiple\ncredentials can be stored in one file. That file supports locking\nboth in a single process and across processes.\n\nThe credential themselves are keyed off of:\n* client_id",
"__author__ = 'jb... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0145,
0.0035,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0176,
0.0009,
0,
0.66,
0.0244,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0193,
0.0009,
0,
0.66,... | [
"\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import base64",
"import clientsecrets",
"import copy",
"import datetime",
"import httplib2",
"import logging",
"import os",
"import sys",
"im... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1619,
0.0476,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2,
0.0095,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2286,
0.0095,
0,
0.66,
... | [
"\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from anyjson import simplejson",
"TYPE_WEB = 'web'",
"TYPE_INSTALL... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1604,
0.0472,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1981,
0.0094,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.217,
0.0094,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import os",
"import stat",
"import threading",
"from anyjson import simplejson",
"from client import Storage as BaseStorage",
"from clien... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1371,
0.0403,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1694,
0.0081,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1855,
0.0081,
0,
0.66,... | [
"\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import oauth2client",
"import base64",
"import pickle",
"from django.db import models",
"from oauth2client.client import St... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | [
[
8,
0,
0.0814,
0.1105,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1453,
0.0058,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1512,
0.0058,
0,
0.66... | [
"\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1",
"__v... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1205,
0.1452,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2046,
0.0033,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2112,
0.0033,
0,
0.66,
... | [
"\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0342,
0.0083,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0414,
0.0021,
0,
0.66,
0.0476,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0476,
0.0021,
0,
0.66,... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import copy",
"import httplib2",
"import logging",
"import oauth2 as oauth",
"import urllib",
"import urlparse",
"from anyjson import simplejson",
"tr... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1259,
0.037,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1556,
0.0074,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1704,
0.0074,
0,
0.66,
... | [
"\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"from google.appengine.ext import db",
"from apiclient.oauth import OAuthCredentials",
"... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.2619,
0.0635,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3175,
0.0159,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3492,
0.0159,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"import threading",
"from apiclient.oauth import Storage as BaseStorage",
"class Storage(BaseStorage):\n \"\"\"Store and retr... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
1,
0,
0.2679,
0.0179,
0,
0.66,
0,
629,
0,
1,
0,
0,
629,
0,
0
],
[
1,
0,
0.2857,
0.0179,
0,
0.66,
0.2,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.3036,
0.0179,
0,
0.6... | [
"import apiclient",
"import base64",
"import pickle",
"from django.db import models",
"class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):",
" __metaclass__ = models.SubfieldBase",
" def db_t... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.0519,
0.0182,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0649,
0.0026,
0,
0.66,
0.0625,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0701,
0.0026,
0,
0.66,... | [
"\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.1545,
0.0407,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.187,
0.0081,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2114,
0.0081,
0,
0.66,
... | [
"\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from oauth2client.anyjson import simplejson",
"class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass",
" \"\"\"Base... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | [
[
8,
0,
0.0318,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0636,
0.0091,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0727,
0.0091,
0,
0.66... | [
"\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"",
"__author__ = \"Joe Gregorio (joe@bitworking.org)\"",
"__copyright__ = \"Copyright 2006, Joe Gregorio\"",
"__contributors__ = []",
"__version__ = \"1.0.0\"",
"__license__ = \"MIT\"",
"__history__ = \"\"\"\n\"\"\"",
"import urlparse",
"escape_... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | [
[
8,
0,
0.0365,
0.0708,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0845,
0.0205,
0,
0.66,
0.04,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0982,
0.0023,
0,
0.66,
... | [
"\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | [
[
1,
0,
0.006,
0.006,
0,
0.66,
0,
32,
0,
1,
0,
0,
32,
0,
0
],
[
1,
0,
0.0119,
0.006,
0,
0.66,
0.1,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0179,
0.006,
0,
0.66,
... | [
"import Cookie",
"import datetime",
"import time",
"import email.utils",
"import calendar",
"import base64",
"import hashlib",
"import hmac",
"import re",
"import logging",
"class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | [
[
14,
0,
0.1667,
0.0556,
0,
0.66,
0,
189,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3889,
0.0556,
0,
0.66,
0.3333,
295,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.6111,
0.0556,
0,
0... | [
"manual_verstr = \"1.5\"",
"auto_build_num = \"211\"",
"verstr = manual_verstr + \".\" + auto_build_num",
"try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | [
[
8,
0,
0.2927,
0.561,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.6098,
0.0244,
0,
0.66,
0.25,
311,
0,
1,
0,
0,
311,
0,
0
],
[
1,
0,
0.6341,
0.0244,
0,
0.66,
... | [
"\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | [
[
8,
0,
0.3,
0.575,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.625,
0.025,
0,
0.66,
0.3333,
311,
0,
1,
0,
0,
311,
0,
0
],
[
1,
0,
0.65,
0.025,
0,
0.66,
0.6... | [
"\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | [
[
1,
0,
0.0204,
0.0068,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0272,
0.0068,
0,
0.66,
0.0833,
614,
0,
1,
0,
0,
614,
0,
0
],
[
14,
0,
0.0408,
0.0068,
0,
... | [
"import re",
"import urllib",
"RESERVED = \":/?#[]@!$&'()*+,;=\"",
"OPERATOR = \"+./;?|!@\"",
"EXPLODE = \"*+\"",
"MODIFIER = \":^\"",
"TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)",
"VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])... |
from core import *
from paginator import *
| [
[
1,
0,
0.5,
0.5,
0,
0.66,
0,
864,
0,
1,
0,
0,
864,
0,
0
],
[
1,
0,
1,
0.5,
0,
0.66,
1,
711,
0,
1,
0,
0,
711,
0,
0
]
] | [
"from core import *",
"from paginator import *"
] |
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | [
[
8,
0,
0.1107,
0.1931,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2077,
0.0009,
0,
0.66,
0.0312,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.2086,
0.0009,
0,
0.66... | [
"\"\"\"\n\nA simple Solr client for python.\n\n\nFeatures\n--------\n * Supports Solr 1.2+",
"import sys",
"import socket",
"import httplib",
"import urlparse",
"import codecs",
"import urllib",
"import datetime",
"import logging",
"from StringIO import StringIO",
"from xml.sax import make_parse... |
# bootstrap easy_install
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages
import solr.core
setup(
name = 'solrpy',
# We can do this because we don't rely on getting "built" to be importable:
version = solr.core.__version__, # update only solr.core.__version__
url =... | [
[
1,
0,
0.1,
0.05,
0,
0.66,
0,
650,
0,
1,
0,
0,
650,
0,
0
],
[
8,
0,
0.15,
0.05,
0,
0.66,
0.25,
479,
3,
0,
0,
0,
0,
0,
1
],
[
1,
0,
0.25,
0.05,
0,
0.66,
0.5,
... | [
"import ez_setup",
"ez_setup.use_setuptools()",
"from setuptools import setup, find_packages",
"import solr.core",
"setup(\n name = 'solrpy',\n # We can do this because we don't rely on getting \"built\" to be importable:\n version = solr.core.__version__, # update only solr.core.__version__\n u... |
#!python
"""Bootstrap distribute installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from distribute_setup import use_setuptools
use_setuptools()
If you want to require a specific version of se... | [
[
8,
0,
0.0175,
0.0289,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.033,
0.0021,
0,
0.66,
0.027,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0351,
0.0021,
0,
0.66,
... | [
"\"\"\"Bootstrap distribute installation\n\nIf you want to use setuptools in your package's setup.py, just include this\nfile in the same directory with it, and add this to the top of your setup.py::\n\n from distribute_setup import use_setuptools\n use_setuptools()",
"import os",
"import sys",
"import ... |
# pysam versioning information
__version__ = "0.6"
__samtools_version__ = "0.1.18"
__tabix_version__ = "0.2.5"
| [
[
14,
0,
0.4286,
0.1429,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.7143,
0.1429,
0,
0.66,
0.5,
20,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
1,
0.1429,
0,
0.66,
... | [
"__version__ = \"0.6\"",
"__samtools_version__ = \"0.1.18\"",
"__tabix_version__ = \"0.2.5\""
] |
from csamtools import *
from ctabix import *
import csamtools
import ctabix
from cvcf import *
import cvcf
import Pileup
import sys
import os
class SamtoolsError( Exception ):
'''exception raised in case of an error incurred in the samtools library.'''
def __init__(self, value):
self.value = value
... | [
[
1,
0,
0.0078,
0.0078,
0,
0.66,
0,
796,
0,
1,
0,
0,
796,
0,
0
],
[
1,
0,
0.0156,
0.0078,
0,
0.66,
0.0714,
200,
0,
1,
0,
0,
200,
0,
0
],
[
1,
0,
0.0234,
0.0078,
0,
... | [
"from csamtools import *",
"from ctabix import *",
"import csamtools",
"import ctabix",
"from cvcf import *",
"import cvcf",
"import Pileup",
"import sys",
"import os",
"class SamtoolsError( Exception ):\n '''exception raised in case of an error incurred in the samtools library.'''\n\n def _... |
'''Tools for working with files in the samtools pileup -c format.'''
import collections
import pysam
PileupSubstitution = collections.namedtuple( "PileupSubstitution",
" ".join( (\
"chromosome",
"pos",
"reference_base",
"genotype",
... | [
[
8,
0,
0.0037,
0.0037,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0074,
0.0037,
0,
0.66,
0.0833,
193,
0,
1,
0,
0,
193,
0,
0
],
[
1,
0,
0.0111,
0.0037,
0,
0.66... | [
"'''Tools for working with files in the samtools pileup -c format.'''",
"import collections",
"import pysam",
"PileupSubstitution = collections.namedtuple( \"PileupSubstitution\",\n \" \".join( (\\\n \"chromosome\", \n \"pos\", \n \"reference... |
#!/usr/bin/python
'''
pysam
*****
'''
import os, sys, glob, shutil, hashlib, re, fnmatch
import platform
name = "pysam"
# collect pysam version
sys.path.insert( 0, "pysam")
import version
version = version.__version__
samtools_exclude = ( "bamtk.c", "razip.c", "bgzip.c",
"main.c", "calDepth... | [
[
8,
0,
0.0205,
0.0274,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0411,
0.0046,
0,
0.66,
0.037,
688,
0,
7,
0,
0,
688,
0,
0
],
[
1,
0,
0.0457,
0.0046,
0,
0.66,... | [
"'''\n\npysam\n*****\n\n'''",
"import os, sys, glob, shutil, hashlib, re, fnmatch",
"import platform",
"name = \"pysam\"",
"sys.path.insert( 0, \"pysam\")",
"import version",
"version = version.__version__",
"samtools_exclude = ( \"bamtk.c\", \"razip.c\", \"bgzip.c\", \n \"main.c\"... |
'''benchmark pysam BAM/SAM access with the samtools commandline tools.
samtools functions are called via the pysam interface to avoid the over-head
of starting additional processes.
'''
import pysam
import timeit
iterations = 10
def runBenchmark( test,
pysam_way,
samtools_way =... | [
[
8,
0,
0.0476,
0.0794,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1111,
0.0159,
0,
0.66,
0.1111,
878,
0,
1,
0,
0,
878,
0,
0
],
[
1,
0,
0.127,
0.0159,
0,
0.66,... | [
"'''benchmark pysam BAM/SAM access with the samtools commandline tools.\n\nsamtools functions are called via the pysam interface to avoid the over-head\nof starting additional processes.\n'''",
"import pysam",
"import timeit",
"iterations = 10",
"def runBenchmark( test, \n pysam_way,\n ... |
#!/usr/bin/env python
'''unit testing code for pysam.
Execute in the :file:`tests` directory as it requires the Makefile
and data files located there.
'''
import sys, os, shutil, gzip
import pysam
import unittest
import itertools
import subprocess
class TestVCFIterator( unittest.TestCase ):
filename = "example.... | [
[
8,
0,
0.0325,
0.0407,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.065,
0.0081,
0,
0.66,
0.125,
509,
0,
4,
0,
0,
509,
0,
0
],
[
1,
0,
0.0732,
0.0081,
0,
0.66,
... | [
"'''unit testing code for pysam.\n\nExecute in the :file:`tests` directory as it requires the Makefile\nand data files located there.\n'''",
"import sys, os, shutil, gzip",
"import pysam",
"import unittest",
"import itertools",
"import subprocess",
"class TestVCFIterator( unittest.TestCase ):\n\n fil... |
#!/usr/bin/env python
'''unit testing code for pysam.
Execute in the :file:`tests` directory as it requires the Makefile
and data files located there.
'''
import sys, os, shutil, gzip
import pysam
import unittest
import itertools
import subprocess
def checkBinaryEqual( filename1, filename2 ):
'''return true if t... | [
[
8,
0,
0.0095,
0.0119,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.019,
0.0024,
0,
0.66,
0.0625,
509,
0,
4,
0,
0,
509,
0,
0
],
[
1,
0,
0.0214,
0.0024,
0,
0.66,... | [
"'''unit testing code for pysam.\n\nExecute in the :file:`tests` directory as it requires the Makefile\nand data files located there.\n'''",
"import sys, os, shutil, gzip",
"import pysam",
"import unittest",
"import itertools",
"import subprocess",
"def checkBinaryEqual( filename1, filename2 ):\n '''... |
# usage: cat pysam_ex1.bam | python pysam_test_stdin.pyx
import pysam
samfile = pysam.Samfile( "-", "rb" )
# set up the modifying iterators
l = list(samfile.fetch( until_eof = True ))
assert len(l) == 3270
| [
[
1,
0,
0.3,
0.1,
0,
0.66,
0,
878,
0,
1,
0,
0,
878,
0,
0
],
[
14,
0,
0.5,
0.1,
0,
0.66,
0.5,
834,
3,
2,
0,
0,
12,
10,
1
],
[
14,
0,
0.8,
0.1,
0,
0.66,
1,
81... | [
"import pysam",
"samfile = pysam.Samfile( \"-\", \"rb\" )",
"l = list(samfile.fetch( until_eof = True ))"
] |
#!/usr/bin/env python
'''unit testing code for pysam.'''
import pysam
import unittest
import os
import itertools
import subprocess
import shutil
class TestExceptions(unittest.TestCase):
def setUp(self):
self.samfile=pysam.Samfile( "ex1.bam","rb" )
def testOutOfRangeNegativeNewFormat(self):
s... | [
[
8,
0,
0.0541,
0.027,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1081,
0.027,
0,
0.66,
0.125,
878,
0,
1,
0,
0,
878,
0,
0
],
[
1,
0,
0.1351,
0.027,
0,
0.66,
... | [
"'''unit testing code for pysam.'''",
"import pysam",
"import unittest",
"import os",
"import itertools",
"import subprocess",
"import shutil",
"class TestExceptions(unittest.TestCase):\n\n def setUp(self):\n self.samfile=pysam.Samfile( \"ex1.bam\",\"rb\" )\n\n def testOutOfRangeNegativeN... |
#!/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... | [] | [] |
#!/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.4528,
0.1321,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
]
] | [
"\"\"\"MySQL CLIENT constants.\n\nThese constants are used when creating the connection. Use bitwise-OR\n(|) to combine options together, and pass them as the client_flags\nparameter to MySQLdb.Connection. For more information on these flags,\nsee the MySQL C API documentation for mysql_real_connect().\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.4035,
0.0877,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5439,
0.0175,
0,
0.66,
0.0556,
401,
0,
1,
0,
0,
401,
0,
0
],
[
1,
0,
0.614,
0.0175,
0,
0.66,... | [
"\"\"\"MySQL FIELD_TYPE Constants.\n\nThese constants represent the various column (field) types that are\nsupported by MySQL.\n\"\"\"",
"from google.storage.speckle.proto import jdbc_type",
"from google.storage.speckle.proto.jdbc_type import *",
"DATETIME = jdbc_type.TIMESTAMP",
"ENUM = jdbc_type.VARCHAR",... |
#!/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... | [] | [] |
#!/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.4792,
0.1042,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
]
] | [
"\"\"\"MySQL FLAG Constants.\n\nThese flags are used along with the FIELD_TYPE to indicate various\nproperties of columns in a result set.\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.0203,
0.0036,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0243,
0.0009,
0,
0.66,
0.0192,
193,
0,
1,
0,
0,
193,
0,
0
],
[
1,
0,
0.0252,
0.0009,
0,
0.66... | [
"\"\"\"Python DB-API (PEP 249) interface to SQL Service.\n\nhttp://www.python.org/dev/peps/pep-0249/\n\"\"\"",
"import collections",
"import datetime",
"import exceptions",
"import sys",
"import time",
"import types",
"from google.storage.speckle.proto import client_error_code_pb2",
"from google.sto... |
#!/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.1875,
0.17,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.285,
0.005,
0,
0.66,
0.05,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.29,
0.005,
0,
0.66,
0.1... | [
"\"\"\"Type conversions for rdbms.\n\nThis module defines a dictionary called 'converters' which provides a mapping\nfor the encoders and decoders used for type conversion by rdbms. The type of\nkey used in the dictionary determines whether the mapping represents an encoder\nor decoder.\n\nIf the key is a Python t... |
#!/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... | [] | [] |
#!/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... | [] | [] |
#!/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.4792,
0.1042,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5833,
0.0208,
0,
0.66,
0.5,
40,
0,
1,
0,
0,
40,
0,
0
],
[
3,
0,
0.8229,
0.375,
0,
0.66,
... | [
"\"\"\"Django database client for rdbms.\n\nEncapsulates the logic for starting up a command line client to the database,\nfor use with the \"dbshell\" management command.\n\"\"\"",
"from django.db import backends",
"class DatabaseClient(backends.BaseDatabaseClient):\n \"\"\"Database client for rdbms.\"\"\"\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.1299,
0.1139,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2028,
0.0036,
0,
0.66,
0.0417,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.2064,
0.0036,
0,
0.66... | [
"\"\"\"Django database backend for rdbms.\n\nThis acts as a simple wrapper around the MySQLdb database backend to utilize an\nalternate settings.py configuration. When used in an application running on\nGoogle App Engine, this backend will use the GAE Apiproxy as a communications\ndriver. When used with dev_appse... |
#!/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... | [] | [] |
#!/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... | [] | [] |
#!/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.0076,
0.0004,
0,
0.66,
0,
138,
0,
1,
0,
0,
138,
0,
0
],
[
1,
0,
0.008,
0.0004,
0,
0.66,
0.006,
57,
0,
1,
0,
0,
57,
0,
0
],
[
1,
0,
0.0083,
0.0004,
0,
0.66... | [
"from google.net.proto2.python.internal import enum_type_wrapper",
"from google.net.proto2.python.public import descriptor as _descriptor",
"from google.net.proto2.python.public import message as _message",
"from google.net.proto2.python.public import reflection as _reflection",
"from google.net.proto2.prot... |
#!/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.093,
0.0047,
0,
0.66,
0,
57,
0,
1,
0,
0,
57,
0,
0
],
[
1,
0,
0.0977,
0.0047,
0,
0.66,
0.0909,
57,
0,
1,
0,
0,
57,
0,
0
],
[
1,
0,
0.1023,
0.0047,
0,
0.66,... | [
"from google.net.proto2.python.public import descriptor as _descriptor",
"from google.net.proto2.python.public import message as _message",
"from google.net.proto2.python.public import reflection as _reflection",
"from google.net.proto2.proto import descriptor_pb2",
"DESCRIPTOR = _descriptor.FileDescriptor(... |
#!/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.3657,
0.1194,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4776,
0.0149,
0,
0.66,
0.0278,
272,
0,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4925,
0.0149,
0,
0.66... | [
"\"\"\"Python equivalent of jdbc_type.h.\n\nPython definition of the JDBC type constant values defined in Java class\njava.sql.Types. Since the values don't fall into the range allowed by\na protocol buffer enum, we use Python constants instead.\n\nIf you update this, update jdbc_type.py also.\n\"\"\"",
"BIT = -... |
#!/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... | [] | [] |
#!/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.0202,
0.001,
0,
0.66,
0,
57,
0,
1,
0,
0,
57,
0,
0
],
[
1,
0,
0.0212,
0.001,
0,
0.66,
0.0145,
57,
0,
1,
0,
0,
57,
0,
0
],
[
1,
0,
0.0222,
0.001,
0,
0.66,
... | [
"from google.net.proto2.python.public import descriptor as _descriptor",
"from google.net.proto2.python.public import message as _message",
"from google.net.proto2.python.public import reflection as _reflection",
"from google.net.proto2.proto import descriptor_pb2",
"import sys",
"try:\n __import__('goog... |
#!/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... | [] | [] |
#!/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... | [] | [] |
#!/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.2829,
0.0789,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
3,
0,
0.6842,
0.6447,
0,
0.66,
1,
545,
0,
6,
0,
0,
186,
0,
2
],
[
8,
1,
0.3816,
0.0132,
1,
0.87,
... | [
"\"\"\"A simple wrapper around enum types to expose utility functions.\n\nInstances are created as properties with the same name as the enum they wrap\non proto classes. For usage, see:\n reflection_test.py\n\"\"\"",
"class EnumTypeWrapper(object):\n \"\"\"A utility for finding the names of enum values.\"\"\"\... |
#!/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.0285,
0.0123,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
7,
0,
0.0382,
0.0035,
0,
0.66,
0.0179,
0,
0,
1,
0,
0,
0,
0,
0
],
[
1,
1,
0.0378,
0.0009,
1,
0.98,
... | [
"\"\"\"Contains a metaclass and helper functions used to create\nprotocol message classes from Descriptor objects at runtime.\n\nRecall that a metaclass is the \"type\" of a class.\n(A class is to a metaclass what an instance is to a class.)\n\nIn this case, we use the GeneratedProtocolMessageType metaclass\nto inj... |
#!/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.2184,
0.0388,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2621,
0.0097,
0,
0.66,
0.0769,
688,
0,
1,
0,
0,
688,
0,
0
],
[
7,
0,
0.3155,
0.0777,
0,
0.66... | [
"\"\"\"\nThis module is the central entity that determines which implementation of the\nAPI is used.\n\"\"\"",
"import os",
"try:\n\n from google.net.proto2.python.internal import _api_implementation\n\n\n _api_version = _api_implementation.api_version\nexcept ImportError:\n _api_version = 0",
" from goog... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.