code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Zdenko Podobný # Author: Zdenko Podobný # # 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/LIC...
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.75, 0.25, 0, 0.66, 1, ...
[ "import os", "import sys", "import ctypes" ]
#!/usr/bin/python # # Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 14, 0, 0.0557, 0.0033, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0689, 0.0033, 0, 0.66, 0.0333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0721, 0.0033, 0, 0...
[ "__author__ = 'afshar@google.com (Ali Afshar)'", "import os", "import httplib2", "import sessions", "from google.appengine.ext import db", "from google.appengine.ext.webapp import template", "from apiclient.discovery import build_from_document", "from apiclient.http import MediaUpload", "from oauth2...
#!/usr/bin/python # # Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ [ 14, 0, 0.0281, 0.0017, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0347, 0.0017, 0, 0.66, 0.0303, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 0.0364, 0.0017, 0, 0...
[ "__author__ = 'afshar@google.com (Ali Afshar)'", "import sys", "sys.path.insert(0, 'lib')", "import os", "import httplib2", "import sessions", "from google.appengine.ext import webapp", "from google.appengine.ext.webapp.util import run_wsgi_app", "from google.appengine.ext import db", "from google...
#!/usr/bin/env python # Copyright (c) 2010, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this l...
[ [ 8, 0, 0.1818, 0.0267, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2032, 0.0053, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.2219, 0.0107, 0, 0.66, ...
[ "\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"", "__author__ = 'olexiy@google.com (Olexiy Oryeshko)'", "class Error(Exception):\n \"\"\"Thrown If val...
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- # # Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ [ 1, 0, 0.0738, 0.0041, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0779, 0.0041, 0, 0.66, 0.0625, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.082, 0.0041, 0, 0...
[ "import base64", "import hashlib", "import logging", "import time", "from OpenSSL import crypto", "from anyjson import simplejson", "CLOCK_SKEW_SECS = 300 # 5 minutes in seconds", "AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds", "MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds", "cla...
# Copyright 2011 Google Inc. All Rights Reserved. """Multi-credential file store with lock support. This module implements a JSON credential store where multiple credentials can be stored in one file. That file supports locking both in a single process and across processes. The credential themselves are keyed off o...
[ [ 8, 0, 0.0437, 0.0741, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0847, 0.0026, 0, 0.66, 0.0588, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0899, 0.0026, 0, 0.66,...
[ "\"\"\"Multi-credential file store with lock support.\n\nThis module implements a JSON credential store where multiple\ncredentials can be stored in one file. That file supports locking\nboth in a single process and across processes.\n\nThe credential themselves are keyed off of:\n* client_id", "__author__ = 'jb...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.0145, 0.0035, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0176, 0.0009, 0, 0.66, 0.0244, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0193, 0.0009, 0, 0.66,...
[ "\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import base64", "import clientsecrets", "import copy", "import datetime", "import httplib2", "import logging", "import os", "import sys", "im...
# Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1619, 0.0476, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2, 0.0095, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2286, 0.0095, 0, 0.66, ...
[ "\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from anyjson import simplejson", "TYPE_WEB = 'web'", "TYPE_INSTALL...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1604, 0.0472, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1981, 0.0094, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.217, 0.0094, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import os", "import stat", "import threading", "from anyjson import simplejson", "from client import Storage as BaseStorage", "from clien...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1371, 0.0403, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1694, 0.0081, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1855, 0.0081, 0, 0.66,...
[ "\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import oauth2client", "import base64", "import pickle", "from django.db import models", "from oauth2client.client import St...
# Copyright (C) 2007 Joe Gregorio # # Licensed under the MIT License """MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.o...
[ [ 8, 0, 0.0814, 0.1105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1453, 0.0058, 0, 0.66, 0.0833, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1512, 0.0058, 0, 0.66...
[ "\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1", "__v...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1205, 0.1452, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2046, 0.0033, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2112, 0.0033, 0, 0.66, ...
[ "\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", ...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.0342, 0.0083, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0414, 0.0021, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0476, 0.0021, 0, 0.66,...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import copy", "import httplib2", "import logging", "import oauth2 as oauth", "import urllib", "import urlparse", "from anyjson import simplejson", "tr...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1259, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1556, 0.0074, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1704, 0.0074, 0, 0.66, ...
[ "\"\"\"Utilities for Google App Engine\n\nUtilities for making it easier to use the\nGoogle API Client for Python on Google App Engine.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "from google.appengine.ext import db", "from apiclient.oauth import OAuthCredentials", "...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.2619, 0.0635, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3175, 0.0159, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3492, 0.0159, 0, 0.66, ...
[ "\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 1.0 credentials.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import pickle", "import threading", "from apiclient.oauth import Storage as BaseStorage", "class Storage(BaseStorage):\n \"\"\"Store and retr...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 1, 0, 0.2679, 0.0179, 0, 0.66, 0, 629, 0, 1, 0, 0, 629, 0, 0 ], [ 1, 0, 0.2857, 0.0179, 0, 0.66, 0.2, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.3036, 0.0179, 0, 0.6...
[ "import apiclient", "import base64", "import pickle", "from django.db import models", "class OAuthCredentialsField(models.Field):\n\n __metaclass__ = models.SubfieldBase\n\n def db_type(self):\n return 'VARCHAR'\n\n def to_python(self, value):", " __metaclass__ = models.SubfieldBase", " def db_t...
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ [ 8, 0, 0.0519, 0.0182, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0649, 0.0026, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0701, 0.0026, 0, 0.66,...
[ "\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "import...
#!/usr/bin/python2.4 # # Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ [ 8, 0, 0.1545, 0.0407, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.187, 0.0081, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2114, 0.0081, 0, 0.66, ...
[ "\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "from oauth2client.anyjson import simplejson", "class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass", " \"\"\"Base...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
[ [ 8, 0, 0.0318, 0.0545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0636, 0.0091, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0727, 0.0091, 0, 0.66...
[ "\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"", "__author__ = \"Joe Gregorio (joe@bitworking.org)\"", "__copyright__ = \"Copyright 2006, Joe Gregorio\"", "__contributors__ = []", "__version__ = \"1.0.0\"", "__license__ = \"MIT\"", "__history__ = \"\"\"\n\"\"\"", "import urlparse", "escape_...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0365, 0.0708, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.0845, 0.0205, 0, 0.66, 0.04, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0982, 0.0023, 0, 0.66, ...
[ "\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ...
import Cookie import datetime import time import email.utils import calendar import base64 import hashlib import hmac import re import logging # Ripped from the Tornado Framework's web.py # http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09 # # Tornado is licensed under the Apache Licen...
[ [ 1, 0, 0.006, 0.006, 0, 0.66, 0, 32, 0, 1, 0, 0, 32, 0, 0 ], [ 1, 0, 0.0119, 0.006, 0, 0.66, 0.1, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0179, 0.006, 0, 0.66, ...
[ "import Cookie", "import datetime", "import time", "import email.utils", "import calendar", "import base64", "import hashlib", "import hmac", "import re", "import logging", "class LilCookies:\n\n @staticmethod\n def _utf8(s):\n if isinstance(s, unicode):\n return s.encode(\"utf-8\")\n ...
# This is the version of this source code. manual_verstr = "1.5" auto_build_num = "211" verstr = manual_verstr + "." + auto_build_num try: from pyutil.version_class import Version as pyutil_Version __version__ = pyutil_Version(verstr) except (ImportError, ValueError): # Maybe there is no pyutil insta...
[ [ 14, 0, 0.1667, 0.0556, 0, 0.66, 0, 189, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3889, 0.0556, 0, 0.66, 0.3333, 295, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.6111, 0.0556, 0, 0...
[ "manual_verstr = \"1.5\"", "auto_build_num = \"211\"", "verstr = manual_verstr + \".\" + auto_build_num", "try:\n from pyutil.version_class import Version as pyutil_Version\n __version__ = pyutil_Version(verstr)\nexcept (ImportError, ValueError):\n # Maybe there is no pyutil installed.\n from dist...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
[ [ 8, 0, 0.2927, 0.561, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6098, 0.0244, 0, 0.66, 0.25, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.6341, 0.0244, 0, 0.66, ...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
[ [ 8, 0, 0.3, 0.575, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.625, 0.025, 0, 0.66, 0.3333, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.65, 0.025, 0, 0.66, 0.6...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including withou...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
[ [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, 0.66, 0.0833, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 14, 0, 0.0408, 0.0068, 0, ...
[ "import re", "import urllib", "RESERVED = \":/?#[]@!$&'()*+,;=\"", "OPERATOR = \"+./;?|!@\"", "EXPLODE = \"*+\"", "MODIFIER = \":^\"", "TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)", "VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])...
#==================================================================== # 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...
#!/usr/bin/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style commen...
[ [ 1, 0, 0.0816, 0.0102, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1224, 0.0102, 0, 0.66, 0.0714, 792, 6, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1531, 0.0102, 0, ...
[ "import os, re, mimetypes, sys", "SOURCE = sys.argv[1:]", "COMMENT_BLOCK = re.compile(r\"(/\\*.+?\\*/)\", re.MULTILINE | re.DOTALL)", "COMMENT_LICENSE = re.compile(r\"(license)\", re.IGNORECASE)", "COMMENT_COPYRIGHT = re.compile(r\"(copyright)\", re.IGNORECASE)", "EXCLUDE_TYPES = [\n \"application/xml\...
#==================================================================== # 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...
import random import md5 from django.db import models from ft_auth.models import OAuthAccessToken STATUS_CODES = { 1 : 'In Queue (%s ahead of you)', 2 : 'Initial Processing', 3 : 'Importing into Fusion Tables', 4 : 'Complete', 6 : 'Error' } class shapeUpload(models.Model): """An upload -- includes location ...
[ [ 1, 0, 0.0204, 0.0204, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0408, 0.0204, 0, 0.66, 0.2, 604, 0, 1, 0, 0, 604, 0, 0 ], [ 1, 0, 0.0816, 0.0204, 0, 0.6...
[ "import random", "import md5", "from django.db import models", "from ft_auth.models import OAuthAccessToken", "STATUS_CODES = {\n 1 : 'In Queue (%s ahead of you)',\n 2 : 'Initial Processing',\n 3 : 'Importing into Fusion Tables',\n 4 : 'Complete',\n 6 : 'Error'\n}", "class shapeUpload(models.Model):\n \"...
#!/usr/bin/env python # # Copyright 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 ...
[ [ 1, 0, 0.64, 0.04, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.68, 0.04, 0, 0.66, 0.5, 547, 0, 1, 0, 0, 547, 0, 0 ], [ 14, 0, 0.88, 0.28, 0, 0.66, 1, ...
[ "from django.conf.urls.defaults import *", "from views import *", "urlpatterns = patterns('',\n\n (r'^upload/$', generic_import),\n url(r'^uploads/(?P<upload_ids>[a-gA-F\\d]*)/$', upload_detail, name=\"upload_detail\"),\n (r'^$', static, {'template':'index.html'}),\n\n)" ]
from django.conf import settings from django.conf.urls.defaults import * from django.contrib import databrowse from django.contrib import admin admin.autodiscover() #from shapeft.custom_admin import editor #from registration.views import register urlpatterns = patterns('', (r'^_admin_/', include(admin.site.url...
[ [ 1, 0, 0.0357, 0.0357, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0714, 0.0357, 0, 0.66, 0.2, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.1429, 0.0357, 0, 0.6...
[ "from django.conf import settings", "from django.conf.urls.defaults import *", "from django.contrib import databrowse", "from django.contrib import admin", "admin.autodiscover()", "urlpatterns = patterns('',\n (r'^_admin_/', include(admin.site.urls)),\n# (r'^editor/(.*)', editor.root),\n (r'^data...
from django import forms from django.contrib.auth.models import User class ContactForm(forms.Form): name = forms.CharField(max_length=100, help_text="Full Name", widget=forms.TextInput(attrs={'size':'40'}),required=False) subject = forms.CharField(max_length=100, help_text="Subject of ...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0.5, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 3, 0, 0.6333, 0.8, 0, 0.66, ...
[ "from django import forms", "from django.contrib.auth.models import User", "class ContactForm(forms.Form):\n name = forms.CharField(max_length=100,\n help_text=\"Full Name\", widget=forms.TextInput(attrs={'size':'40'}),required=False)\n subject = forms.CharField(max_length=100,\n he...
from django.conf.urls.defaults import * from views import * urlpatterns = patterns('', (r'^', contact), (r'^thanks/$', static, {'template':'contact_thanks.html'}), )
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.25, 0.125, 0, 0.66, 0.5, 547, 0, 1, 0, 0, 547, 0, 0 ], [ 14, 0, 0.6875, 0.5, 0, 0.66, ...
[ "from django.conf.urls.defaults import *", "from views import *", "urlpatterns = patterns('',\n (r'^', contact),\n (r'^thanks/$', static, {'template':'contact_thanks.html'}),\n)" ]
#r!/usr/bin/env python # # Copyright 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...
[ [ 1, 0, 0.3333, 0.0196, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.3529, 0.0196, 0, 0.66, 0.2, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.3725, 0.0196, 0, 0.6...
[ "from django.conf import settings", "from django.shortcuts import render_to_response", "from django.http import HttpResponseRedirect", "from forms import *", "def static(request, template):\n return render_to_response(template, RequestContext(request,{}))", " return render_to_response(template, RequestC...
#!/usr/bin/env python # # Copyright 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 ...
[ [ 1, 0, 0.4146, 0.0244, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.439, 0.0244, 0, 0.66, 0.3333, 886, 0, 1, 0, 0, 886, 0, 0 ], [ 3, 0, 0.622, 0.2439, 0, 0.66...
[ "from django.db import models", "from django.contrib.gis.geos import Point", "class OAuthRequestToken(models.Model):\n \"\"\"OAuth Request Token.\"\"\"\n session_key = models.CharField(max_length=250)\n ft_token = models.CharField(max_length=250)\n ft_token_secret = models.CharField(max_length=250)\...
#!/usr/bin/env python # # Copyright 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 ...
[ [ 1, 0, 0.68, 0.04, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.72, 0.04, 0, 0.66, 0.5, 547, 0, 2, 0, 0, 547, 0, 0 ], [ 14, 0, 0.9, 0.24, 0, 0.66, 1, ...
[ "from django.conf.urls.defaults import *", "from views import FTVerify, FTAuthenticate", "urlpatterns = patterns('',\n\n (r'^FTVerify/$', FTVerify),\n (r'^FTAuthenticate/$', FTAuthenticate),\n\n)" ]
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 1, 0, 0.1356, 0.0085, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1441, 0.0085, 0, 0.66, 0.0588, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1525, 0.0085, 0, ...
[ "import os", "import random", "from datetime import datetime", "from django.conf import settings", "from django.shortcuts import render_to_response, get_object_or_404", "from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden, Http404", "from django.template import RequestConte...
#!/usr/bin/env python 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 have to ...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5, 0.5455, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.3636, 0.0909, 1, 0.75, ...
[ "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/python2.6 # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
[ [ 8, 0, 0.0841, 0.0047, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0935, 0.0047, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1028, 0.0047, 0, 0.66,...
[ "\"\"\"Build the ScriptCover Extension.\"\"\"", "__author__ = 'ekamenskaya@google.com (Ekaterina Kamenskaya)'", "import logging", "import optparse", "import os", "import shutil", "import subprocess", "import urllib", "import zipfile", "CHECKOUT_CLOSURE_COMMAND = ('svn checkout http://closure-libra...
"""Convert Wavefront OBJ / MTL files into Three.js (JSON model version, to be used with web worker based ascii / binary loader) ------------------------- How to use this converter ------------------------- python convert_obj_three.py -i infile.obj -o outfile.js [-m "morphfiles*.obj"] [-c "morphcolors*.obj"] [-a cente...
[ [ 8, 0, 0.0406, 0.0806, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0819, 0.0006, 0, 0.66, 0.0125, 286, 0, 1, 0, 0, 286, 0, 0 ], [ 1, 0, 0.0825, 0.0006, 0, 0.66...
[ "\"\"\"Convert Wavefront OBJ / MTL files into Three.js (JSON model version, to be used with web worker based ascii / binary loader)\n\n-------------------------\nHow to use this converter\n-------------------------\n\npython convert_obj_three.py -i infile.obj -o outfile.js [-m \"morphfiles*.obj\"] [-c \"morphcolors...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
[ [ 8, 0, 0.0386, 0.0063, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0441, 0.0016, 0, 0.66, 0.05, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0457, 0.0016, 0, 0.66, ...
[ "\"\"\"\nBlender importer for Three.js (ASCII JSON format).\n\n\"\"\"", "import os", "import time", "import json", "import bpy", "import mathutils", "from mathutils.geometry import tesselate_polygon", "from io_utils import load_image, unpack_list, unpack_face_list", "def setColor(c, t):\n c.r = t...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
[ [ 8, 0, 0.0157, 0.0049, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0191, 0.0006, 0, 0.66, 0.0101, 573, 0, 1, 0, 0, 573, 0, 0 ], [ 1, 0, 0.0197, 0.0006, 0, 0.66...
[ "\"\"\"\nBlender exporter for Three.js (ASCII JSON format).\n\nTODO\n - export scene\n - copy used images to folder where exported file goes\n - binary format\n\"\"\"", "import bpy", "import mathutils", "import os", "import os.path", "import math", "import operator", "import random", "DEFAU...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
[ [ 4, 0, 0.0794, 0.0167, 0, 0.66, 0, 0, 0, 0, 0, 0, 0, 0, 5 ], [ 1, 1, 0.0752, 0.0028, 1, 0.37, 0, 201, 0, 1, 0, 0, 201, 0, 0 ], [ 4, 1, 0.0794, 0.0056, 1, 0.37, ...
[ "if \"bpy\" in locals():\n import imp\n if \"export_threejs\" in locals():\n imp.reload(export_threejs)\n if \"import_threejs\" in locals():\n imp.reload(import_threejs)", " import imp", " if \"export_threejs\" in locals():\n imp.reload(export_threejs)", " imp.reload...
#!/usr/bin/env python import os import tempfile files = [ 'js/Error.js', 'js/lib/Logger.js', 'js/lib/Stats.js', 'js/lib/gui.min.js', 'js/lib/color.js', 'js/lib/js-signals.min.js', 'js/lib/Tween.js', 'js/lib/ThreeWebGL.js', 'js/lib/ThreeExtras.js', 'js/lib/LoadingBar.js', 'js/lib/RequestAnimationFrame.js', 'js/lib...
[ [ 1, 0, 0.0233, 0.0078, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.031, 0.0078, 0, 0.66, 0.1111, 516, 0, 1, 0, 0, 516, 0, 0 ], [ 14, 0, 0.4729, 0.8605, 0, ...
[ "import os", "import tempfile", "files = [\n\n'js/Error.js',\n\n'js/lib/Logger.js',\n'js/lib/Stats.js',\n'js/lib/gui.min.js',\n'js/lib/color.js',", "string = ''", "for item in files:\n\tsrc_file = open('../deploy/' + item,'r')\n\tstring += src_file.read() + \"\\n\"", "\tsrc_file = open('../deploy/' + item...
#!/usr/bin/env python # lame_tagger.py - A POS tagger based on Hidden Markov Model (using HMMTK) # Written by Yuchen Zhang # Dec, 2012 import sys import pickle import math from hmmpytk import hmm_faster INF = float('inf') # infinity !!! NEG_INF = float('-inf') M_LN2 = 0.69314718055994530942 letters = [chr(x) for x...
[ [ 1, 0, 0.0171, 0.0028, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0199, 0.0028, 0, 0.66, 0.0625, 848, 0, 1, 0, 0, 848, 0, 0 ], [ 1, 0, 0.0228, 0.0028, 0, ...
[ "import sys", "import pickle", "import math", "from hmmpytk import hmm_faster", "INF = float('inf') # infinity !!!", "NEG_INF = float('-inf')", "M_LN2 = 0.69314718055994530942", "letters = [chr(x) for x in xrange(ord('a'), ord('z') + 1)]", "def ln(value):\n if (value == 0.0):\n return N...
# hmmpytk/hmm_faster.py - HMM (Hidden Markov Model) implementation written in Python # Yuchen Zhang (yuchenz@cs.cmu.edu) # Version history: # # Dec 31, 2012, 0.2.0 - Big improvements in speed # Dec 28, 2012, 0.1.1 - Added support for training on multiple instances # Dec 27, 2012, 0.1.0 - initial version # # You may ...
[ [ 1, 0, 0.0177, 0.0016, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0194, 0.0016, 0, 0.66, 0.2, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.021, 0.0016, 0, 0.66...
[ "import sys", "import math", "import random", "import copy", "import pickle", "class HMM:\n INF = float('inf') # infinity !!!\n NEG_INF = float('-inf')\n M_LN2 = 0.69314718055994530942\n \n # constructor supplies state list and observation list \n def __init__(self, states = None, obs...
#!/usr/bin/env python import sys from array import array import random import time import hmm_faster import math M_LN2 = 0.69314718055994530942 def log_add(left, right): if (right < left): return left + math.log1p(math.exp(right - left)) elif (right > left): return right + math.log1p(math.exp(...
[ [ 1, 0, 0.0147, 0.0074, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0221, 0.0074, 0, 0.66, 0.1, 80, 0, 1, 0, 0, 80, 0, 0 ], [ 1, 0, 0.0294, 0.0074, 0, 0.66,...
[ "import sys", "from array import array", "import random", "import time", "import hmm_faster", "import math", "M_LN2 = 0.69314718055994530942", "def log_add(left, right):\n if (right < left):\n return left + math.log1p(math.exp(right - left))\n elif (right > left):\n return right + ...
# hmmtk/hmm.py - HMM (Hidden Markov Model) implementation written in Python # First version author: Yuchen Zhang (yuchenz@cs.cmu.edu) # Version history: # # Dec 28, 2012, 0.1.1 - Added support for training on multiple instances # Dec 27, 2012, 0.1.0 - initial version # # *** THIS PACKAGE IS OBSOLETE, PLEASE USE THE ...
[ [ 1, 0, 0.0158, 0.0016, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0174, 0.0016, 0, 0.66, 0.2, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.019, 0.0016, 0, 0.66...
[ "import sys", "import math", "import random", "import copy", "import pickle", "class HMM:\n INF = float('inf') # infinity !!!\n NEG_INF = float('-inf')\n M_LN2 = 0.69314718055994530942\n \n # constructor supplies state list and observation list \n def __init__(self, states = None, obs...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.3125, 0.0208, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3542, 0.0208, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3958, 0.0208, 0, 0.66, ...
[ "\"\"\"Main package for URL routing and the index page.\"\"\"", "__author__ = 'Sean Lip'", "import feconf", "from core.controllers import cron", "from core.platform import models", "transaction_services = models.Registry.import_transaction_services()", "import webapp2", "from webapp2_extras.routes imp...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.1532, 0.009, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1712, 0.009, 0, 0.66, 0.1429, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1982, 0.009, 0, 0.66, ...
[ "\"\"\"Provides memcache services.\"\"\"", "__author__ = 'Sean Lip'", "from core import counters", "from google.appengine.api import memcache", "def get_multi(keys):\n \"\"\"Looks up a list of keys in memcache.\n\n Args:\n - keys: a list of keys (strings) to look up.\n\n Returns:\n A dict...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.1405, 0.0083, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.157, 0.0083, 0, 0.66, 0.1429, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1736, 0.0083, 0, 0.66, ...
[ "\"\"\"Interface for storage model switching.\"\"\"", "__author__ = 'Sean Lip'", "import feconf", "import utils", "NAMES = utils.create_enum(\n 'base_model', 'config', 'exploration', 'file', 'job', 'statistics', 'user',\n 'feedback')", "class _Platform(object):\n @classmethod\n def import_mode...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.1954, 0.0115, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2184, 0.0115, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2529, 0.0115, 0, 0.66,...
[ "\"\"\"Provides a seam for user-related services.\"\"\"", "__author__ = 'Sean Lip'", "import utils", "from google.appengine.api import users", "from google.appengine.ext import ndb", "def create_login_url(slug):\n \"\"\"Creates a login url.\"\"\"\n return users.create_login_url(slug)", " \"\"\"...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.4722, 0.0278, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5278, 0.0278, 0, 0.66, 0.25, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.6111, 0.0278, 0, 0.66, ...
[ "\"\"\"Provides a seam for transaction services.\"\"\"", "__author__ = 'Sean Lip'", "from google.appengine.ext import ndb", "def run_in_transaction(fn, *args, **kwargs):\n \"\"\"Run a function in a transaction.\"\"\"\n return ndb.transaction(\n lambda: fn(*args, **kwargs),\n xg=True,\n ...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.5312, 0.0312, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5938, 0.0312, 0, 0.66, 0.25, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.6875, 0.0312, 0, 0.66, ...
[ "\"\"\"Provides a seam for taskqueue-related operations.\"\"\"", "__author__ = 'Sean Lip'", "from google.appengine.ext import deferred", "def defer(fn, *args, **kwargs):\n \"\"\"Adds a new task to the deferred queue.\"\"\"\n deferred.defer(fn, *args, **kwargs)", " \"\"\"Adds a new task to the defer...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.3864, 0.0227, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4318, 0.0227, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.4773, 0.0227, 0, 0.66, ...
[ "\"\"\"Job registries.\"\"\"", "__author__ = 'Sean Lip'", "from core.domain import stats_jobs", "ONE_OFF_JOB_MANAGERS = []", "ALL_CONTINUOUS_COMPUTATION_MANAGERS = [stats_jobs.StatisticsAggregator]", "class ContinuousComputationEventDispatcher(object):\n \"\"\"Dispatches events to the relevant Continuo...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.0208, 0.0012, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0232, 0.0012, 0, 0.66, 0.0256, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0256, 0.0012, 0, 0.66,...
[ "\"\"\"Tests for long running jobs and continuous computations.\"\"\"", "__author__ = 'Sean Lip'", "import ast", "import time", "from core import jobs", "from core import jobs_registry", "from core.domain import event_services", "from core.domain import exp_domain", "from core.domain import exp_serv...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.0156, 0.0009, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0174, 0.0009, 0, 0.66, 0.0227, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0192, 0.0009, 0, 0.66,...
[ "\"\"\"Common classes and methods for managing long running jobs.\"\"\"", "__author__ = 'Sean Lip'", "import ast", "import copy", "import datetime", "import logging", "import traceback", "import utils", "from core.platform import models", "(base_models, job_models,) = models.Registry.import_models...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.1119, 0.0075, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1269, 0.0075, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1418, 0.0075, 0, 0.66, ...
[ "\"\"\"Tests for the profile page.\"\"\"", "__author__ = 'Sean Lip'", "from core.tests import test_utils", "import feconf", "class EditorPrerequisitesTest(test_utils.GenericTestBase):\n\n def test_redirect_to_prerequisites_page_happens(self):\n self.login('editor@example.com')\n\n response ...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0579, 0.0039, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0656, 0.0039, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0734, 0.0039, 0, 0.66, ...
[ "\"\"\"Tests for the page that allows learners to play through an exploration.\"\"\"", "__author__ = 'Sean Lip'", "from core.domain import config_services", "from core.domain import exp_domain", "from core.domain import exp_services", "from core.domain import rights_manager", "from core.tests import tes...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.4054, 0.027, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4595, 0.027, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.5135, 0.027, 0, 0.66, 0...
[ "\"\"\"Controllers for miscellaneous services.\"\"\"", "__author__ = 'Tarashish Mishra'", "import base64", "import json", "from core.controllers import base", "class FileReadHandler(base.BaseHandler):\n \"\"\"Returns a base64-encoded ascii string with uploaded file's content.\"\"\"\n\n def post(self...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0219, 0.0015, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0248, 0.0015, 0, 0.66, 0.0833, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0277, 0.0015, 0, 0.66,...
[ "\"\"\"Tests for the gallery pages.\"\"\"", "__author__ = 'Sean Lip'", "from core.controllers import galleries", "from core.domain import config_services", "from core.domain import exp_services", "from core.domain import rights_manager", "from core.tests import test_utils", "import feconf", "CAN_EDI...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.1456, 0.0097, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.165, 0.0097, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1845, 0.0097, 0, 0.66, ...
[ "\"\"\"Controllers for Oppia resources (templates, images).\"\"\"", "__author__ = 'sll@google.com (Sean Lip)'", "import logging", "import mimetypes", "import urllib", "from core.controllers import base", "from core.domain import fs_domain", "from core.domain import obj_services", "from core.domain i...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.2941, 0.0196, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3333, 0.0196, 0, 0.66, 0.1667, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3725, 0.0196, 0, 0.66,...
[ "\"\"\"Controllers for the moderator page.\"\"\"", "__author__ = 'yanamal@google.com (Yana Malysheva)'", "import logging", "from core.controllers import base", "from core.domain import user_services", "class ModeratorPage(base.BaseHandler):\n \"\"\"The moderator page.\"\"\"\n\n PAGE_NAME_FOR_CSRF = ...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0882, 0.0059, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1, 0.0059, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1118, 0.0059, 0, 0.66, 0...
[ "\"\"\"Tests for the admin page.\"\"\"", "__author__ = 'Sean Lip'", "from core.controllers import editor", "from core.controllers import pages", "from core.domain import config_domain", "from core.tests import test_utils", "ADMIN_EMAIL = 'admin@example.com'", "BOTH_MODERATOR_AND_ADMIN_EMAIL = 'moderat...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.1724, 0.0115, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1954, 0.0115, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2184, 0.0115, 0, 0.66,...
[ "\"\"\"Controllers for the splash page and user dashboard.\"\"\"", "__author__ = 'sll@google.com (Sean Lip)'", "from core.controllers import base", "from core.controllers import pages", "from core.domain import config_domain", "from core.domain import exp_services", "from core.domain import user_service...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.5, 0.0333, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5667, 0.0333, 0, 0.66, 0.25, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.6333, 0.0333, 0, 0.66, ...
[ "\"\"\"Tests for various static pages (like About, Contact, etc.).\"\"\"", "__author__ = 'Sean Lip'", "from core.tests import test_utils", "import feconf", "class NoninteractivePagesTest(test_utils.GenericTestBase):\n\n def test_about_page(self):\n \"\"\"Test the About page.\"\"\"\n respons...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.2239, 0.0149, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2537, 0.0149, 0, 0.66, 0.1667, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2836, 0.0149, 0, 0.66,...
[ "\"\"\"Controllers for interactive and non-interactive widgets.\"\"\"", "__author__ = 'sll@google.com (Sean Lip)'", "import collections", "from core.controllers import base", "from core.domain import widget_registry", "class WidgetRepositoryHandler(base.BaseHandler):\n \"\"\"Populates the widget reposi...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.1364, 0.0091, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1545, 0.0091, 0, 0.66, 0.1429, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1727, 0.0091, 0, 0.66,...
[ "\"\"\"Controllers for the feedback thread page.\"\"\"", "__author__ = 'kashida@google.com (Koji Ashida)'", "from core.controllers import base", "from core.domain import feedback_services", "class ThreadListHandler(base.BaseHandler):\n \"\"\"Handles operations relating to feedback thread lists.\"\"\"\n\n...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.0846, 0.005, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0945, 0.005, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1045, 0.005, 0, 0.66, ...
[ "\"\"\"Tests for generic controller behavior.\"\"\"", "__author__ = 'Sean Lip'", "import copy", "import feconf", "import re", "import types", "from core.controllers import base", "from core.tests import test_utils", "import main", "import webapp2", "import webtest", "class BaseHandlerTest(test...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.283, 0.0189, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3208, 0.0189, 0, 0.66, 0.25, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3774, 0.0189, 0, 0.66, ...
[ "\"\"\"Controllers for queries relating to recent commits.\"\"\"", "__author__ = 'sll@google.com (Sean Lip)'", "from core.controllers import base", "from core.domain import exp_services", "class RecentCommitsHandler(base.BaseHandler):\n \"\"\"Returns a list of recent commits.\"\"\"\n\n # TODO(sll): Ac...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0802, 0.0053, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0909, 0.0053, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1016, 0.0053, 0, 0.66, ...
[ "\"\"\"Tests for the home page (i.e. the splash page and user dashboard).\"\"\"", "__author__ = 'Sean Lip'", "from core.domain import rights_manager", "from core.tests import test_utils", "class HomePageTest(test_utils.GenericTestBase):\n\n def test_logged_out_homepage(self):\n \"\"\"Test the logg...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0202, 0.0013, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0229, 0.0013, 0, 0.66, 0.0526, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0256, 0.0013, 0, 0.66,...
[ "\"\"\"Tests for the exploration editor page.\"\"\"", "__author__ = 'Sean Lip'", "import os", "import StringIO", "import zipfile", "from core.domain import config_services", "from core.domain import exp_domain", "from core.domain import exp_services", "from core.domain import stats_domain", "from ...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0332, 0.0022, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0376, 0.0022, 0, 0.66, 0.0294, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.042, 0.0022, 0, 0.66, ...
[ "\"\"\"Base constants and handlers.\"\"\"", "__author__ = 'Sean Lip'", "import base64", "import datetime", "import hmac", "import json", "import logging", "import os", "import sys", "import time", "import traceback", "import urllib", "from core import counters", "from core.domain import co...
# coding: utf-8 # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ [ 8, 0, 0.0242, 0.0014, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.027, 0.0014, 0, 0.66, 0.0233, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0299, 0.0014, 0, 0.66, ...
[ "\"\"\"Controllers for the editor view.\"\"\"", "__author__ = 'sll@google.com (Sean Lip)'", "import imghdr", "import logging", "from core.controllers import base", "from core.domain import config_domain", "from core.domain import dependency_registry", "from core.domain import event_services", "from ...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.0493, 0.0029, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0551, 0.0029, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0609, 0.0029, 0, 0.66, ...
[ "\"\"\"Tests for the feedback controllers.\"\"\"", "__author__ = 'Sean Lip'", "from core.domain import exp_domain", "from core.domain import exp_services", "from core.domain import rights_manager", "from core.tests import test_utils", "import feconf", "EXPECTED_THREAD_KEYS = [\n 'status', 'original...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.1974, 0.0132, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2237, 0.0132, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.25, 0.0132, 0, 0.66, ...
[ "\"\"\"Controllers for simple, mostly-static pages (like About, Contact, etc.).\"\"\"", "__author__ = 'sll@google.com (Sean Lip)'", "from core.controllers import base", "from core.controllers import editor", "from core.domain import config_domain", "from core.domain import exp_services", "from core.doma...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.1056, 0.007, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1197, 0.007, 0, 0.66, 0.1667, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1338, 0.007, 0, 0.66, ...
[ "\"\"\"Tests for Oppia resource handling (e.g. templates, images).\"\"\"", "__author__ = 'Sean Lip'", "import os", "from core.domain import exp_services", "from core.tests import test_utils", "import feconf", "class ImageHandlerTest(test_utils.GenericTestBase):\n\n EDITOR_EMAIL = 'editor@example.com'...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.8824, 0.0588, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\"Controllers for the cron jobs.\"\"\"" ]
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0453, 0.003, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0514, 0.003, 0, 0.66, 0.0526, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0574, 0.003, 0, 0.66, ...
[ "\"\"\"Controllers for the Oppia learner view.\"\"\"", "__author__ = 'Sean Lip'", "from core.controllers import base", "from core.domain import dependency_registry", "from core.domain import event_services", "from core.domain import exp_services", "from core.domain import feedback_services", "from cor...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.2632, 0.0175, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2982, 0.0175, 0, 0.66, 0.3333, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3333, 0.0175, 0, 0.66,...
[ "\"\"\"Tests for the moderator page.\"\"\"", "__author__ = 'Yana Malysheva'", "from core.tests import test_utils", "class ModeratorTest(test_utils.GenericTestBase):\n\n def test_moderator_page(self):\n \"\"\"Tests access to the Moderator page\"\"\"\n # Try accessing the moderator page without...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0538, 0.0036, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0609, 0.0036, 0, 0.66, 0.0417, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0681, 0.0036, 0, 0.66,...
[ "\"\"\"Controllers for the gallery pages.\"\"\"", "__author__ = 'sll@google.com (Sean Lip)'", "import collections", "from core.controllers import base", "from core.domain import config_domain", "from core.domain import exp_domain", "from core.domain import exp_services", "from core.domain import right...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0658, 0.0044, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0746, 0.0044, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0833, 0.0044, 0, 0.66,...
[ "\"\"\"Controllers for the admin view.\"\"\"", "__author__ = 'sll@google.com (Sean Lip)'", "import logging", "from core import counters", "from core import jobs", "from core import jobs_registry", "from core.controllers import base", "from core.controllers import editor", "from core.domain import co...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.1154, 0.0077, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1308, 0.0077, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1462, 0.0077, 0, 0.66,...
[ "\"\"\"Controllers for the profile page.\"\"\"", "__author__ = 'sfederwisch@google.com (Stephanie Federwisch)'", "from core.controllers import base", "from core.domain import config_domain", "from core.domain import exp_services", "from core.domain import user_services", "import feconf", "import utils...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0557, 0.0306, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0752, 0.0028, 0, 0.66, 0.0417, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0808, 0.0028, 0, 0.66,...
[ "\"\"\"Performance test for the Oppia reader view.\n\nBefore running this script, exploration 0 should be loaded in the target\nserver.\n\nRun this script from the Oppia root directory:\n\n python core/tests/reader_view_load_test.py --thread_count=5 --start_uid=1 \\", "__author__ = 'Sean Lip (sll@google.com)'"...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.1638, 0.0776, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2155, 0.0086, 0, 0.66, 0.0625, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2328, 0.0086, 0, 0.66,...
[ "\"\"\"Oppia test suite.\n\nIn general, this script should not be run directly. Instead, invoke\nit from the command line by running\n\n bash scripts/test.sh\n\nfrom the oppia/ root folder.", "__author__ = 'Sean Lip'", "import argparse", "import os", "import sys", "import unittest", "CURR_DIR = os.pa...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.1789, 0.0105, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2, 0.0105, 0, 0.66, 0.0714, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.3789, 0.3053, 0, 0.66, ...
[ "\"\"\"Services for performance counters.\"\"\"", "__author__ = 'Sean Lip'", "class PerfCounter(object):\n \"\"\"Generic in-process numeric counter; not aggregated across instances.\"\"\"\n # TODO(sll): Add aggregation across instances.\n\n def __init__(self, name, description):\n if name in Reg...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0735, 0.0049, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0833, 0.0049, 0, 0.66, 0.0588, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.098, 0.0049, 0, 0.66, ...
[ "\"\"\"Domain objects for configuration properties.\"\"\"", "__author__ = 'Sean Lip'", "from core.domain import obj_services", "from core.domain import user_services", "from core.platform import models", "(config_models,) = models.Registry.import_models([models.NAMES.config])", "memcache_services = mode...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.2787, 0.0164, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3115, 0.0164, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3443, 0.0164, 0, 0.66, ...
[ "\"\"\"Tests for parameter domain objects.\"\"\"", "__author__ = 'Sean Lip'", "from core.domain import param_domain", "import test_utils", "import utils", "class ParameterDomainUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for parameter domain objects.\"\"\"\n\n def test_param_change_class(se...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.0702, 0.0041, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0785, 0.0041, 0, 0.66, 0.04, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0868, 0.0041, 0, 0.66, ...
[ "\"\"\"Services for user data.\"\"\"", "__author__ = 'Stephanie Federwisch'", "import datetime", "import logging", "import re", "from core.platform import models", "current_user_services = models.Registry.import_current_user_services()", "(user_models,) = models.Registry.import_models([models.NAMES.us...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.0418, 0.0025, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0467, 0.0025, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0516, 0.0025, 0, 0.66,...
[ "\"\"\"Classes relating to widgets.\"\"\"", "__author__ = 'Sean Lip'", "import copy", "import logging", "import os", "from core.domain import obj_services", "from core.domain import rule_domain", "import feconf", "import jinja_utils", "import utils", "import json", "class AnswerHandler(object)...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.2698, 0.0159, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3016, 0.0159, 0, 0.66, 0.1429, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.3333, 0.0159, 0, 0.66,...
[ "\"\"\"Registry for JavaScript library dependencies.\"\"\"", "__author__ = 'Sean Lip'", "import itertools", "import os", "from extensions.dependencies import dependencies_config", "import feconf", "import utils", "class Registry(object):\n \"\"\"Registry of all JS/CSS library dependencies.\"\"\"\n\...
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ [ 8, 0, 0.0843, 0.0056, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0955, 0.0056, 0, 0.66, 0.0909, 809, 0, 1, 0, 0, 809, 0, 0 ], [ 1, 0, 0.1067, 0.0056, 0, 0.66...
[ "\"\"\"Jobs for statistics views.\"\"\"", "import ast", "from core import jobs", "from core.domain import stats_services", "from core.platform import models", "(base_models, stats_models,) = models.Registry.import_models([\n models.NAMES.base_model, models.NAMES.statistics])", "transaction_services =...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.027, 0.0016, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0302, 0.0016, 0, 0.66, 0.0227, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.035, 0.0016, 0, 0.66, ...
[ "\"\"\"Domain objects and functions that manage rights for various user actions.\"\"\"", "__author__ = 'Sean Lip'", "import logging", "from core.domain import config_domain", "from core.domain import exp_domain", "from core.domain import user_services", "from core.platform import models", "current_use...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.0219, 0.0077, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0274, 0.0011, 0, 0.66, 0.0192, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0295, 0.0011, 0, 0.66,...
[ "\"\"\"Commands that can be used to operate on explorations.\n\nAll functions here should be agnostic of how ExplorationModel objects are\nstored in the database. In particular, the various query methods should\ndelegate to the Exploration model class. This will enable the exploration\nstorage model to be changed w...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.1318, 0.0078, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1473, 0.0078, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1628, 0.0078, 0, 0.66, ...
[ "\"\"\"Classes relating to parameters.\"\"\"", "__author__ = 'Sean Lip'", "import feconf", "import re", "import utils", "from core.domain import obj_services", "from core.domain import value_generators_domain", "class ParamSpec(object):\n \"\"\"Value object for an exploration parameter specificatio...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.1149, 0.0068, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1284, 0.0068, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1419, 0.0068, 0, 0.66, ...
[ "\"\"\"Tests for filesystem-related domain objects.\"\"\"", "__author__ = 'Sean Lip'", "import os", "from core.domain import fs_domain", "import feconf", "import test_utils", "class ExplorationFileSystemUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for the datastore-backed exploration file sys...