code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
# 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.0559,
0.0033,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0625,
0.0033,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0691,
0.0033,
0,
0.66,... | [
"\"\"\"Domain objects representing a file system and a file stream.\"\"\"",
"__author__ = 'Sean Lip'",
"import logging",
"import os",
"from core.platform import models",
"(file_models,) = models.Registry.import_models([\n models.NAMES.file\n])",
"import feconf",
"import utils",
"CHANGE_LIST_SAVE ... |
# 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.2,
0.0133,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2267,
0.0133,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2533,
0.0133,
0,
0.66,
... | [
"\"\"\"Service methods for typed instances.\"\"\"",
"__author__ = 'Sean Lip'",
"import copy",
"import inspect",
"from extensions.objects.models import objects",
"class Registry(object):\n \"\"\"Registry of all objects.\"\"\"\n\n # Dict mapping object class names to their classes.\n objects_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... | [
[
14,
0,
0.0548,
0.0032,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0613,
0.0032,
0,
0.66,
0.0769,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0645,
0.0032,
0,
0... | [
"__author__ = 'Jeremy Emerson'",
"import os",
"import re",
"import string",
"from core.domain import dependency_registry",
"from core.domain import obj_services",
"from core.domain import widget_domain",
"from core.domain import widget_registry",
"import feconf",
"import test_utils",
"import uti... |
# 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.1043,
0.0061,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1166,
0.0061,
0,
0.66,
0.0625,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1288,
0.0061,
0,
0.66,... | [
"\"\"\"Services for exploration-related statistics.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import exp_domain",
"from core.domain import exp_services",
"from core.domain import stats_domain",
"from core.platform import models",
"(stats_models,) = models.Registry.import_models([models.NAMES.... |
# 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.1453,
0.0085,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1624,
0.0085,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1795,
0.0085,
0,
0.66,
... | [
"\"\"\"Tests for JavaScript library dependencies.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import dependency_registry",
"from core.domain import exp_services",
"from core.domain import widget_registry",
"from core.tests import test_utils",
"import feconf",
"class DependencyRegistryTests(te... |
# 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.1478,
0.0087,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1652,
0.0087,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1826,
0.0087,
0,
0.66,... | [
"\"\"\"Classes relating to value generators.\"\"\"",
"__author__ = 'Sean Lip'",
"import copy",
"import inspect",
"import os",
"import pkgutil",
"import feconf",
"import utils",
"class BaseValueGenerator(object):\n \"\"\"Base value generator class.\n\n A value generator is a class containing a ... |
# 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.2361,
0.0139,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2639,
0.0139,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2917,
0.0139,
0,
0.66,
... | [
"\"\"\"Provides services for HTML skins for the reader view.\"\"\"",
"__author__ = 'Sean Lip'",
"import copy",
"import inspect",
"from extensions.skins import skin_classes",
"class Registry(object):\n \"\"\"Registry of all skins.\"\"\"\n\n # Dict mapping skin ids to their classes.\n _skins_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.1049,
0.0062,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1173,
0.0062,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1296,
0.0062,
0,
0.66,... | [
"\"\"\"Widget registry class.\"\"\"",
"__author__ = 'Sean Lip'",
"import pkgutil",
"from core.domain import dependency_registry",
"import feconf",
"import utils",
"class Registry(object):\n \"\"\"Registry of all widgets.\"\"\"\n\n # The keys of these dicts are the widget ids and the values are ins... |
# 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.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3585,
0.0189,
0,
0.66,
... | [
"\"\"\"Tests for feedback-related services.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import feedback_services",
"from core.platform import models",
"(feedback_models,) = models.Registry.import_models([models.NAMES.feedback])",
"import test_utils",
"class FeedbackServicesUnitTests(test_utils.... |
# 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.1371,
0.0081,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1532,
0.0081,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1694,
0.0081,
0,
0.66,
... | [
"\"\"\"Domain object for statistics models.\"\"\"",
"__author__ = 'Sean Lip'",
"import copy",
"import operator",
"import re",
"from core.platform import models",
"(stats_models,) = models.Registry.import_models([models.NAMES.statistics])",
"class StateCounter(object):\n \"\"\"Domain object that kee... |
# 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.0523,
0.0035,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0592,
0.0035,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0662,
0.0035,
0,
0.66,... | [
"\"\"\"Tests for classes and methods relating to user rights.\"\"\"",
"__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",
"import feconf",
"import test_utils",
"c... |
# 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.0977,
0.0057,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1092,
0.0057,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1207,
0.0057,
0,
0.66,... | [
"\"\"\"Classes for handling events.\"\"\"",
"__author__ = 'Sean Lip'",
"import inspect",
"from core import jobs_registry",
"from core.domain import exp_domain",
"from core.platform import models",
"(stats_models,) = models.Registry.import_models([models.NAMES.statistics])",
"taskqueue_services = model... |
# 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... | [
[
14,
0,
0.1532,
0.009,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1712,
0.009,
0,
0.66,
0.25,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.1892,
0.009,
0,
0.66,
... | [
"__author__ = 'Stephanie Federwisch'",
"from core.domain import user_services",
"import test_utils",
"import utils",
"class UserServicesUnitTests(test_utils.GenericTestBase):\n \"\"\"Test the user services methods.\"\"\"\n\n def test_set_and_get_username(self):\n user_id = 'someUser'\n u... |
# 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.1667,
0.0098,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1863,
0.0098,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2059,
0.0098,
0,
0.66,
... | [
"\"\"\"Tests for the HTML sanitizer.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import html_cleaner",
"import test_utils",
"class HtmlCleanerUnitTests(test_utils.GenericTestBase):\n \"\"\"Test the HTML sanitizer.\"\"\"\n\n def setUp(self):\n super(HtmlCleanerUnitTests, self).setUp()\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.34,
0.02,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.38,
0.02,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.42,
0.02,
0,
0.66,
0.2857,... | [
"\"\"\"Tests for event handling.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import event_services",
"from core.tests import test_utils",
"from google.appengine.ext import ndb",
"class NumbersModel(ndb.Model):\n number = ndb.IntegerProperty()",
" number = ndb.IntegerProperty()",
"class ... |
# 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.4048,
0.0238,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4524,
0.0238,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5,
0.0238,
0,
0.66,
... | [
"\"\"\"Tests for methods in the widget registry.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import widget_registry",
"import test_utils",
"class WidgetRegistryTests(test_utils.GenericTestBase):\n \"\"\"Tests for the widget registry.\"\"\"\n\n def test_deduplication_of_dependency_ids(self):\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... | [
[
14,
0,
0.4857,
0.0286,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5429,
0.0286,
0,
0.66,
0.3333,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.5714,
0.0286,
0,
0... | [
"__author__ = 'Sean Lip'",
"from core.domain import value_generators_domain",
"import test_utils",
"class ValueGeneratorsUnitTests(test_utils.GenericTestBase):\n \"\"\"Test the value generator registry.\"\"\"\n\n def test_value_generator_registry(self):\n COPIER_ID = 'Copier'\n\n copier = ... |
# 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.2273,
0.0152,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2576,
0.0152,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2879,
0.0152,
0,
0.66,... | [
"\"\"\"Tests for services relating to typed objects.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import obj_services",
"from extensions.objects.models import objects",
"import test_utils",
"class ObjectRegistryUnitTests(test_utils.GenericTestBase):\n \"\"\"Test the Registry class in obj_servic... |
# 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.1589,
0.0093,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1776,
0.0093,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1963,
0.0093,
0,
0.66,... | [
"\"\"\"Tests for rule objects.\"\"\"",
"__author__ = 'Sean Lip'",
"import inspect",
"import os",
"import pkgutil",
"from core.domain import rule_domain",
"from extensions.objects.models import objects",
"import feconf",
"import test_utils",
"class FakeRule(rule_domain.Rule):\n subject_type = ob... |
# 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.125,
0.0074,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1397,
0.0074,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1544,
0.0074,
0,
0.66,
... | [
"\"\"\"Commands for feedback thread and message operations.\"\"\"",
"__author__ = 'Koji Ashida'",
"from core.domain import user_services",
"from core.platform import models",
"(feedback_models,) = models.Registry.import_models([models.NAMES.feedback])",
"import feconf",
"import utils",
"def get_thread... |
# 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.2125,
0.0125,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2375,
0.0125,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2625,
0.0125,
0,
0.66,... | [
"\"\"\"HTML sanitizing service.\"\"\"",
"__author__ = 'Sean Lip'",
"import bleach",
"from core.domain import widget_registry",
"import feconf",
"import logging",
"import urlparse",
"def filter_a(name, value):\n if name in ('title', 'target'):\n return True\n if name == 'href':\n ur... |
# 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.2381,
0.0159,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2698,
0.0159,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3175,
0.0159,
0,
0.66,... | [
"\"\"\"Services for configuration properties.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import config_domain",
"from core.domain import obj_services",
"from core.platform import models",
"(config_models,) = models.Registry.import_models([models.NAMES.config])",
"memcache_services = models.Reg... |
# 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.0543,
0.0032,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0607,
0.0032,
0,
0.66,
0.0526,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0671,
0.0032,
0,
0.66,... | [
"\"\"\"Classes relating to rules.\"\"\"",
"__author__ = 'Sean Lip'",
"import inspect",
"import os",
"import pkgutil",
"from extensions.objects.models import objects",
"import feconf",
"import jinja_utils",
"AND_RULE_TYPE = 'and_rule'",
"OR_RULE_TYPE = 'or_rule'",
"NOT_RULE_TYPE = 'not_rule'",
... |
# 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.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4773,
0.0227,
0,
0.66,
... | [
"\"\"\"Tests for skin services.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import skins_services",
"import test_utils",
"class DefaultSkinsUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for the default skins.\"\"\"\n\n def test_get_all_skin_ids(self):\n self.assertEqual(\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... | [
[
14,
0,
0.0117,
0.0007,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0131,
0.0007,
0,
0.66,
0.0345,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0138,
0.0007,
0,
0... | [
"__author__ = 'Sean Lip'",
"import datetime",
"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 fs_domain",
"from core.domain import param_domain",
"f... |
# 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.0312,
0.0018,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0349,
0.0018,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0386,
0.0018,
0,
0.66,... | [
"\"\"\"Tests for exploration domain objects and methods defined on them.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.domain import exp_domain",
"from core.domain import param_domain",
"from core.tests import test_utils",
"import feconf",
"import utils",
"class ExplorationDomainUnitTests(test_utils.G... |
# 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... | [
[
14,
0,
0.0443,
0.0026,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0495,
0.0026,
0,
0.66,
0.0833,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0521,
0.0026,
0,
0... | [
"__author__ = 'Jeremy Emerson'",
"from core.domain import event_services",
"from core.domain import exp_domain",
"from core.domain import exp_services",
"from core.domain import rule_domain",
"from core.domain import stats_domain",
"from core.domain import stats_services",
"from core.tests import test... |
# 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... | [
[
14,
0,
0.0802,
0.0047,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0896,
0.0047,
0,
0.66,
0.125,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0943,
0.0047,
0,
0.... | [
"__author__ = 'Sean Lip'",
"from core.domain import exp_domain",
"from core.domain import exp_services",
"from core.domain import event_services",
"from core.domain import stats_domain",
"from core.domain import stats_services",
"from core.tests import test_utils",
"class StateCounterUnitTests(test_ut... |
# 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... | [
[
14,
0,
0.081,
0.0048,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
8,
0,
0.0905,
0.0048,
0,
0.66,
0.0833,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1,
0.0048,
0,
0.66,
... | [
"__author__ = 'Stephanie Federwisch'",
"\"\"\"Tests for statistics continuous computations.\"\"\"",
"import datetime",
"from core import jobs_registry",
"from core.domain import event_services",
"from core.domain import stats_jobs",
"from core.platform import models",
"(job_models, stats_models,) = mo... |
# 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... | [
[
14,
0,
0.2125,
0.0125,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2375,
0.0125,
0,
0.66,
0.1667,
768,
0,
1,
0,
0,
768,
0,
0
],
[
14,
0,
0.2562,
0.025,
0,
0... | [
"__author__ = 'Sean Lip'",
"from core.platform import models",
"(base_models,) = models.Registry.import_models([\n models.NAMES.base_model])",
"import feconf",
"import test_utils",
"import unittest",
"class BaseModelUnitTests(test_utils.GenericTestBase):\n \"\"\"Test the generic base model.\"\"\"\... |
# 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.0346,
0.0023,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0392,
0.0023,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0438,
0.0023,
0,
0.66,... | [
"\"\"\"Base model class.\"\"\"",
"__author__ = 'Sean Lip'",
"from core.platform import models",
"transaction_services = models.Registry.import_transaction_services()",
"import feconf",
"import utils",
"from google.appengine.datastore import datastore_query",
"from google.appengine.ext import ndb",
"... |
# 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.1269,
0.0075,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1418,
0.0075,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1567,
0.0075,
0,
0.66,... | [
"\"\"\"Models relating to the per-exploration file system.\"\"\"",
"__author__ = 'Sean Lip'",
"import os",
"import core.storage.base_model.gae_models as base_models",
"from google.appengine.ext import ndb",
"import utils",
"QUERY_LIMIT = 1000",
"class FileMetadataSnapshotMetadataModel(base_models.Base... |
# 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.0842,
0.005,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0941,
0.005,
0,
0.66,
0.0714,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.104,
0.005,
0,
0.66,
... | [
"\"\"\"Models for Oppia feedback threads and messages.\"\"\"",
"__author__ = 'Koji Ashida'",
"from core.platform import models",
"(base_models,) = models.Registry.import_models([models.NAMES.base_model])",
"import utils",
"from google.appengine.ext import ndb",
"STATUS_CHOICES_OPEN = 'open'",
"STATUS_... |
# 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.1156,
0.0068,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1293,
0.0068,
0,
0.66,
0.0588,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1429,
0.0068,
0,
0.66,... | [
"\"\"\"Models for long-running jobs.\"\"\"",
"__author__ = 'Sean Lip'",
"import random",
"from core.platform import models",
"(base_models,) = models.Registry.import_models([models.NAMES.base_model])",
"import utils",
"from google.appengine.ext import ndb",
"STATUS_CODE_NEW = 'new'",
"STATUS_CODE_QU... |
# 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.0443,
0.0026,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0495,
0.0026,
0,
0.66,
0.0556,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0547,
0.0026,
0,
0.66,... | [
"\"\"\"Models for Oppia statistics.\"\"\"",
"__author__ = 'Sean Lip'",
"import datetime",
"import feconf",
"import logging",
"from core.platform import models",
"(base_models,) = models.Registry.import_models([models.NAMES.base_model])",
"import utils",
"from google.appengine.ext import ndb",
"QUE... |
# 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.0484,
0.0028,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0541,
0.0028,
0,
0.66,
0.0625,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0598,
0.0028,
0,
0.66,... | [
"\"\"\"Model for an Oppia exploration.\"\"\"",
"__author__ = 'Sean Lip'",
"import core.storage.base_model.gae_models as base_models",
"import core.storage.user.gae_models as user_models",
"import feconf",
"from google.appengine.ext import ndb",
"QUERY_LIMIT = 100",
"EXPLORATION_STATUS_PRIVATE = 'priva... |
# 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.3269,
0.0192,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3654,
0.0192,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4038,
0.0192,
0,
0.66,
... | [
"\"\"\"Models for Oppia users.\"\"\"",
"__author__ = 'Stephanie Federwisch'",
"from core.platform import models",
"(base_models,) = models.Registry.import_models([models.NAMES.base_model])",
"from google.appengine.ext import ndb",
"class UserSettingsModel(base_models.BaseModel):\n \"\"\"Settings and pr... |
# 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.3469,
0.0204,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3878,
0.0204,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4286,
0.0204,
0,
0.66,... | [
"\"\"\"Models relating to configuration properties.\"\"\"",
"__author__ = 'Sean Lip'",
"import core.storage.base_model.gae_models as base_models",
"from google.appengine.ext import ndb",
"class ConfigPropertySnapshotMetadataModel(\n base_models.BaseSnapshotMetadataModel):\n \"\"\"Storage model for... |
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | [
[
8,
0,
0.1049,
0.007,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1189,
0.007,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1329,
0.007,
0,
0.66,
... | [
"\"\"\"Module for implementing question tags.\"\"\"",
"__author__ = 'sll@google.com (Sean Lip)'",
"import os",
"import jinja2",
"from common import jinja_utils",
"from common import schema_fields",
"from common import tags",
"from controllers import lessons",
"from models import custom_modules",
"... |
# 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.1619,
0.1151,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2302,
0.0072,
0,
0.66,
0.0323,
325,
0,
1,
0,
0,
325,
0,
0
],
[
1,
0,
0.2374,
0.0072,
0,
0.66... | [
"\"\"\"Deployment script for building new integration releases.\n\nTHIS SCRIPT SHOULD ONLY BE RUN BY MEMBERS OF THE DEVELOPMENT TEAM.\n\nEach run of the script creates a new versioned directory containing code that\ncan be used to integrate Oppia explorations with other platforms.\n\nThis script should be run 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.038,
0.0025,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.043,
0.0025,
0,
0.66,
0.0233,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0481,
0.0025,
0,
0.66,
... | [
"\"\"\"Common utility functions.\"\"\"",
"__author__ = 'sll@google.com (Sean Lip)'",
"import base64",
"import datetime",
"import hashlib",
"import json",
"import os",
"import random",
"import re",
"import StringIO",
"import time",
"import unicodedata",
"import urllib",
"import urlparse",
... |
# 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.0481,
0.0032,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0545,
0.0032,
0,
0.66,
0.0263,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0609,
0.0032,
0,
0.66,... | [
"\"\"\"URL routing definitions, and some basic error/warmup handlers.\"\"\"",
"__author__ = 'Sean Lip'",
"import feconf",
"import logging",
"from core import jobs_registry",
"from core.controllers import admin",
"from core.controllers import base",
"from core.controllers import editor",
"from core.c... |
# 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.061,
0.0335,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0823,
0.003,
0,
0.66,
0.0435,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0884,
0.003,
0,
0.66,
... | [
"\"\"\"Utility functions for managing schemas and schema-based validation.\n\nA schema is a way to specify the type of an object. For example, one might\nwant to require that an object is an integer, or that it is a dict with two\nkeys named 'abc' and 'def', each with values that are unicode strings. This\nfile con... |
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | [
[
8,
0,
0.1049,
0.007,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1189,
0.007,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1329,
0.007,
0,
0.66,
... | [
"\"\"\"Module for implementing question tags.\"\"\"",
"__author__ = 'sll@google.com (Sean Lip)'",
"import os",
"import jinja2",
"from common import jinja_utils",
"from common import schema_fields",
"from common import tags",
"from controllers import lessons",
"from models import custom_modules",
"... |
# 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.0623,
0.0037,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0696,
0.0037,
0,
0.66,
0.0123,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0806,
0.0037,
0,
0.6... | [
"\"\"\"Stores various configuration options and constants for Oppia.\"\"\"",
"import os",
"DEBUG = False",
"PLATFORM = 'gae'",
"if PLATFORM == 'gae':\n DEV_MODE = (\n not os.environ.get('SERVER_SOFTWARE')\n or os.environ['SERVER_SOFTWARE'].startswith('Development'))\nelse:\n raise Except... |
# 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.1782,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2701,
0.0057,
0,
0.66,
0.037,
325,
0,
1,
0,
0,
325,
0,
0
],
[
1,
0,
0.2759,
0.0057,
0,
0.66,... | [
"\"\"\"Deployment script for Oppia.\n\nUSE THIS SCRIPT AT YOUR OWN RISK! A safe option is to modify app.yaml manually\nand run the 'appcfg.py update' command.\n\nThis script performs a deployment of Oppia to a Google App Engine appspot\ninstance. It creates a build with unnecessary files removed, which is saved\nin... |
# 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.3571,
0.0238,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.4048,
0.0238,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
2,
0,
0.5119,
0.0952,
0,
0.66,
... | [
"\"\"\"Common utility functions and classes used by multiple Python scripts.\"\"\"",
"import os",
"def ensure_directory_exists(d):\n \"\"\"Creates the given directory if it does not already exist.\"\"\"\n if not os.path.exists(d):\n os.makedirs(d)",
" \"\"\"Creates the given directory if it do... |
# 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.1685,
0.0112,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.191,
0.0112,
0,
0.66,
0.0625,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.2022,
0.0112,
0,
0.66,... | [
"\"\"\"Build file for production version of Oppia. Minifies JS and CSS.\"\"\"",
"import os",
"import re",
"import shutil",
"import subprocess",
"HEAD_DIR = 'core/templates/dev/head/'",
"OUT_DIR = 'core/templates/prod/head/'",
"REMOVE_WS = re.compile(r'\\s{2,}').sub",
"def _minify(source_path, target... |
# 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.1271,
0.0085,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1441,
0.0085,
0,
0.66,
0.0909,
739,
0,
1,
0,
0,
739,
0,
0
],
[
1,
0,
0.1525,
0.0085,
0,
0.66... | [
"\"\"\"Jinja-related utilities.\"\"\"",
"import copy",
"import logging",
"import os",
"import math",
"import jinja2",
"from jinja2 import meta",
"import json",
"class JinjaConfig(object):\n \"\"\"Contains Jinja configuration properties.\"\"\"\n\n def _js_string_filter(value):\n \"\"\"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 requi... | [
[
14,
0,
0.1049,
0.0062,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1173,
0.0062,
0,
0.66,
0.3333,
329,
0,
1,
0,
0,
329,
0,
0
],
[
1,
0,
0.1235,
0.0062,
0,
0... | [
"__author__ = 'Jeremy Emerson'",
"import test_utils",
"import utils",
"class UtilsTests(test_utils.GenericTestBase):\n \"\"\"Test the core utility methods.\"\"\"\n\n def test_create_enum_method(self):\n \"\"\"Test create_enum method.\"\"\"\n o = utils.create_enum('first', 'second', 'third'... |
# 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... | [
[
14,
0,
0.0739,
0.0043,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0826,
0.0043,
0,
0.66,
0.25,
789,
0,
1,
0,
0,
789,
0,
0
],
[
1,
0,
0.087,
0.0043,
0,
0.66... | [
"__author__ = 'Sean Lip'",
"import schema_utils",
"import test_utils",
"class SchemaValidationUnitTests(test_utils.GenericTestBase):\n \"\"\"Test validation of schemas.\"\"\"\n\n def test_schemas_are_correctly_validated(self):\n INVALID_SCHEMAS = [\n ['type'],\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.0569,
0.0033,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0635,
0.0033,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0702,
0.0033,
0,
0.66,... | [
"\"\"\"Tests for typed object classes (mostly normalization).\"\"\"",
"__author__ = 'Sean Lip'",
"import inspect",
"from extensions.objects.models import objects",
"import schema_utils",
"import test_utils",
"class ObjectNormalizationUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests normalization ... |
# 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.0334,
0.002,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0373,
0.002,
0,
0.66,
0.0312,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0413,
0.002,
0,
0.66,
... | [
"\"\"\"Classes for interpreting typed objects in Oppia.\"\"\"",
"__author__ = 'Sean Lip'",
"import base64",
"import copy",
"import os",
"import StringIO",
"import tarfile",
"import feconf",
"import schema_utils",
"import utils",
"class BaseObject(object):\n \"\"\"Base object class.\n\n Thi... |
# 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.2208,
0.013,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2468,
0.013,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2727,
0.013,
0,
0.66,
... | [
"\"\"\"Classes corresponding to skins for the learner view.\"\"\"",
"__author__ = 'Sean Lip'",
"import feconf",
"import jinja_utils",
"import jinja2",
"DEFAULT_ENTRY_POINT_PATH = 'player.html'",
"class BaseSkin(object):\n \"\"\"Base skin class.\n\n This is the superclass for all skin classes.\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.4474,
0.0263,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.5,
0.0263,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5526,
0.0263,
0,
0.66,
... | [
"\"\"\"Tests for classification of 2D coordinates.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import coord_two_dim",
"import test_utils",
"class CoordTwoDimRuleUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for rules operating on CoordTwoDim objects.\"\"\"\n\n def test_within_rule... |
# 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.2073,
0.0122,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2317,
0.0122,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2561,
0.0122,
0,
0.66,... | [
"\"\"\"Rules for Reals.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import base",
"class Equals(base.RealRule):\n description = 'is equal to {{x|Real}}'\n is_generic = False\n\n def _evaluate(self, subject):\n return subject == self.x",
" description = 'is equal to {{x|Real}... |
# coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | [
[
8,
0,
0.1518,
0.0089,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1696,
0.0089,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1875,
0.0089,
0,
0.66,... | [
"\"\"\"Rules for MusicPhrase objects.\"\"\"",
"__author__ = 'Michael Wagner'",
"from extensions.rules import base",
"NOTE_MAP = {'C4': 60, 'D4': 62, 'E4': 64, 'F4': 65, 'G4': 67, 'A4': 69,\n 'B4': 71, 'C5': 72, 'D5': 74, 'E5': 76, 'F5': 77, 'G5': 79,\n 'A5': 81}",
"def _get_midi_note_v... |
# 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.5667,
0.0333,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6333,
0.0333,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.7,
0.0333,
0,
0.66,
... | [
"\"\"\"Tests for classification of NonnegativeInts.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import nonnegative_int",
"import test_utils",
"class NonnegativeIntUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for rules operating on NonnegativeInt objects.\"\"\"\n\n def test_equals... |
# 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.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3443,
0.0164,
0,
0.66,
... | [
"\"\"\"Tests for classification of NormalizedStrings.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import normalized_string",
"import test_utils",
"class NormalizedStringRuleUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for rules operating on NormalizedString objects.\"\"\"\n\n def... |
# 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.2208,
0.013,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2468,
0.013,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2727,
0.013,
0,
0.66,
... | [
"\"\"\"Rules for SetOfUnicodeString objects.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import base",
"class Equals(base.SetOfUnicodeStringRule):\n description = 'is equal to {{x|SetOfUnicodeString}}'\n is_generic = False\n\n def _evaluate(self, subject):\n return set(subject) =... |
# 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.2329,
0.0137,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2603,
0.0137,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2877,
0.0137,
0,
0.66,... | [
"\"\"\"Rules for NormalizedStrings.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import base",
"class Equals(base.NormalizedStringRule):\n description = 'is equal to {{x|NormalizedString}}'\n is_generic = False\n\n def _evaluate(self, subject):\n return subject.lower() == self.x.l... |
# 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.0934,
0.0055,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1044,
0.0055,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1154,
0.0055,
0,
0.66,
... | [
"\"\"\"Tests for classification of MusicNotes.\"\"\"",
"__author__ = 'Michael Wagner'",
"from extensions.rules import music_phrase",
"import test_utils",
"class MusicPhraseRuleUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for rules operating on MusicPhrase objects.\"\"\"\n\n def test_equals_rul... |
# 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.2656,
0.0156,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2969,
0.0156,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3281,
0.0156,
0,
0.66,
... | [
"\"\"\"Rules for UnicodeString.\"\"\"",
"__author__ = 'Tarashish Mishra'",
"import base64",
"from extensions.rules import base",
"class Equals(base.UnicodeStringRule):\n description = 'is equal to {{x|UnicodeString}}'\n is_generic = False\n\n def _evaluate(self, subject):\n return subject.lo... |
# 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.2537,
0.0149,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2836,
0.0149,
0,
0.66,
0.1667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3134,
0.0149,
0,
0.66,... | [
"\"\"\"Tests for classification of UnicodeStrings.\"\"\"",
"__author__ = 'Tarashish Mishra'",
"import base64",
"import unittest",
"from core.domain import fs_domain",
"from extensions.rules import unicode_string",
"class UnicodeStringRuleUnitTests(unittest.TestCase):\n \"\"\"Tests for rules operating... |
# 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.3148,
0.0185,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3519,
0.0185,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3889,
0.0185,
0,
0.66,
... | [
"\"\"\"Tests for classification of CodeEvaluation.\"\"\"",
"__author__ = 'Koji Ashida'",
"from extensions.rules import code_evaluation",
"import test_utils",
"class CodeEvaluationRuleUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for rules operating on CodeEvaluation objects.\"\"\"\n\n def test_... |
# 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.2833,
0.0167,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3167,
0.0167,
0,
0.66,
0.0833,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.3333,
0.0167,
0,
0.66... | [
"\"\"\"Base rules.\"\"\"",
"from core.domain import rule_domain",
"from extensions.objects.models import objects",
"class CodeEvaluationRule(rule_domain.Rule):\n subject_type = objects.CodeEvaluation",
" subject_type = objects.CodeEvaluation",
"class CoordTwoDimRule(rule_domain.Rule):\n subject_t... |
# 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.1371,
0.0081,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1532,
0.0081,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1694,
0.0081,
0,
0.66,... | [
"\"\"\"Tests for classification of TarFileStrings.\"\"\"",
"__author__ = 'Tarashish Mishra'",
"import base64",
"import os",
"import unittest",
"from core.domain import fs_domain",
"from extensions.rules import tar_file_string",
"import utils",
"TEST_DATA_DIR = os.path.join('extensions', 'rules', 'te... |
# 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.2073,
0.0122,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2317,
0.0122,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2561,
0.0122,
0,
0.66,
... | [
"\"\"\"Tests for classification of real numbers.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import real",
"import test_utils",
"class RealRuleUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for rules operating on Real objects.\"\"\"\n\n def test_equals_rule(self):\n self.ass... |
# 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.4359,
0.0256,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4872,
0.0256,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5385,
0.0256,
0,
0.66,
... | [
"\"\"\"Rules for CoordTwoDim objects.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import base",
"class Within(base.CoordTwoDimRule):\n description = 'is within {{d|Real}} of {{p|CoordTwoDim}}'\n is_generic = False\n\n def _evaluate(self, subject):\n dx = subject[0] - self.p[0]\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.1604,
0.0094,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1792,
0.0094,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1981,
0.0094,
0,
0.66,
... | [
"\"\"\"Rules for TarFileString.\"\"\"",
"__author__ = 'Tarashish Mishra'",
"from extensions.rules import base",
"class ChecksWrapperDirName(base.TarFileStringRule):\n description = 'does not have a wrapper directory named {{x|UnicodeString}}'\n is_generic = True\n\n def _evaluate(self, subject):\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.191,
0.0112,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2135,
0.0112,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.236,
0.0112,
0,
0.66,
... | [
"\"\"\"Tests for classification of SetOfUnicodeString objects.\"\"\"",
"__author__ = 'Sean Lip'",
"import extensions.rules.set_of_unicode_string as set_rules",
"import test_utils",
"class SetOfUnicodeStringRuleUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for rules operating on SetOfUnicodeString ... |
# 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.5862,
0.0345,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6552,
0.0345,
0,
0.66,
0.3333,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.7241,
0.0345,
0,
0.66,... | [
"\"\"\"Rules for NonnegativeInts.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.rules import base",
"class Equals(base.NonnegativeIntRule):\n description = 'is equal to {{x|NonnegativeInt}}'\n is_generic = False\n\n def _evaluate(self, subject):\n return subject == self.x",
" descri... |
# 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.3778,
0.0222,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4222,
0.0222,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4667,
0.0222,
0,
0.66,
... | [
"\"\"\"Rules for CheckedProof objects.\"\"\"",
"__author__ = 'Jacob Davis'",
"from extensions.rules import base",
"class Correct(base.CheckedProofRule):\n description = 'is correct'\n is_generic = False\n\n def _evaluate(self, subject):\n return subject.get('correct')",
" description = 'i... |
# 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.2297,
0.0135,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2568,
0.0135,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2838,
0.0135,
0,
0.66,
... | [
"\"\"\"Tests for classification of CheckedProof.\"\"\"",
"__author__ = 'Jacob Davis'",
"from extensions.rules import checked_proof",
"import test_utils",
"class CheckedProofRuleUnitTests(test_utils.GenericTestBase):\n \"\"\"Tests for rules operating on CheckedProof objects.\"\"\"\n\n correct_example =... |
# 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.4146,
0.0244,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4634,
0.0244,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5122,
0.0244,
0,
0.66,
... | [
"\"\"\"Rules for CodeEvaluation objects.\"\"\"",
"__author__ = 'Koji Ashida'",
"from extensions.rules import base",
"class OutputEquals(base.CodeEvaluationRule):\n description = (\n 'has output equal to {{x|NormalizedString}} (collapsing spaces)')\n is_generic = False\n\n def _evaluate(self, s... |
# 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.5667,
0.0333,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6333,
0.0333,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.9,
0.2333,
0,
0.66,
... | [
"\"\"\"Configuration for JavaScript library dependencies.\"\"\"",
"__author__ = 'Sean Lip'",
"DEPENDENCIES_TO_ANGULAR_MODULES_DICT = {\n 'codemirror': ['ui.codemirror'],\n 'google_maps': ['ui.map'],\n 'jsrepl': [],\n 'logic_proof': [],\n 'midijs': [],\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.2297,
0.0135,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2568,
0.0135,
0,
0.66,
0.25,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2838,
0.0135,
0,
0.66,
... | [
"\"\"\"Tests for value generators.\"\"\"",
"__author__ = 'Sean Lip'",
"from extensions.value_generators.models import generators",
"import test_utils",
"class ValueGeneratorUnitTests(test_utils.GenericTestBase):\n \"\"\"Test that value generators work correctly.\"\"\"\n\n def test_copier(self):\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.1491,
0.0088,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1667,
0.0088,
0,
0.66,
0.1111,
739,
0,
1,
0,
0,
739,
0,
0
],
[
1,
0,
0.1754,
0.0088,
0,
0.66... | [
"\"\"\"Custom value generator classes.\"\"\"",
"import copy",
"import numbers",
"from core.domain import value_generators_domain",
"import jinja_utils",
"import utils",
"class Copier(value_generators_domain.BaseValueGenerator):\n \"\"\"Returns a copy of the input value.\"\"\"\n\n default_value = '... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class Tabs(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a widg... | [
[
1,
0,
0.0143,
0.0143,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0286,
0.0143,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5357,
0.9429,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class Tabs(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n This c... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class Collapsible(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents... | [
[
1,
0,
0.0137,
0.0137,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0274,
0.0137,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5342,
0.9452,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class Collapsible(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n ... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class Image(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a wid... | [
[
1,
0,
0.0161,
0.0161,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0323,
0.0161,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5403,
0.9355,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class Image(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n This ... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class Video(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a wid... | [
[
1,
0,
0.0111,
0.0111,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0222,
0.0111,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5278,
0.9556,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class Video(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n This ... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class Link(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a widg... | [
[
1,
0,
0.0149,
0.0149,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0299,
0.0149,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5373,
0.9403,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class Link(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n This c... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class Math(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a widg... | [
[
1,
0,
0.0167,
0.0167,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0333,
0.0167,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5417,
0.9333,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class Math(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n This c... |
from core.domain import widget_domain
class NumericInput(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a widget, whose id is the name of the class. It is
a... | [
[
1,
0,
0.0244,
0.0244,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
3,
0,
0.5488,
0.9268,
0,
0.66,
1,
269,
0,
0,
0,
0,
434,
0,
0
],
[
8,
1,
0.2073,
0.1951,
1,
0.69,... | [
"from core.domain import widget_domain",
"class NumericInput(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n This class represents a widget, whose id is the name of the c... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class SetInput(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a ... | [
[
1,
0,
0.0167,
0.0167,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0333,
0.0167,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5417,
0.9333,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class SetInput(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n Th... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class InteractiveMap(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represe... | [
[
1,
0,
0.0137,
0.0137,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0274,
0.0137,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5342,
0.9452,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class InteractiveMap(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class CodeRepl(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a ... | [
[
1,
0,
0.011,
0.011,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.022,
0.011,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5275,
0.956,
0,
0.66,
... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class CodeRepl(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n Th... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class MusicNotesInput(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class repres... | [
[
1,
0,
0.0196,
0.0196,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0392,
0.0196,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.549,
0.9216,
0,
0.66... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class MusicNotesInput(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\... |
from core.domain import widget_domain
class TarFileReadInput(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a widget, whose id is the name of the class. It is
... | [
[
1,
0,
0.025,
0.025,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
3,
0,
0.55,
0.925,
0,
0.66,
1,
877,
0,
0,
0,
0,
434,
0,
0
],
[
8,
1,
0.2125,
0.2,
1,
0.22,
0,
... | [
"from core.domain import widget_domain",
"class TarFileReadInput(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n This class represents a widget, whose id is the name of t... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class MultipleChoiceInput(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class re... | [
[
1,
0,
0.0196,
0.0196,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0392,
0.0196,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.549,
0.9216,
0,
0.66... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class MultipleChoiceInput(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class TextInput(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a... | [
[
1,
0,
0.0152,
0.0152,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0303,
0.0152,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5379,
0.9394,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class TextInput(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n T... |
from core.domain import widget_domain
from extensions.value_generators.models import generators
class Continue(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a ... | [
[
1,
0,
0.0208,
0.0208,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.0417,
0.0208,
0,
0.66,
0.5,
717,
0,
1,
0,
0,
717,
0,
0
],
[
3,
0,
0.5521,
0.9167,
0,
0.6... | [
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class Continue(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n Th... |
from core.domain import widget_domain
class FileReadInput(widget_domain.BaseWidget):
"""Definition of a widget.
Do NOT make any changes to this widget definition while the Oppia app is
running, otherwise things will break.
This class represents a widget, whose id is the name of the class. It is
... | [
[
1,
0,
0.0263,
0.0263,
0,
0.66,
0,
595,
0,
1,
0,
0,
595,
0,
0
],
[
3,
0,
0.5526,
0.9211,
0,
0.66,
1,
668,
0,
0,
0,
0,
434,
0,
0
],
[
8,
1,
0.2237,
0.2105,
1,
0.51,... | [
"from core.domain import widget_domain",
"class FileReadInput(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, otherwise things will break.\n\n This class represents a widget, whose id is the name of the ... |
# 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... | [
[
14,
0,
0.2099,
0.0123,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2346,
0.0123,
0,
0.66,
0.3333,
595,
0,
1,
0,
0,
595,
0,
0
],
[
1,
0,
0.2469,
0.0123,
0,
0... | [
"__author__ = 'Jacob Davis'",
"from core.domain import widget_domain",
"from extensions.value_generators.models import generators",
"class LogicProof(widget_domain.BaseWidget):\n \"\"\"Definition of a widget.\n\n Do NOT make any changes to this widget definition while the Oppia app is\n running, othe... |
# 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.1829,
0.0122,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2073,
0.0122,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2317,
0.0122,
0,
0.66,... | [
"\"\"\"Configuration for App Engine.\"\"\"",
"__author__ = 'sll@google.com (Sean Lip)'",
"import logging",
"import os",
"import sys",
"import time",
"appstats_CALC_RPC_COSTS = True",
"appstats_MAX_STACK = 50",
"def webapp_add_wsgi_middleware(app):\n \"\"\"Add AppStats recording.\n\n This also ... |
# 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... | [
[
14,
0,
0.1545,
0.0091,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1727,
0.0091,
0,
0.66,
0.3333,
339,
0,
1,
0,
0,
339,
0,
0
],
[
1,
0,
0.1818,
0.0091,
0,
0... | [
"__author__ = 'Sean Lip'",
"import jinja_utils",
"import test_utils",
"class JinjaUtilsUnitTests(test_utils.GenericTestBase):\n\n def test_js_string_filter(self):\n \"\"\"Test js_string filter.\"\"\"\n expected_values = [\n ('a', '\\\\\"a\\\\\"'),\n (2, '2'),\n ... |
#!/usr/bin/env python
import sys
import os
import glob
def main():
source_folder = os.path.join('bin', 'release')
new_version = None
suggest_string = ''
for testfile in glob.glob( os.path.join(source_folder, 'Duplicati *.zip') ):
version_info = testfile[testfile.rfind('Duplicati ') + ... | [
[
1,
0,
0.025,
0.0083,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0333,
0.0083,
0,
0.66,
0.25,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0417,
0.0083,
0,
0.6... | [
"import sys",
"import os",
"import glob",
"def main():\n \n source_folder = os.path.join('bin', 'release')\n \n new_version = None\n suggest_string = ''\n\n for testfile in glob.glob( os.path.join(source_folder, 'Duplicati *.zip') ):",
" source_folder = os.path.join('bin', 'release')",
" new_versi... |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementat... | [
[
8,
0,
0.1875,
0.0081,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1976,
0.004,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2056,
0.004,
0,
0.66,
... | [
"\"\"\"Google Code file uploader script.\n\"\"\"",
"__author__ = 'danderson@google.com (David Anderson)'",
"import httplib",
"import os.path",
"import optparse",
"import getpass",
"import base64",
"import sys",
"def upload(file, project_name, user_name, password, summary, labels=None):\n \"\"\"Uplo... |
#!/usr/bin/env python
"""
This file is a standalone python script that is tested with python 2.7
If Duplicati is producing a backup with the option --upload-verification-file,
it will produce a *-verification.json file on the backend, which can be verified
by this script. Simply run this script with the path to ... | [
[
8,
0,
0.0612,
0.0714,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1122,
0.0102,
0,
0.66,
0.0833,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1224,
0.0102,
0,
0.66... | [
"\"\"\"\nThis file is a standalone python script that is tested with python 2.7\nIf Duplicati is producing a backup with the option --upload-verification-file,\nit will produce a *-verification.json file on the backend, which can be verified\nby this script. Simply run this script with the path to the backup\nfolde... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.