code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | [
[
1,
0,
0.0738,
0.0041,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.0779,
0.0041,
0,
0.66,
0.0625,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.082,
0.0041,
0,
0... | [
"import base64",
"import hashlib",
"import logging",
"import time",
"from OpenSSL import crypto",
"from anyjson import simplejson",
"CLOCK_SKEW_SECS = 300 # 5 minutes in seconds",
"AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds",
"MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds",
"cla... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1619,
0.0476,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2,
0.0095,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2286,
0.0095,
0,
0.66,
... | [
"\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from anyjson import simplejson",
"TYPE_WEB = 'web'",
"TYPE_INSTALL... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | [
[
1,
0,
0.006,
0.006,
0,
0.66,
0,
32,
0,
1,
0,
0,
32,
0,
0
],
[
1,
0,
0.0119,
0.006,
0,
0.66,
0.1,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0179,
0.006,
0,
0.66,
... | [
"import Cookie",
"import datetime",
"import time",
"import email.utils",
"import calendar",
"import base64",
"import hashlib",
"import hmac",
"import re",
"import logging",
"class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | [
[
8,
0,
0.0814,
0.1105,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1453,
0.0058,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1512,
0.0058,
0,
0.66... | [
"\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1",
"__v... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0342,
0.0083,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0414,
0.0021,
0,
0.66,
0.0476,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0476,
0.0021,
0,
0.66,... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import copy",
"import httplib2",
"import logging",
"import oauth2 as oauth",
"import urllib",
"import urlparse",
"from anyjson import simplejson",
"tr... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.0519,
0.0182,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0649,
0.0026,
0,
0.66,
0.0625,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0701,
0.0026,
0,
0.66,... | [
"\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.2619,
0.0635,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3175,
0.0159,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3492,
0.0159,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"import threading",
"from apiclient.oauth import Storage as BaseStorage",
"class Storage(BaseStorage):\n \"\"\"Store and retr... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
1,
0,
0.2679,
0.0179,
0,
0.66,
0,
629,
0,
1,
0,
0,
629,
0,
0
],
[
1,
0,
0.2857,
0.0179,
0,
0.66,
0.2,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.3036,
0.0179,
0,
0.6... | [
"import apiclient",
"import base64",
"import pickle",
"from django.db import models",
"class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):",
" __metaclass__ = models.SubfieldBase",
" def db_t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1259,
0.037,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1556,
0.0074,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1704,
0.0074,
0,
0.66,
... | [
"\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"from google.appengine.ext import db",
"from apiclient.oauth import OAuthCredentials",
"... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.1545,
0.0407,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.187,
0.0081,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2114,
0.0081,
0,
0.66,
... | [
"\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from oauth2client.anyjson import simplejson",
"class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass",
" \"\"\"Base... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1205,
0.1452,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2046,
0.0033,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2112,
0.0033,
0,
0.66,
... | [
"\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | [
[
1,
0,
0.0204,
0.0068,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0272,
0.0068,
0,
0.66,
0.0833,
614,
0,
1,
0,
0,
614,
0,
0
],
[
14,
0,
0.0408,
0.0068,
0,
... | [
"import re",
"import urllib",
"RESERVED = \":/?#[]@!$&'()*+,;=\"",
"OPERATOR = \"+./;?|!@\"",
"EXPLODE = \"*+\"",
"MODIFIER = \":^\"",
"TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)",
"VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | [
[
8,
0,
0.1818,
0.0267,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2032,
0.0053,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.2219,
0.0107,
0,
0.66,
... | [
"\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"",
"__author__ = 'olexiy@google.com (Olexiy Oryeshko)'",
"class Error(Exception):\n \"\"\"Thrown If val... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | [
[
8,
0,
0.0365,
0.0708,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0845,
0.0205,
0,
0.66,
0.04,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0982,
0.0023,
0,
0.66,
... | [
"\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | [
[
8,
0,
0.0318,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0636,
0.0091,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0727,
0.0091,
0,
0.66... | [
"\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"",
"__author__ = \"Joe Gregorio (joe@bitworking.org)\"",
"__copyright__ = \"Copyright 2006, Joe Gregorio\"",
"__contributors__ = []",
"__version__ = \"1.0.0\"",
"__license__ = \"MIT\"",
"__history__ = \"\"\"\n\"\"\"",
"import urlparse",
"escape_... |
#! /usr/bin/env python
import logging
from oauth2client.keyring_storage import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run
from httplib2 import Http
import json
from cmislib.model import CmisClient, CmisException
import os, pwd
NETWORK = 'alfresco.com'
SITE = 'alf... | [
[
1,
0,
0.0208,
0.0104,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0312,
0.0104,
0,
0.66,
0.0227,
985,
0,
1,
0,
0,
985,
0,
0
],
[
1,
0,
0.0417,
0.0104,
0,
... | [
"import logging",
"from oauth2client.keyring_storage import Storage",
"from oauth2client.client import flow_from_clientsecrets",
"from oauth2client.tools import run",
"from httplib2 import Http",
"import json",
"from cmislib.model import CmisClient, CmisException",
"import os, pwd",
"NETWORK = 'alfr... |
#! /usr/bin/env python
import logging
from oauth2client.keyring_storage import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run
from httplib2 import Http
import json
import os, pwd
uid = pwd.getpwuid( os.getuid() )[ 0 ]
storage = Storage("Jeff's Sample Python App", uid... | [
[
1,
0,
0.0541,
0.027,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0811,
0.027,
0,
0.66,
0.0476,
985,
0,
1,
0,
0,
985,
0,
0
],
[
1,
0,
0.1081,
0.027,
0,
0.6... | [
"import logging",
"from oauth2client.keyring_storage import Storage",
"from oauth2client.client import flow_from_clientsecrets",
"from oauth2client.tools import run",
"from httplib2 import Http",
"import json",
"import os, pwd",
"uid = pwd.getpwuid( os.getuid() )[ 0 ]",
"storage = Storage(\"Jeff's S... |
#! /usr/bin/env python
import logging
from oauth2client.keyring_storage import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run
from httplib2 import Http
import json
from cmislib.model import CmisClient
import os, pwd
uid = pwd.getpwuid(os.getuid())[0]
storage = Storag... | [
[
1,
0,
0.0588,
0.0294,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0882,
0.0294,
0,
0.66,
0.0455,
985,
0,
1,
0,
0,
985,
0,
0
],
[
1,
0,
0.1176,
0.0294,
0,
... | [
"import logging",
"from oauth2client.keyring_storage import Storage",
"from oauth2client.client import flow_from_clientsecrets",
"from oauth2client.tools import run",
"from httplib2 import Http",
"import json",
"from cmislib.model import CmisClient",
"import os, pwd",
"uid = pwd.getpwuid(os.getuid()... |
#!/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_... |
from google.appengine.ext import webapp
from google.appengine.api import memcache
from google.appengine.ext.webapp.util import run_wsgi_app
from versionhandler import VersionHandler
from metrichandler import MetricHandler
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers... | [
[
1,
0,
0.0435,
0.0435,
0,
0.66,
0,
167,
0,
1,
0,
0,
167,
0,
0
],
[
1,
0,
0.087,
0.0435,
0,
0.66,
0.1111,
279,
0,
1,
0,
0,
279,
0,
0
],
[
1,
0,
0.1304,
0.0435,
0,
0... | [
"from google.appengine.ext import webapp",
"from google.appengine.api import memcache",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from versionhandler import VersionHandler",
"from metrichandler import MetricHandler",
"class MainPage(webapp.RequestHandler):\n def get(self):\n ... |
import logging
import pprint
import re
from google.appengine.ext import webapp
from metricentry import MetricEntry
from utils import ip_info
CURRENT_VERSION = "0.6.10"
RX_VERSION_CHUNKER = re.compile(r"\s*DwarfTherapist\s+(\d+)\.(\d+)\.(\d+)\s*")
class VersionHandler(webapp.RequestHandler):
def get(self,... | [
[
1,
0,
0.0312,
0.0312,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0625,
0.0312,
0,
0.66,
0.125,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.0938,
0.0312,
0,
0... | [
"import logging",
"import pprint",
"import re",
"from google.appengine.ext import webapp",
"from metricentry import MetricEntry",
"from utils import ip_info",
"CURRENT_VERSION = \"0.6.10\"",
"RX_VERSION_CHUNKER = re.compile(r\"\\s*DwarfTherapist\\s+(\\d+)\\.(\\d+)\\.(\\d+)\\s*\")",
"class VersionHan... |
import logging
import urllib
from xml.etree import ElementTree as ET
from pprint import pformat
xml_to_dict_map = {
'CountryCode': 'country',
'RegionName': 'region_name',
'RegionCode': 'region_code',
'City': 'city'
}
def ip_info(ip):
"""
<?xml version="1.0" encoding="UTF-8"?>
<Respo... | [
[
1,
0,
0.0182,
0.0182,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0364,
0.0182,
0,
0.66,
0.2,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0545,
0.0182,
0,
0.6... | [
"import logging",
"import urllib",
"from xml.etree import ElementTree as ET",
"from pprint import pformat",
"xml_to_dict_map = {\n 'CountryCode': 'country',\n 'RegionName': 'region_name',\n 'RegionCode': 'region_code',\n 'City': 'city'\n}",
"def ip_info(ip):\n \"\"\"\n<?xml version=\"1.0\" ... |
from google.appengine.ext import webapp
import pprint
import logging
class MetricHandler(webapp.RequestHandler):
def get(self, *args):
self.response.headers['Content-Type'] = 'text/html'
info = ip_info("96.253.131.222")
self.response.out.write("Metrics must be posted! %s<br/>%s" % (... | [
[
1,
0,
0.0588,
0.0588,
0,
0.66,
0,
167,
0,
1,
0,
0,
167,
0,
0
],
[
1,
0,
0.1176,
0.0588,
0,
0.66,
0.3333,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.1765,
0.0588,
0,
... | [
"from google.appengine.ext import webapp",
"import pprint",
"import logging",
"class MetricHandler(webapp.RequestHandler):\n def get(self, *args):\n self.response.headers['Content-Type'] = 'text/html'\n info = ip_info(\"96.253.131.222\")\n self.response.out.write(\"Metrics must be post... |
import datetime
from google.appengine.ext import db
class MetricEntry(db.Model):
ip = db.StringProperty()
city = db.StringProperty()
region_code = db.StringProperty()
region_name = db.StringProperty()
country = db.StringProperty()
dt_version_major = db.IntegerProperty()
dt_version... | [
[
1,
0,
0.0625,
0.0625,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.125,
0.0625,
0,
0.66,
0.5,
167,
0,
1,
0,
0,
167,
0,
0
],
[
3,
0,
0.5938,
0.75,
0,
0.66,
... | [
"import datetime",
"from google.appengine.ext import db",
"class MetricEntry(db.Model):\n ip = db.StringProperty()\n city = db.StringProperty()\n region_code = db.StringProperty()\n region_name = db.StringProperty()\n country = db.StringProperty()\n dt_version_major = db.IntegerProperty()\n ... |
# Author: Srinath Avadhanula
# This file is distributed as part of the vim-latex project
# http://vim-latex.sf.net
import re
class Bibliography(dict):
def __init__(self, txt, macros={}):
"""
txt:
a string which represents the entire bibtex entry. A typical
entry is of the f... | [
[
1,
0,
0.0226,
0.0045,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
3,
0,
0.3688,
0.6787,
0,
0.66,
0.3333,
1,
0,
4,
0,
0,
827,
0,
36
],
[
2,
1,
0.2353,
0.4027,
1,
0... | [
"import re",
"class Bibliography(dict):\n def __init__(self, txt, macros={}):\n \"\"\"\n txt:\n a string which represents the entire bibtex entry. A typical\n entry is of the form:\n @ARTICLE{ellington:84:part3,\n author = {Ellington, C P},",
... |
import string, vim, re, os, glob
# catFile: assigns a local variable retval to the contents of a file {{{
def catFile(filename):
try:
file = open(filename)
lines = ''.join(file.readlines())
file.close()
except:
lines = ''
# escape double quotes and backslashes before quoting the string so
# everything pass... | [
[
1,
0,
0.0192,
0.0192,
0,
0.66,
0,
890,
0,
5,
0,
0,
890,
0,
0
],
[
2,
0,
0.1635,
0.2308,
0,
0.66,
0.3333,
448,
0,
1,
1,
0,
0,
0,
6
],
[
7,
1,
0.125,
0.1154,
1,
0.4... | [
"import string, vim, re, os, glob",
"def catFile(filename):\n\ttry:\n\t\tfile = open(filename)\n\t\tlines = ''.join(file.readlines())\n\t\tfile.close()\n\texcept:\n\t\tlines = ''",
"\ttry:\n\t\tfile = open(filename)\n\t\tlines = ''.join(file.readlines())\n\t\tfile.close()\n\texcept:\n\t\tlines = ''",
"\t\tfil... |
import random, sys, threading, time
from java.util import ArrayList
from no.priv.garshol.duke import ConfigLoader, Processor, Property, DukeConfigException
from no.priv.garshol.duke.utils import ObjectUtils
from no.priv.garshol.duke.matchers import TestFileListener
POPULATION_SIZE = 100
POPULATIONS = 100
def round(n... | [
[
1,
0,
0.0062,
0.0031,
0,
0.66,
0,
715,
0,
4,
0,
0,
715,
0,
0
],
[
1,
0,
0.0093,
0.0031,
0,
0.66,
0.0263,
62,
0,
1,
0,
0,
62,
0,
0
],
[
1,
0,
0.0125,
0.0031,
0,
0.... | [
"import random, sys, threading, time",
"from java.util import ArrayList",
"from no.priv.garshol.duke import ConfigLoader, Processor, Property, DukeConfigException",
"from no.priv.garshol.duke.utils import ObjectUtils",
"from no.priv.garshol.duke.matchers import TestFileListener",
"POPULATION_SIZE = 100",
... |
#!/usr/bin/python
from optparse import OptionParser
import re
import subprocess
import sys
"""
This script generates a release note from the output of git log
between the specified tags.
Options:
--issues Show output the commits with issues associated with them.
--issue-numbers Show outputs issue numbers o... | [
[
1,
0,
0.0187,
0.0093,
0,
0.66,
0,
323,
0,
1,
0,
0,
323,
0,
0
],
[
1,
0,
0.028,
0.0093,
0,
0.66,
0.0526,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0374,
0.0093,
0,
0... | [
"from optparse import OptionParser",
"import re",
"import subprocess",
"import sys",
"\"\"\"\nThis script generates a release note from the output of git log\nbetween the specified tags.\n\nOptions:\n--issues Show output the commits with issues associated with them.\n--issue-numbers Show outputs ... |
import cgi
import datetime
import urllib
import wsgiref.handlers
import random
import datetime
from django.utils import simplejson
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class Score(db.Model):
name=db.StringProperty()
... | [
[
1,
0,
0.0074,
0.0074,
0,
0.66,
0,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.0148,
0.0074,
0,
0.66,
0.0556,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0222,
0.0074,
0,
... | [
"import cgi",
"import datetime",
"import urllib",
"import wsgiref.handlers",
"import random",
"import datetime",
"from django.utils import simplejson",
"from google.appengine.ext import db",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"... |
print 'Content-Type: text/plain'
print ''
print 'You probably want /tetris ...'
| [
[
8,
0,
0.3333,
0.3333,
0,
0.66,
0,
535,
3,
1,
0,
0,
0,
0,
1
],
[
8,
0,
0.6667,
0.3333,
0,
0.66,
0.5,
535,
3,
1,
0,
0,
0,
0,
1
],
[
8,
0,
1,
0.3333,
0,
0.66,
1,... | [
"print('Content-Type: text/plain')",
"print('')",
"print('You probably want /tetris ...')"
] |
import sys, os
import speech
speech.say("Hello, Bryan. Welcome back")
speech.say("Would you like me to turn on the lights?")
| [
[
1,
0,
0.2,
0.2,
0,
0.66,
0,
509,
0,
2,
0,
0,
509,
0,
0
],
[
1,
0,
0.4,
0.2,
0,
0.66,
0.3333,
473,
0,
1,
0,
0,
473,
0,
0
],
[
8,
0,
0.8,
0.2,
0,
0.66,
0.6667,
... | [
"import sys, os",
"import speech",
"speech.say(\"Hello, Bryan. Welcome back\")",
"speech.say(\"Would you like me to turn on the lights?\")"
] |
#!/usr/bin/env python
#==============================================================================
# PyTyle - An on-demand tiling manager
# Copyright (C) 2009-2010 Andrew Gallant <andrew@pytyle.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | [
[
1,
0,
0.0833,
0.0833,
0,
0.66,
0,
423,
0,
3,
0,
0,
423,
0,
0
],
[
1,
0,
0.25,
0.0833,
0,
0.66,
0.1429,
490,
0,
1,
0,
0,
490,
0,
0
],
[
1,
0,
0.4167,
0.0833,
0,
0.... | [
"import traceback, sys, time",
"import xcb.xproto",
"import pt.config as config",
"import pt.ptxcb as ptxcb",
"import pt.state as state",
"from pt.dispatcher import Dispatcher",
"from pt.window import Window",
"from pt.tile import Tile"
] |
#==============================================================================
# PyTyle - An on-demand tiling manager
# Copyright (C) 2009-2010 Andrew Gallant <andrew@pytyle.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publishe... | [
[
1,
0,
0.3636,
0.0182,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.4,
0.0182,
0,
0.66,
0.25,
901,
0,
1,
0,
0,
901,
0,
0
],
[
1,
0,
0.4182,
0.0182,
0,
0.66,... | [
"import sys",
"from distutils import sysconfig",
"from distutils.core import setup",
"try:\n import xcb.xproto, xcb.xcb, xcb.xinerama, xcb.randr\nexcept:\n print('')\n print('PyTyle 2 requires the X Python Binding')\n print('See: http://cgit.freedesktop.org/xcb/xpyb/')\n print('Or xpyb-ng can b... |
import ptxcb
from tile import Tile
from container import Container
class ManualTile(Tile):
def __init__(self, monitor):
Tile.__init__(self, monitor)
self.root = None
self.catchall = None
#
# Helper methods
#
def add(self, win):
if (
win.tilable() and s... | [
[
1,
0,
0.001,
0.001,
0,
0.66,
0,
805,
0,
1,
0,
0,
805,
0,
0
],
[
1,
0,
0.0029,
0.001,
0,
0.66,
0.125,
319,
0,
1,
0,
0,
319,
0,
0
],
[
1,
0,
0.0039,
0.001,
0,
0.66,... | [
"import ptxcb",
"from tile import Tile",
"from container import Container",
"class ManualTile(Tile):\n def __init__(self, monitor):\n Tile.__init__(self, monitor)\n self.root = None\n self.catchall = None\n\n #\n # Helper methods",
" def __init__(self, monitor):\n Til... |
import ptxcb
class Workspace(object):
WORKSPACES = {}
@staticmethod
def add(wsid):
Desktop.add(wsid)
@staticmethod
def iter_all_monitors():
for wsid in Workspace.WORKSPACES:
for mon in Workspace.WORKSPACES[wsid].iter_monitors():
yield mon
@staticme... | [
[
1,
0,
0.0127,
0.0127,
0,
0.66,
0,
805,
0,
1,
0,
0,
805,
0,
0
],
[
3,
0,
0.3671,
0.6709,
0,
0.66,
0.3333,
92,
0,
10,
0,
0,
186,
0,
6
],
[
14,
1,
0.0506,
0.0127,
1,
... | [
"import ptxcb",
"class Workspace(object):\n WORKSPACES = {}\n\n @staticmethod\n def add(wsid):\n Desktop.add(wsid)\n\n @staticmethod",
" WORKSPACES = {}",
" def add(wsid):\n Desktop.add(wsid)",
" Desktop.add(wsid)",
" def iter_all_monitors():\n for wsid in ... |
import time
import config
import ptxcb
import state
import tilers
from command import Command
from window import Window
from tile import Tile
class Dispatcher(object):
def __init__(self, event_data):
self._event_data = event_data
self._stop = False
assert 'event' in self._event_data
... | [
[
1,
0,
0.0083,
0.0083,
0,
0.66,
0,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.025,
0.0083,
0,
0.66,
0.125,
308,
0,
1,
0,
0,
308,
0,
0
],
[
1,
0,
0.0333,
0.0083,
0,
0.... | [
"import time",
"import config",
"import ptxcb",
"import state",
"import tilers",
"from command import Command",
"from window import Window",
"from tile import Tile",
"class Dispatcher(object):\n def __init__(self, event_data):\n self._event_data = event_data\n self._stop = False\n\n... |
from tile import Tile
from container import Container
class AutoTile(Tile):
def __init__(self, monitor):
Tile.__init__(self, monitor)
self.store = None
self.cycle_index = 0
#
# Helper methods
#
def add(self, win):
if (
win.tilable() and self.tiling and
... | [
[
1,
0,
0.0031,
0.0031,
0,
0.66,
0,
319,
0,
1,
0,
0,
319,
0,
0
],
[
1,
0,
0.0062,
0.0031,
0,
0.66,
0.3333,
516,
0,
1,
0,
0,
516,
0,
0
],
[
3,
0,
0.3665,
0.7112,
0,
... | [
"from tile import Tile",
"from container import Container",
"class AutoTile(Tile):\n def __init__(self, monitor):\n Tile.__init__(self, monitor)\n self.store = None\n self.cycle_index = 0\n\n #\n # Helper methods",
" def __init__(self, monitor):\n Tile.__init__(self, mo... |
import re
import config
from command import Command
from container import Container
class Tile(object):
queue_tile = set()
@staticmethod
def dispatch(monitor, command):
assert isinstance(command, Command)
tiler = monitor.get_tiler()
if tiler:
if tiler.get_name() == '... | [
[
1,
0,
0.0048,
0.0048,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0145,
0.0048,
0,
0.66,
0.25,
308,
0,
1,
0,
0,
308,
0,
0
],
[
1,
0,
0.0193,
0.0048,
0,
0.... | [
"import re",
"import config",
"from command import Command",
"from container import Container",
"class Tile(object):\n queue_tile = set()\n\n @staticmethod\n def dispatch(monitor, command):\n assert isinstance(command, Command)\n\n tiler = monitor.get_tiler()",
" queue_tile = set... |
import time
import ptxcb
import config
from command import Command
from window import Window
from monitor import Monitor
from workspace import Workspace
from container import Container
_ACTIVE = None
pointer_grab = False
moving = False
properties = {}
xinerama = ptxcb.connection.xinerama_get_screens()
def init():
... | [
[
1,
0,
0.0037,
0.0037,
0,
0.66,
0,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.011,
0.0037,
0,
0.66,
0.0303,
805,
0,
1,
0,
0,
805,
0,
0
],
[
1,
0,
0.0184,
0.0037,
0,
0... | [
"import time",
"import ptxcb",
"import config",
"from command import Command",
"from window import Window",
"from monitor import Monitor",
"from workspace import Workspace",
"from container import Container",
"_ACTIVE = None",
"pointer_grab = False",
"moving = False",
"properties = {}",
"xin... |
import math
from pt.tile_auto import AutoTile
class Vertical(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
self.hsplit = self.get_option('width_factor')
#
# Helper methods
#
def decrement_hsplit(self):
self.hsplit -= self.get_option('step_size'... | [
[
1,
0,
0.006,
0.006,
0,
0.66,
0,
526,
0,
1,
0,
0,
526,
0,
0
],
[
1,
0,
0.018,
0.006,
0,
0.66,
0.3333,
988,
0,
1,
0,
0,
988,
0,
0
],
[
3,
0,
0.2814,
0.509,
0,
0.66,... | [
"import math",
"from pt.tile_auto import AutoTile",
"class Vertical(AutoTile):\n def __init__(self, monitor):\n AutoTile.__init__(self, monitor)\n\n self.hsplit = self.get_option('width_factor')\n\n #\n # Helper methods",
" def __init__(self, monitor):\n AutoTile.__init__(self... |
import math
from pt.tile_auto import AutoTile
class Center(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
self.hsplit = self.get_option('width_factor')
self.vsplit = self.get_option('height_factor')
self.columns = self.get_option('columns')
#
# H... | [
[
1,
0,
0.0083,
0.0083,
0,
0.66,
0,
526,
0,
1,
0,
0,
526,
0,
0
],
[
1,
0,
0.0248,
0.0083,
0,
0.66,
0.5,
988,
0,
1,
0,
0,
988,
0,
0
],
[
3,
0,
0.5207,
0.9669,
0,
0.6... | [
"import math",
"from pt.tile_auto import AutoTile",
"class Center(AutoTile):\n def __init__(self, monitor):\n AutoTile.__init__(self, monitor)\n\n self.hsplit = self.get_option('width_factor')\n self.vsplit = self.get_option('height_factor')\n self.columns = self.get_option('colum... |
from pt.tile_auto import AutoTile
class Maximal(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
#
# Commands
#
def cmd_tile(self):
AutoTile.cmd_tile(self)
if not self.store.all():
return
# Do master last, in case decorations a... | [
[
1,
0,
0.0286,
0.0286,
0,
0.66,
0,
988,
0,
1,
0,
0,
988,
0,
0
],
[
3,
0,
0.5429,
0.9429,
0,
0.66,
1,
447,
0,
4,
0,
0,
407,
0,
7
],
[
2,
1,
0.1286,
0.0571,
1,
0.26,... | [
"from pt.tile_auto import AutoTile",
"class Maximal(AutoTile):\n def __init__(self, monitor):\n AutoTile.__init__(self, monitor)\n\n #\n # Commands\n #",
" def __init__(self, monitor):\n AutoTile.__init__(self, monitor)",
" AutoTile.__init__(self, monitor)",
" def cmd_... |
import pt.tile_manual
import cascade
import center
import horizontal
import maximal
import vertical
ManualTile = pt.tile_manual.ManualTile
Cascade = cascade.Cascade
Center = center.Center
Horizontal = horizontal.Horizontal
HorizontalRows = horizontal.HorizontalRows
Maximal = maximal.Maximal
Vertical = vertical.Verti... | [
[
1,
0,
0.0588,
0.0588,
0,
0.66,
0,
744,
0,
1,
0,
0,
744,
0,
0
],
[
1,
0,
0.1765,
0.0588,
0,
0.66,
0.0769,
248,
0,
1,
0,
0,
248,
0,
0
],
[
1,
0,
0.2353,
0.0588,
0,
... | [
"import pt.tile_manual",
"import cascade",
"import center",
"import horizontal",
"import maximal",
"import vertical",
"ManualTile = pt.tile_manual.ManualTile",
"Cascade = cascade.Cascade",
"Center = center.Center",
"Horizontal = horizontal.Horizontal",
"HorizontalRows = horizontal.HorizontalRows... |
import math
from pt.tile_auto import AutoTile
class Cascade(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
self.hsplit = self.get_option('width_factor')
self.vsplit = self.get_option('height_factor')
#
# Helper methods
#
def raise_active(self):
... | [
[
1,
0,
0.0061,
0.0061,
0,
0.66,
0,
526,
0,
1,
0,
0,
526,
0,
0
],
[
1,
0,
0.0183,
0.0061,
0,
0.66,
0.5,
988,
0,
1,
0,
0,
988,
0,
0
],
[
3,
0,
0.5152,
0.9756,
0,
0.6... | [
"import math",
"from pt.tile_auto import AutoTile",
"class Cascade(AutoTile):\n def __init__(self, monitor):\n AutoTile.__init__(self, monitor)\n\n self.hsplit = self.get_option('width_factor')\n self.vsplit = self.get_option('height_factor')\n\n #",
" def __init__(self, monitor)... |
import math
from pt.tile_auto import AutoTile
class Horizontal(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
self.vsplit = self.get_option('height_factor')
#
# Helper methods
#
def decrement_vsplit(self):
self.vsplit -= self.get_option('step_si... | [
[
1,
0,
0.0061,
0.0061,
0,
0.66,
0,
526,
0,
1,
0,
0,
526,
0,
0
],
[
1,
0,
0.0184,
0.0061,
0,
0.66,
0.3333,
988,
0,
1,
0,
0,
988,
0,
0
],
[
3,
0,
0.2883,
0.5215,
0,
... | [
"import math",
"from pt.tile_auto import AutoTile",
"class Horizontal(AutoTile):\n def __init__(self, monitor):\n AutoTile.__init__(self, monitor)\n\n self.vsplit = self.get_option('height_factor')\n\n #\n # Helper methods",
" def __init__(self, monitor):\n AutoTile.__init__(s... |
class Grid(object):
def __init__(self):
pass
| [
[
3,
0,
0.6667,
1,
0,
0.66,
0,
690,
0,
1,
0,
0,
186,
0,
0
],
[
2,
1,
0.8333,
0.6667,
1,
0.25,
0,
555,
0,
1,
0,
0,
0,
0,
0
]
] | [
"class Grid(object):\n def __init__(self):\n pass",
" def __init__(self):\n pass"
] |
# Library imports
import config
import ptxcb
import tilers
# Class imports
from workspace import Workspace
class Monitor(object):
@staticmethod
def add(wsid, xinerama):
for mid, screen in enumerate(xinerama):
new_mon = Monitor(
Workspace.WORKSPACES[wsid],
mi... | [
[
1,
0,
0.0084,
0.0042,
0,
0.66,
0,
308,
0,
1,
0,
0,
308,
0,
0
],
[
1,
0,
0.0127,
0.0042,
0,
0.66,
0.25,
805,
0,
1,
0,
0,
805,
0,
0
],
[
1,
0,
0.0169,
0.0042,
0,
0.... | [
"import config",
"import ptxcb",
"import tilers",
"from workspace import Workspace",
"class Monitor(object):\n @staticmethod\n def add(wsid, xinerama):\n for mid, screen in enumerate(xinerama):\n new_mon = Monitor(\n Workspace.WORKSPACES[wsid],\n mid,\n ... |
import time
import ptxcb
import config
from workspace import Workspace
class Window(object):
WINDOWS = {}
@staticmethod
def add(wid):
if wid not in Window.WINDOWS:
if Window.manageable(wid):
win = Window(wid)
Window.WINDOWS[wid] = win
... | [
[
1,
0,
0.0028,
0.0028,
0,
0.66,
0,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.0083,
0.0028,
0,
0.66,
0.2,
805,
0,
1,
0,
0,
805,
0,
0
],
[
1,
0,
0.011,
0.0028,
0,
0.66... | [
"import time",
"import ptxcb",
"import config",
"from workspace import Workspace",
"class Window(object):\n WINDOWS = {}\n\n @staticmethod\n def add(wid):\n if wid not in Window.WINDOWS:\n if Window.manageable(wid):\n win = Window(wid)",
" WINDOWS = {}",
" ... |
import ptxcb
import config
from window import BogusWindow
class Container(object):
idinc = 1
active = None
@staticmethod
def manage_focus(win):
if win and win.container:
win.container.borders_activate(win.container.tiler.decor)
elif Container.active:
Container.... | [
[
1,
0,
0.005,
0.005,
0,
0.66,
0,
805,
0,
1,
0,
0,
805,
0,
0
],
[
1,
0,
0.01,
0.005,
0,
0.66,
0.3333,
308,
0,
1,
0,
0,
308,
0,
0
],
[
1,
0,
0.0199,
0.005,
0,
0.66,
... | [
"import ptxcb",
"import config",
"from window import BogusWindow",
"class Container(object):\n idinc = 1\n active = None\n\n @staticmethod\n def manage_focus(win):\n if win and win.container:\n win.container.borders_activate(win.container.tiler.decor)",
" idinc = 1",
" ... |
import xcb.xproto
import ptxcb
import config
class Command:
_cmds = {}
_mods = {
'alt': xcb.xproto.ModMask._1,
'ctrl': xcb.xproto.ModMask.Control,
'shift': xcb.xproto.ModMask.Shift,
'super': xcb.xproto.ModMask._4,
'menu': xcb.xproto.ModMask._3
}
def __init__(se... | [
[
1,
0,
0.0103,
0.0103,
0,
0.66,
0,
490,
0,
1,
0,
0,
490,
0,
0
],
[
1,
0,
0.0309,
0.0103,
0,
0.66,
0.3333,
805,
0,
1,
0,
0,
805,
0,
0
],
[
1,
0,
0.0412,
0.0103,
0,
... | [
"import xcb.xproto",
"import ptxcb",
"import config",
"class Command:\n _cmds = {}\n _mods = {\n 'alt': xcb.xproto.ModMask._1,\n 'ctrl': xcb.xproto.ModMask.Control,\n 'shift': xcb.xproto.ModMask.Shift,\n 'super': xcb.xproto.ModMask._4,\n 'menu': xcb.xproto.ModMask._3",... |
import struct
import xcb.xproto, xcb.xcb, xcb.xinerama, xcb.randr
conn = None
setup = None
syms_to_codes = {}
codes_to_syms = {}
def init():
global conn, setup
conn = xcb.xcb.connect()
setup = conn.get_setup()
init_keymap()
def init_keymap():
global setup, syms_to_codes, codes_to_syms
q ... | [
[
1,
0,
0.0093,
0.0093,
0,
0.66,
0,
399,
0,
1,
0,
0,
399,
0,
0
],
[
1,
0,
0.0278,
0.0093,
0,
0.66,
0.0588,
490,
0,
4,
0,
0,
490,
0,
0
],
[
14,
0,
0.0463,
0.0093,
0,
... | [
"import struct",
"import xcb.xproto, xcb.xcb, xcb.xinerama, xcb.randr",
"conn = None",
"setup = None",
"syms_to_codes = {}",
"codes_to_syms = {}",
"def init():\n global conn, setup\n\n conn = xcb.xcb.connect()\n setup = conn.get_setup()\n\n init_keymap()",
" conn = xcb.xcb.connect()",
... |
import struct
import xcb.xproto
import connection
from atoms import atoms
class Atom:
_cache = {}
@staticmethod
def build_cache():
if Atom._cache:
return
for atom in atoms:
Atom._cache[atom] = connection.get_core().InternAtom(
False,
... | [
[
1,
0,
0.0119,
0.0119,
0,
0.66,
0,
399,
0,
1,
0,
0,
399,
0,
0
],
[
1,
0,
0.0357,
0.0119,
0,
0.66,
0.25,
490,
0,
1,
0,
0,
490,
0,
0
],
[
1,
0,
0.0595,
0.0119,
0,
0.... | [
"import struct",
"import xcb.xproto",
"import connection",
"from atoms import atoms",
"class Atom:\n _cache = {}\n\n @staticmethod\n def build_cache():\n if Atom._cache:\n return",
" _cache = {}",
" def build_cache():\n if Atom._cache:\n return\n\n ... |
atoms = {
'_PYTYLE_TYPE': ('ATOM', 32),
'_PYTYLE_TYPE_PLACE_HOLDER': ('ATOM', 32),
'_PYTYLE_TYPE_BORDER': ('ATOM', 32),
'WM_CLASS': ('STRING', 8),
'WM_HINTS': ('WM_HINTS', 32),
'WM_NAME': ('STRING', 8),
'WM_NORMAL_HINTS': ('WM_SIZE_HINTS', 32),
'WM_PROTOCOLS': ('ATOM', 32),
'WM_STAT... | [
[
14,
0,
0.2723,
0.5347,
0,
0.66,
0,
715,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.6287,
0.1584,
0,
0.66,
0.3333,
354,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.7871,
0.1386,
0,
0... | [
"atoms = {\n '_PYTYLE_TYPE': ('ATOM', 32),\n '_PYTYLE_TYPE_PLACE_HOLDER': ('ATOM', 32),\n '_PYTYLE_TYPE_BORDER': ('ATOM', 32),\n\n 'WM_CLASS': ('STRING', 8),\n 'WM_HINTS': ('WM_HINTS', 32),\n 'WM_NAME': ('STRING', 8),",
"window_types = {\n '_NET_WM_WINDOW_TYPE_DESKTOP': ('ATOM', 32),\n '_N... |
import xcb.xproto
from window import Window
from window import XROOT
from atom import Atom
def dispatch(e):
NotifyModes = {
0: 'Normal', 1: 'Grab', 2: 'Ungrab', 3: 'WhileGrabbed'
}
NotifyDetails = {
0: 'Ancestor', 1: 'Virtual', 2: 'Inferior', 3: 'Nonlinear',
4: 'NonlinearVirtual',... | [
[
1,
0,
0.0127,
0.0127,
0,
0.66,
0,
490,
0,
1,
0,
0,
490,
0,
0
],
[
1,
0,
0.038,
0.0127,
0,
0.66,
0.25,
114,
0,
1,
0,
0,
114,
0,
0
],
[
1,
0,
0.0506,
0.0127,
0,
0.6... | [
"import xcb.xproto",
"from window import Window",
"from window import XROOT",
"from atom import Atom",
"def dispatch(e):\n NotifyModes = {\n 0: 'Normal', 1: 'Grab', 2: 'Ungrab', 3: 'WhileGrabbed'\n }\n\n NotifyDetails = {\n 0: 'Ancestor', 1: 'Virtual', 2: 'Inferior', 3: 'Nonlinear',\n... |
import struct, traceback, time
import xcb.xproto, xcb.xcb
import connection
from atom import Atom
from events import events
class Window(object):
queue = []
@staticmethod
def exec_queue():
for tup in Window.queue:
tup[0](*tup[1:])
Window.queue = []
def __init__(self, wid... | [
[
1,
0,
0.0015,
0.0015,
0,
0.66,
0,
399,
0,
3,
0,
0,
399,
0,
0
],
[
1,
0,
0.0046,
0.0015,
0,
0.66,
0.1111,
490,
0,
2,
0,
0,
490,
0,
0
],
[
1,
0,
0.0077,
0.0015,
0,
... | [
"import struct, traceback, time",
"import xcb.xproto, xcb.xcb",
"import connection",
"from atom import Atom",
"from events import events",
"class Window(object):\n queue = []\n\n @staticmethod\n def exec_queue():\n for tup in Window.queue:\n tup[0](*tup[1:])\n Window.queu... |
import atom
import connection
import event
import keysyms
import window
Atom = atom.Atom
BlankWindow = window.BlankWindow
LineWindow = window.LineWindow
RootWindow = window.RootWindow
Window = window.Window
keysyms = keysyms.keysyms
atoms = atoms.atoms
XROOT = window.XROOT
| [
[
1,
0,
0.0625,
0.0625,
0,
0.66,
0,
833,
0,
1,
0,
0,
833,
0,
0
],
[
1,
0,
0.125,
0.0625,
0,
0.66,
0.0833,
351,
0,
1,
0,
0,
351,
0,
0
],
[
1,
0,
0.1875,
0.0625,
0,
0... | [
"import atom",
"import connection",
"import event",
"import keysyms",
"import window",
"Atom = atom.Atom",
"BlankWindow = window.BlankWindow",
"LineWindow = window.LineWindow",
"RootWindow = window.RootWindow",
"Window = window.Window",
"keysyms = keysyms.keysyms",
"atoms = atoms.atoms",
"XR... |
keysyms = {
'VoidSymbol': 0xffffff,
'BackSpace': 0xff08,
'Tab': 0xff09,
'Linefeed': 0xff0a,
'Clear': 0xff0b,
'Return': 0xff0d,
'Pause': 0xff13,
'Scroll_Lock': 0xff14,
'Sys_Req': 0xff15,
'Escape': 0xff1b,
'Delete': 0xffff,
'Multi_key': 0xff20,
'Codeinput': 0xff37,
... | [
[
14,
0,
0.5002,
1,
0,
0.66,
0,
226,
0,
0,
0,
0,
0,
6,
0
]
] | [
"keysyms = {\n 'VoidSymbol': 0xffffff,\n 'BackSpace': 0xff08,\n 'Tab': 0xff09,\n 'Linefeed': 0xff0a,\n 'Clear': 0xff0b,\n 'Return': 0xff0d,\n 'Pause': 0xff13,"
] |
events = {
'KeyPressEvent': 2,
'KeyReleaseEvent': 3,
'ButtonPressEvent': 4,
'ButtonReleaseEvent': 5,
'MotionNotifyEvent': 6,
'EnterNotifyEvent': 7,
'LeaveNotifyEvent': 8,
'FocusInEvent': 9,
'FocusOutEvent': 10,
'KeymapNotifyEvent': 11,
'ExposeEvent': 12,
'GraphicsExposure... | [
[
14,
0,
0.5143,
1,
0,
0.66,
0,
830,
0,
0,
0,
0,
0,
6,
0
]
] | [
"events = {\n 'KeyPressEvent': 2,\n 'KeyReleaseEvent': 3,\n 'ButtonPressEvent': 4,\n 'ButtonReleaseEvent': 5,\n 'MotionNotifyEvent': 6,\n 'EnterNotifyEvent': 7,\n 'LeaveNotifyEvent': 8,"
] |
# 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 or agreed to in writing, ... | [
[
8,
0,
0.1881,
0.0891,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2574,
0.0099,
0,
0.66,
0.05,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2673,
0.0099,
0,
0.66,
... | [
"\"\"\"Main program for Rietveld.\n\nThis is also a template for running a Django app under Google App\nEngine, especially when using a newer version of Django than provided\nin the App Engine standard library.\n\nThe site-specific code is all in other files: urls.py, models.py,\nviews.py, settings.py.",
"import ... |
# Removes duplicate nicknames (issue99).
#
# To run this script:
# - Make sure App Engine library (incl. yaml) is in PYTHONPATH.
# - Make sure that the remote API is included in app.yaml.
# - Run "tools/appengine_console.py APP_ID".
# - Import this module.
# - update_accounts.run() updates accounts.
# - Use the o... | [
[
1,
0,
0.2097,
0.0161,
0,
0.66,
0,
167,
0,
1,
0,
0,
167,
0,
0
],
[
1,
0,
0.2419,
0.0161,
0,
0.66,
0.25,
844,
0,
1,
0,
0,
844,
0,
0
],
[
2,
0,
0.4194,
0.2742,
0,
0.... | [
"from google.appengine.ext import db",
"from codereview import models",
"def fetch_accounts():\n query = models.Account.all()\n accounts = {}\n results = query.fetch(100)\n while results:\n last = None\n for account in results:\n if account.lower_nickname in accounts:",
" ... |
"""Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Custom A... | [
[
8,
0,
0.0217,
0.0217,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0652,
0.0217,
0,
0.66,
0.0909,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.087,
0.0217,
0,
0.66,... | [
"\"\"\"Configuration.\"\"\"",
"import logging",
"import os",
"import re",
"from google.appengine.ext.appstats import recording",
"logging.info('Loading %s from %s', __name__, __file__)",
"def webapp_add_wsgi_middleware(app):\n app = recording.appstats_wsgi_middleware(app)\n return app",
" app = rec... |
# Copyright 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 writing, ... | [
[
8,
0,
0.2381,
0.0159,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2698,
0.0159,
0,
0.66,
0.1667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3016,
0.0159,
0,
0.66... | [
"\"\"\"Test utils.\"\"\"",
"import os",
"from google.appengine.ext import testbed",
"from django.test import TestCase as _TestCase",
"FILES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'files')",
"class TestCase(_TestCase):\n \"\"\"Customized Django TestCase.\n\n This class disables th... |
#!/usr/bin/env python
# Copyright 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 ... | [
[
1,
0,
0.1345,
0.0084,
0,
0.66,
0,
44,
0,
1,
0,
0,
44,
0,
0
],
[
1,
0,
0.1429,
0.0084,
0,
0.66,
0.0435,
784,
0,
1,
0,
0,
784,
0,
0
],
[
1,
0,
0.1513,
0.0084,
0,
0.... | [
"import code",
"import getpass",
"import logging",
"import optparse",
"import os",
"import re",
"import sys",
"ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')",
"LIB = os.path.join(ROOT, '..', 'google_appengine', 'lib')",
"sys.path.insert(0, os.path.join(ROOT, '..', 'google_a... |
# Copyright 2008-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.5357,
0.0357,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.6429,
0.0357,
0,
0.66,
0.5,
341,
0,
1,
0,
0,
341,
0,
0
],
[
14,
0,
0.9464,
0.1429,
0,
0.66,
... | [
"\"\"\"Top-level URL mappings for Rietveld.\"\"\"",
"from django.conf.urls.defaults import *",
"urlpatterns = patterns(\n '',\n url(r'', include('codereview.urls')),\n )"
] |
# 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 or agreed to in writing, ... | [
[
8,
0,
0.1807,
0.012,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2048,
0.012,
0,
0.66,
0.0385,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2289,
0.012,
0,
0.66,
... | [
"\"\"\"Minimal Django settings.\"\"\"",
"import os",
"from google.appengine.api import app_identity",
"APPEND_SLASH = False",
"DEBUG = os.environ['SERVER_SOFTWARE'].startswith('Dev')",
"INSTALLED_APPS = (\n 'codereview',\n)",
"HSTS_MAX_AGE = 60*60*24*365 # 1 year in seconds.",
"MIDDLEWARE_CLASSES ... |
# 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 or agreed to in writi... | [
[
1,
0,
0.1765,
0.0118,
0,
0.66,
0,
866,
0,
1,
0,
0,
866,
0,
0
],
[
3,
0,
0.6,
0.8118,
0,
0.66,
1,
200,
0,
1,
0,
0,
920,
0,
20
],
[
8,
1,
0.2235,
0.0353,
1,
0.88,
... | [
"import difflib",
"class PseudoPatienceSequenceMatcher(difflib.SequenceMatcher):\n \"\"\"Provides a SequenceMatcher that prefers longer \"first\" matches to longer\n \"second\" matches.\n \"\"\"\n\n def get_matching_blocks(self):\n \"\"\"Returns list of triples describing matching subsequences.",
" \"\"... |
# Copyright 2013 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 writing, ... | [
[
8,
0,
0.107,
0.0947,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1605,
0.0041,
0,
0.66,
0.0556,
463,
0,
1,
0,
0,
463,
0,
0
],
[
1,
0,
0.1646,
0.0041,
0,
0.66,... | [
"\"\"\"Collection of functions to be used for Auth related activies.\n\nThe two methods to be chiefy used are:\n - get_current_user\n - is_current_user_admin\n\nBoth of these methods check for a cookie-based current user (through the Users\nAPI) and an OAuth 2.0 current user (through the OAuth API).",
"import j... |
# 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 or agreed to in writing, ... | [
[
1,
0,
0.092,
0.0061,
0,
0.66,
0,
604,
0,
1,
0,
0,
604,
0,
0
],
[
1,
0,
0.1043,
0.0061,
0,
0.66,
0.0667,
211,
0,
1,
0,
0,
211,
0,
0
],
[
1,
0,
0.1104,
0.0061,
0,
0... | [
"import md5",
"from django.contrib.syndication.feeds import Feed",
"from django.core.exceptions import ObjectDoesNotExist",
"from django.core.urlresolvers import reverse",
"from django.utils.feedgenerator import Atom1Feed",
"from codereview import library",
"from codereview import models",
"class Base... |
# 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 or agreed to in writing, ... | [
[
8,
0,
0.0417,
0.0417,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0647,
0.0014,
0,
0.66,
0.037,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.0661,
0.0014,
0,
0.66,... | [
"\"\"\"Intra-region diff utilities.\n\nIntra-region diff highlights the blocks of code which have been changed or\ndeleted within a region. So instead of highlighting the whole region marked as\nchanged, the user can see what exactly was changed within that region.\n\nTerminology:\n 'region' is a list of consecuti... |
# 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 or agreed to in writing, ... | [
[
8,
0,
0.0654,
0.0192,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0808,
0.0038,
0,
0.66,
0.0833,
866,
0,
1,
0,
0,
866,
0,
0
],
[
1,
0,
0.0846,
0.0038,
0,
0.66... | [
"\"\"\"Utility to read and apply a unified diff without forking patch(1).\n\nFor a discussion of the unified diff format, see my blog on Artima:\nhttp://www.artima.com/weblogs/viewpost.jsp?thread=164293\n\"\"\"",
"import difflib",
"import logging",
"import patiencediff",
"import re",
"import sys",
"_CHU... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.