code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.0145, 0.0035, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0176, 0.0009, 0, 0.66, 0.0244, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0193, 0.0009, 0, 0.66,...
[ "\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import base64", "import clientsecrets", "import copy", "import datetime", "import httplib2", "import logging", "import os", "import sys", "im...
# Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1619, 0.0476, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2, 0.0095, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2286, 0.0095, 0, 0.66, ...
[ "\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from anyjson import simplejson", "TYPE_WEB = 'web'", "TYPE_INSTALL...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1604, 0.0472, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1981, 0.0094, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.217, 0.0094, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import os", "import stat", "import threading", "from anyjson import simplejson", "from client import Storage as BaseStorage", "from clien...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1371, 0.0403, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1694, 0.0081, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1855, 0.0081, 0, 0.66,...
[ "\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import oauth2client", "import base64", "import pickle", "from django.db import models", "from oauth2client.client import St...
# Copyright (C) 2007 Joe Gregorio # # Licensed under the MIT License """MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.o...
[ [ 8, 0, 0.0814, 0.1105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1453, 0.0058, 0, 0.66, 0.0833, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1512, 0.0058, 0, 0.66...
[ "\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1", "__v...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1205, 0.1452, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2046, 0.0033, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2112, 0.0033, 0, 0.66, ...
[ "\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", ...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.0342, 0.0083, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0414, 0.0021, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0476, 0.0021, 0, 0.66,...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import copy", "import httplib2", "import logging", "import oauth2 as oauth", "import urllib", "import urlparse", "from anyjson import simplejson", "tr...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1259, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1556, 0.0074, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1704, 0.0074, 0, 0.66, ...
[ "\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "from google.appengine.ext import db", "from apiclient.oauth import OAuthCredentials", "...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.2619, 0.0635, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3175, 0.0159, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3492, 0.0159, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "import threading", "from apiclient.oauth import Storage as BaseStorage", "class Storage(BaseStorage):\n \"\"\"Store and retr...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 1, 0, 0.2679, 0.0179, 0, 0.66, 0, 629, 0, 1, 0, 0, 629, 0, 0 ], [ 1, 0, 0.2857, 0.0179, 0, 0.66, 0.2, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.3036, 0.0179, 0, 0.6...
[ "import apiclient", "import base64", "import pickle", "from django.db import models", "class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):", " __metaclass__ = models.SubfieldBase", " def db_t...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ [ 8, 0, 0.0519, 0.0182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0649, 0.0026, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0701, 0.0026, 0, 0.66,...
[ "\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import...
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ [ 8, 0, 0.1545, 0.0407, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.187, 0.0081, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2114, 0.0081, 0, 0.66, ...
[ "\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from oauth2client.anyjson import simplejson", "class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass", " \"\"\"Base...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
[ [ 8, 0, 0.0318, 0.0545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0636, 0.0091, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0727, 0.0091, 0, 0.66...
[ "\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"", "__author__ = \"Joe Gregorio (joe@bitworking.org)\"", "__copyright__ = \"Copyright 2006, Joe Gregorio\"", "__contributors__ = []", "__version__ = \"1.0.0\"", "__license__ = \"MIT\"", "__history__ = \"\"\"\n\"\"\"", "import urlparse", "escape_...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0365, 0.0708, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.0845, 0.0205, 0, 0.66, 0.04, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0982, 0.0023, 0, 0.66, ...
[ "\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ...
import Cookie import datetime import time import email.utils import calendar import base64 import hashlib import hmac import re import logging # Ripped from the Tornado Framework's web.py # http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09 # # Tornado is licensed under the Apache Licen...
[ [ 1, 0, 0.006, 0.006, 0, 0.66, 0, 32, 0, 1, 0, 0, 32, 0, 0 ], [ 1, 0, 0.0119, 0.006, 0, 0.66, 0.1, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0179, 0.006, 0, 0.66, ...
[ "import Cookie", "import datetime", "import time", "import email.utils", "import calendar", "import base64", "import hashlib", "import hmac", "import re", "import logging", "class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ...
# This is the version of this source code. manual_verstr = "1.5" auto_build_num = "211" verstr = manual_verstr + "." + auto_build_num try: from pyutil.version_class import Version as pyutil_Version __version__ = pyutil_Version(verstr) except (ImportError, ValueError): # Maybe there is no pyutil insta...
[ [ 14, 0, 0.1667, 0.0556, 0, 0.66, 0, 189, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3889, 0.0556, 0, 0.66, 0.3333, 295, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.6111, 0.0556, 0, 0...
[ "manual_verstr = \"1.5\"", "auto_build_num = \"211\"", "verstr = manual_verstr + \".\" + auto_build_num", "try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
[ [ 8, 0, 0.2927, 0.561, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6098, 0.0244, 0, 0.66, 0.25, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.6341, 0.0244, 0, 0.66, ...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
[ [ 8, 0, 0.3, 0.575, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.625, 0.025, 0, 0.66, 0.3333, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.65, 0.025, 0, 0.66, 0.6...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
[ [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, 0.66, 0.0833, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 14, 0, 0.0408, 0.0068, 0, ...
[ "import re", "import urllib", "RESERVED = \":/?#[]@!$&'()*+,;=\"", "OPERATOR = \"+./;?|!@\"", "EXPLODE = \"*+\"", "MODIFIER = \":^\"", "TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)", "VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])...
from bluetooth import * import bluetooth._msbt as bt bt.initwinsock () # ============== SDP service registration and unregistration ============ def discover_devices (duration=8, flush_cache=True, lookup_names=False, lookup_class=False): return bt.discover_devices (flush_cache, lookup_names, lookup_class) def l...
[ [ 1, 0, 0.004, 0.004, 0, 0.66, 0, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 1, 0, 0.0081, 0.004, 0, 0.66, 0.1111, 775, 0, 1, 0, 0, 775, 0, 0 ], [ 8, 0, 0.0161, 0.004, 0, 0.66...
[ "from bluetooth import *", "import bluetooth._msbt as bt", "bt.initwinsock ()", "def discover_devices (duration=8, flush_cache=True, lookup_names=False, lookup_class=False):\n return bt.discover_devices (flush_cache, lookup_names, lookup_class)", " return bt.discover_devices (flush_cache, lookup_names...
from .btcommon import * raise NotImplementedError
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 601, 0, 1, 0, 0, 601, 0, 0 ] ]
[ "from .btcommon import *" ]
from .btcommon import * import socket import struct import threading import os import _widcomm DEFAULT_MTU = 672 def dbg (*args): return sys.stdout.write (*args) sys.stdout.write ("\n") def BD_ADDR_to_str (bda): return "%02X:%02X:%02X:%02X:%02X:%02X" % \ (ord(bda[0]), ord(bda[1]), ord(bda...
[ [ 1, 0, 0.0013, 0.0013, 0, 0.66, 0, 601, 0, 1, 0, 0, 601, 0, 0 ], [ 1, 0, 0.0025, 0.0013, 0, 0.66, 0.0476, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.0038, 0.0013, 0, ...
[ "from .btcommon import *", "import socket", "import struct", "import threading", "import os", "import _widcomm", "DEFAULT_MTU = 672", "def dbg (*args):\n return\n sys.stdout.write (*args)\n sys.stdout.write (\"\\n\")", " return", " sys.stdout.write (*args)", " sys.stdout.write ...
import sys import struct import binascii L2CAP=0 RFCOMM=3 PORT_ANY=0 # Service Class IDs SDP_SERVER_CLASS = "1000" BROWSE_GRP_DESC_CLASS = "1001" PUBLIC_BROWSE_GROUP = "1002" SERIAL_PORT_CLASS = "1101" LAN_ACCESS_CLASS = "1102" DIALUP_NET_CLASS = "1103" IRMC_SYNC_CLASS = "1104" OBEX_OBJPUSH_CLASS = "1105" OBEX_FILET...
[ [ 1, 0, 0.0025, 0.0025, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.005, 0.0025, 0, 0.66, 0.0058, 399, 0, 1, 0, 0, 399, 0, 0 ], [ 1, 0, 0.0075, 0.0025, 0, 0...
[ "import sys", "import struct", "import binascii", "L2CAP=0", "RFCOMM=3", "PORT_ANY=0", "SDP_SERVER_CLASS = \"1000\"", "BROWSE_GRP_DESC_CLASS = \"1001\"", "PUBLIC_BROWSE_GROUP = \"1002\"", "SERIAL_PORT_CLASS = \"1101\"", "LAN_ACCESS_CLASS = \"1102\"", "DIALUP_NET_CLASS = \"1103\"", "IRMC_SYNC...
import sys import struct import binascii if sys.version < '3': from .btcommon import * import _bluetooth as _bt else: from bluetooth.btcommon import * import bluetooth._bluetooth as _bt import array import fcntl _constants = [ 'HCI', 'RFCOMM', 'L2CAP', 'SCO', 'SOL_L2CAP', 'SOL_RFCOMM',\ 'L2CAP_OPTI...
[ [ 1, 0, 0.0016, 0.0016, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0032, 0.0016, 0, 0.66, 0.0435, 399, 0, 1, 0, 0, 399, 0, 0 ], [ 1, 0, 0.0047, 0.0016, 0, ...
[ "import sys", "import struct", "import binascii", "if sys.version < '3':\n from .btcommon import *\n import _bluetooth as _bt\nelse:\n from bluetooth.btcommon import *\n import bluetooth._bluetooth as _bt", " from .btcommon import *", " import _bluetooth as _bt", " from bluetooth.bt...
import sys import os if sys.version < '3': from .btcommon import * else: from bluetooth.btcommon import * __version__ = 0.19 def _dbg(*args): return sys.stderr.write(*args) sys.stderr.write("\n") if sys.platform == "win32": _dbg("trying widcomm") have_widcomm = False dll = "wbtapi.dll...
[ [ 1, 0, 0.0067, 0.0067, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0134, 0.0067, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 4, 0, 0.0302, 0.0268, 0, 0.6...
[ "import sys", "import os", "if sys.version < '3':\n from .btcommon import *\nelse:\n from bluetooth.btcommon import *", " from .btcommon import *", " from bluetooth.btcommon import *", "__version__ = 0.19", "def _dbg(*args):\n return\n sys.stderr.write(*args)\n sys.stderr.write(\"\\...
#!/usr/bin/env python from distutils.core import setup, Extension from distutils.debug import DEBUG import itertools import sys import platform import os mods = [] def find_MS_SDK(): candidate_roots = (os.getenv('ProgramFiles'), os.getenv('ProgramFiles(x86)')) if sys.version < '3.3': ...
[ [ 1, 0, 0.0278, 0.0093, 0, 0.66, 0, 152, 0, 2, 0, 0, 152, 0, 0 ], [ 1, 0, 0.037, 0.0093, 0, 0.66, 0.1111, 342, 0, 1, 0, 0, 342, 0, 0 ], [ 1, 0, 0.0463, 0.0093, 0, 0...
[ "from distutils.core import setup, Extension", "from distutils.debug import DEBUG", "import itertools", "import sys", "import platform", "import os", "mods = []", "def find_MS_SDK():\n candidate_roots = (os.getenv('ProgramFiles'),\n os.getenv('ProgramFiles(x86)'))\n if sys....
# file: sdp-browse.py # auth: Albert Huang <albert@csail.mit.edu> # desc: displays services being advertised on a specified bluetooth device # $Id: sdp-browse.py 393 2006-02-24 20:30:15Z albert $ import sys import bluetooth if len(sys.argv) < 2: print("usage: sdp-browse <addr>") print(" addr can be a blueto...
[ [ 1, 0, 0.1714, 0.0286, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2, 0.0286, 0, 0.66, 0.1429, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 4, 0, 0.3, 0.1143, 0, 0.66, ...
[ "import sys", "import bluetooth", "if len(sys.argv) < 2:\n print(\"usage: sdp-browse <addr>\")\n print(\" addr can be a bluetooth address, \\\"localhost\\\", or \\\"all\\\"\")\n sys.exit(2)", " print(\"usage: sdp-browse <addr>\")", " print(\" addr can be a bluetooth address, \\\"localhost...
# file: rfcomm-client.py # auth: Albert Huang <albert@csail.mit.edu> # desc: simple demonstration of a client application that uses RFCOMM sockets # intended for use with rfcomm-server # # $Id: rfcomm-client.py 424 2006-08-24 03:35:54Z albert $ from bluetooth import * import sys if sys.version < '3': input ...
[ [ 1, 0, 0.1667, 0.0208, 0, 0.66, 0, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 1, 0, 0.1875, 0.0208, 0, 0.66, 0.0588, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.2396, 0.0417, 0, ...
[ "from bluetooth import *", "import sys", "if sys.version < '3':\n input = raw_input", " input = raw_input", "addr = None", "if len(sys.argv) < 2:\n print(\"no device specified. Searching all nearby bluetooth devices for\")\n print(\"the SampleServer service\")\nelse:\n addr = sys.argv[1]\n...
# file: rfcomm-server.py # auth: Albert Huang <albert@csail.mit.edu> # desc: simple demonstration of a server application that uses RFCOMM sockets # # $Id: rfcomm-server.py 518 2007-08-10 07:20:07Z albert $ from bluetooth import * server_sock=BluetoothSocket( RFCOMM ) server_sock.bind(("",PORT_ANY)) server_sock.liste...
[ [ 1, 0, 0.1707, 0.0244, 0, 0.66, 0, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 14, 0, 0.2195, 0.0244, 0, 0.66, 0.0714, 944, 3, 1, 0, 0, 838, 10, 1 ], [ 8, 0, 0.2439, 0.0244, 0, ...
[ "from bluetooth import *", "server_sock=BluetoothSocket( RFCOMM )", "server_sock.bind((\"\",PORT_ANY))", "server_sock.listen(1)", "port = server_sock.getsockname()[1]", "uuid = \"94f39d29-7d6d-437d-973b-fba39e49d4ee\"", "advertise_service( server_sock, \"SampleServer\",\n service_id = ...
# file: inquiry.py # auth: Albert Huang <albert@csail.mit.edu> # desc: performs a simple device inquiry followed by a remote name request of # each discovered device # $Id: inquiry.py 401 2006-05-05 19:07:48Z albert $ # import bluetooth print("performing inquiry...") nearby_devices = bluetooth.discover_devices...
[ [ 1, 0, 0.4706, 0.0588, 0, 0.66, 0, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 8, 0, 0.5882, 0.0588, 0, 0.66, 0.25, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.7059, 0.0588, 0, 0.6...
[ "import bluetooth", "print(\"performing inquiry...\")", "nearby_devices = bluetooth.discover_devices(lookup_names = True)", "print(\"found %d devices\" % len(nearby_devices))", "for addr, name in nearby_devices:\n print(\" %s - %s\" % (addr, name))", " print(\" %s - %s\" % (addr, name))" ]
# file: asynchronous-inquiry.py # auth: Albert Huang <albert@csail.mit.edu> # desc: demonstration of how to do asynchronous device discovery by subclassing # the DeviceDiscoverer class # $Id: asynchronous-inquiry.py 405 2006-05-06 00:39:50Z albert $ # # XXX Linux only (5/5/2006) import bluetooth import select c...
[ [ 1, 0, 0.1385, 0.0154, 0, 0.66, 0, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 1, 0, 0.1538, 0.0154, 0, 0.66, 0.1667, 438, 0, 1, 0, 0, 438, 0, 0 ], [ 3, 0, 0.4923, 0.6308, 0, ...
[ "import bluetooth", "import select", "class MyDiscoverer(bluetooth.DeviceDiscoverer):\n \n def pre_inquiry(self):\n self.done = False\n \n def device_discovered(self, address, device_class, name):\n print(\"%s - %s\" % (address, name))", " def pre_inquiry(self):\n self.done...
# file: l2capclient.py # desc: Demo L2CAP server for pybluez. # $Id: l2capserver.py 524 2007-08-15 04:04:52Z albert $ import bluetooth server_sock=bluetooth.BluetoothSocket( bluetooth.L2CAP ) port = 0x1001 server_sock.bind(("",port)) server_sock.listen(1) #uuid = "94f39d29-7d6d-437d-973b-fba39e49d4ef" #bluetooth.a...
[ [ 1, 0, 0.1562, 0.0312, 0, 0.66, 0, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 14, 0, 0.2188, 0.0312, 0, 0.66, 0.0909, 944, 3, 1, 0, 0, 838, 10, 1 ], [ 14, 0, 0.2812, 0.0312, 0, ...
[ "import bluetooth", "server_sock=bluetooth.BluetoothSocket( bluetooth.L2CAP )", "port = 0x1001", "server_sock.bind((\"\",port))", "server_sock.listen(1)", "client_sock,address = server_sock.accept()", "print(\"Accepted connection from \",address)", "data = client_sock.recv(1024)", "print(\"Data rece...
# file: l2capclient.py # desc: Demo L2CAP client for bluetooth module. # $Id: l2capclient.py 524 2007-08-15 04:04:52Z albert $ import sys import bluetooth if sys.version < '3': input = raw_input sock=bluetooth.BluetoothSocket(bluetooth.L2CAP) if len(sys.argv) < 2: print("usage: l2capclient.py <addr>") s...
[ [ 1, 0, 0.1613, 0.0323, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1935, 0.0323, 0, 0.66, 0.0909, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 4, 0, 0.2742, 0.0645, 0, ...
[ "import sys", "import bluetooth", "if sys.version < '3':\n input = raw_input", " input = raw_input", "sock=bluetooth.BluetoothSocket(bluetooth.L2CAP)", "if len(sys.argv) < 2:\n print(\"usage: l2capclient.py <addr>\")\n sys.exit(2)", " print(\"usage: l2capclient.py <addr>\")", " sys.e...
#!/usr/bin/python """ A simple graphical chat client to demonstrate the use of pybluez. Opens a l2cap socket and listens on PSM 0x1001 Provides the ability to scan for nearby bluetooth devices and establish chat sessions with them. """ import os import sys import time import gtk import gobject import gtk.glade i...
[ [ 8, 0, 0.0314, 0.0366, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0628, 0.0052, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0681, 0.0052, 0, 0.66...
[ "\"\"\" A simple graphical chat client to demonstrate the use of pybluez.\n\nOpens a l2cap socket and listens on PSM 0x1001\n\nProvides the ability to scan for nearby bluetooth devices and establish chat\nsessions with them.\n\"\"\"", "import os", "import sys", "import time", "import gtk", "import gobject...
import sys import struct import bluetooth def usage(): print("usage: l2-mtu < server | client > [options]") print("") print("l2-mtu server to start in server mode") print("l2-mtu client <addr> to start in client mode and connect to addr") sys.exit(2) if len(sys.argv) < 2: usage() m...
[ [ 1, 0, 0.0167, 0.0167, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0333, 0.0167, 0, 0.66, 0.1429, 399, 0, 1, 0, 0, 399, 0, 0 ], [ 1, 0, 0.05, 0.0167, 0, 0....
[ "import sys", "import struct", "import bluetooth", "def usage():\n print(\"usage: l2-mtu < server | client > [options]\")\n print(\"\")\n print(\"l2-mtu server to start in server mode\")\n print(\"l2-mtu client <addr> to start in client mode and connect to addr\")\n sys.exit(2)",...
import os import sys import struct import bluetooth._bluetooth as _bt def read_local_bdaddr(hci_sock): old_filter = hci_sock.getsockopt( _bt.SOL_HCI, _bt.HCI_FILTER, 14) flt = _bt.hci_filter_new() opcode = _bt.cmd_opcode_pack(_bt.OGF_INFO_PARAM, _bt.OCF_READ_BD_ADDR) _bt.hci_filter_set_pty...
[ [ 1, 0, 0.0286, 0.0286, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0571, 0.0286, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0857, 0.0286, 0, 0.6...
[ "import os", "import sys", "import struct", "import bluetooth._bluetooth as _bt", "def read_local_bdaddr(hci_sock):\n old_filter = hci_sock.getsockopt( _bt.SOL_HCI, _bt.HCI_FILTER, 14)\n flt = _bt.hci_filter_new()\n opcode = _bt.cmd_opcode_pack(_bt.OGF_INFO_PARAM, \n _bt.OCF_READ_BD_ADDR...
import sys import fcntl import struct import array import bluetooth import bluetooth._bluetooth as bt # low level bluetooth wrappers. def __get_acl_conn_handle(sock, addr): hci_fd = sock.fileno() reqstr = struct.pack( "6sB17s", bt.str2ba(addr), bt.ACL_LINK, "\0" * 17) request = array.array( "c", reqstr )...
[ [ 1, 0, 0.0132, 0.0132, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0263, 0.0132, 0, 0.66, 0.0417, 488, 0, 1, 0, 0, 488, 0, 0 ], [ 1, 0, 0.0395, 0.0132, 0, ...
[ "import sys", "import fcntl", "import struct", "import array", "import bluetooth", "import bluetooth._bluetooth as bt # low level bluetooth wrappers.", "def __get_acl_conn_handle(sock, addr):\n hci_fd = sock.fileno()\n reqstr = struct.pack( \"6sB17s\", bt.str2ba(addr), bt.ACL_LINK, \"\\0\" * 17)...
# performs a simple device inquiry, followed by a remote name request of each # discovered device import os import sys import struct import bluetooth._bluetooth as bluez def printpacket(pkt): for c in pkt: sys.stdout.write("%02x " % struct.unpack("B",c)[0]) print() def read_inquiry_mode(sock): ...
[ [ 1, 0, 0.0256, 0.0064, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0321, 0.0064, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0385, 0.0064, 0, ...
[ "import os", "import sys", "import struct", "import bluetooth._bluetooth as bluez", "def printpacket(pkt):\n for c in pkt:\n sys.stdout.write(\"%02x \" % struct.unpack(\"B\",c)[0])\n print()", " for c in pkt:\n sys.stdout.write(\"%02x \" % struct.unpack(\"B\",c)[0])", " sys...
import sys import bluetooth if len(sys.argv) < 2: print("usage: l2-unreliable-server") sys.exit(2) timeout = int(sys.argv[1]) assert timeout >= 0 server_sock=bluetooth.BluetoothSocket( bluetooth.L2CAP ) server_sock.bind(("",0x1001)) server_sock.listen(1) while True: print("waiting for incoming connection...
[ [ 1, 0, 0.0294, 0.0294, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0588, 0.0294, 0, 0.66, 0.125, 256, 0, 1, 0, 0, 256, 0, 0 ], [ 4, 0, 0.1471, 0.0882, 0, 0...
[ "import sys", "import bluetooth", "if len(sys.argv) < 2:\n print(\"usage: l2-unreliable-server\")\n sys.exit(2)", " print(\"usage: l2-unreliable-server\")", " sys.exit(2)", "timeout = int(sys.argv[1])", "server_sock=bluetooth.BluetoothSocket( bluetooth.L2CAP )", "server_sock.bind((\"\",0x1...
import os import sys import struct import bluetooth._bluetooth as bluez def read_inquiry_scan_activity(sock): """returns the current inquiry scan interval and window, or -1 on failure""" # save current filter old_filter = sock.getsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, 14) # Setup socket filter...
[ [ 1, 0, 0.0111, 0.0111, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0222, 0.0111, 0, 0.66, 0.1, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0333, 0.0111, 0, 0.6...
[ "import os", "import sys", "import struct", "import bluetooth._bluetooth as bluez", "def read_inquiry_scan_activity(sock):\n \"\"\"returns the current inquiry scan interval and window, \n or -1 on failure\"\"\"\n # save current filter\n old_filter = sock.getsockopt( bluez.SOL_HCI, bluez.HCI_FILT...
# importing modules import numpy as np from random import gauss import sys import math # Gaussian distribution for life-times, constants from article "Measurement of the relativistic time using mesons" meson_lifetime = 2.2e-6 meson_variance = 0.2e-6 # observer's inputs with checking print "measurement ...
[ [ 1, 0, 0.0435, 0.0217, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0652, 0.0217, 0, 0.66, 0.05, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.087, 0.0217, 0, 0.6...
[ "import numpy as np", "from random import gauss", "import sys", "import math", "meson_lifetime = 2.2e-6", "meson_variance = 0.2e-6", "print(\"measurement altitude [in meters from 0 to 3000]\")", "height = float(raw_input(\">>> \"))", "if not (height >= 0 and height <= 3000):\n sys.exit('Check you...
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you ...
[ [ 1, 0, 0.3514, 0.0135, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3649, 0.0135, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.3784, 0.0135, 0, ...
[ "import os", "import re", "import tempfile", "import shutil", "ignore_pattern = re.compile('^(.svn|target|bin|classes)')", "java_pattern = re.compile('^.*\\.java')", "annot_pattern = re.compile('import org\\.apache\\.http\\.annotation\\.')", "def process_dir(dir):\n files = os.listdir(dir)\n for...
from __future__ import division #may affect pearson def readfile(filename): lines=[line for line in file(filename)] rownames=[] data=[] for line in lines: p=line.strip().split(' ') #single space as separator #print p # First column in each row is the rowname rownames.append(p[0]) # The data...
[ [ 1, 0, 0.0082, 0.0082, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 2, 0, 0.0738, 0.1066, 0, 0.66, 0.0769, 335, 0, 1, 1, 0, 0, 0, 6 ], [ 14, 1, 0.0328, 0.0082, 1, 0...
[ "from __future__ import division #may affect pearson", "def readfile(filename):\n lines=[line for line in file(filename)]\n rownames=[]\n data=[]\n for line in lines:\n p=line.strip().split(' ') #single space as separator\n #print p\n # First column in each row is the rowname", " lines=[line for l...
#1. Install numpy for ironpython: http://www.enthought.com/repo/.iron/ #2. Copy __future__.py to your C:\Program Files\IronPython 2.7\Lib from __future__ import division def readfile(filename): lines=[line for line in file(filename)] rownames=[] data=[] for line in lines: p=line.strip().split(' ')...
[ [ 1, 0, 0.0263, 0.0088, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 2, 0, 0.0965, 0.114, 0, 0.66, 0.0833, 335, 0, 1, 1, 0, 0, 0, 6 ], [ 14, 1, 0.0526, 0.0088, 1, 0....
[ "from __future__ import division", "def readfile(filename):\n lines=[line for line in file(filename)]\n rownames=[]\n data=[]\n for line in lines:\n p=line.strip().split(' ') #single space as separator\n #print p\n # First column in each row is the rowname", " lines=[line for line in file(filename...
"""Record of phased-in incompatible language changes. Each line is of the form: FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," CompilerFlag ")" where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples of the same form as sys.version_info...
[ [ 8, 0, 0.1914, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4219, 0.0703, 0, 0.66, 0.0588, 843, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.4688, 0.0078, 0, 0.66,...
[ "\"\"\"Record of phased-in incompatible language changes.\n\nEach line is of the form:\n\n FeatureName = \"_Feature(\" OptionalRelease \",\" MandatoryRelease \",\"\n CompilerFlag \")\"\n\nwhere, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples", "all_feature_name...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.0799, 0.0022, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.0821, 0.0022, 0, 0.66, 0.2, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.0864, 0.0022, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import unittest", "import util", "class AnimMeshTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n self.__abcStitcherExe = os.environ['AbcSt...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.4022, 0.0109, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.413, 0.0109, 0, 0.66, 0.1667, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.4239, 0.0109, 0, 0...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import unittest", "import util", "def getObjFromName( nodeName ):\n selectionList = OpenMaya.MSelectionList()\n selectionList.add( nodeName )\n obj = OpenMaya.MObject()\n selectionList.getDependNode(0, obj)\...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.1285, 0.0035, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1319, 0.0035, 0, 0.66, 0.2, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.1354, 0.0035, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import unittest", "import util", "import os", "class interpolationTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f i...
#!/usr/bin/env mayapy ##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source ...
[ [ 1, 0, 0.3905, 0.0095, 0, 0.66, 0, 958, 0, 1, 0, 0, 958, 0, 0 ], [ 1, 0, 0.4, 0.0095, 0, 0.66, 0.04, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.4095, 0.0095, 0, 0.66,...
[ "import glob", "import os", "import sys", "import time", "import unittest", "import maya.standalone", "maya.standalone.initialize(name='python')", "from maya import cmds as MayaCmds", "from maya.mel import eval as MelEval", "usage = \"\"\"\nUsage:\nmayapy RunTests.py AbcExport AbcImport AbcStitche...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.25, 0.0068, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.2568, 0.0068, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2635, 0.0068, 0, 0.66...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class TransformTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in self.__files :", " def setUp(self):\n...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.2552, 0.0069, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.2621, 0.0069, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.269, 0.0069, 0, 0.66...
[ "from maya import cmds as MayaCmds", "import os", "import subprocess", "import unittest", "import util", "class AnimNurbsCurveTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__abcStitcher = [os.environ['AbcStitcher']]\n self.__files = []\n...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.1927, 0.0052, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1979, 0.0052, 0, 0.66, 0.1667, 901, 0, 1, 0, 0, 901, 0, 0 ], [ 1, 0, 0.2083, 0.0052, 0, ...
[ "from maya import cmds as MayaCmds", "from maya.mel import eval as MelEval", "import os", "import maya.OpenMaya as OpenMaya", "import unittest", "import util", "class StaticMeshTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n ...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.2624, 0.0071, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.2695, 0.0071, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2766, 0.0071, 0, 0....
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class VisibilityTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in self.__files :", " def setUp(self):\...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.1209, 0.0033, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1242, 0.0033, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1275, 0.0033, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "def testNurbsCurveRW( self, isGroup, abcFileName, inText):\n\n MayaCmds.file(new=True, force=True)\n name = MayaCmds.textCurves( font='Courier', text=inText )\n if isGroup == True :\n MayaCmds.addAttr(name[0...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.3274, 0.0088, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.3363, 0.0088, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3451, 0.0088, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "def makeRobot():\n MayaCmds.polyCube(name=\"head\")\n MayaCmds.move(0, 4, 0, r=1)\n\n MayaCmds.polyCube(name=\"chest\")\n MayaCmds.scale(2, 2.5, 1)\n MayaCmds.move(0, 2, 0, r=1)\n MayaCmds.polyCube(name=\"...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.2517, 0.0068, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.2585, 0.0068, 0, 0.66, 0.1429, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.2653, 0.0068, 0, ...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import subprocess", "import unittest", "import util", "def createJoints():\n\n name = MayaCmds.joint(position=(0, 0, 0))\n MayaCmds.rotate(33.694356, 4.000428, 61.426019, r=True, ws=True)\n MayaCmds.joint(p...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.1429, 0.0039, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1467, 0.0039, 0, 0.66, 0.125, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1506, 0.0039, 0, 0...
[ "from maya import cmds as MayaCmds", "from maya import mel as Mel", "import os", "import unittest", "import util", "def makeRobot():\n MayaCmds.polyCube(name=\"head\")\n MayaCmds.move(0, 4, 0, r=1)\n\n MayaCmds.polyCube(name=\"chest\")\n MayaCmds.scale(2, 2.5, 1)\n MayaCmds.move(0, 2, 0, r=...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.185, 0.005, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.19, 0.005, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.195, 0.005, 0, 0.66, ...
[ "from maya import cmds as MayaCmds", "import os", "import subprocess", "import unittest", "import util", "class AnimNurbsSurfaceTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__abcStitcher = [os.environ['AbcStitcher']]\n self.__files = []...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.319, 0.0086, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.3276, 0.0086, 0, 0.66, 0.1429, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.3362, 0.0086, 0, 0...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import subprocess", "import unittest", "import util", "def createLocator():\n shape = MayaCmds.createNode(\"locator\")\n name = MayaCmds.pickWalk(shape, d=\"up\")\n MayaCmds.setAttr(shape+'.localPositionX',...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.5606, 0.0152, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.5909, 0.0152, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.6061, 0.0152, 0, 0....
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class emptyMeshTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in self.__files:", " def setUp(self):\n ...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.5441, 0.0147, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.5588, 0.0147, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.5735, 0.0147, 0, 0....
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class TransformTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in self.__files :", " def setUp(self):\n...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.5139, 0.0139, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.5278, 0.0139, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.5417, 0.0139, 0, 0....
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class AnimPointPrimitiveTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n\n def tearDown(self):", " def setUp(self):\n MayaCmds.file(...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.6727, 0.0182, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.6909, 0.0182, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.7091, 0.0182, 0, ...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "class AbcExport_dupRootsTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n\n def testStaticTransformReadWrite(self):\n MayaCmds.polyCube(n='cube')\n MayaCmds.group(n='group1')", ...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.1682, 0.0045, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1727, 0.0045, 0, 0.66, 0.1667, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.1773, 0.0045, 0, ...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import subprocess", "import unittest", "import util", "class AnimMeshTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__abcStitcher = [os.environ['AbcStitcher...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.5, 0.0135, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.527, 0.0135, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.5405, 0.0135, 0, 0.66, ...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class StaticPointPrimitiveTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in self.__files :", " def set...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.209, 0.0056, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.2147, 0.0056, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2203, 0.0056, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class LoadWorldSpaceTranslateJobTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in self.__files :", " d...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.0971, 0.0026, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.0997, 0.0026, 0, 0.66, 0.125, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1024, 0.0026, 0, 0...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "def checkEqualRotate(test, nodeName1, nodeName2, precision):\n test.failUnlessAlmostEqual(MayaCmds.getAttr(nodeName1 + '.rotateX'),\n MayaCmds.getAttr(nodeName2 + '.rotateX'), precision)\n test.failUnlessAlmost...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.086, 0.0023, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.0884, 0.0023, 0, 0.66, 0.0714, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.0907, 0.0023, 0, 0...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import math", "def expandFileName(name):\n return os.getcwd() + os.path.sep + name", " return os.getcwd() + os.path.sep + name", "def floatDiff(val1, val2, tolerance):\n diff = math.fabs(val1 - val2)\n if ...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.1171, 0.0032, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1203, 0.0032, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1234, 0.0032, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import os", "import subprocess", "import unittest", "import util", "class subframesTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in self.__files:", "...
# # Copyright (c) 2010 Sony Pictures Imageworks 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 list of c...
[ [ 1, 0, 0.2845, 0.0086, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.2931, 0.0086, 0, 0.66, 0.1429, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.3017, 0.0086, 0, ...
[ "from maya import cmds as MayaCmds", "from maya import mel as Mel", "import os", "import unittest", "import util", "def makeRobot():\n MayaCmds.polyCube(name=\"head\")\n MayaCmds.move(0, 4, 0, r=1)\n\n MayaCmds.polyCube(name=\"chest\")\n MayaCmds.scale(2, 2.5, 1)\n MayaCmds.move(0, 2, 0, r=...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.2056, 0.0056, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.2111, 0.0056, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2167, 0.0056, 0, 0....
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class staticPropTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in self.__files :", " def setUp(self):\...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.1121, 0.003, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1152, 0.003, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1182, 0.003, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "def testStaticNurbsWithoutTrim(self, surfacetype, abcFileName):\n\n if (surfacetype == 0):\n ret = MayaCmds.nurbsPlane(p=(0, 0, 0), ax=(0, 1, 0), w=1, lr=1, d=3,\n u=5, v=5, ch=0)\n errmsg = 'Nu...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.0539, 0.0015, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.0553, 0.0015, 0, 0.66, 0.2, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.0568, 0.0015, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import unittest", "import util", "class MayaReloadTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__files = []\n\n def tearDown(self):\n for f in sel...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.209, 0.0056, 0, 0.66, 0, 924, 0, 1, 0, 0, 924, 0, 0 ], [ 1, 0, 0.2147, 0.0056, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2203, 0.0056, 0, 0.66...
[ "import maya.cmds as MayaCmds", "import os", "import subprocess", "import unittest", "import util", "class animPropTest(unittest.TestCase):\n\n#-------------------------------------------------------------------------\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__abcSt...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.3737, 0.0101, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.3838, 0.0101, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3939, 0.0101, 0, 0....
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "def makeRobot():\n MayaCmds.polyCube(name=\"head\")\n MayaCmds.move(0, 4, 0, r=1)\n\n MayaCmds.polyCube(name=\"chest\")\n MayaCmds.scale(2, 2.5, 1)\n MayaCmds.move(0, 2, 0, r=1)\n MayaCmds.polyCube(name=\"leftArm\")", " ...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.1689, 0.0046, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1735, 0.0046, 0, 0.66, 0.1667, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.1781, 0.0046, 0, ...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import unittest", "import util", "def getObjFromName(nodeName):\n selectionList = OpenMaya.MSelectionList()\n selectionList.add(nodeName)\n obj = OpenMaya.MObject()\n selectionList.getDependNode(0, obj)\n ...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.3394, 0.0092, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.3486, 0.0092, 0, 0.66, 0.1429, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.3578, 0.0092, 0, ...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import subprocess", "import unittest", "import util", "def createCamera():\n name = MayaCmds.camera()\n MayaCmds.setAttr(name[1]+'.horizontalFilmAperture', 0.962)\n MayaCmds.setAttr(name[1]+'.verticalFilmAp...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks, Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with...
[ [ 1, 0, 0.0992, 0.0027, 0, 0.66, 0, 924, 0, 1, 0, 0, 924, 0, 0 ], [ 1, 0, 0.1019, 0.0027, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1046, 0.0027, 0, 0.6...
[ "import maya.cmds as MayaCmds", "import os", "import subprocess", "import unittest", "import util", "class AnimTransformTest(unittest.TestCase):\n\n def setUp(self):\n MayaCmds.file(new=True, force=True)\n self.__abcStitcher = [os.environ['AbcStitcher']]\n self.__files = []\n\n ...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with ...
[ [ 14, 0, 0.5167, 0.3917, 0, 0.66, 0, 594, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.8458, 0.25, 0, 0.66, 0.5, 120, 0, 1, 0, 0, 0, 0, 3 ], [ 14, 1, 0.7333, 0.0083, 1, 0.9, ...
[ "sprops = \\\n\"\"\"\nIBoolProperty\nIUcharProperty\nICharProperty\nIUInt16Property\nIInt16Property\nIUInt32Property", "def printdefs( p ):\n s = \" //%s\\n //\\n\"\n #s += 'bool\\n( Abc::%s::*matchesMetaData )( const AbcA::MetaData&,\\nAbc::SchemaInterpMatching ) = \\\\\\n'\n #s += '&Abc::%s::matc...
#!/usr/bin/env python2.6 #-*- mode: python -*- ##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistrib...
[ [ 1, 0, 0.2033, 0.0055, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.2088, 0.0055, 0, 0.66, 0.1667, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2143, 0.0055, 0, ...
[ "from __future__ import with_statement", "import os, sys, re", "from Path import Path", "COMMENT = re.compile( r\"//|#\" )", "WS = re.compile( r\"\\s\" )", "class CacheEntry( object ):\n def __init__( self, _line ):\n line = WS.sub( \"\", str( _line ) )\n\n if not line:\n retur...
##-***************************************************************************** ## ## Copyright (c) 2009-2011, ## Sony Pictures Imageworks Inc. and ## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. ## ## All rights reserved. ## ## Redistribution and use in source and binary forms, with ...
[ [ 1, 0, 0.9737, 0.0263, 0, 0.66, 0, 754, 0, 1, 0, 0, 754, 0, 0 ], [ 1, 0, 1, 0.0263, 0, 0.66, 1, 610, 0, 2, 0, 0, 610, 0, 0 ] ]
[ "from Path import Path", "from CMakeCache import CMakeCache, CacheEntry" ]
if False: # set to True to insert test data store(store.product.id > 0).delete() store(store.category.id > 0).delete() if len(store(store.product.id > 0).select()) == 0: fantasy_id = store.category.insert(name='Fantasy', description='Fantasy books', small_image='testdata/hp1.jpg') hp1 = ...
[ [ 4, 0, 0.525, 1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 19 ], [ 8, 1, 0.1, 0.05, 1, 0.7, 0, 266, 3, 0, 0, 0, 0, 0, 2 ], [ 8, 1, 0.15, 0.05, 1, 0.7, 0.5, 266, ...
[ "if False: # set to True to insert test data \n store(store.product.id > 0).delete()\n store(store.category.id > 0).delete()\n if len(store(store.product.id > 0).select()) == 0:\n fantasy_id = store.category.insert(name='Fantasy', description='Fantasy books', small_image='testdata/hp1.jpg')\n ...
# import re # delimiter to use between words in URL URL_DELIMITER = '-' def pretty_url(id, name): """Create pretty URL from record name and ID """ return '%s%s%d' % (' '.join(re.sub('[^\w ]+', '', name).split()).replace(' ', URL_DELIMITER), URL_DELIMITER, id) def pretty_id(url): """Extract id fr...
[ [ 1, 0, 0.1071, 0.0357, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 14, 0, 0.25, 0.0357, 0, 0.66, 0.2, 352, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.3393, 0.1429, 0, 0.66, ...
[ "import re", "URL_DELIMITER = '-'", "def pretty_url(id, name):\n \"\"\"Create pretty URL from record name and ID\n \"\"\"\n return '%s%s%d' % (' '.join(re.sub('[^\\w ]+', '', name).split()).replace(' ', URL_DELIMITER), URL_DELIMITER, id)", " \"\"\"Create pretty URL from record name and ID\n \"\...
UNDEFINED = -1 if request.env.web2py_runtime_gae: # if running on Google App Engine store = DAL('gae') # connect to Google BigTable session.connect(request, response, db=store) # and store sessions and tickets there else: store = DAL("sqlite://store.db") store.define...
[ [ 14, 0, 0.0065, 0.0065, 0, 0.66, 0, 67, 0, 0, 0, 0, 0, 0, 0 ], [ 4, 0, 0.039, 0.0325, 0, 0.66, 0.0323, 0, 7, 0, 0, 0, 0, 0, 3 ], [ 14, 1, 0.0325, 0.0065, 1, 0.91, ...
[ "UNDEFINED = -1", "if request.env.web2py_runtime_gae: # if running on Google App Engine\n store = DAL('gae') # connect to Google BigTable\n session.connect(request, response, db=store) # and store sessions and tickets there\nelse:\n store = DAL(\"sqlite://store.db\")"...
########################################################### ### make sure administrator is on localhost ############################################################ import os, socket, datetime,copy import gluon.contenttype import gluon.fileutils ### crytical --- make a copy of the environment global_env=copy.copy(glo...
[ [ 1, 0, 0.0288, 0.0048, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0337, 0.0048, 0, 0.66, 0.04, 919, 0, 1, 0, 0, 919, 0, 0 ], [ 1, 0, 0.0385, 0.0048, 0, 0....
[ "import os, socket, datetime,copy", "import gluon.contenttype", "import gluon.fileutils", "global_env=copy.copy(globals())", "global_env['datetime']=datetime", "http_host = request.env.http_host.split(':')[0]", "remote_addr = request.env.remote_addr", "try: hosts=(http_host, socket.gethostbyname(remot...
if not session.cart: # instantiate new cart session.cart, session.balance = [], 0 session.google_merchant_id = mystore.google_merchant_id response.menu = [ ['Store Front', request.function == 'index', URL(r=request, f='index')], ['About Us', request.function == 'aboutus', URL(r=request, f='aboutus')]...
[ [ 4, 0, 0.0203, 0.0203, 0, 0.66, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.027, 0.0068, 1, 0.96, 0, 0, 0, 0, 0, 0, 0, 8, 0 ], [ 14, 0, 0.0338, 0.0068, 0, 0.66, 0....
[ "if not session.cart:\n # instantiate new cart\n session.cart, session.balance = [], 0", " session.cart, session.balance = [], 0", "session.google_merchant_id = mystore.google_merchant_id", "response.menu = [\n ['Store Front', request.function == 'index', URL(r=request, f='index')],\n ['About Us', ...
########################################################### ### make sure administrator is on localhost ############################################################ import os from gluon.contenttype import contenttype from gluon.fileutils import check_credentials, listdir if not session.authorized and not request.func...
[ [ 1, 0, 0.0278, 0.0056, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0333, 0.0056, 0, 0.66, 0.0625, 919, 0, 1, 0, 0, 919, 0, 0 ], [ 1, 0, 0.0389, 0.0056, 0, ...
[ "import os", "from gluon.contenttype import contenttype", "from gluon.fileutils import check_credentials, listdir", "if not session.authorized and not request.function=='login':\n redirect(URL(r=request,f='login'))", " redirect(URL(r=request,f='login'))", "response.view='manage.html'", "response.m...
#!/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...
#!/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/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...
"""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']", ...
"""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...
#!/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...
""" This file illustrates how we can use code generation to implement substitution in first-order abstract syntax. """ class Term: """ Base class for the language. """ pass class Lam(Term): def __init__(self, name, body): self.name = name self.body = body def __repr_...
[ [ 8, 0, 0.026, 0.0417, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.0833, 0.0312, 0, 0.66, 0.0769, 902, 0, 0, 0, 0, 0, 0, 0 ], [ 8, 1, 0.0833, 0.0104, 1, 0.15, ...
[ "\"\"\"\nThis file illustrates how we can use code generation to implement\nsubstitution in first-order abstract syntax.\n\"\"\"", "class Term:\n \"\"\" Base class for the language. \"\"\"\n pass", " \"\"\" Base class for the language. \"\"\"", "class Lam(Term):\n def __init__(self, name, body):\n...
""" This is an implementation of untyped lambda calculus using Higher Order Abstract Syntax (HOAS). It demonstrates how we can look inside lambda functions by passing them dummy objects like variable names. """ class Term: alphabet = set(['x', 'y', 'z', 'u', 'v', 'w']) class Lam(Term): def __init__(self...
[ [ 8, 0, 0.0361, 0.0602, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.1024, 0.0241, 0, 0.66, 0.0769, 902, 0, 0, 0, 0, 0, 0, 1 ], [ 14, 1, 0.1084, 0.012, 1, 0.34, ...
[ "\"\"\"\nThis is an implementation of untyped lambda calculus using Higher Order\nAbstract Syntax (HOAS). It demonstrates how we can look inside lambda functions\nby passing them dummy objects like variable names.\n\"\"\"", "class Term:\n alphabet = set(['x', 'y', 'z', 'u', 'v', 'w'])", " alphabet = set([...
# Simple types and type checking in Python. class Exp: pass class Lam(Exp): def __init__(self, vartype, body): self.body = body self.vartype = vartype self.varname = name = self.body.func_code.co_varnames[0] def __repr__(self): name = self.varname ret...
[ [ 3, 0, 0.0336, 0.0149, 0, 0.66, 0, 632, 0, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.1754, 0.2388, 0, 0.66, 0.0625, 121, 0, 6, 0, 0, 632, 0, 10 ], [ 2, 1, 0.0784, 0.0299, 1, 0...
[ "class Exp:\n pass", "class Lam(Exp):\n def __init__(self, vartype, body):\n self.body = body\n self.vartype = vartype\n self.varname = name = self.body.func_code.co_varnames[0]\n\n def __repr__(self):\n name = self.varname", " def __init__(self, vartype, body):\n ...