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.1604, 0.0472, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1981, 0.0094, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.217, 0.0094, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import os", "import stat", "import threading", "from anyjson import simplejson", "from client import Storage as BaseStorage", "from clien...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1371, 0.0403, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1694, 0.0081, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1855, 0.0081, 0, 0.66,...
[ "\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import oauth2client", "import base64", "import pickle", "from django.db import models", "from oauth2client.client import St...
# Copyright (C) 2007 Joe Gregorio # # Licensed under the MIT License """MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.o...
[ [ 8, 0, 0.0814, 0.1105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1453, 0.0058, 0, 0.66, 0.0833, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1512, 0.0058, 0, 0.66...
[ "\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1", "__v...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1205, 0.1452, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2046, 0.0033, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2112, 0.0033, 0, 0.66, ...
[ "\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", ...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.0342, 0.0083, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0414, 0.0021, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0476, 0.0021, 0, 0.66,...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import copy", "import httplib2", "import logging", "import oauth2 as oauth", "import urllib", "import urlparse", "from anyjson import simplejson", "tr...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1259, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1556, 0.0074, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1704, 0.0074, 0, 0.66, ...
[ "\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "from google.appengine.ext import db", "from apiclient.oauth import OAuthCredentials", "...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.2619, 0.0635, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3175, 0.0159, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3492, 0.0159, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "import threading", "from apiclient.oauth import Storage as BaseStorage", "class Storage(BaseStorage):\n \"\"\"Store and retr...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 1, 0, 0.2679, 0.0179, 0, 0.66, 0, 629, 0, 1, 0, 0, 629, 0, 0 ], [ 1, 0, 0.2857, 0.0179, 0, 0.66, 0.2, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.3036, 0.0179, 0, 0.6...
[ "import apiclient", "import base64", "import pickle", "from django.db import models", "class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):", " __metaclass__ = models.SubfieldBase", " def db_t...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ [ 8, 0, 0.0519, 0.0182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0649, 0.0026, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0701, 0.0026, 0, 0.66,...
[ "\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import...
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ [ 8, 0, 0.1545, 0.0407, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.187, 0.0081, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2114, 0.0081, 0, 0.66, ...
[ "\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from oauth2client.anyjson import simplejson", "class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass", " \"\"\"Base...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
[ [ 8, 0, 0.0318, 0.0545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0636, 0.0091, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0727, 0.0091, 0, 0.66...
[ "\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"", "__author__ = \"Joe Gregorio (joe@bitworking.org)\"", "__copyright__ = \"Copyright 2006, Joe Gregorio\"", "__contributors__ = []", "__version__ = \"1.0.0\"", "__license__ = \"MIT\"", "__history__ = \"\"\"\n\"\"\"", "import urlparse", "escape_...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0365, 0.0708, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.0845, 0.0205, 0, 0.66, 0.04, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0982, 0.0023, 0, 0.66, ...
[ "\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ...
import Cookie import datetime import time import email.utils import calendar import base64 import hashlib import hmac import re import logging # Ripped from the Tornado Framework's web.py # http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09 # # Tornado is licensed under the Apache Licen...
[ [ 1, 0, 0.006, 0.006, 0, 0.66, 0, 32, 0, 1, 0, 0, 32, 0, 0 ], [ 1, 0, 0.0119, 0.006, 0, 0.66, 0.1, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0179, 0.006, 0, 0.66, ...
[ "import Cookie", "import datetime", "import time", "import email.utils", "import calendar", "import base64", "import hashlib", "import hmac", "import re", "import logging", "class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ...
# This is the version of this source code. manual_verstr = "1.5" auto_build_num = "211" verstr = manual_verstr + "." + auto_build_num try: from pyutil.version_class import Version as pyutil_Version __version__ = pyutil_Version(verstr) except (ImportError, ValueError): # Maybe there is no pyutil insta...
[ [ 14, 0, 0.1667, 0.0556, 0, 0.66, 0, 189, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3889, 0.0556, 0, 0.66, 0.3333, 295, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.6111, 0.0556, 0, 0...
[ "manual_verstr = \"1.5\"", "auto_build_num = \"211\"", "verstr = manual_verstr + \".\" + auto_build_num", "try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
[ [ 8, 0, 0.2927, 0.561, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6098, 0.0244, 0, 0.66, 0.25, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.6341, 0.0244, 0, 0.66, ...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
[ [ 8, 0, 0.3, 0.575, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.625, 0.025, 0, 0.66, 0.3333, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.65, 0.025, 0, 0.66, 0.6...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
[ [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, 0.66, 0.0833, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 14, 0, 0.0408, 0.0068, 0, ...
[ "import re", "import urllib", "RESERVED = \":/?#[]@!$&'()*+,;=\"", "OPERATOR = \"+./;?|!@\"", "EXPLODE = \"*+\"", "MODIFIER = \":^\"", "TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)", "VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])...
#!/usr/bin/python from node import Node def make_tree(preorder, inorder): '''Makes a tree from the preorder and inorder lists.''' if not preorder or not inorder: return None else: root = Node(first(preorder)) left_sublist, right_sublist = split_at(inorder, root.key) if...
[ [ 1, 0, 0.0323, 0.0161, 0, 0.66, 0, 772, 0, 1, 0, 0, 772, 0, 0 ], [ 2, 0, 0.3065, 0.5, 0, 0.66, 0.1429, 92, 0, 2, 1, 0, 0, 0, 12 ], [ 8, 1, 0.0806, 0.0161, 1, 0.72,...
[ "from node import Node", "def make_tree(preorder, inorder):\n '''Makes a tree from the preorder and inorder lists.'''\n\n if not preorder or not inorder:\n return None\n \n else:\n root = Node(first(preorder))", " '''Makes a tree from the preorder and inorder lists.'''", " if n...
#!/usr/bin/python from node import Node def sum_to_deepest(root): '''Returns the sum of the deepest leaf of the tree defined by Node root. If there are multiple deepest leafs, returns the greatest sum between them.''' if root: sums, depths = populate_sums(root) deepest_sums = [sum...
[ [ 1, 0, 0.0968, 0.0323, 0, 0.66, 0, 772, 0, 1, 0, 0, 772, 0, 0 ], [ 2, 0, 0.3548, 0.4194, 0, 0.66, 0.5, 95, 0, 1, 1, 0, 0, 0, 4 ], [ 8, 1, 0.2258, 0.0968, 1, 0.91, ...
[ "from node import Node", "def sum_to_deepest(root):\n '''Returns the sum of the deepest leaf of the tree defined by Node root.\n If there are multiple deepest leafs, returns the greatest sum between\n them.'''\n \n if root:\n sums, depths = populate_sums(root)\n deepest_sums = [sum fo...
from Tkinter import * root = Tk() def callback(event): print "clicked at", event.x, event.y frame = Frame(root, width=100, height=100) frame.bind("<Button-1>", callback) frame.pack() root.mainloop()
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 368, 0, 1, 0, 0, 368, 0, 0 ], [ 14, 0, 0.25, 0.0833, 0, 0.66, 0.1667, 696, 3, 0, 0, 0, 309, 10, 1 ], [ 2, 0, 0.4583, 0.1667, 0, ...
[ "from Tkinter import *", "root = Tk()", "def callback(event):\n print(\"clicked at\", event.x, event.y)", " print(\"clicked at\", event.x, event.y)", "frame = Frame(root, width=100, height=100)", "frame.bind(\"<Button-1>\", callback)", "frame.pack()", "root.mainloop()" ]
#!/usr/bin/python from node import Node def sum_to_deepest(root): '''Returns the sum of the deepest leaf of the tree defined by Node root. If there are multiple deepest leafs, returns the greatest sum between them.''' if root: sums, depths = populate_sums(root) deepest_sums = [sum...
[ [ 1, 0, 0.0968, 0.0323, 0, 0.66, 0, 772, 0, 1, 0, 0, 772, 0, 0 ], [ 2, 0, 0.3548, 0.4194, 0, 0.66, 0.5, 95, 0, 1, 1, 0, 0, 0, 4 ], [ 8, 1, 0.2258, 0.0968, 1, 0.01, ...
[ "from node import Node", "def sum_to_deepest(root):\n '''Returns the sum of the deepest leaf of the tree defined by Node root.\n If there are multiple deepest leafs, returns the greatest sum between\n them.'''\n \n if root:\n sums, depths = populate_sums(root)\n deepest_sums = [sum fo...
#!/usr/bin/python from node import Node def make_tree(preorder, inorder): '''Makes a tree from the preorder and inorder lists.''' if not preorder or not inorder: return None else: root = Node(first(preorder)) left_sublist, right_sublist = split_at(inorder, root.key) if...
[ [ 1, 0, 0.0323, 0.0161, 0, 0.66, 0, 772, 0, 1, 0, 0, 772, 0, 0 ], [ 2, 0, 0.3065, 0.5, 0, 0.66, 0.1429, 92, 0, 2, 1, 0, 0, 0, 12 ], [ 8, 1, 0.0806, 0.0161, 1, 0.47,...
[ "from node import Node", "def make_tree(preorder, inorder):\n '''Makes a tree from the preorder and inorder lists.'''\n\n if not preorder or not inorder:\n return None\n \n else:\n root = Node(first(preorder))", " '''Makes a tree from the preorder and inorder lists.'''", " if n...
from Tkinter import * root = Tk() w = Label(root, text="Hello, world!") w.pack() root.mainloop()
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 368, 0, 1, 0, 0, 368, 0, 0 ], [ 14, 0, 0.375, 0.125, 0, 0.66, 0.25, 696, 3, 0, 0, 0, 309, 10, 1 ], [ 14, 0, 0.625, 0.125, 0, 0.66,...
[ "from Tkinter import *", "root = Tk()", "w = Label(root, text=\"Hello, world!\")", "w.pack()", "root.mainloop()" ]
class Node(object): '''A node class.''' def __init__(self, key): '''Makes a new node with the given key.''' self.key = key self.left = None self.right = None
[ [ 3, 0, 0.5714, 1, 0, 0.66, 0, 345, 0, 1, 0, 0, 186, 0, 0 ], [ 8, 1, 0.2857, 0.1429, 1, 0.81, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.7143, 0.7143, 1, 0.81, 1, ...
[ "class Node(object):\n '''A node class.'''\n def __init__(self, key):\n '''Makes a new node with the given key.'''\n self.key = key\n self.left = None\n self.right = None", " '''A node class.'''", " def __init__(self, key):\n '''Makes a new node with the given key....
from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", command=frame.quit) self.button.pack(side=LEFT) self.hi_there = Button(frame, text="Hello", com...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 368, 0, 1, 0, 0, 368, 0, 0 ], [ 3, 0, 0.4773, 0.7273, 0, 0.66, 0.25, 789, 0, 2, 0, 0, 0, 0, 7 ], [ 2, 1, 0.4545, 0.5, 1, 0.63, ...
[ "from Tkinter import *", "class App:\n\n def __init__(self, master):\n\n frame = Frame(master)\n frame.pack()\n\n self.button = Button(frame, text=\"QUIT\",", " def __init__(self, master):\n\n frame = Frame(master)\n frame.pack()\n\n self.button = Button(frame, te...
#!/usr/bin/python import sys import math def binary_search(A, v, p, r): '''Searches A for v starting at index p and ending at index r.''' if p < r: midpoint = int(math.floor((p + r) / 2)) if v <= midpoint: return binary_search(A, v, p, midpoint) else: return binary_search(A, v, midpoint + 1, r) return r,...
[ [ 1, 0, 0.125, 0.0625, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1875, 0.0625, 0, 0.66, 0.3333, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 2, 0, 0.5, 0.5625, 0, 0.66...
[ "import sys", "import math", "def binary_search(A, v, p, r):\n\t'''Searches A for v starting at index p and ending at index r.'''\n\tif p < r:\n\t\tmidpoint = int(math.floor((p + r) / 2))\n\t\tif v <= midpoint:\n\t\t\treturn binary_search(A, v, p, midpoint)\n\t\telse:\n\t\t\treturn binary_search(A, v, midpoint ...
#!/usr/bin/python import sys import math def binary_search(A, v, p, r): '''Searches A for v starting at index p and ending at index r.''' if p < r: midpoint = int(math.floor((p + r) / 2)) if v <= midpoint: return binary_search(A, v, p, midpoint) else: return binary_search(A, v, midpoint + 1, r) return r,...
[ [ 1, 0, 0.125, 0.0625, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1875, 0.0625, 0, 0.66, 0.3333, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 2, 0, 0.5, 0.5625, 0, 0.66...
[ "import sys", "import math", "def binary_search(A, v, p, r):\n\t'''Searches A for v starting at index p and ending at index r.'''\n\tif p < r:\n\t\tmidpoint = int(math.floor((p + r) / 2))\n\t\tif v <= midpoint:\n\t\t\treturn binary_search(A, v, p, midpoint)\n\t\telse:\n\t\t\treturn binary_search(A, v, midpoint ...
#!/usr/bin/python import math def summable(A, x): '''Returns true if there exists a pair of elements in A that sum to x, false otherwise.''' if len(A) == 1 or len(A) == 0: return False elif len(A) == 2: return A[0] + A[1] == x elif len(A) == 3: return A[0] + A[1] == x or A[1] + A[2] == x or A[0] + A[2] == x...
[ [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 2, 0, 0.2872, 0.4255, 0, 0.66, 0.2, 155, 0, 2, 1, 0, 0, 0, 15 ], [ 8, 1, 0.117, 0.0426, 1, 0.36,...
[ "import math", "def summable(A, x):\n\t'''Returns true if there exists a pair of elements in A that sum to\n\tx, false otherwise.'''\n\tif len(A) == 1 or len(A) == 0:\n\t\treturn False\n\telif len(A) == 2:\n\t\treturn A[0] + A[1] == x\n\telif len(A) == 3:", "\t'''Returns true if there exists a pair of elements ...
#!/usr/bin/python import math def summable(A, x): '''Returns true if there exists a pair of elements in A that sum to x, false otherwise.''' if len(A) == 1 or len(A) == 0: return False elif len(A) == 2: return A[0] + A[1] == x elif len(A) == 3: return A[0] + A[1] == x or A[1] + A[2] == x or A[0] + A[2] == x...
[ [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 2, 0, 0.2872, 0.4255, 0, 0.66, 0.2, 155, 0, 2, 1, 0, 0, 0, 15 ], [ 8, 1, 0.117, 0.0426, 1, 0.79,...
[ "import math", "def summable(A, x):\n\t'''Returns true if there exists a pair of elements in A that sum to\n\tx, false otherwise.'''\n\tif len(A) == 1 or len(A) == 0:\n\t\treturn False\n\telif len(A) == 2:\n\t\treturn A[0] + A[1] == x\n\telif len(A) == 3:", "\t'''Returns true if there exists a pair of elements ...
def fib(limit): a = 0 b = 1 for i in range(0, limit): print b a, b = b, a + b if __name__ == '__main__': fib(100)
[ [ 2, 0, 0.3889, 0.6667, 0, 0.66, 0, 604, 0, 1, 0, 0, 0, 0, 2 ], [ 14, 1, 0.2222, 0.1111, 1, 0.77, 0, 475, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 1, 0.3333, 0.1111, 1, 0.77, ...
[ "def fib(limit):\n\ta = 0\n\tb = 1\n\tfor i in range(0, limit):\n\t\tprint(b)\n\t\ta, b = b, a + b", "\ta = 0", "\tb = 1", "\tfor i in range(0, limit):\n\t\tprint(b)\n\t\ta, b = b, a + b", "\t\tprint(b)", "\t\ta, b = b, a + b", "if __name__ == '__main__':\n\tfib(100)", "\tfib(100)" ]
def generate_names(first_names, last_names, limit): '''Generates names(limit many) randomly using the list of first names first_names and the list of the last names last_names.'''
[ [ 2, 0, 0.5, 0.75, 0, 0.66, 0, 934, 0, 3, 0, 0, 0, 0, 0 ], [ 8, 1, 0.625, 0.5, 1, 0.63, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "def generate_names(first_names, last_names, limit):\n\t'''Generates names(limit many) randomly using the list of first names \n\tfirst_names and the list of the last names last_names.'''", "\t'''Generates names(limit many) randomly using the list of first names \n\tfirst_names and the list of the last names last...
#!/usr/bin/python #Reduces a matrix to row-echelon form using the gaussian algorithm. def gaussian(matrix): '''Reduces a matrix to row-echelon form. pre: matrix is a list of lists, where each sublist is a row of integers in a matrix. Each row must be the same length. post: returns a list of lists of the same size,...
[ [ 2, 0, 0.6667, 0.75, 0, 0.66, 0, 78, 0, 1, 0, 0, 0, 0, 0 ], [ 8, 1, 0.5833, 0.4167, 1, 0.86, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.9167, 0.0833, 1, 0.86, 0.5...
[ "def gaussian(matrix):\n\t'''Reduces a matrix to row-echelon form.\n\tpre: matrix is a list of lists, where each sublist is a row of\n\tintegers in a matrix. Each row must be the same length.\n\tpost: returns a list of lists of the same size, but with the matrix\n\treduced to row-echelon form.'''\n\t\n\ti = 0", "...
#!/usr/bin/python #make_course_db.py #Writes info on all the courses to a text file. from BeautifulSoup import BeautifulSoup from course import Course import os import re def make_course_db(): '''Writes info on all courses to a text file.''' course_pagepath = os.getcwd() + '/course_pages/' #the course_db maps lis...
[ [ 1, 0, 0.0331, 0.0066, 0, 0.66, 0, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0397, 0.0066, 0, 0.66, 0.0909, 571, 0, 1, 0, 0, 571, 0, 0 ], [ 1, 0, 0.0464, 0.0066, 0, ...
[ "from BeautifulSoup import BeautifulSoup", "from course import Course", "import os", "import re", "def make_course_db():\n\t'''Writes info on all courses to a text file.'''\n\n\tcourse_pagepath = os.getcwd() + '/course_pages/'\n\t#the course_db maps lists of class objects to their category names\n\tcourse_d...
#timetable.py #Class for a timetable of courses at U of T. class Timetable: course_names = [] times = {} def __init__(self, courses): '''Makes a new timetable with courses from courses.''' self.courses = courses def add(self, category, code, db): '''Adds course indicated by category + code to the tim...
[ [ 3, 0, 0.6667, 0.7333, 0, 0.66, 0, 582, 0, 2, 0, 0, 0, 0, 0 ], [ 14, 1, 0.4, 0.0667, 1, 0.56, 0, 413, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 1, 0.4667, 0.0667, 1, 0.56, ...
[ "class Timetable:\n\tcourse_names = []\n\ttimes = {}\n\t\n\tdef __init__(self, courses):\n\t\t'''Makes a new timetable with courses from courses.'''\n\t\tself.courses = courses", "\tcourse_names = []", "\ttimes = {}", "\tdef __init__(self, courses):\n\t\t'''Makes a new timetable with courses from courses.'''\...
#!/usr/bin/python #course.py #Represents a course at U of T. import re class InvalidNameException(Exception): pass class Course(object): '''Represents a course at U of T.''' category = '' code = '' credit = '' session = '' name = '' lectures = {} practicals = {} tutorials = {} last_lecture_updated = '' ...
[ [ 1, 0, 0.102, 0.0204, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 3, 0, 0.1531, 0.0408, 0, 0.66, 0.3333, 731, 0, 0, 0, 0, 645, 0, 0 ], [ 3, 0, 0.5612, 0.7347, 0, 0...
[ "import re", "class InvalidNameException(Exception):\n\tpass", "class Course(object):\n\t'''Represents a course at U of T.'''\n\n\tcategory = ''\n\tcode = ''\n\tcredit = ''\n\tsession = ''\n\tname = ''", "\t'''Represents a course at U of T.'''", "\tcategory = ''", "\tcode = ''", "\tcredit = ''", "\tse...
#!/usr/bin/python #make_course_db.py #Writes info on all the courses to a text file. from BeautifulSoup import BeautifulSoup from course import Course import os import re def make_course_db(): '''Writes info on all courses to a text file.''' course_pagepath = os.getcwd() + '/course_pages/' #the course_db maps lis...
[ [ 1, 0, 0.0331, 0.0066, 0, 0.66, 0, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0397, 0.0066, 0, 0.66, 0.0909, 571, 0, 1, 0, 0, 571, 0, 0 ], [ 1, 0, 0.0464, 0.0066, 0, ...
[ "from BeautifulSoup import BeautifulSoup", "from course import Course", "import os", "import re", "def make_course_db():\n\t'''Writes info on all courses to a text file.'''\n\n\tcourse_pagepath = os.getcwd() + '/course_pages/'\n\t#the course_db maps lists of class objects to their category names\n\tcourse_d...
#!/usr/bin/python #course.py #Represents a course at U of T. import re class InvalidNameException(Exception): pass class Course(object): '''Represents a course at U of T.''' category = '' code = '' credit = '' session = '' name = '' lectures = {} practicals = {} tutorials = {} last_lecture_updated = '' ...
[ [ 1, 0, 0.102, 0.0204, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 3, 0, 0.1531, 0.0408, 0, 0.66, 0.3333, 731, 0, 0, 0, 0, 645, 0, 0 ], [ 3, 0, 0.5612, 0.7347, 0, 0...
[ "import re", "class InvalidNameException(Exception):\n\tpass", "class Course(object):\n\t'''Represents a course at U of T.'''\n\n\tcategory = ''\n\tcode = ''\n\tcredit = ''\n\tsession = ''\n\tname = ''", "\t'''Represents a course at U of T.'''", "\tcategory = ''", "\tcode = ''", "\tcredit = ''", "\tse...
import cPickle SAVE_FILE_NAME="progress.txt" USERS_FILE_NAME="profiles.txt" def get_users(): users = [] try: with open(USERS_FILE_NAME, "r") as f: users = cPickle.load(f) except IOError: should_make_profile = ask_yes_no("No user profiles found; would you " \ "like to make a new one?") if should_make_pr...
[ [ 1, 0, 0.0132, 0.0132, 0, 0.66, 0, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 14, 0, 0.0263, 0.0132, 0, 0.66, 0.125, 688, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0395, 0.0132, 0, 0...
[ "import cPickle", "SAVE_FILE_NAME=\"progress.txt\"", "USERS_FILE_NAME=\"profiles.txt\"", "def get_users():\n\tusers = []\n\ttry:\n\t\twith open(USERS_FILE_NAME, \"r\") as f:\n\t\t\tusers = cPickle.load(f) \n\texcept IOError:\n\t\tshould_make_profile = ask_yes_no(\"No user profiles found; would you \" \\\n\t\t...
class User: '''User of the motivator program.''' name = "" level = 0 exp = 0 def __init__(self, name, level, exp): '''Makes a new user called name, at level level and starting with exp experience.''' self.name = name self.level = level self.exp = exp def level_up(self): '''Increases the level of the...
[ [ 3, 0, 0.5238, 1, 0, 0.66, 0, 61, 0, 3, 0, 0, 0, 0, 1 ], [ 8, 1, 0.0952, 0.0476, 1, 0.88, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.1429, 0.0476, 1, 0.88, 0.1667...
[ "class User:\n\t'''User of the motivator program.'''\n\tname = \"\"\n\tlevel = 0\n\texp = 0\n\tdef __init__(self, name, level, exp):\n\t\t'''Makes a new user called name, at level level and starting with\n\t\texp experience.'''", "\t'''User of the motivator program.'''", "\tname = \"\"", "\tlevel = 0", "\te...
#!/usr/bin/python #Reduces a matrix to row-echelon form using the gaussian algorithm. def gaussian(matrix): '''Reduces a matrix to row-echelon form. pre: matrix is a list of lists, where each sublist is a row of integers in a matrix. Each row must be the same length. post: returns a list of lists of the same size,...
[ [ 2, 0, 0.6667, 0.75, 0, 0.66, 0, 78, 0, 1, 0, 0, 0, 0, 0 ], [ 8, 1, 0.5833, 0.4167, 1, 0.34, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.9167, 0.0833, 1, 0.34, 0.5...
[ "def gaussian(matrix):\n\t'''Reduces a matrix to row-echelon form.\n\tpre: matrix is a list of lists, where each sublist is a row of\n\tintegers in a matrix. Each row must be the same length.\n\tpost: returns a list of lists of the same size, but with the matrix\n\treduced to row-echelon form.'''\n\t\n\ti = 0", "...
import logging def get_numlines(filename): '''Gets the number of lines in the file indicated by filename.''' try: with open(filename, 'r') as f: return len(f.readlines()) except EnvironmentError as e: print e.message logging.error(e) except TypeError as e: print e.message logging.error(e) print get_n...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 2, 0, 0.5333, 0.7333, 0, 0.66, 0.5, 877, 0, 1, 1, 0, 0, 0, 7 ], [ 8, 1, 0.2667, 0.0667, 1, 0.43,...
[ "import logging", "def get_numlines(filename):\n\t'''Gets the number of lines in the file indicated by filename.'''\n\ttry:\n\t\twith open(filename, 'r') as f:\n\t\t\treturn len(f.readlines())\n\texcept EnvironmentError as e:\n\t\tprint(e.message)\n\t\tlogging.error(e)", "\t'''Gets the number of lines in the fi...
try: range = xrange except NameError: pass print(range(5))
[ [ 7, 0, 0.4167, 0.6667, 0, 0.66, 0, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 1, 0.3333, 0.1667, 1, 0.51, 0, 816, 2, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 1, 0.1667, 0, 0.66, 1, ...
[ "try:\n\trange = xrange\nexcept NameError:\n\tpass", "\trange = xrange", "print(range(5))" ]
#!/usr/bin/python #empty spaces + stone colors BLANK=0 BLACK=1 WHITE=2 #used to determine the relationship between connected stones UNRELATED=3 FRIENDS=4 ENEMIES=5 #Used to announce which player is making a move. COLOR_STRINGS = {BLANK:"Blank", WHITE:"White", BLACK:"Black"} class IllegalMoveException(Exception): "...
[ [ 14, 0, 0.0237, 0.004, 0, 0.66, 0, 530, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0277, 0.004, 0, 0.66, 0.1, 187, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0316, 0.004, 0, 0.66, ...
[ "BLANK=0", "BLACK=1", "WHITE=2", "UNRELATED=3", "FRIENDS=4", "ENEMIES=5", "COLOR_STRINGS = {BLANK:\"Blank\", WHITE:\"White\", BLACK:\"Black\"}", "class IllegalMoveException(Exception):\n\t\"\"\"Raised when an illegal move by the rules of Go is made.\"\"\"\n\tdef __init__(self, coordinates, reason):\n\...
#!/usr/bin/python #empty spaces + stone colors BLANK=0 BLACK=1 WHITE=2 #used to determine the relationship between connected stones UNRELATED=3 FRIENDS=4 ENEMIES=5 #Used to announce which player is making a move. COLOR_STRINGS = {BLANK:"Blank", WHITE:"White", BLACK:"Black"} class IllegalMoveException(Exception): "...
[ [ 14, 0, 0.0237, 0.004, 0, 0.66, 0, 530, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0277, 0.004, 0, 0.66, 0.1, 187, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0316, 0.004, 0, 0.66, ...
[ "BLANK=0", "BLACK=1", "WHITE=2", "UNRELATED=3", "FRIENDS=4", "ENEMIES=5", "COLOR_STRINGS = {BLANK:\"Blank\", WHITE:\"White\", BLACK:\"Black\"}", "class IllegalMoveException(Exception):\n\t\"\"\"Raised when an illegal move by the rules of Go is made.\"\"\"\n\tdef __init__(self, coordinates, reason):\n\...
#/usr/bin/python #go.py: handles the game of Go being played. import board import sys #default rules + settings of the game DEFAULT_KOMI = 6.5 DEFAULT_SIZE = 19 DEFAULT_HANDICAP = 0 DEFAULT_BPLAYER_NAME = "Black" DEFAULT_WPLAYER_NAME = "White" BLACK_STARTS = True #the tiles on the board BLANK = 0 BLACK = 1 WHITE = 2 ...
[ [ 1, 0, 0.0183, 0.0046, 0, 0.66, 0, 594, 0, 1, 0, 0, 594, 0, 0 ], [ 1, 0, 0.0228, 0.0046, 0, 0.66, 0.0625, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.0365, 0.0046, 0, ...
[ "import board", "import sys", "DEFAULT_KOMI = 6.5", "DEFAULT_SIZE = 19", "DEFAULT_HANDICAP = 0", "DEFAULT_BPLAYER_NAME = \"Black\"", "DEFAULT_WPLAYER_NAME = \"White\"", "BLACK_STARTS = True", "BLANK = 0", "BLACK = 1", "WHITE = 2", "COLOR_STRINGS = {BLANK:\"Blank\", BLACK:\"Black\", WHITE:\"Whi...
''' Created on 2011-3-13 @author: Fish ''' from pyDes import * from aboutfamily.familyMember.models import LoginId class EnAndDecrypt(object): ''' classdocs ''' global key def __init__(self): ''' Constructor ''' key = 'crazefish' d...
[ [ 8, 0, 0.0732, 0.122, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1463, 0.0244, 0, 0.66, 0.3333, 276, 0, 1, 0, 0, 276, 0, 0 ], [ 1, 0, 0.1707, 0.0244, 0, 0.66,...
[ "'''\nCreated on 2011-3-13\n\n@author: Fish\n'''", "from pyDes import *", "from aboutfamily.familyMember.models import LoginId", "class EnAndDecrypt(object):\n '''\n classdocs\n '''\n global key \n \n def __init__(self):\n '''", " '''\n classdocs\n '''", " def __init__...
''' Created on 2011-3-13 @author: Frank F Zhang ''' from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ class UserSignupForm(forms.Form): MAX_LENGTH = 10 """ A form that creates a user with profile """ email = f...
[ [ 8, 0, 0.0405, 0.0676, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0811, 0.0135, 0, 0.66, 0.2, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0946, 0.0135, 0, 0.66, ...
[ "'''\nCreated on 2011-3-13\n\n@author: Frank F Zhang\n'''", "from django import forms", "from django.contrib.auth.models import User", "from django.utils.translation import ugettext_lazy as _", "class UserSignupForm(forms.Form):\n MAX_LENGTH = 10\n \"\"\"\n A form that creates a user with profile\n...
''' Backend for email/password authentication Created on 2011-4-2 @author: Frank F Zhang ''' from django.contrib.auth.models import User from django.core.validators import email_re from aboutfamily.user.enanddecrypt import encrpytEmail class BasicBackend: def get_user(self, user_id): try: ...
[ [ 8, 0, 0.1176, 0.2059, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2353, 0.0294, 0, 0.66, 0.2, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.2647, 0.0294, 0, 0.66, ...
[ "'''\nBackend for email/password authentication\n\nCreated on 2011-4-2\n\n@author: Frank F Zhang\n'''", "from django.contrib.auth.models import User", "from django.core.validators import email_re", "from aboutfamily.user.enanddecrypt import encrpytEmail", "class BasicBackend:\n def get_user(self, user_id...
# -*- coding: utf-8 -*- from django.db import models, connection from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.auth.admin import UserAdmin from aboutfamily import ENCODING from aboutfamily.user import AVATAR_HOLDER, AVATAR_STORAGE_PATH ...
[ [ 1, 0, 0.0328, 0.0164, 0, 0.66, 0, 40, 0, 2, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0492, 0.0164, 0, 0.66, 0.1111, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.0656, 0.0164, 0, 0....
[ "from django.db import models, connection", "from django.utils.translation import ugettext_lazy as _", "from django.contrib.auth.models import User", "from django.contrib.auth.admin import UserAdmin", "from aboutfamily import ENCODING", "from aboutfamily.user import AVATAR_HOLDER, AVATAR_STORAGE_PATH", ...
''' Created on 2011-3-13 @author: Frank F Zhang ''' from django.conf.urls.defaults import patterns, url urlpatterns = patterns('aboutfamily.user.views', url(r'^login/$', 'user_login', name='user_login'), url(r'^register/$', 'user_signup', name='user_signup'), )
[ [ 8, 0, 0.2727, 0.4545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5455, 0.0909, 0, 0.66, 0.5, 341, 0, 2, 0, 0, 341, 0, 0 ], [ 14, 0, 0.8636, 0.3636, 0, 0.66, ...
[ "'''\nCreated on 2011-3-13\n\n@author: Frank F Zhang\n'''", "from django.conf.urls.defaults import patterns, url", "urlpatterns = patterns('aboutfamily.user.views',\n url(r'^login/$', 'user_login', name='user_login'),\n url(r'^register/$', 'user_signup', name='user_signup'),\n)" ]
#coding=utf-8 from django.contrib import admin from django.contrib.auth.models import User, Group from django.contrib.auth.admin import UserAdmin, GroupAdmin from django.utils.translation import ugettext_lazy as _ from aboutfamily.user.models import Profile,Family admin.site.register(Profile) #Extends ...
[ [ 1, 0, 0.1765, 0.0588, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.2353, 0.0588, 0, 0.66, 0.1667, 808, 0, 2, 0, 0, 808, 0, 0 ], [ 1, 0, 0.2941, 0.0588, 0, ...
[ "from django.contrib import admin", "from django.contrib.auth.models import User, Group", "from django.contrib.auth.admin import UserAdmin, GroupAdmin", "from django.utils.translation import ugettext_lazy as _", "from aboutfamily.user.models import Profile,Family", "admin.site.register(Profile)", "admin...
''' Created on 2011-3-13 @author: Frank F Zhang ''' from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib.auth import login, authenticate from django.template import RequestContext from django.shortcuts import render_to_response from django.db import tr...
[ [ 8, 0, 0.0484, 0.0806, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0968, 0.0161, 0, 0.66, 0.0909, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.1129, 0.0161, 0, 0.66...
[ "'''\nCreated on 2011-3-13\n\n@author: Frank F Zhang\n'''", "from django.http import HttpResponseRedirect", "from django.core.urlresolvers import reverse", "from django.contrib.auth import login, authenticate", "from django.template import RequestContext", "from django.shortcuts import render_to_response"...
######################################## # User related constants ######################################## import os.path #AVATAR_STORAGE_PATH defines the relative path where user uploaded avatar will be stored AVATAR_STORAGE_PATH = "userfile/avatar/" #AVATAR_SIZE defines the default size of user's avatar AV...
[ [ 1, 0, 0.25, 0.0625, 0, 0.66, 0, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 14, 0, 0.4375, 0.0625, 0, 0.66, 0.25, 526, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.625, 0.0625, 0, 0.66, ...
[ "import os.path", "AVATAR_STORAGE_PATH = \"userfile/avatar/\"", "AVATAR_SIZE = (100, 100)", "AVATAR_HOLDER_FIlENAME = \"avatar_holder.png\"", "AVATAR_HOLDER = os.path.join(AVATAR_STORAGE_PATH, AVATAR_HOLDER_FIlENAME).replace(\"\\\\\", \"/\")" ]
#!/usr/bin/env python #fish from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll ha...
[ [ 1, 0, 0.25, 0.0833, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5417, 0.5, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.4167, 0.0833, 1, 0.59, 0,...
[ "from django.core.management import execute_manager", "try:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
#!/usr/bin/env python #fish from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll ha...
[ [ 1, 0, 0.25, 0.0833, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5417, 0.5, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.4167, 0.0833, 1, 0.09, 0,...
[ "from django.core.management import execute_manager", "try:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
''' Created on 2011-3-13 @author: Fish ''' from pyDes import * from aboutfamily.familyMember.models import LoginId class EnAndDecrypt(object): ''' classdocs ''' global key def __init__(self): ''' Constructor ''' key = 'crazefish' d...
[ [ 8, 0, 0.0732, 0.122, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1463, 0.0244, 0, 0.66, 0.3333, 276, 0, 1, 0, 0, 276, 0, 0 ], [ 1, 0, 0.1707, 0.0244, 0, 0.66,...
[ "'''\nCreated on 2011-3-13\n\n@author: Fish\n'''", "from pyDes import *", "from aboutfamily.familyMember.models import LoginId", "class EnAndDecrypt(object):\n '''\n classdocs\n '''\n global key \n \n def __init__(self):\n '''", " '''\n classdocs\n '''", " def __init__...
from django.db import models from django.utils.translation import ugettext_lazy as _ from aboutfamily import ENCODING # Create your models here. class LoginId(models.Model): regId = models.AutoField(verbose_name=_("Register ID"),primary_key=True) mail = models.EmailField(verbose_name=_("Email Address")) ...
[ [ 1, 0, 0.0278, 0.0278, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0556, 0.0278, 0, 0.66, 0.2, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.1111, 0.0278, 0, 0.66,...
[ "from django.db import models", "from django.utils.translation import ugettext_lazy as _", "from aboutfamily import ENCODING", "class LoginId(models.Model):\n regId = models.AutoField(verbose_name=_(\"Register ID\"),primary_key=True)\n mail = models.EmailField(verbose_name=_(\"Email Address\"))\n pas...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
[ [ 8, 0, 0.1522, 0.2609, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3478, 0.0435, 0, 0.66, 0.3333, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.5435, 0.2609, 0, 0.66...
[ "\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"", "from django.test import TestCase", "class SimpleTest(TestCase):\n def test_basic_a...
''' Created on 2011-3-12 @author: Ren ''' from aboutfamily.familyMember.models import LoginId from django.contrib import admin class LoginIdAdmin(admin.ModelAdmin): fieldsets=[ (None, {'fields':['mail','password']}) ] list_display = ['mail'] admin.site.regist...
[ [ 8, 0, 0.1875, 0.3125, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4375, 0.0625, 0, 0.66, 0.25, 838, 0, 1, 0, 0, 838, 0, 0 ], [ 1, 0, 0.5, 0.0625, 0, 0.66, ...
[ "'''\nCreated on 2011-3-12\n\n@author: Ren\n'''", "from aboutfamily.familyMember.models import LoginId", "from django.contrib import admin", "class LoginIdAdmin(admin.ModelAdmin):\n fieldsets=[\n (None, {'fields':['mail','password']})\n ]\n list_display = ['mail']", " fi...
# Create your views here.
[]
[]
from django.conf.urls.defaults import patterns, url, include #fish # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^aboutfamily/', include('aboutfamily.foo.urls')), # Uncomment the admin/doc line below to ...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 341, 0, 3, 0, 0, 341, 0, 0 ], [ 1, 0, 0.1818, 0.0455, 0, 0.66, 0.3333, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 8, 0, 0.2273, 0.0455, 0, ...
[ "from django.conf.urls.defaults import patterns, url, include", "from django.contrib import admin", "admin.autodiscover()", "urlpatterns = patterns('',\n # Example:\n # (r'^aboutfamily/', include('aboutfamily.foo.urls')),\n\n # Uncomment the admin/doc line below to enable admin documentation:\n # ...
from django.db import models from django.utils.translation import ugettext_lazy as _ from aboutfamily.user.models import Profile, Family from aboutfamily import ENCODING # Create your models here. class Event(models.Model): topic = models.CharField(max_length=70,verbose_name=_("Event Topic"),blank=False) ini...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.2, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.1667, 0.0417, 0, 0.66,...
[ "from django.db import models", "from django.utils.translation import ugettext_lazy as _", "from aboutfamily.user.models import Profile, Family", "from aboutfamily import ENCODING", "class Event(models.Model):\n topic = models.CharField(max_length=70,verbose_name=_(\"Event Topic\"),blank=False)\n init...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
[ [ 8, 0, 0.1522, 0.2609, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3478, 0.0435, 0, 0.66, 0.3333, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.5435, 0.2609, 0, 0.66...
[ "\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"", "from django.test import TestCase", "class SimpleTest(TestCase):\n def test_basic_a...
''' Created on 2011-3-12 @author: Ren ''' #coding=utf-8 from aboutfamily.eventHandle.models import Event,InvolveParty from django.contrib import admin class EventAdmin(admin.ModelAdmin): fieldsets=[ (None, {'fields':['initiator', 'topic', ...
[ [ 8, 0, 0.12, 0.2, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.28, 0.04, 0, 0.66, 0.1667, 644, 0, 2, 0, 0, 644, 0, 0 ], [ 1, 0, 0.32, 0.04, 0, 0.66, 0.3333,...
[ "'''\nCreated on 2011-3-12\n\n@author: Ren\n'''", "from aboutfamily.eventHandle.models import Event,InvolveParty", "from django.contrib import admin", "class EventAdmin(admin.ModelAdmin):\n fieldsets=[\n (None, {'fields':['initiator',\n 'topic',\n ...
# Create your views here.
[]
[]
# Django settings for aboutfamily project. #fisih import os.path DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. ...
[ [ 1, 0, 0.0291, 0.0097, 0, 0.66, 0, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 14, 0, 0.0485, 0.0097, 0, 0.66, 0.05, 309, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.0583, 0.0097, 0, 0.66...
[ "import os.path", "DEBUG = True", "TEMPLATE_DEBUG = DEBUG", "ADMINS = (\n # ('Your Name', 'your_email@domain.com'),\n)", "MANAGERS = ADMINS", "DATABASES = {\n 'default': {\n 'ENGINE': 'mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'NAME': 'aboutfa...
''' Created on 2011-3-13 @author: Frank F Zhang ''' from django.template import Context, RequestContext from django.shortcuts import render_to_response def index(request): modelMap = {} return render_to_response("index.html.template", modelMap, context_instance=RequestContext(request))
[ [ 8, 0, 0.25, 0.4167, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0833, 0, 0.66, 0.3333, 213, 0, 2, 0, 0, 213, 0, 0 ], [ 1, 0, 0.5833, 0.0833, 0, 0.66, ...
[ "'''\nCreated on 2011-3-13\n\n@author: Frank F Zhang\n'''", "from django.template import Context, RequestContext", "from django.shortcuts import render_to_response", "def index(request):\n modelMap = {}\n return render_to_response(\"index.html.template\",\n modelMap, context_instance=RequestConte...
######################################## # User related constants ######################################## ENCODING="UTF-8"
[ [ 14, 0, 1, 0.25, 0, 0.66, 0, 1, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "ENCODING=\"UTF-8\"" ]
############################################################################# # Documentation # ############################################################################# # Author: Todd Whiteman # Date: 16th March, 2009 # Verion: 2.0.0 # License: Public Domain - free to do as you wish # Homepage...
[ [ 8, 0, 0.0657, 0.0692, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1021, 0.0012, 0, 0.66, 0.1111, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.1056, 0.0012, 0, 0.6...
[ "\"\"\"A pure python implementation of the DES and TRIPLE DES encryption algorithms.\n\nClass initialization\n--------------------\npyDes.des(key, [mode], [IV], [pad], [padmode])\npyDes.triple_des(key, [mode], [IV], [pad], [padmode])\n\nkey -> Bytes containing the encryption key. 8 bytes for DES, 16 or 24 bytes...
##-***************************************************************************** ## ## 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.82, ...
[ "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...
##-***************************************************************************** ## ## 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.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.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.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.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.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.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...
[ [ 1, 0, 0.2984, 0.0081, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.3065, 0.0081, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3145, 0.0081, 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.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.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.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.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.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.0855, 0.0023, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.0878, 0.0023, 0, 0.66, 0.0714, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.0901, 0.0023, 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.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.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.6271, 0.0169, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.6441, 0.0169, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.661, 0.0169, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import os", "import unittest", "import util", "class renderableOnlyTest(unittest.TestCase):\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:\n os.remove(f)...
##-***************************************************************************** ## ## 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.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.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.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.1095, 0.003, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1124, 0.003, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1154, 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) 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.1341, 0.0036, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.1377, 0.0036, 0, 0.66, 0.2, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.1449, 0.0036, 0, 0.6...
[ "from maya import cmds as MayaCmds", "import maya.OpenMaya as OpenMaya", "import os", "import unittest", "import util", "class ColorSetsTest(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...
##-***************************************************************************** ## ## 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.37, 0.01, 0, 0.66, 0, 481, 0, 1, 0, 0, 481, 0, 0 ], [ 1, 0, 0.38, 0.01, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.39, 0.01, 0, 0.66, 0.4, ...
[ "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.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...
##-***************************************************************************** ## ## 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...