code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | [
[
8,
0,
0.0814,
0.1105,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1453,
0.0058,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1512,
0.0058,
0,
0.66... | [
"\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1",
"__v... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0342,
0.0083,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0414,
0.0021,
0,
0.66,
0.0476,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0476,
0.0021,
0,
0.66,... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import copy",
"import httplib2",
"import logging",
"import oauth2 as oauth",
"import urllib",
"import urlparse",
"from anyjson import simplejson",
"tr... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.0519,
0.0182,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0649,
0.0026,
0,
0.66,
0.0625,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0701,
0.0026,
0,
0.66,... | [
"\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.2619,
0.0635,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3175,
0.0159,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3492,
0.0159,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"import threading",
"from apiclient.oauth import Storage as BaseStorage",
"class Storage(BaseStorage):\n \"\"\"Store and retr... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
1,
0,
0.2679,
0.0179,
0,
0.66,
0,
629,
0,
1,
0,
0,
629,
0,
0
],
[
1,
0,
0.2857,
0.0179,
0,
0.66,
0.2,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.3036,
0.0179,
0,
0.6... | [
"import apiclient",
"import base64",
"import pickle",
"from django.db import models",
"class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):",
" __metaclass__ = models.SubfieldBase",
" def db_t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1259,
0.037,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1556,
0.0074,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1704,
0.0074,
0,
0.66,
... | [
"\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pickle",
"from google.appengine.ext import db",
"from apiclient.oauth import OAuthCredentials",
"... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
8,
0,
0.1545,
0.0407,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.187,
0.0081,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2114,
0.0081,
0,
0.66,
... | [
"\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from oauth2client.anyjson import simplejson",
"class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass",
" \"\"\"Base... |
__version__ = "1.0c2"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0c2\""
] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1205,
0.1452,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2046,
0.0033,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2112,
0.0033,
0,
0.66,
... | [
"\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | [
[
1,
0,
0.0204,
0.0068,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0272,
0.0068,
0,
0.66,
0.0833,
614,
0,
1,
0,
0,
614,
0,
0
],
[
14,
0,
0.0408,
0.0068,
0,
... | [
"import re",
"import urllib",
"RESERVED = \":/?#[]@!$&'()*+,;=\"",
"OPERATOR = \"+./;?|!@\"",
"EXPLODE = \"*+\"",
"MODIFIER = \":^\"",
"TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)",
"VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | [
[
8,
0,
0.1818,
0.0267,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2032,
0.0053,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.2219,
0.0107,
0,
0.66,
... | [
"\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"",
"__author__ = 'olexiy@google.com (Olexiy Oryeshko)'",
"class Error(Exception):\n \"\"\"Thrown If val... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | [
[
8,
0,
0.0365,
0.0708,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.0845,
0.0205,
0,
0.66,
0.04,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0982,
0.0023,
0,
0.66,
... | [
"\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | [
[
8,
0,
0.0318,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0636,
0.0091,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0727,
0.0091,
0,
0.66... | [
"\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"",
"__author__ = \"Joe Gregorio (joe@bitworking.org)\"",
"__copyright__ = \"Copyright 2006, Joe Gregorio\"",
"__contributors__ = []",
"__version__ = \"1.0.0\"",
"__license__ = \"MIT\"",
"__history__ = \"\"\"\n\"\"\"",
"import urlparse",
"escape_... |
# -*- coding: utf-8 -*-
"""
Flaskr
~~~~~~
A microblog example application written as Flask tutorial with
Flask and sqlite3.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
from sqlite3 import dbapi2 as sqlite3
from ... | [
[
8,
0,
0.0348,
0.0535,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0642,
0.0053,
0,
0.66,
0.037,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0695,
0.0053,
0,
0.66,... | [
"\"\"\"\n Flaskr\n ~~~~~~\n\n A microblog example application written as Flask tutorial with\n Flask and sqlite3.\n\n :copyright: (c) 2010 by Armin Ronacher.",
"from __future__ import with_statement",
"from sqlite3 import dbapi2 as sqlite3",
"from contextlib import closing",
"from flask impor... |
#!/usr/bin/python
# Nginx normally runs under "www-data" user
# hence you need to run this file also as "www-data" to avoid socket access problems.
# sudo -u www-data ./sozluk.fcgi
from flup.server.fcgi import WSGIServer
from sozluk import app
if __name__ == '__main__':
WSGIServer(app, bindAddress='/tmp/fcgi.sock')... | [
[
1,
0,
0.6364,
0.0909,
0,
0.66,
0,
729,
0,
1,
0,
0,
729,
0,
0
],
[
1,
0,
0.7273,
0.0909,
0,
0.66,
0.5,
211,
0,
1,
0,
0,
211,
0,
0
],
[
4,
0,
0.9545,
0.1818,
0,
0.6... | [
"from flup.server.fcgi import WSGIServer",
"from sozluk import app",
"if __name__ == '__main__':\n\tWSGIServer(app, bindAddress='/tmp/fcgi.sock').run()",
"\tWSGIServer(app, bindAddress='/tmp/fcgi.sock').run()"
] |
#!/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>[\\+\\*])... |
#! /usr/bin/python
from sys import argv
from os import path, remove, mkdir
from shutil import rmtree
global ACCOUNTS, AUDIT, GROUPS, FILES, TEST, COOKIE
def loginz(uname, pwd):
global COOKIE
if COOKIE.checkCK() ==0:
# add to audit
AUDIT.write(uname + ' logged in\n')
# create global c... | [
[
1,
0,
0.0208,
0.0069,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0278,
0.0069,
0,
0.66,
0.1,
688,
0,
3,
0,
0,
688,
0,
0
],
[
1,
0,
0.0347,
0.0069,
0,
0.6... | [
"from sys import argv",
"from os import path, remove, mkdir",
"from shutil import rmtree",
"def loginz(uname, pwd):\n global COOKIE\n\n if COOKIE.checkCK() ==0:\n # add to audit\n AUDIT.write(uname + ' logged in\\n')\n # create global cookie\n COOKIE =cookie(uname)",
" i... |
#! /usr/bin/python
from sys import argv
from os import path, remove, mkdir
from shutil import rmtree
global ACCOUNTS, AUDIT, GROUPS, FILES, TEST, COOKIE
def loginz(uname, pwd):
global COOKIE
if COOKIE.checkCK() ==0:
# add to audit
AUDIT.write(uname + ' logged in\n')
# create global c... | [
[
1,
0,
0.0208,
0.0069,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0278,
0.0069,
0,
0.66,
0.1,
688,
0,
3,
0,
0,
688,
0,
0
],
[
1,
0,
0.0347,
0.0069,
0,
0.6... | [
"from sys import argv",
"from os import path, remove, mkdir",
"from shutil import rmtree",
"def loginz(uname, pwd):\n global COOKIE\n\n if COOKIE.checkCK() ==0:\n # add to audit\n AUDIT.write(uname + ' logged in\\n')\n # create global cookie\n COOKIE =cookie(uname)",
" i... |
#!/usr/bin/env python
from __future__ import division
import sys
import mpq
archive = mpq.Archive(sys.argv[1])
print "Name: %s" % sys.argv[1]
print "Version: %s" % archive.filename
print "Offset: %s" % archive.offset
print "Packed size: %s" % archive.packed_size
print "Unpac... | [
[
1,
0,
0.1875,
0.0625,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.3125,
0.0625,
0,
0.66,
0.1111,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.4375,
0.0625,
0,
... | [
"from __future__ import division",
"import sys",
"import mpq",
"archive = mpq.Archive(sys.argv[1])",
"print(\"Name: %s\" % sys.argv[1])",
"print(\"Version: %s\" % archive.filename)",
"print(\"Offset: %s\" % archive.offset)",
"print(\"Packed size: %s\" % archive.... |
from os.path import dirname, join
import subprocess
basedir = dirname(__file__)
cmd = ['pybot', '--outputdir', join(basedir, 'results'), join(basedir, 'vacalc')]
pythonpath = '%s:%s' % (join(basedir, 'lib'), join(basedir, '..', 'src'))
subprocess.call(' '.join(cmd), shell=True, env={'PYTHONPATH': pythonpath})
| [
[
1,
0,
0.125,
0.125,
0,
0.66,
0,
79,
0,
2,
0,
0,
79,
0,
0
],
[
1,
0,
0.25,
0.125,
0,
0.66,
0.2,
394,
0,
1,
0,
0,
394,
0,
0
],
[
14,
0,
0.5,
0.125,
0,
0.66,
0.4... | [
"from os.path import dirname, join",
"import subprocess",
"basedir = dirname(__file__)",
"cmd = ['pybot', '--outputdir', join(basedir, 'results'), join(basedir, 'vacalc')]",
"pythonpath = '%s:%s' % (join(basedir, 'lib'), join(basedir, '..', 'src'))",
"subprocess.call(' '.join(cmd), shell=True, env={'PYTHO... |
import os
import sys
import subprocess
import datetime
import tempfile
import vacalc
class VacalcLibrary(object):
def __init__(self):
self._db_file = os.path.join(tempfile.gettempdir(),
'vacalc-atestdb.csv')
def count_vacation(self, startdate, year):
res... | [
[
1,
0,
0.0217,
0.0217,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0435,
0.0217,
0,
0.66,
0.1667,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0652,
0.0217,
0,
... | [
"import os",
"import sys",
"import subprocess",
"import datetime",
"import tempfile",
"import vacalc",
"class VacalcLibrary(object):\n\n def __init__(self):\n self._db_file = os.path.join(tempfile.gettempdir(),\n 'vacalc-atestdb.csv')\n\n def count_vacati... |
from __future__ import with_statement
import os
import sys
import csv
import datetime
import tempfile
class VacalcError(Exception): pass
class EmployeeStore(object):
def __init__(self, db_file):
self._db_file = db_file
if self._db_file and os.path.isfile(self._db_file):
self._employ... | [
[
1,
0,
0.0068,
0.0068,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0137,
0.0068,
0,
0.66,
0.0909,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0205,
0.0068,
0,
... | [
"from __future__ import with_statement",
"import os",
"import sys",
"import csv",
"import datetime",
"import tempfile",
"class VacalcError(Exception): pass",
"class EmployeeStore(object):\n\n def __init__(self, db_file):\n self._db_file = db_file\n if self._db_file and os.path.isfile(... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | [
[
1,
0,
0.0724,
0.0045,
0,
0.66,
0,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.0769,
0.0045,
0,
0.66,
0.1,
394,
0,
1,
0,
0,
394,
0,
0
],
[
1,
0,
0.0814,
0.0045,
0,
0.6... | [
"from __future__ import with_statement",
"import subprocess",
"import time",
"from random import randint",
"import os",
"import re",
"import sys",
"from robot.libraries import BuiltIn",
"from robot.utils import html_escape",
"class Parallel(object):\n \"\"\"\n Library for executing tests in ... |
# -*- python -*-
# ex: set syntax=python:
import os
ROBOT_FRAMEWORK_REPOSITORY = 'http://robotframework.googlecode.com/svn/trunk/'
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
####### BUILDSLAVES
from buildbot.buildslave impo... | [
[
1,
0,
0.0213,
0.0071,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0355,
0.0071,
0,
0.66,
0.0278,
358,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0567,
0.0071,
0,
... | [
"import os",
"ROBOT_FRAMEWORK_REPOSITORY = 'http://robotframework.googlecode.com/svn/trunk/'",
"c = BuildmasterConfig = {}",
"from buildbot.buildslave import BuildSlave",
"c['slaves'] = [BuildSlave(\"debian-py2.4\", \"robotci\")]",
"c['slavePortnum'] = 9989",
"from buildbot.changes.svnpoller import SVNP... |
from vacalcapp import VacalcApplication
| [
[
1,
0,
1,
1,
0,
0.66,
0,
545,
0,
1,
0,
0,
545,
0,
0
]
] | [
"from vacalcapp import VacalcApplication"
] |
from javax.swing import JFrame, JList, JPanel, JLabel, JTextField, JButton, Box, BoxLayout, JTable
from javax.swing.event import ListSelectionListener
from javax.swing.table import AbstractTableModel
from java.awt.event import ActionListener
from java.awt import FlowLayout, BorderLayout, Dimension, Font, Color
class ... | [
[
1,
0,
0.0043,
0.0043,
0,
0.66,
0,
828,
0,
9,
0,
0,
828,
0,
0
],
[
1,
0,
0.0085,
0.0043,
0,
0.66,
0.0833,
182,
0,
1,
0,
0,
182,
0,
0
],
[
1,
0,
0.0128,
0.0043,
0,
... | [
"from javax.swing import JFrame, JList, JPanel, JLabel, JTextField, JButton, Box, BoxLayout, JTable",
"from javax.swing.event import ListSelectionListener",
"from javax.swing.table import AbstractTableModel",
"from java.awt.event import ActionListener",
"from java.awt import FlowLayout, BorderLayout, Dimens... |
from robot import run as run_robot
import cProfile
import pstats
filename = 'robot.profile'
cProfile.run('run_robot("/home/husa/workspace/robotframework/atest/testdata/misc/")', filename)
p = pstats.Stats(filename)
p.strip_dirs().sort_stats(-1).print_stats()
| [
[
1,
0,
0.1,
0.1,
0,
0.66,
0,
735,
0,
1,
0,
0,
735,
0,
0
],
[
1,
0,
0.2,
0.1,
0,
0.66,
0.1667,
686,
0,
1,
0,
0,
686,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.3333,
... | [
"from robot import run as run_robot",
"import cProfile",
"import pstats",
"filename = 'robot.profile'",
"cProfile.run('run_robot(\"/home/husa/workspace/robotframework/atest/testdata/misc/\")', filename)",
"p = pstats.Stats(filename)",
"p.strip_dirs().sort_stats(-1).print_stats()"
] |
#!/usr/bin/env python
"""Script to generate atest runners based on data files.
Usage: %s path/to/data.file
"""
from __future__ import with_statement
import sys, os
if len(sys.argv) != 2:
print __doc__ % os.path.basename(sys.argv[0])
sys.exit(1)
inpath = os.path.abspath(sys.argv[1])
outpath = inpath.replac... | [
[
8,
0,
0.0957,
0.0851,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1702,
0.0213,
0,
0.66,
0.125,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.1915,
0.0213,
0,
0.66,... | [
"\"\"\"Script to generate atest runners based on data files.\n\nUsage: %s path/to/data.file\n\"\"\"",
"from __future__ import with_statement",
"import sys, os",
"if len(sys.argv) != 2:\n print(__doc__ % os.path.basename(sys.argv[0]))\n sys.exit(1)",
" print(__doc__ % os.path.basename(sys.argv[0]))... |
#!/usr/bin/env python
"""A script for running Robot Framework's acceptance tests.
Usage: run_atests.py interpreter [options] datasource(s)
Data sources are paths to directories or files under 'robot' folder.
Available options are the same that can be used with Robot Framework.
See its help (e.g. 'pybot --help') fo... | [
[
8,
0,
0.1081,
0.1712,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2072,
0.009,
0,
0.66,
0.0667,
621,
0,
1,
0,
0,
621,
0,
0
],
[
1,
0,
0.2162,
0.009,
0,
0.66,
... | [
"\"\"\"A script for running Robot Framework's acceptance tests.\n\nUsage: run_atests.py interpreter [options] datasource(s)\n\nData sources are paths to directories or files under 'robot' folder.\n\nAvailable options are the same that can be used with Robot Framework.\nSee its help (e.g. 'pybot --help') for more i... |
def get_variables(*args):
return { 'PPATH_VARFILE_2' : ' '.join(args),
'LIST__PPATH_VARFILE_2' : args }
| [
[
2,
0,
0.5,
0.75,
0,
0.66,
0,
461,
0,
1,
1,
0,
0,
0,
1
],
[
13,
1,
0.625,
0.5,
1,
0.15,
0,
0,
0,
0,
0,
0,
0,
6,
1
]
] | [
"def get_variables(*args):\n return { 'PPATH_VARFILE_2' : ' '.join(args),\n 'LIST__PPATH_VARFILE_2' : args }",
" return { 'PPATH_VARFILE_2' : ' '.join(args),\n 'LIST__PPATH_VARFILE_2' : args }"
] |
PPATH_VARFILE = "Variable from varible file in PYTHONPATH" | [
[
14,
0,
1,
1,
0,
0.66,
0,
799,
1,
0,
0,
0,
0,
3,
0
]
] | [
"PPATH_VARFILE = \"Variable from varible file in PYTHONPATH\""
] |
list1 = [1, 2, 3, 4, 'foo', 'bar']
dictionary1 = {'a': 1}
dictionary2 = {'a': 1, 'b': 2}
| [
[
14,
0,
0.3333,
0.3333,
0,
0.66,
0,
150,
0,
0,
0,
0,
0,
5,
0
],
[
14,
0,
0.6667,
0.3333,
0,
0.66,
0.5,
355,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
1,
0.3333,
0,
0.66,
... | [
"list1 = [1, 2, 3, 4, 'foo', 'bar']",
"dictionary1 = {'a': 1}",
"dictionary2 = {'a': 1, 'b': 2}"
] |
class ParameterLibrary:
def __init__(self, host='localhost', port='8080'):
self.host = host
self.port = port
def parameters(self):
return self.host, self.port | [
[
3,
0,
0.5625,
1,
0,
0.66,
0,
341,
0,
2,
0,
0,
0,
0,
0
],
[
2,
1,
0.5,
0.375,
1,
0.3,
0,
555,
0,
3,
0,
0,
0,
0,
0
],
[
14,
2,
0.5,
0.125,
2,
0.18,
0,
445,
... | [
"class ParameterLibrary:\n \n def __init__(self, host='localhost', port='8080'):\n self.host = host\n self.port = port\n \n def parameters(self):\n return self.host, self.port",
" def __init__(self, host='localhost', port='8080'):\n self.host = host\n self.por... |
some_string = 'Hello, World!'
class _SomeObject:
pass
some_object = _SomeObject() | [
[
14,
0,
0.1667,
0.1667,
0,
0.66,
0,
913,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.5833,
0.3333,
0,
0.66,
0.5,
122,
0,
0,
0,
0,
0,
0,
0
],
[
14,
0,
1,
0.1667,
0,
0.66,
... | [
"some_string = 'Hello, World!'",
"class _SomeObject:\n pass",
"some_object = _SomeObject()"
] |
library = "It should be OK to have an attribute with same name as the module"
def keyword_from_submodule(arg='World'):
return "Hello, %s!" % arg
| [
[
14,
0,
0.2,
0.2,
0,
0.66,
0,
860,
1,
0,
0,
0,
0,
3,
0
],
[
2,
0,
0.9,
0.4,
0,
0.66,
1,
962,
0,
1,
1,
0,
0,
0,
0
],
[
13,
1,
1,
0.2,
1,
0.51,
0,
0,
4,
... | [
"library = \"It should be OK to have an attribute with same name as the module\"",
"def keyword_from_submodule(arg='World'):\n return \"Hello, %s!\" % arg",
" return \"Hello, %s!\" % arg"
] |
class TraceLogArgsLibrary(object):
def only_mandatory(self, mand1, mand2):
pass
def mandatory_and_default(self, mand, default="default value"):
pass
def multiple_default_values(self, a=1, a2=2, a3=3, a4=4):
pass
def mandatory_and_varargs(self, mand, *varargs):
pass
... | [
[
3,
0,
0.3333,
0.6333,
0,
0.66,
0,
552,
0,
6,
0,
0,
186,
0,
2
],
[
2,
1,
0.1167,
0.0667,
1,
0.47,
0,
124,
0,
3,
0,
0,
0,
0,
0
],
[
2,
1,
0.2167,
0.0667,
1,
0.47,
... | [
"class TraceLogArgsLibrary(object):\n\n def only_mandatory(self, mand1, mand2):\n pass\n\n def mandatory_and_default(self, mand, default=\"default value\"):\n pass",
" def only_mandatory(self, mand1, mand2):\n pass",
" def mandatory_and_default(self, mand, default=\"default valu... |
class Mandatory:
def __init__(self, mandatory1, mandatory2):
self.mandatory1 = mandatory1
self.mandatory2 = mandatory2
def get_args(self):
return self.mandatory1, self.mandatory2
class Defaults(object):
def __init__(self, mandatory, default1='value', default2=None):
self... | [
[
3,
0,
0.1406,
0.25,
0,
0.66,
0,
745,
0,
2,
0,
0,
0,
0,
0
],
[
2,
1,
0.125,
0.0938,
1,
0.96,
0,
555,
0,
3,
0,
0,
0,
0,
0
],
[
14,
2,
0.125,
0.0312,
2,
0.01,
0,... | [
"class Mandatory:\n\n def __init__(self, mandatory1, mandatory2):\n self.mandatory1 = mandatory1\n self.mandatory2 = mandatory2\n\n def get_args(self):\n return self.mandatory1, self.mandatory2",
" def __init__(self, mandatory1, mandatory2):\n self.mandatory1 = mandatory1\n ... |
from ExampleLibrary import ExampleLibrary
class ExtendPythonLib(ExampleLibrary):
def kw_in_python_extender(self, arg):
return arg/2
def print_many(self, *msgs):
raise Exception('Overridden kw executed!')
def using_method_from_python_parent(self):
self.exception('Asser... | [
[
1,
0,
0.0833,
0.0833,
0,
0.66,
0,
472,
0,
1,
0,
0,
472,
0,
0
],
[
3,
0,
0.625,
0.8333,
0,
0.66,
1,
677,
0,
3,
0,
0,
472,
0,
2
],
[
2,
1,
0.4583,
0.1667,
1,
0.14,
... | [
"from ExampleLibrary import ExampleLibrary",
"class ExtendPythonLib(ExampleLibrary):\n \n def kw_in_python_extender(self, arg):\n return arg/2\n \n def print_many(self, *msgs):\n raise Exception('Overridden kw executed!')",
" def kw_in_python_extender(self, arg):\n return arg... |
ROBOT_LIBRARY_SCOPE = 'Test Suite' # this should be ignored
__version__ = 'test' # this should be used as version of this library
def passing():
pass
def failing():
raise AssertionError('This is a failing keyword from module library')
def logging():
print 'Hello from module library'
print '*WARN* ... | [
[
14,
0,
0.0185,
0.0185,
0,
0.66,
0,
305,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.037,
0.0185,
0,
0.66,
0.0588,
162,
1,
0,
0,
0,
0,
3,
0
],
[
2,
0,
0.1019,
0.037,
0,
0.66... | [
"ROBOT_LIBRARY_SCOPE = 'Test Suite' # this should be ignored",
"__version__ = 'test' # this should be used as version of this library",
"def passing():\n pass",
"def failing():\n raise AssertionError('This is a failing keyword from module library')",
"def logging():\n print('Hello from module lib... |
class PythonVarArgsConstructor:
def __init__(self, mandatory, *varargs):
self.mandatory = mandatory
self.varargs = varargs
def get_args(self):
return self.mandatory, ' '.join(self.varargs)
| [
[
3,
0,
0.5,
0.8889,
0,
0.66,
0,
282,
0,
2,
0,
0,
0,
0,
1
],
[
2,
1,
0.4444,
0.3333,
1,
0.97,
0,
555,
0,
3,
0,
0,
0,
0,
0
],
[
14,
2,
0.4444,
0.1111,
2,
0.09,
0... | [
"class PythonVarArgsConstructor:\n \n def __init__(self, mandatory, *varargs):\n self.mandatory = mandatory\n self.varargs = varargs\n\n def get_args(self):\n return self.mandatory, ' '.join(self.varargs)",
" def __init__(self, mandatory, *varargs):\n self.mandatory = manda... |
class NewStyleClassLibrary(object):
def mirror(self, arg):
arg = list(arg)
arg.reverse()
return ''.join(arg)
def _property_getter(self):
raise SystemExit('This should not be called, ever!!!')
prop = property(_property_getter)
class NewStyleClassArgsLibrar... | [
[
3,
0,
0.1765,
0.3235,
0,
0.66,
0,
12,
0,
2,
0,
0,
186,
0,
5
],
[
2,
1,
0.1324,
0.1176,
1,
0.92,
0,
697,
0,
2,
1,
0,
0,
0,
3
],
[
14,
2,
0.1176,
0.0294,
2,
0.33,
... | [
"class NewStyleClassLibrary(object):\n \n def mirror(self, arg):\n arg = list(arg)\n arg.reverse()\n return ''.join(arg)\n\n def _property_getter(self):",
" def mirror(self, arg):\n arg = list(arg)\n arg.reverse()\n return ''.join(arg)",
" arg = list(... |
class ZipLib:
def kw_from_zip(self, arg):
print '*INFO*', arg
return arg * 2
| [
[
3,
0,
0.4286,
0.7143,
0,
0.66,
0,
240,
0,
1,
0,
0,
0,
0,
1
],
[
2,
1,
0.5714,
0.4286,
1,
0.73,
0,
374,
0,
2,
1,
0,
0,
0,
1
],
[
8,
2,
0.5714,
0.1429,
2,
0.16,
... | [
"class ZipLib:\n\n\tdef kw_from_zip(self, arg):\n\t\tprint('*INFO*', arg)\n\t\treturn arg * 2",
"\tdef kw_from_zip(self, arg):\n\t\tprint('*INFO*', arg)\n\t\treturn arg * 2",
"\t\tprint('*INFO*', arg)",
"\t\treturn arg * 2"
] |
__version__ = 'N/A' # This should be ignored when version is parsed
class NameLibrary:
handler_count = 10
def simple1(self):
"""Simple 1"""
def simple2___(self):
"""Simple 2"""
def underscore_name(self):
"""Underscore Name"""
def underscore_name2_(self):
"""Undersc... | [
[
14,
0,
0.0062,
0.0062,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
],
[
3,
0,
0.0994,
0.1553,
0,
0.66,
0.0769,
353,
0,
11,
0,
0,
0,
0,
0
],
[
14,
1,
0.0311,
0.0062,
1,
0... | [
"__version__ = 'N/A' # This should be ignored when version is parsed",
"class NameLibrary:\n handler_count = 10\n def simple1(self):\n \"\"\"Simple 1\"\"\"\n def simple2___(self):\n \"\"\"Simple 2\"\"\"\n def underscore_name(self):\n \"\"\"Underscore Name\"\"\"",
" handler_c... |
from robot import utils
def passing_handler(*args):
for arg in args:
print arg,
return ', '.join(args)
def failing_handler(*args):
if len(args) == 0:
msg = 'Failure'
else:
msg = 'Failure: %s' % ' '.join(args)
raise AssertionError(msg)
class GetKeywordNamesLibrary:
... | [
[
1,
0,
0.027,
0.027,
0,
0.66,
0,
735,
0,
1,
0,
0,
735,
0,
0
],
[
2,
0,
0.1486,
0.1081,
0,
0.66,
0.3333,
44,
0,
1,
1,
0,
0,
0,
2
],
[
6,
1,
0.1486,
0.0541,
1,
0.54,... | [
"from robot import utils",
"def passing_handler(*args):\n for arg in args:\n print(arg,)\n return ', '.join(args)",
" for arg in args:\n print(arg,)",
" print(arg,)",
" return ', '.join(args)",
"def failing_handler(*args):\n if len(args) == 0:\n msg = 'Failure'\n... |
import exceptions
class ObjectToReturn:
def __init__(self, name):
self.name = name
def __str__(self):
return self.name
def exception(self, name, msg=""):
exception = getattr(exceptions, name)
raise exception, msg
| [
[
1,
0,
0.0833,
0.0833,
0,
0.66,
0,
63,
0,
1,
0,
0,
63,
0,
0
],
[
3,
0,
0.625,
0.8333,
0,
0.66,
1,
601,
0,
3,
0,
0,
0,
0,
1
],
[
2,
1,
0.4583,
0.1667,
1,
0.56,
... | [
"import exceptions",
"class ObjectToReturn:\n \n def __init__(self, name):\n self.name = name\n\n def __str__(self):\n return self.name",
" def __init__(self, name):\n self.name = name",
" self.name = name",
" def __str__(self):\n return self.name",
" ... |
class SameNamesAsInBuiltIn:
def noop(self):
"""Using this keyword without libname causes an error""" | [
[
3,
0,
0.625,
1,
0,
0.66,
0,
82,
0,
1,
0,
0,
0,
0,
0
],
[
2,
1,
0.875,
0.5,
1,
0.69,
0,
907,
0,
1,
0,
0,
0,
0,
0
],
[
8,
2,
1,
0.25,
2,
0.98,
0,
0,
1,
... | [
"class SameNamesAsInBuiltIn:\n \n def noop(self):\n \"\"\"Using this keyword without libname causes an error\"\"\"",
" def noop(self):\n \"\"\"Using this keyword without libname causes an error\"\"\"",
" \"\"\"Using this keyword without libname causes an error\"\"\""
] |
class KwargsLibrary(object):
def __init__(self, arg1=None, arg2=None):
self.arg1 = arg1
self.arg2 = arg2
def check_init_arguments(self, exp_arg1, exp_arg2):
if self.arg1 != exp_arg1 or self.arg2 != exp_arg2:
raise AssertionError('Wrong initialization values. Got (%s, %s), e... | [
[
3,
0,
0.52,
1,
0,
0.66,
0,
328,
0,
7,
0,
0,
186,
0,
2
],
[
2,
1,
0.16,
0.12,
1,
0.79,
0,
555,
0,
3,
0,
0,
0,
0,
0
],
[
14,
2,
0.16,
0.04,
2,
0.48,
0,
572,... | [
"class KwargsLibrary(object):\n\n def __init__(self, arg1=None, arg2=None):\n self.arg1 = arg1\n self.arg2 = arg2\n\n def check_init_arguments(self, exp_arg1, exp_arg2):\n if self.arg1 != exp_arg1 or self.arg2 != exp_arg2:",
" def __init__(self, arg1=None, arg2=None):\n self.a... |
class FatalCatastrophyException(RuntimeError):
ROBOT_EXIT_ON_FAILURE = True
class ContinuableApocalypseException(RuntimeError):
ROBOT_CONTINUE_ON_FAILURE = True
def exit_on_failure():
raise FatalCatastrophyException()
def raise_continuable_failure(msg='Can be continued'):
raise ContinuableApocalypseE... | [
[
3,
0,
0.1364,
0.1818,
0,
0.66,
0,
572,
0,
0,
0,
0,
178,
0,
0
],
[
14,
1,
0.1818,
0.0909,
1,
0.43,
0,
675,
1,
0,
0,
0,
0,
4,
0
],
[
3,
0,
0.4091,
0.1818,
0,
0.66,
... | [
"class FatalCatastrophyException(RuntimeError):\n ROBOT_EXIT_ON_FAILURE = True",
" ROBOT_EXIT_ON_FAILURE = True",
"class ContinuableApocalypseException(RuntimeError):\n ROBOT_CONTINUE_ON_FAILURE = True",
" ROBOT_CONTINUE_ON_FAILURE = True",
"def exit_on_failure():\n raise FatalCatastrophyExce... |
class LibClass1:
def verify_libclass1(self):
return 'LibClass 1 works'
class LibClass2:
def verify_libclass2(self):
return 'LibClass 2 works also'
| [
[
3,
0,
0.2273,
0.3636,
0,
0.66,
0,
529,
0,
1,
0,
0,
0,
0,
0
],
[
2,
1,
0.3182,
0.1818,
1,
0.31,
0,
99,
0,
1,
1,
0,
0,
0,
0
],
[
13,
2,
0.3636,
0.0909,
2,
0.25,
... | [
"class LibClass1:\n \n def verify_libclass1(self):\n return 'LibClass 1 works'",
" def verify_libclass1(self):\n return 'LibClass 1 works'",
" return 'LibClass 1 works'",
"class LibClass2:\n\n def verify_libclass2(self):\n return 'LibClass 2 works also'",
" def ver... |
class ArgumentsPython:
# method docs are used in unit tests as expected min and max args
def a_0(self):
"""(0,0)"""
return 'a_0'
def a_1(self, arg):
"""(1,1)"""
return 'a_1: ' + arg
def a_3(self, arg1, arg2, arg3):
"""(3,3)"""
return ' ... | [
[
3,
0,
0.5,
0.9722,
0,
0.66,
0,
360,
0,
8,
0,
0,
0,
0,
8
],
[
2,
1,
0.1667,
0.0833,
1,
0.84,
0,
653,
0,
1,
1,
0,
0,
0,
0
],
[
8,
2,
0.1667,
0.0278,
2,
0.93,
0,... | [
"class ArgumentsPython:\n \n # method docs are used in unit tests as expected min and max args\n \n def a_0(self):\n \"\"\"(0,0)\"\"\"\n return 'a_0'",
" def a_0(self):\n \"\"\"(0,0)\"\"\"\n return 'a_0'",
" \"\"\"(0,0)\"\"\"",
" return 'a_0'",
" d... |
class FailUntilSucceeds:
ROBOT_LIBRARY_SCOPE = 'TESTCASE'
def __init__(self, times_to_fail=0):
self.times_to_fail = int(times_to_fail)
def fail_until_retried_often_enough(self, message="Hello"):
self.times_to_fail -= 1
if self.times_to_fail >= 0:
raise Exce... | [
[
3,
0,
0.5417,
1,
0,
0.66,
0,
243,
0,
2,
0,
0,
0,
0,
2
],
[
14,
1,
0.25,
0.0833,
1,
0.28,
0,
305,
1,
0,
0,
0,
0,
3,
0
],
[
2,
1,
0.4583,
0.1667,
1,
0.28,
0.5,
... | [
"class FailUntilSucceeds:\n \n ROBOT_LIBRARY_SCOPE = 'TESTCASE'\n \n def __init__(self, times_to_fail=0):\n self.times_to_fail = int(times_to_fail)\n \n def fail_until_retried_often_enough(self, message=\"Hello\"):",
" ROBOT_LIBRARY_SCOPE = 'TESTCASE'",
" def __init__(self, times_... |
import ExampleJavaLibrary
import DefaultArgs
class ExtendJavaLib(ExampleJavaLibrary):
def kw_in_java_extender(self, arg):
return arg*2
def javaSleep(self, secs):
raise Exception('Overridden kw executed!')
def using_method_from_java_parent(self):
self.divByZero()
class ExtendJa... | [
[
1,
0,
0.027,
0.027,
0,
0.66,
0,
716,
0,
1,
0,
0,
716,
0,
0
],
[
1,
0,
0.0541,
0.027,
0,
0.66,
0.2,
96,
0,
1,
0,
0,
96,
0,
0
],
[
3,
0,
0.2568,
0.2703,
0,
0.66,
... | [
"import ExampleJavaLibrary",
"import DefaultArgs",
"class ExtendJavaLib(ExampleJavaLibrary):\n\n def kw_in_java_extender(self, arg):\n return arg*2\n\n def javaSleep(self, secs):\n raise Exception('Overridden kw executed!')",
" def kw_in_java_extender(self, arg):\n return arg*2",... |
class RunKeywordButNoGetKeywordNamesLibrary:
def run_keyword(self, *args):
return ' '.join(args)
def some_other_keyword(self, *args):
return ' '.join(args) | [
[
3,
0,
0.5714,
1,
0,
0.66,
0,
352,
0,
2,
0,
0,
0,
0,
2
],
[
2,
1,
0.5,
0.2857,
1,
0.02,
0,
458,
0,
2,
1,
0,
0,
0,
1
],
[
13,
2,
0.5714,
0.1429,
2,
0.75,
0,
... | [
"class RunKeywordButNoGetKeywordNamesLibrary:\n \n def run_keyword(self, *args):\n return ' '.join(args)\n \n def some_other_keyword(self, *args):\n return ' '.join(args)",
" def run_keyword(self, *args):\n return ' '.join(args)",
" return ' '.join(args)",
" d... |
import os
import tempfile
import time
class ListenAll:
ROBOT_LISTENER_API_VERSION = '2'
def __init__(self, *path):
if not path:
path = os.path.join(tempfile.gettempdir(), 'listen_all.txt')
else:
path = ':'.join(path)
self.outfile = open(path, 'w')
def sta... | [
[
1,
0,
0.0118,
0.0118,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0235,
0.0118,
0,
0.66,
0.3333,
516,
0,
1,
0,
0,
516,
0,
0
],
[
1,
0,
0.0353,
0.0118,
0,
... | [
"import os",
"import tempfile",
"import time",
"class ListenAll:\n\n ROBOT_LISTENER_API_VERSION = '2'\n\n def __init__(self, *path):\n if not path:\n path = os.path.join(tempfile.gettempdir(), 'listen_all.txt')\n else:",
" ROBOT_LISTENER_API_VERSION = '2'",
" def __ini... |
import os
import tempfile
outpath = os.path.join(tempfile.gettempdir(), 'listen_by_module.txt')
OUTFILE = open(outpath, 'w')
def start_suite(name, doc):
OUTFILE.write("SUITE START: %s '%s'\n" % (name, doc))
def start_test(name, doc, tags):
tags = [ str(tag) for tag in tags ]
OUTFILE.write("T... | [
[
1,
0,
0.0192,
0.0192,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0385,
0.0192,
0,
0.66,
0.0625,
516,
0,
1,
0,
0,
516,
0,
0
],
[
14,
0,
0.0769,
0.0192,
0,
... | [
"import os",
"import tempfile",
"outpath = os.path.join(tempfile.gettempdir(), 'listen_by_module.txt')",
"OUTFILE = open(outpath, 'w')",
"def start_suite(name, doc):\n OUTFILE.write(\"SUITE START: %s '%s'\\n\" % (name, doc))",
" OUTFILE.write(\"SUITE START: %s '%s'\\n\" % (name, doc))",
"def start... |
import os
import tempfile
class OldListenAll:
def __init__(self, *path):
if not path:
path = os.path.join(tempfile.gettempdir(), 'listen_all.txt')
else:
path = ':'.join(path)
self.outfile = open(path, 'w')
def start_suite(self, name, doc):
... | [
[
1,
0,
0.0172,
0.0172,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0345,
0.0172,
0,
0.66,
0.5,
516,
0,
1,
0,
0,
516,
0,
0
],
[
3,
0,
0.5431,
0.931,
0,
0.66... | [
"import os",
"import tempfile",
"class OldListenAll:\n \n def __init__(self, *path):\n if not path:\n path = os.path.join(tempfile.gettempdir(), 'listen_all.txt')\n else:\n path = ':'.join(path)\n self.outfile = open(path, 'w')",
" def __init__(self, *path):... |
import os
import tempfile
outpath = os.path.join(tempfile.gettempdir(), 'listen_by_module.txt')
OUTFILE = open(outpath, 'w')
ROBOT_LISTENER_API_VERSION = 2
def start_suite(name, attrs):
metastr = ' '.join(['%s: %s' % (k, v) for k, v
in attrs['metadata'].items()])
OUTFILE.write("SUITE ... | [
[
1,
0,
0.0152,
0.0152,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0303,
0.0152,
0,
0.66,
0.0526,
516,
0,
1,
0,
0,
516,
0,
0
],
[
14,
0,
0.0606,
0.0152,
0,
... | [
"import os",
"import tempfile",
"outpath = os.path.join(tempfile.gettempdir(), 'listen_by_module.txt')",
"OUTFILE = open(outpath, 'w')",
"ROBOT_LISTENER_API_VERSION = 2",
"def start_suite(name, attrs):\n metastr = ' '.join(['%s: %s' % (k, v) for k, v\n in attrs['metadata'].items(... |
import os
import tempfile
from robot.libraries.BuiltIn import BuiltIn
class ListenSome:
ROBOT_LISTENER_API_VERSION = '2'
def __init__(self):
outpath = os.path.join(tempfile.gettempdir(), 'listen_some.txt')
self.outfile = open(outpath, 'w')
def startTest(self, name, attrs):
self.... | [
[
1,
0,
0.0119,
0.0119,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0238,
0.0119,
0,
0.66,
0.1429,
516,
0,
1,
0,
0,
516,
0,
0
],
[
1,
0,
0.0476,
0.0119,
0,
... | [
"import os",
"import tempfile",
"from robot.libraries.BuiltIn import BuiltIn",
"class ListenSome:\n ROBOT_LISTENER_API_VERSION = '2'\n\n def __init__(self):\n outpath = os.path.join(tempfile.gettempdir(), 'listen_some.txt')\n self.outfile = open(outpath, 'w')\n\n def startTest(self, nam... |
import os
import tempfile
ROBOT_LISTENER_API_VERSION = '2'
OUTFILE = open(os.path.join(tempfile.gettempdir(), 'listener_attrs.txt'), 'w')
START_ATTRIBUTES = ['doc', 'starttime']
END_ATTRIBUTES = START_ATTRIBUTES + ['endtime', 'elapsedtime', 'status']
EXPECTED_TYPES = {'elapsedtime': (int, long), 'tags': list, 'args'... | [
[
1,
0,
0.0192,
0.0192,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0385,
0.0192,
0,
0.66,
0.0714,
516,
0,
1,
0,
0,
516,
0,
0
],
[
14,
0,
0.0962,
0.0192,
0,
... | [
"import os",
"import tempfile",
"ROBOT_LISTENER_API_VERSION = '2'",
"OUTFILE = open(os.path.join(tempfile.gettempdir(), 'listener_attrs.txt'), 'w')",
"START_ATTRIBUTES = ['doc', 'starttime']",
"END_ATTRIBUTES = START_ATTRIBUTES + ['endtime', 'elapsedtime', 'status']",
"EXPECTED_TYPES = {'elapsedtime': (... |
import os
import tempfile
class ListenSome:
def __init__(self):
outpath = os.path.join(tempfile.gettempdir(), 'listen_some.txt')
self.outfile = open(outpath, 'w')
def startTest(self, name, doc, tags):
self.outfile.write(name + '\n')
def endSuite(self, stat, msg):
... | [
[
1,
0,
0.0278,
0.0278,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0556,
0.0278,
0,
0.66,
0.25,
516,
0,
1,
0,
0,
516,
0,
0
],
[
3,
0,
0.3194,
0.3889,
0,
0.... | [
"import os",
"import tempfile",
"class ListenSome:\n \n def __init__(self):\n outpath = os.path.join(tempfile.gettempdir(), 'listen_some.txt')\n self.outfile = open(outpath, 'w')\n \n def startTest(self, name, doc, tags):\n self.outfile.write(name + '\\n')",
" def __ini... |
import subprocess
import os
import signal
import ctypes
import time
class ProcessManager(object):
def __init__(self):
self._process = None
self._stdout = ''
self._stderr = ''
def start_process(self, *args):
args = args[0].split() + list(args[1:])
self._process = subpr... | [
[
1,
0,
0.0137,
0.0137,
0,
0.66,
0,
394,
0,
1,
0,
0,
394,
0,
0
],
[
1,
0,
0.0274,
0.0137,
0,
0.66,
0.2,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0411,
0.0137,
0,
0.6... | [
"import subprocess",
"import os",
"import signal",
"import ctypes",
"import time",
"class ProcessManager(object):\n\n def __init__(self):\n self._process = None\n self._stdout = ''\n self._stderr = ''\n\n def start_process(self, *args):",
" def __init__(self):\n self... |
from robot.libraries.BuiltIn import BuiltIn
BIN = BuiltIn()
def start_keyword(*args):
if BIN.get_variables()['${TESTNAME}'] == 'Listener Using BuiltIn':
BIN.set_test_variable('${SET BY LISTENER}', 'quux')
| [
[
1,
0,
0.1111,
0.1111,
0,
0.66,
0,
588,
0,
1,
0,
0,
588,
0,
0
],
[
14,
0,
0.3333,
0.1111,
0,
0.66,
0.5,
831,
3,
0,
0,
0,
961,
10,
1
],
[
2,
0,
0.7778,
0.3333,
0,
0... | [
"from robot.libraries.BuiltIn import BuiltIn",
"BIN = BuiltIn()",
"def start_keyword(*args):\n if BIN.get_variables()['${TESTNAME}'] == 'Listener Using BuiltIn':\n BIN.set_test_variable('${SET BY LISTENER}', 'quux')",
" if BIN.get_variables()['${TESTNAME}'] == 'Listener Using BuiltIn':\n B... |
from xml.dom.minidom import parse
def parse_xunit(path):
return parse(path)
def get_root_element_name(dom):
return dom.documentElement.tagName
def get_element_count_by_name(dom, name):
return len(get_elements_by_name(dom, name))
def get_elements_by_name(dom, name):
return dom.getElementsByTagName(na... | [
[
1,
0,
0.0769,
0.0769,
0,
0.66,
0,
770,
0,
1,
0,
0,
770,
0,
0
],
[
2,
0,
0.2692,
0.1538,
0,
0.66,
0.25,
889,
0,
1,
1,
0,
0,
0,
1
],
[
13,
1,
0.3077,
0.0769,
1,
0.1... | [
"from xml.dom.minidom import parse",
"def parse_xunit(path):\n return parse(path)",
" return parse(path)",
"def get_root_element_name(dom):\n return dom.documentElement.tagName",
" return dom.documentElement.tagName",
"def get_element_count_by_name(dom, name):\n return len(get_elements_by_n... |
import os.path
import robot
import tempfile
__all__ = ['robotpath', 'javatempdir', 'robotversion']
robotpath = os.path.abspath(os.path.dirname(robot.__file__))
javatempdir = tempfile.gettempdir() # Used to be different on OSX and elsewhere
robotversion = robot.version.get_version()
| [
[
1,
0,
0.1111,
0.1111,
0,
0.66,
0,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.2222,
0.1111,
0,
0.66,
0.1667,
735,
0,
1,
0,
0,
735,
0,
0
],
[
1,
0,
0.3333,
0.1111,
0,
0.... | [
"import os.path",
"import robot",
"import tempfile",
"__all__ = ['robotpath', 'javatempdir', 'robotversion']",
"robotpath = os.path.abspath(os.path.dirname(robot.__file__))",
"javatempdir = tempfile.gettempdir() # Used to be different on OSX and elsewhere",
"robotversion = robot.version.get_version()"
] |
import os
import sys
from stat import S_IREAD, S_IWRITE
class TestHelper:
def set_read_only(self, path):
os.chmod(path, S_IREAD)
def set_read_write(self, path):
os.chmod(path, S_IREAD | S_IWRITE)
def get_output_name(self, *datasources):
if not datasources:
raise ... | [
[
1,
0,
0.0233,
0.0233,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0465,
0.0233,
0,
0.66,
0.3333,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0698,
0.0233,
0,
... | [
"import os",
"import sys",
"from stat import S_IREAD, S_IWRITE",
"class TestHelper:\n \n def set_read_only(self, path):\n os.chmod(path, S_IREAD)\n\n def set_read_write(self, path):\n os.chmod(path, S_IREAD | S_IWRITE)",
" def set_read_only(self, path):\n os.chmod(path, S_IR... |
import os
import re
from robot import utils
from robot.output import readers
from robot.common import Statistics
from robot.libraries.BuiltIn import BuiltIn
class TestCheckerLibrary:
def process_output(self, path):
path = path.replace('/', os.sep)
try:
print "Processing o... | [
[
1,
0,
0.006,
0.006,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.012,
0.006,
0,
0.66,
0.1,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0241,
0.006,
0,
0.66,
... | [
"import os",
"import re",
"from robot import utils",
"from robot.output import readers",
"from robot.common import Statistics",
"from robot.libraries.BuiltIn import BuiltIn",
"class TestCheckerLibrary:\n \n def process_output(self, path):\n path = path.replace('/', os.sep)\n ... |
message_list = [ u'Circle is 360\u00B0',
u'Hyv\u00E4\u00E4 \u00FC\u00F6t\u00E4',
u'\u0989\u09C4 \u09F0 \u09FA \u099F \u09EB \u09EA \u09B9' ]
message1 = message_list[0]
message2 = message_list[1]
message3 = message_list[2]
messages = ', '.join(message_list)
sect = unichr(167)
auml = unic... | [
[
14,
0,
0.1333,
0.2,
0,
0.66,
0,
656,
0,
0,
0,
0,
0,
5,
0
],
[
14,
0,
0.3333,
0.0667,
0,
0.66,
0.1111,
880,
6,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4,
0.0667,
0,
0.66,
... | [
"message_list = [ u'Circle is 360\\u00B0',\n u'Hyv\\u00E4\\u00E4 \\u00FC\\u00F6t\\u00E4',\n u'\\u0989\\u09C4 \\u09F0 \\u09FA \\u099F \\u09EB \\u09EA \\u09B9' ]",
"message1 = message_list[0]",
"message2 = message_list[1]",
"message3 = message_list[2]",
"messages = ', '.join(messag... |
u"""Module test library.
With some non-ascii stuff:
Hyv\u00E4\u00E4 y\u00F6t\u00E4.
\u0421\u043F\u0430\u0441\u0438\u0431\u043E!
"""
ROBOT_LIBRARY_VERSION = '0.1-alpha'
def keyword():
"""A keyword
See `get hello` for details"""
pass
def get_hello():
"""Get the intialization variables
See `imp... | [
[
8,
0,
0.1739,
0.3043,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3913,
0.0435,
0,
0.66,
0.3333,
466,
1,
0,
0,
0,
0,
3,
0
],
[
2,
0,
0.6087,
0.2174,
0,
0.66,... | [
"u\"\"\"Module test library.\n\nWith some non-ascii stuff:\n\nHyv\\u00E4\\u00E4 y\\u00F6t\\u00E4.\n\\u0421\\u043F\\u0430\\u0441\\u0438\\u0431\\u043E!\n\"\"\"",
"ROBOT_LIBRARY_VERSION = '0.1-alpha'",
"def keyword():\n \"\"\"A keyword\n\n See `get hello` for details\"\"\"\n pass",
" \"\"\"A keyword\... |
class no_arg_init:
def __init__(self):
"""This doc not shown because there are no arguments."""
def keyword(self):
"""A keyword.
See `get hello` for details and *never* run this keyword.
"""
1/0
def get_hello(self, arg):
"""Returns 'Hello `arg`!'.
... | [
[
3,
0,
0.5,
0.95,
0,
0.66,
0,
941,
0,
3,
0,
0,
0,
0,
0
],
[
2,
1,
0.175,
0.1,
1,
0,
0,
555,
0,
1,
0,
0,
0,
0,
0
],
[
8,
2,
0.2,
0.05,
2,
0.04,
0,
0,
1,... | [
"class no_arg_init:\n\n def __init__(self):\n \"\"\"This doc not shown because there are no arguments.\"\"\"\n\n def keyword(self):\n \"\"\"A keyword.",
" def __init__(self):\n \"\"\"This doc not shown because there are no arguments.\"\"\"",
" \"\"\"This doc not shown becaus... |
class dynamic:
def get_keyword_names(self):
return ['Keyword 1', 'KW 2']
def run_keyword(self, name, args):
print name, args
def get_keyword_arguments(self, name):
return [ 'arg%d' % (i+1) for i in range(int(name[-1])) ]
def get_keyword_documentation(self, name):
retu... | [
[
3,
0,
0.5192,
1,
0,
0.66,
0,
670,
0,
4,
0,
0,
0,
0,
3
],
[
2,
1,
0.1346,
0.0769,
1,
0.21,
0,
768,
0,
1,
1,
0,
0,
0,
0
],
[
13,
2,
0.1538,
0.0385,
2,
0.48,
0,
... | [
"class dynamic:\n\n def get_keyword_names(self):\n return ['Keyword 1', 'KW 2']\n\n def run_keyword(self, name, args):\n print(name, args)",
" def get_keyword_names(self):\n return ['Keyword 1', 'KW 2']",
" return ['Keyword 1', 'KW 2']",
" def run_keyword(self, name, ar... |
class regular:
ROBOT_LIBRARY_SCOPE = 'TEST SUITE'
"""This is a very regular test library"""
def __init__(self, arg1='hello', arg2='world'):
"""Constructs a new regular test library
See `keyword`
Examples:
| regular | foo | bar |
| regular | | # defaul... | [
[
3,
0,
0.5167,
1,
0,
0.66,
0,
2,
0,
3,
0,
0,
0,
0,
0
],
[
14,
1,
0.0667,
0.0333,
1,
0.56,
0,
305,
1,
0,
0,
0,
0,
3,
0
],
[
8,
1,
0.1333,
0.0333,
1,
0.56,
0.25,... | [
"class regular:\n ROBOT_LIBRARY_SCOPE = 'TEST SUITE'\n\n \"\"\"This is a very regular test library\"\"\"\n\n def __init__(self, arg1='hello', arg2='world'):\n \"\"\"Constructs a new regular test library",
" ROBOT_LIBRARY_SCOPE = 'TEST SUITE'",
" \"\"\"This is a very regular test library\"\... |
class new_style_no_init(object):
"""No __init__ on this one."""
def kw(self):
"""The only lonely keyword."""
| [
[
3,
0,
0.5833,
1,
0,
0.66,
0,
886,
0,
1,
0,
0,
186,
0,
0
],
[
8,
1,
0.5,
0.1667,
1,
0.23,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
2,
1,
0.9167,
0.3333,
1,
0.23,
1,
... | [
"class new_style_no_init(object):\n\n \"\"\"No __init__ on this one.\"\"\"\n\n def kw(self):\n \"\"\"The only lonely keyword.\"\"\"",
" \"\"\"No __init__ on this one.\"\"\"",
" def kw(self):\n \"\"\"The only lonely keyword.\"\"\"",
" \"\"\"The only lonely keyword.\"\"\""
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.