code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
# Copyright 2014 Google Inc. All rights reserved.
#
# 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... | [] | [] |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | [
[
8,
0,
0.2329,
0.0137,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2603,
0.0137,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.274,
0.0137,
0,
0.66,
... | [
"'''The setup and build script for the python-twitter library.'''",
"__author__ = 'python-twitter@googlegroups.com'",
"__version__ = '0.8.3'",
"METADATA = dict(\n name = \"python-twitter\",\n version = __version__,\n py_modules = ['twitter'],\n author='The Python-Twitter Developers',\n author_email='pyth... |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | [
[
1,
0,
0.2,
0.0111,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2111,
0.0111,
0,
0.66,
0.0625,
509,
0,
1,
0,
0,
509,
0,
0
],
[
7,
0,
0.2611,
0.0444,
0,
0.6... | [
"import os",
"import sys",
"try:\n from urlparse import parse_qsl\nexcept:\n from cgi import parse_qsl",
" from urlparse import parse_qsl",
" from cgi import parse_qsl",
"import oauth2 as oauth",
"REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token'",
"ACCESS_TOKEN_URL = 'https://api... |
"""Implementation of JSONEncoder
"""
import re
try:
from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from simplejson._speedups import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
... | [
[
8,
0,
0.0035,
0.0046,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0069,
0.0023,
0,
0.66,
0.0667,
540,
0,
1,
0,
0,
540,
0,
0
],
[
7,
0,
0.015,
0.0092,
0,
0.66,... | [
"\"\"\"Implementation of JSONEncoder\n\"\"\"",
"import re",
"try:\n from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii\nexcept ImportError:\n c_encode_basestring_ascii = None",
" from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii",... |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | [
[
8,
0,
0.1582,
0.3133,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3165,
0.0032,
0,
0.66,
0.1,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3244,
0.0127,
0,
0.66,
... | [
"r\"\"\"JSON (JavaScript Object Notation) <http://json.org> is a subset of\nJavaScript syntax (ECMA-262 3rd edition) used as a lightweight data\ninterchange format.\n\n:mod:`simplejson` exposes an API familiar to users of the standard library\n:mod:`marshal` and :mod:`pickle` modules. It is the externally maintaine... |
"""JSON token scanner
"""
import re
try:
from simplejson._speedups import make_scanner as c_make_scanner
except ImportError:
c_make_scanner = None
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
(re.VERBOSE | re.MULTILINE | re.DOTALL))
def py_make_scan... | [
[
8,
0,
0.0231,
0.0308,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0462,
0.0154,
0,
0.66,
0.1667,
540,
0,
1,
0,
0,
540,
0,
0
],
[
7,
0,
0.0846,
0.0615,
0,
0.66... | [
"\"\"\"JSON token scanner\n\"\"\"",
"import re",
"try:\n from simplejson._speedups import make_scanner as c_make_scanner\nexcept ImportError:\n c_make_scanner = None",
" from simplejson._speedups import make_scanner as c_make_scanner",
" c_make_scanner = None",
"__all__ = ['make_scanner']",
... |
#!/usr/bin/python2.4
'''Post a message to twitter'''
__author__ = 'dewitt@google.com'
import ConfigParser
import getopt
import os
import sys
import twitter
USAGE = '''Usage: tweet [options] message
This script posts a message to Twitter.
Options:
-h --help : print this help
--consumer-key : the twit... | [
[
8,
0,
0.0213,
0.0071,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0355,
0.0071,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0496,
0.0071,
0,
0.66,... | [
"'''Post a message to twitter'''",
"__author__ = 'dewitt@google.com'",
"import ConfigParser",
"import getopt",
"import os",
"import sys",
"import twitter",
"USAGE = '''Usage: tweet [options] message\n\n This script posts a message to Twitter.\n\n Options:\n\n -h --help : print this help\n --co... |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | [
[
8,
0,
0.2606,
0.0563,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3099,
0.0141,
0,
0.66,
0.5,
614,
0,
1,
0,
0,
614,
0,
0
],
[
3,
0,
0.7535,
0.507,
0,
0.66,
... | [
"'''A class that defines the default URL Shortener.\n\nTinyURL is provided as the default and as an example.\n'''",
"import urllib",
"class ShortenURL(object):\n '''Helper class to make URL Shortener calls if/when required'''\n def __init__(self,\n userid=None,\n password=N... |
#! /usr/bin/env python
# encoding: utf-8
# waf 1.6.10
VERSION='0.3.3'
import sys
APPNAME='p2t'
top = '.'
out = 'build'
CPP_SOURCES = ['poly2tri/common/shapes.cc',
'poly2tri/sweep/cdt.cc',
'poly2tri/sweep/advancing_front.cc',
'poly2tri/sweep/sweep_context.cc',
... | [
[
14,
0,
0.1111,
0.0222,
0,
0.66,
0,
557,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1333,
0.0222,
0,
0.66,
0.0909,
509,
0,
1,
0,
0,
509,
0,
0
],
[
14,
0,
0.1556,
0.0222,
0,
... | [
"VERSION='0.3.3'",
"import sys",
"APPNAME='p2t'",
"top = '.'",
"out = 'build'",
"CPP_SOURCES = ['poly2tri/common/shapes.cc',\n 'poly2tri/sweep/cdt.cc',\n 'poly2tri/sweep/advancing_front.cc',\n 'poly2tri/sweep/sweep_context.cc',\n 'poly2tri/sweep/swee... |
#!/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/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.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.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) 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... |
# 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... |
#!/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/python2.6
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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... | [
[
8,
0,
0.0841,
0.0047,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0935,
0.0047,
0,
0.66,
0.0476,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1028,
0.0047,
0,
0.66,... | [
"\"\"\"Build the ScriptCover Extension.\"\"\"",
"__author__ = 'ekamenskaya@google.com (Ekaterina Kamenskaya)'",
"import logging",
"import optparse",
"import os",
"import shutil",
"import subprocess",
"import urllib",
"import zipfile",
"CHECKOUT_CLOSURE_COMMAND = ('svn checkout http://closure-libra... |
#!/usr/bin/python
"gui2py application example using a resource & controller"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import gui
class MyController(gui.Controller):
def on_load(self, evt):
print "initialized!"... | [
[
8,
0,
0.0789,
0.0263,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1316,
0.0263,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1579,
0.0263,
0,
0.66... | [
"\"gui2py application example using a resource & controller\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import gui",
"class MyController(gui.Controller):\n\n def on_load(self, evt):\n pri... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Experimental sample gui2py application demo of sizer usage"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import datetime
import decimal
import os
# disable ubuntu unified menu
os.enviro... | [
[
8,
0,
0.0952,
0.0238,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1429,
0.0238,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1667,
0.0238,
0,
0.66... | [
"\"Experimental sample gui2py application demo of sizer usage\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import datetime",
"import decimal",
"import os",
"os.environ['UBUNTU_MENUPROXY'] = '0'"... |
[{'bgcolor': u'#E5E5E5',
'components': [{'left': '10',
'name': 'field1',
'top': '10',
'type': 'TextBox',
'value': u'Hello gui2py',
'width': '288'},
{'bgcolor': u'#E5E5E5',
'components': [{'id':... | [
[
8,
0,
0.5104,
1,
0,
0.66,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
] | [
"[{'bgcolor': u'#E5E5E5',\n 'components': [{'left': '10',\n 'name': 'field1',\n 'top': '10',\n 'type': 'TextBox',\n 'value': u'Hello gui2py',\n 'width': '288'},\n {'bgcolor': u'#E5E5E5',"
] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py resource (python lists/dicts ui definition) support"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Implementation resembles PythonCard's resource file structure (resource and
# ... | [
[
8,
0,
0.0134,
0.0034,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0201,
0.0034,
0,
0.66,
0.0556,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0235,
0.0034,
0,
0.66... | [
"\"gui2py resource (python lists/dicts ui definition) support\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import os",
"import pprint",
"import sys",
"from . import util",
"PYTHONCARD_EVENT_MA... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Font facilities (encapsulate wx.Font)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's font module, altought
# most of it was ... | [
[
8,
0,
0.0268,
0.0067,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0403,
0.0067,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.047,
0.0067,
0,
0.66,
... | [
"\"gui2py's Font facilities (encapsulate wx.Font)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"class Font(object):\n\n def __init__(self, parent=None, **kwargs ) :\n self._parent = parent\... |
#----------------------------------------------------------------------------
# Name: flowsizer.py
# Purpose: Implements a Flow Sizer
#
# Author: Peter Damoc (peter at gmail.com)
#
# Created: January 2006
# Version: 0.1
# Licence: wxWindows license
import wx
class... | [
[
1,
0,
0.1122,
0.0102,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
3,
0,
0.4133,
0.5714,
0,
0.66,
0.5,
915,
0,
5,
0,
0,
535,
0,
25
],
[
2,
1,
0.1633,
0.051,
1,
0.2... | [
"import wx",
"class FlowSizer(wx.PySizer):\n def __init__(self, minHSpace=0, minVSpace=0): \n wx.PySizer.__init__(self)\n self.snp = []\n self.minHSpace = minHSpace\n self.minVSpace = minVSpace\n \n def _calcSizeAndPos(self):",
" def __init__(self, minHSpace=0,... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Shell, Namespace viewer and other debugging facilities"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# inspired byPythonCard debug module, but completely rewritten
import wx
import wx... | [
[
8,
0,
0.1111,
0.0278,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1667,
0.0278,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1944,
0.0278,
0,
0.66,... | [
"\"Shell, Namespace viewer and other debugging facilities\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import wx",
"import wx.py",
"TOOL_WINDOW_STYLE = wx.DEFAULT_FRAME_STYLE | wx.FRAME_NO_TASKBAR... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"PythonCard to gui2py resources conversion tool"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import gui
CTRL_MAP = {
'Widget': None,
'Button': gui.Button,
'CheckBox': gui.C... | [
[
8,
0,
0.0163,
0.0041,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0244,
0.0041,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0285,
0.0041,
0,
0.66... | [
"\"PythonCard to gui2py resources conversion tool\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import gui",
"CTRL_MAP = {\n 'Widget': None,\n 'Button': gui.Button,\n 'CheckBox': gui.CheckBo... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Visual Toolbox to drag & drop gui2py's components (using wx AuiToolbar)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# some parts where inspired or borrowed from wxPython examples
impo... | [
[
8,
0,
0.0157,
0.0039,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0235,
0.0039,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0275,
0.0039,
0,
0.66... | [
"\"Visual Toolbox to drag & drop gui2py's components (using wx AuiToolbar)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import wx",
"import os, sys",
"import gui",
"from gui import registry",
... |
#from .inspector import InspectorPanel
#from .propeditor import PropertyEditorPanel
#from .designer import BasicDesigner
#from .toolbox import ToolBox, ToolBoxDropTarget
| [] | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's generic Top Level Window (uses wx.Frame)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's model.Background component,
# but ... | [
[
8,
0,
0.0175,
0.0044,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0263,
0.0044,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0307,
0.0044,
0,
0.66... | [
"\"gui2py's generic Top Level Window (uses wx.Frame)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..component import Component, ControlSuper, ImageBackgroundMixin, SizerMixin",
"from ..spec ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Top Level Windows package"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Window is a fork of PythonCard's model.Background
from .window import Window
from .htmlwin... | [
[
8,
0,
0.3077,
0.0769,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4615,
0.0769,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.5385,
0.0769,
0,
0.66,
... | [
"\"gui2py's Top Level Windows package\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"from .window import Window",
"from .htmlwin import HtmlWindow"
] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's HTML Top Level Window (uses wx.Frame and gui.HtmlBox)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# This is an experimental approach to show rich internet application... | [
[
8,
0,
0.069,
0.0172,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1034,
0.0172,
0,
0.66,
0.1,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1207,
0.0172,
0,
0.66,
... | [
"\"gui2py's HTML Top Level Window (uses wx.Frame and gui.HtmlBox)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import wx",
"from ..component import Component, Spec, InitSpec, EventSpec, StyleSpec",
... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's basic HTML control (uses wx.HtmlWindow)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
__license__ = "LGPL 3.0"
# Initial implementation was based on PythonCard's HtmlWindow component... | [
[
8,
0,
0.0315,
0.0079,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0472,
0.0079,
0,
0.66,
0.0714,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0551,
0.0079,
0,
0.66... | [
"\"gui2py's basic HTML control (uses wx.HtmlWindow)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"__license__ = \"LGPL 3.0\"",
"import os",
"import sys",
"import wx",
"import wx.html",
"from ..event impo... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's RadioButton for mutual exclusive options (uses wx.RadioButton)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Note: Pythoncard didn't implemented this, so the code is almost... | [
[
8,
0,
0.0741,
0.0185,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1111,
0.0185,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1296,
0.0185,
0,
0.66,... | [
"\"gui2py's RadioButton for mutual exclusive options (uses wx.RadioButton)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Spec, Eve... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's line separator control (uses wx.StaticLine)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's StaticLine component,
# but red... | [
[
8,
0,
0.1176,
0.0294,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1765,
0.0294,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2059,
0.0294,
0,
0.66... | [
"\"gui2py's line separator control (uses wx.StaticLine)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..component import Control, Spec, StyleSpec, InitSpec",
"from .. import images",
"class... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's List Model-View-Controller control (uses wx.ListCtrl & mixins)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's MultiColumnLis... | [
[
8,
0,
0.008,
0.002,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.012,
0.002,
0,
0.66,
0.0588,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0141,
0.002,
0,
0.66,
... | [
"\"gui2py's List Model-View-Controller control (uses wx.ListCtrl & mixins)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, SubCompon... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's ComboBox control (uses wx.ComboBox - wx.Choice is not used by now)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's ComboBox c... | [
[
8,
0,
0.069,
0.0172,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1034,
0.0172,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1207,
0.0172,
0,
0.66,... | [
"\"gui2py's ComboBox control (uses wx.ComboBox - wx.Choice is not used by now)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Spec,... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Gauge (a.k.a. progress bar) control (uses wx.Gauge)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's Gauge component,
# but ... | [
[
8,
0,
0.1053,
0.0263,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1579,
0.0263,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1842,
0.0263,
0,
0.66... | [
"\"gui2py's Gauge (a.k.a. progress bar) control (uses wx.Gauge)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..component import Control, Spec, EventSpec, InitSpec, StyleSpec",
"from .. impor... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's basic ListBox control (uses wx.ListBox), defines ItemContainerControl"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's List co... | [
[
8,
0,
0.0187,
0.0047,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.028,
0.0047,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0327,
0.0047,
0,
0.66,... | [
"\"gui2py's basic ListBox control (uses wx.ListBox), defines ItemContainerControl\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Sp... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's basic Label control (uses wx.StaticText)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's StaticText component,
# but redesi... | [
[
8,
0,
0.0556,
0.0139,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0833,
0.0139,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0972,
0.0139,
0,
0.66,... | [
"\"gui2py's basic Label control (uses wx.StaticText)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Spec, EventSpec, InitSpec, Styl... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Tree Model-View-Controller control (uses wx.TreeCtrl)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's Tree component,
# but... | [
[
8,
0,
0.0159,
0.004,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0238,
0.004,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0278,
0.004,
0,
0.66,
... | [
"\"gui2py's Tree Model-View-Controller control (uses wx.TreeCtrl)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import TreeEvent",
"from ..component import Control, SubComponent",
"... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Notebook control and TabPanel (uses wx.Notebook and wx.Panel)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's Notebook compon... | [
[
8,
0,
0.0278,
0.0069,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0417,
0.0069,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0486,
0.0069,
0,
0.66... | [
"\"gui2py's Notebook control and TabPanel (uses wx.Notebook and wx.Panel)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Component,... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's basic Image control (uses wx.StaticBitmap)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
# Initial implementation was based on PythonCard's Image component,
# but redesigned and overhauled a l... | [
[
8,
0,
0.0204,
0.0051,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0306,
0.0051,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0357,
0.0051,
0,
0.66... | [
"\"gui2py's basic Image control (uses wx.StaticBitmap)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Spec, EventSpec, InitSpec, StyleSpec",
"from ..... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Panel control + optional label/frame (uses wx.StatixBox & wx.Panel)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's StatixBox... | [
[
8,
0,
0.0367,
0.0092,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.055,
0.0092,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0642,
0.0092,
0,
0.66,... | [
"\"gui2py's Panel control + optional label/frame (uses wx.StatixBox & wx.Panel)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Comp... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Button control (uses wx.Button and wx.BitmapButton)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's Button component,
# but... | [
[
8,
0,
0.0444,
0.0111,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0667,
0.0111,
0,
0.66,
0.1,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0778,
0.0111,
0,
0.66,
... | [
"\"gui2py's Button control (uses wx.Button and wx.BitmapButton)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Spec, EventSpec, Ini... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's CheckBox control (uses wx.CheckBox)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's CehckBox component,
# but redesigned an... | [
[
8,
0,
0.0851,
0.0213,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1277,
0.0213,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1489,
0.0213,
0,
0.66,... | [
"\"gui2py's CheckBox control (uses wx.CheckBox)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..event import FormEvent",
"from ..component import Control, Spec, EventSpec, InitSpec",
"from ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Grid Model-View-Controller control (uses wx.Grid & PyGridBaseTable)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicables
# Initial implementation was based on PythonCard's Grid com... | [
[
8,
0,
0.0074,
0.0019,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0112,
0.0019,
0,
0.66,
0.0556,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.013,
0.0019,
0,
0.66,... | [
"\"gui2py's Grid Model-View-Controller control (uses wx.Grid & PyGridBaseTable)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicables",
"import wx",
"import wx.grid as gridlib",
"from ..event import GridEvent",
"from ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Controls package"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Most controls where forked from PythonCard's components package, altought
# most of they were redesign... | [
[
8,
0,
0.1143,
0.0286,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1714,
0.0286,
0,
0.66,
0.05,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2,
0.0286,
0,
0.66,
... | [
"\"gui2py's Controls package\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"from .label import Label",
"from .button import Button",
"from .textbox import TextBox",
"from .checkbox import CheckBox... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Slider control, similar to a scrollbar in other libs (uses wx.Slider)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's List co... | [
[
8,
0,
0.0678,
0.0169,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1017,
0.0169,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1186,
0.0169,
0,
0.66,... | [
"\"gui2py's Slider control, similar to a scrollbar in other libs (uses wx.Slider)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import wx",
"from ..component import Control, Spec, EventSpec, InitSpec, StyleSpec"... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Common dialogs (function wrappers for wxPython dialogs)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
import wx
from wx.lib import dialogs
from .font import Font
def alert(message, title="", par... | [
[
8,
0,
0.0263,
0.0066,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0395,
0.0066,
0,
0.66,
0.0588,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0461,
0.0066,
0,
0.66... | [
"\"Common dialogs (function wrappers for wxPython dialogs)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"import wx",
"from wx.lib import dialogs",
"from .font import Font",
"def alert(message, title=\"\", parent=None, scrolled=... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's miscellaneous utility functions (frozen, path, caller module, etc.)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was stripped down from PythonCard's util mod... | [
[
8,
0,
0.0606,
0.0152,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0909,
0.0152,
0,
0.66,
0.0714,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1061,
0.0152,
0,
0.66... | [
"\"gui2py's miscellaneous utility functions (frozen, path, caller module, etc.)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\" # where applicable",
"import os",
"import sys",
"import imp",
"import re",
"import fnmatch",
"def ma... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Event Model (encapsulates wx.Event)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Initial implementation was inspired on PythonCard's event module, altought
# it was... | [
[
8,
0,
0.0213,
0.0053,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0319,
0.0053,
0,
0.66,
0.0556,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0372,
0.0053,
0,
0.66... | [
"\"gui2py's Event Model (encapsulates wx.Event)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import time",
"class Event:\n \"Generic Event Object: holds actual event data (created by EventHandler... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's StatusBar (encapsulates wx.StatusBar)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Initial implementation was based on PythonCard's statusbar module, altought
# som... | [
[
8,
0,
0.0727,
0.0182,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1091,
0.0182,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1273,
0.0182,
0,
0.66... | [
"\"gui2py's StatusBar (encapsulates wx.StatusBar)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import wx",
"from .event import FormEvent",
"from .component import Component, Control, Spec, StyleSp... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py: Simple and powerful GUI framework for agile development - Main Package"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
__version__ = "0.9.3"
# some parts where inspired or borrowed... | [
[
8,
0,
0.0571,
0.0143,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0857,
0.0143,
0,
0.66,
0.0556,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1,
0.0143,
0,
0.66,
... | [
"\"gui2py: Simple and powerful GUI framework for agile development - Main Package\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"__version__ = \"0.9.3\"",
"import wx",
"from .controls import Label, ... |
import sys
import os
import inspect
# Events
from sphinx.ext.autodoc import MethodDocumenter, ModuleDocumenter
class EventDocumenter(MethodDocumenter):
objtype = "event"
member_order = 45
priority = 5
@classmethod
def can_document_member(cls, member, membername, isattr, parent):
... | [
[
1,
0,
0.01,
0.01,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.02,
0.01,
0,
0.66,
0.1667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.03,
0.01,
0,
0.66,
0.... | [
"import sys",
"import os",
"import inspect",
"from sphinx.ext.autodoc import MethodDocumenter, ModuleDocumenter",
"class EventDocumenter(MethodDocumenter):\n objtype = \"event\"\n member_order = 45\n priority = 5\n\n @classmethod\n def can_document_member(cls, member, membername, isattr, pare... |
# -*- coding: utf-8 -*-
#
# gui2py documentation build configuration file, created by
# Txema Vicente <txema@nabla.net>
#
import os
import sys
import time
import datetime
import pprint
_PrettyPrinter = pprint.PrettyPrinter(indent=4)
def pretty(text):
_PrettyPrinter.pprint(text)
return _PrettyPrinter.pformat(t... | [
[
1,
0,
0.0588,
0.0084,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0672,
0.0084,
0,
0.66,
0.0208,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0756,
0.0084,
0,
... | [
"import os",
"import sys",
"import time",
"import datetime",
"import pprint",
"_PrettyPrinter = pprint.PrettyPrinter(indent=4)",
"def pretty(text):\n _PrettyPrinter.pprint(text)\n return _PrettyPrinter.pformat(text)",
" _PrettyPrinter.pprint(text)",
" return _PrettyPrinter.pformat(text)"... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Maintains a regstry of the components that have been loaded into the system"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Initial implementation was inspired on PythonCard's r... | [
[
8,
0,
0.1818,
0.0455,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2727,
0.0455,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.3182,
0.0455,
0,
0.66... | [
"\"Maintains a regstry of the components that have been loaded into the system\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"CONTROLS = {}",
"HTML = {} # tags",
"WINDOWS = {}",
"MENU = {}",... |
import wx
import wx.html
from . import GetParam
FormSubmitEventType = wx.NewEventType()
EVT_FORM_SUBMIT = wx.PyEventBinder(FormSubmitEventType)
class FormSubmitEvent(wx.PyEvent):
"""
Event indication a form was submitted.
form is the form object being submitted
args is a dict of form ar... | [
[
1,
0,
0.0049,
0.0049,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0098,
0.0049,
0,
0.66,
0.125,
136,
0,
1,
0,
0,
136,
0,
0
],
[
1,
0,
0.0244,
0.0049,
0,
0... | [
"import wx",
"import wx.html",
"from . import GetParam",
"FormSubmitEventType = wx.NewEventType()",
"EVT_FORM_SUBMIT = wx.PyEventBinder(FormSubmitEventType)",
"class FormSubmitEvent(wx.PyEvent):\n \"\"\"\n Event indication a form was submitted.\n form is the form object being submitted\n ... |
"""
Implementations of form input controls
"""
from . import GetParam, form
from .input import FormControlMixin
from ..controls import Label
import wx
import wx.html
class FormLabel(Label, FormControlMixin):
def __init__(self, parent, form, tag, parser, *args, **kwargs):
label ... | [
[
8,
0,
0.0667,
0.1,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1667,
0.0333,
0,
0.66,
0.1667,
0,
0,
2,
0,
0,
0,
0,
0
],
[
1,
0,
0.2,
0.0333,
0,
0.66,
0.33... | [
"\"\"\"\n Implementations of form input controls\n\"\"\"",
"from . import GetParam, form",
"from .input import FormControlMixin",
"from ..controls import Label",
"import wx",
"import wx.html",
"class FormLabel(Label, FormControlMixin):\n def __init__(self, parent, form, tag, parser, *args, **kwarg... |
from . import GetParam, input
from .input import FormControlMixin
from ..controls import ComboBox
class SingleSelectControl(ComboBox, FormControlMixin):
def __init__(self, parent, form, tag, parser, option_list, **kwargs):
kwargs["name"] = GetParam(tag, "NAME", "")
ComboBox.__init__(sel... | [
[
1,
0,
0.037,
0.037,
0,
0.66,
0,
0,
0,
2,
0,
0,
0,
0,
0
],
[
1,
0,
0.0741,
0.037,
0,
0.66,
0.3333,
930,
0,
1,
0,
0,
930,
0,
0
],
[
1,
0,
0.1481,
0.037,
0,
0.66,
... | [
"from . import GetParam, input",
"from .input import FormControlMixin",
"from ..controls import ComboBox",
"class SingleSelectControl(ComboBox, FormControlMixin):\n def __init__(self, parent, form, tag, parser, option_list, **kwargs):\n kwargs[\"name\"] = GetParam(tag, \"NAME\", \"\")\n Combo... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Experimental HTML Form support using wx.Html"
# Initial implementation was based on a form example found in the wxPython wiki,
# altought some of it was redesigned and overhauled a lot.
# Note: there is no need to use this package, as gui2py works completely without
... | [
[
8,
0,
0.0952,
0.0238,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2857,
0.0238,
0,
0.66,
0.1429,
666,
0,
1,
0,
0,
666,
0,
0
],
[
14,
0,
0.3333,
0.0238,
0,
0.6... | [
"\"Experimental HTML Form support using wx.Html\"",
"import wx",
"__SENTINEL = object()",
"def GetParam(tag, param, default=__SENTINEL):\n \"\"\" Convenience function for accessing tag parameters\"\"\"\n if tag.HasParam(param):\n return tag.GetParam(param)\n else:\n if default == __SENT... |
"""
Implementations of form input controls
"""
from . import GetParam, form
from ..controls import TextBox, Button, CheckBox
from .. import registry
import wx
import wx.html
def TypeHandler(type_name):
""" A metaclass generator. Returns a metaclass which
will register it's class as the class... | [
[
8,
0,
0.0141,
0.0211,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0352,
0.007,
0,
0.66,
0.0769,
0,
0,
2,
0,
0,
0,
0,
0
],
[
1,
0,
0.0423,
0.007,
0,
0.66,
... | [
"\"\"\"\n Implementations of form input controls\n\"\"\"",
"from . import GetParam, form",
"from ..controls import TextBox, Button, CheckBox",
"from .. import registry",
"import wx",
"import wx.html",
"def TypeHandler(type_name):\n \"\"\" A metaclass generator. Returns a metaclass which\n will ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Sample gui2py application"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# images were taken from Pythoncard's proof and widgets demos
# for more complete examples, see each control modul... | [
[
8,
0,
0.0155,
0.0039,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0233,
0.0039,
0,
0.66,
0.0111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0271,
0.0039,
0,
0.66... | [
"\"Sample gui2py application\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import datetime # base imports, used by some controls and event handlers",
"import decimal",
"import time",
"import ... |
#!/usr/bin/env python
# By R.Suzi rnd@onego.ru
# Extended and expanded by Andy Todd <andy47@halfcooked.com>
# Simplified & adapted for gui2py by Mariano Reingart <reingart@gmail.com>
"""
This script is setup.py of the gui2py package.
You need to have wxPython to run gui2py
"""
WIN_DEFAULT_COMMAND = "insta... | [
[
8,
0,
0.1,
0.0625,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.15,
0.0125,
0,
0.66,
0.1111,
891,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1625,
0.0125,
0,
0.66,
... | [
"\"\"\"\nThis script is setup.py of the gui2py package.\n\nYou need to have wxPython to run gui2py\n\"\"\"",
"WIN_DEFAULT_COMMAND = \"install\"",
"APPLICATION_NAME = \"gui2py\"",
"from distutils.core import setup",
"import os, sys",
"import gui",
"version = gui.__version__",
"if sys.version_info > (3,... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py application example using a resource"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import gui
def on_load(evt):
print "initializing!"
window['mypanel']['mybutton'].labe... | [
[
8,
0,
0.1,
0.025,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.15,
0.025,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.175,
0.025,
0,
0.66,
0.1... | [
"\"gui2py application example using a resource\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import gui",
"def on_load(evt):\n print(\"initializing!\")\n window['mypanel']['mybutton'].label = \... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Minimal gui2py application (to be used as skeleton)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import gui
# --- here goes your event hand... | [
[
8,
0,
0.1176,
0.0294,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1765,
0.0294,
0,
0.66,
0.1,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.2059,
0.0294,
0,
0.66,
... | [
"\"Minimal gui2py application (to be used as skeleton)\"",
"__author__ = \"Mariano Reingart (reingart@gmail.com)\"",
"__copyright__ = \"Copyright (C) 2013- Mariano Reingart\"",
"__license__ = \"LGPL 3.0\"",
"import gui",
"def greeting(evt):\n import wx, sys\n gui.alert('\\n'.join([wx.version(), sys.... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | [
[
1,
0,
0.0816,
0.0102,
0,
0.66,
0,
688,
0,
4,
0,
0,
688,
0,
0
],
[
14,
0,
0.1224,
0.0102,
0,
0.66,
0.0714,
792,
6,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1531,
0.0102,
0,
... | [
"import os, re, mimetypes, sys",
"SOURCE = sys.argv[1:]",
"COMMENT_BLOCK = re.compile(r\"(/\\*.+?\\*/)\", re.MULTILINE | re.DOTALL)",
"COMMENT_LICENSE = re.compile(r\"(license)\", re.IGNORECASE)",
"COMMENT_COPYRIGHT = re.compile(r\"(copyright)\", re.IGNORECASE)",
"EXCLUDE_TYPES = [\n \"application/xml\... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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.4545,
0.0303,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.5152,
0.0303,
0,
0.66,
0.2,
123,
0,
1,
0,
0,
123,
0,
0
],
[
1,
0,
0.5455,
0.0303,
0,
0.6... | [
"import os",
"import webapp2",
"import jinja2",
"from controllers import lessons, utils",
"urls = [\n ('/', lessons.CourseHandler),\n ('/register', utils.RegisterHandler),\n ('/course', lessons.CourseHandler),\n ('/unit', lessons.UnitHandler),\n ('/activity', lessons.ActivityHandler),\n ('/assessment'... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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.3125,
0.0208,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.3333,
0.0208,
0,
0.66,
0.25,
167,
0,
1,
0,
0,
167,
0,
0
],
[
3,
0,
0.4792,
0.2292,
0,
0.... | [
"import datetime",
"from google.appengine.ext import db",
"class Student(db.Model):\n \"\"\"Student profile.\"\"\"\n enrolled_date = db.DateTimeProperty(auto_now_add=True)\n precourse_answer = db.TextProperty()\n midterm_answer = db.TextProperty()\n final_answer = db.TextProperty()\n precourse_score = db.... |
#
# 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, software
# distributed under... | [
[
8,
0,
0.0208,
0.0148,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0295,
0.0009,
0,
0.66,
0.0213,
312,
0,
1,
0,
0,
312,
0,
0
],
[
1,
0,
0.0304,
0.0009,
0,
0.66... | [
"\"\"\"Enforces schema and verifies course files for referential integrity.\n\nUse this script to verify referential integrity of your course definition files\nbefore you import them into the production instance of Google AppEngine.\n\nHere is how to use the script:\n - prepare your course files\n - edi... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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.051,
0.0034,
0,
0.66,
0,
715,
0,
2,
0,
0,
715,
0,
0
],
[
1,
0,
0.0578,
0.0034,
0,
0.66,
0.0769,
279,
0,
2,
0,
0,
279,
0,
0
],
[
1,
0,
0.0646,
0.0034,
0,
0... | [
"import logging, json",
"from google.appengine.api import users, memcache",
"from utils import StudentHandler",
"from models.models import Student, Unit, Lesson",
"\"\"\"\nHandler for course page\n\"\"\"",
"class CourseHandler(StudentHandler):\n\n def get(self):\n # Check for enrollment status\n ... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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.119,
0.0079,
0,
0.66,
0,
688,
0,
2,
0,
0,
688,
0,
0
],
[
1,
0,
0.127,
0.0079,
0,
0.66,
0.0714,
563,
0,
3,
0,
0,
563,
0,
0
],
[
1,
0,
0.1349,
0.0079,
0,
0.... | [
"import os, logging",
"from models.models import Student, Unit, Lesson",
"import webapp2, jinja2",
"from google.appengine.api import users, memcache, taskqueue",
"from google.appengine.ext import db",
"template_dir = os.path.join(os.path.dirname(__file__), '../views')",
"jinja_environment = jinja2.Envir... |
#!/usr/bin/env python
import time
t = time.time()
u = time.gmtime(t)
s = time.strftime('%a, %e %b %Y %T GMT', u)
print 'Content-Type: text/javascript'
print 'Cache-Control: no-cache'
print 'Date: ' + s
print 'Expires: ' + s
print ''
print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
| [
[
1,
0,
0.1818,
0.0909,
0,
0.66,
0,
654,
0,
1,
0,
0,
654,
0,
0
],
[
14,
0,
0.2727,
0.0909,
0,
0.66,
0.1111,
15,
3,
0,
0,
0,
654,
10,
1
],
[
14,
0,
0.3636,
0.0909,
0,
... | [
"import time",
"t = time.time()",
"u = time.gmtime(t)",
"s = time.strftime('%a, %e %b %Y %T GMT', u)",
"print('Content-Type: text/javascript')",
"print('Cache-Control: no-cache')",
"print('Date: ' + s)",
"print('Expires: ' + s)",
"print('')",
"print('var timeskew = new Date().getTime() - ' + str(t... |
def foobar():
print 'yes'
foobar()
| [
[
2,
0,
0.375,
0.5,
0,
0.66,
0,
139,
0,
0,
0,
0,
0,
0,
1
],
[
8,
1,
0.5,
0.25,
1,
0.73,
0,
535,
3,
1,
0,
0,
0,
0,
1
],
[
8,
0,
1,
0.25,
0,
0.66,
1,
139,
... | [
"def foobar():\n print('yes')",
" print('yes')",
"foobar()"
] |
print 4
| [
[
8,
0,
1,
1,
0,
0.66,
0,
535,
3,
1,
0,
0,
0,
0,
1
]
] | [
"print(4)"
] |
for i in range(10):
print i
| [
[
6,
0,
0.5,
0.6667,
0,
0.66,
0,
826,
3,
0,
0,
0,
0,
0,
2
],
[
8,
1,
0.6667,
0.3333,
1,
0.86,
0,
535,
3,
1,
0,
0,
0,
0,
1
]
] | [
"for i in range(10):\n print(i)",
" print(i)"
] |
class X: pass
| [
[
3,
0,
0.3333,
0.3333,
0,
0.66,
0,
783,
0,
0,
0,
0,
0,
0,
0
]
] | [
"class X: pass"
] |
import goog.math as gm
v0 = gm.Vec2(10, 12)
print "ctor", v0
v1 = gm.Vec2.randomUnit()
print "randomunit", gm.nearlyEquals(v1.magnitude(), 1.0);
v2 = gm.Vec2.random()
# todo; attr access
#print v2.x >= -1 and v2.x <= 1, v2.y >= -1 and v2.y <= 1
v3 = gm.Vec2.fromCoordinate(gm.Coordinate(4, 5))
print "fromcoord", v3
... | [
[
1,
0,
0.0204,
0.0204,
0,
0.66,
0,
190,
0,
1,
0,
0,
190,
0,
0
],
[
14,
0,
0.0612,
0.0204,
0,
0.66,
0.0303,
745,
3,
2,
0,
0,
198,
10,
1
],
[
8,
0,
0.0816,
0.0204,
0,
... | [
"import goog.math as gm",
"v0 = gm.Vec2(10, 12)",
"print(\"ctor\", v0)",
"v1 = gm.Vec2.randomUnit()",
"v2 = gm.Vec2.random()",
"v3 = gm.Vec2.fromCoordinate(gm.Coordinate(4, 5))",
"print(\"fromcoord\", v3)",
"v4 = v3.clone()",
"print(\"clone\", v4)",
"print(\"mag\", v4.magnitude())",
"print(\"mag... |
import goog.json
print goog.json.parse
# random sample from json.org
obj = goog.json.parse("""
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortA... | [
[
1,
0,
0.0345,
0.0345,
0,
0.66,
0,
575,
0,
1,
0,
0,
575,
0,
0
],
[
8,
0,
0.1034,
0.0345,
0,
0.66,
0.3333,
535,
3,
1,
0,
0,
0,
0,
1
],
[
14,
0,
0.569,
0.8276,
0,
0.... | [
"import goog.json",
"print(goog.json.parse)",
"obj = goog.json.parse(\"\"\"\n{\n \"glossary\": {\n \"title\": \"example glossary\",\n \"GlossDiv\": {\n \"title\": \"S\",\n \"GlossList\": {\n \"GlossEntry\": {",
"print(obj)"
] |
from goog.json import parse as jparse
print jparse('''
{"x":5, "y":6, "z":[3.1, 4.7, 5.6]}
''')
| [
[
1,
0,
0.5,
0.5,
0,
0.66,
0,
575,
0,
1,
0,
0,
575,
0,
0
]
] | [
"from goog.json import parse as jparse"
] |
import goog.math as gm
c1 = gm.Coordinate()
c2 = gm.Coordinate(1)
c3 = gm.Coordinate(1, 2)
print c1.toString()
print c2.toString()
print c3.toString()
c4 = gm.Coordinate(1, 2)
c5 = gm.Coordinate(3, 4)
print gm.Coordinate.equals(c3, c4)
print gm.Coordinate.equals(c3, c5)
c6 = c4.clone()
c7 = c6.clone()
print gm.Coordi... | [
[
1,
0,
0.0455,
0.0455,
0,
0.66,
0,
190,
0,
1,
0,
0,
190,
0,
0
],
[
14,
0,
0.1364,
0.0455,
0,
0.66,
0.0556,
452,
3,
0,
0,
0,
782,
10,
1
],
[
14,
0,
0.1818,
0.0455,
0,
... | [
"import goog.math as gm",
"c1 = gm.Coordinate()",
"c2 = gm.Coordinate(1)",
"c3 = gm.Coordinate(1, 2)",
"print(c1.toString())",
"print(c2.toString())",
"print(c3.toString())",
"c4 = gm.Coordinate(1, 2)",
"c5 = gm.Coordinate(3, 4)",
"print(gm.Coordinate.equals(c3, c4))",
"print(gm.Coordinate.equal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.