repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
cnelson/python-fleet
fleet/v1/objects/unit.py
Unit.destroy
def destroy(self): """Remove a unit from the fleet cluster Returns: True: The unit was removed Raises: fleet.v1.errors.APIError: Fleet returned a response code >= 400 """ # if this unit didn't come from fleet, we can't destroy it if not self._i...
python
def destroy(self): """Remove a unit from the fleet cluster Returns: True: The unit was removed Raises: fleet.v1.errors.APIError: Fleet returned a response code >= 400 """ # if this unit didn't come from fleet, we can't destroy it if not self._i...
[ "def", "destroy", "(", "self", ")", ":", "# if this unit didn't come from fleet, we can't destroy it", "if", "not", "self", ".", "_is_live", "(", ")", ":", "raise", "RuntimeError", "(", "'A unit must be submitted to fleet before it can destroyed.'", ")", "return", "self", ...
Remove a unit from the fleet cluster Returns: True: The unit was removed Raises: fleet.v1.errors.APIError: Fleet returned a response code >= 400
[ "Remove", "a", "unit", "from", "the", "fleet", "cluster" ]
train
https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/objects/unit.py#L304-L319
cnelson/python-fleet
fleet/v1/objects/unit.py
Unit.set_desired_state
def set_desired_state(self, state): """Update the desired state of a unit. Args: state (str): The desired state for the unit, must be one of ``_STATES`` Returns: str: The updated state Raises: fleet.v1.errors.APIError: Fleet returned a response cod...
python
def set_desired_state(self, state): """Update the desired state of a unit. Args: state (str): The desired state for the unit, must be one of ``_STATES`` Returns: str: The updated state Raises: fleet.v1.errors.APIError: Fleet returned a response cod...
[ "def", "set_desired_state", "(", "self", ",", "state", ")", ":", "if", "state", "not", "in", "self", ".", "_STATES", ":", "raise", "ValueError", "(", "'state must be one of: {0}'", ".", "format", "(", "self", ".", "_STATES", ")", ")", "# update our internal st...
Update the desired state of a unit. Args: state (str): The desired state for the unit, must be one of ``_STATES`` Returns: str: The updated state Raises: fleet.v1.errors.APIError: Fleet returned a response code >= 400 ValueError: An invalid val...
[ "Update", "the", "desired", "state", "of", "a", "unit", "." ]
train
https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/objects/unit.py#L321-L350
raamana/hiwenet
hiwenet/more_metrics.py
diff_medians
def diff_medians(array_one, array_two): """ Computes the difference in medians between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable ...
python
def diff_medians(array_one, array_two): """ Computes the difference in medians between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable ...
[ "def", "diff_medians", "(", "array_one", ",", "array_two", ")", ":", "array_one", "=", "check_array", "(", "array_one", ")", "array_two", "=", "check_array", "(", "array_two", ")", "diff_medians", "=", "np", ".", "ma", ".", "median", "(", "array_one", ")", ...
Computes the difference in medians between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable Two arrays of values, possibly of different length...
[ "Computes", "the", "difference", "in", "medians", "between", "two", "arrays", "of", "values", "." ]
train
https://github.com/raamana/hiwenet/blob/b12699b3722fd0a6a835e7d7ca4baf58fb181809/hiwenet/more_metrics.py#L21-L49
raamana/hiwenet
hiwenet/more_metrics.py
diff_medians_abs
def diff_medians_abs(array_one, array_two): """ Computes the absolute (symmetric) difference in medians between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, ar...
python
def diff_medians_abs(array_one, array_two): """ Computes the absolute (symmetric) difference in medians between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, ar...
[ "def", "diff_medians_abs", "(", "array_one", ",", "array_two", ")", ":", "abs_diff_medians", "=", "np", ".", "abs", "(", "diff_medians", "(", "array_one", ",", "array_two", ")", ")", "return", "abs_diff_medians" ]
Computes the absolute (symmetric) difference in medians between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable Two arrays of values, possibl...
[ "Computes", "the", "absolute", "(", "symmetric", ")", "difference", "in", "medians", "between", "two", "arrays", "of", "values", "." ]
train
https://github.com/raamana/hiwenet/blob/b12699b3722fd0a6a835e7d7ca4baf58fb181809/hiwenet/more_metrics.py#L52-L78
raamana/hiwenet
hiwenet/more_metrics.py
diff_means
def diff_means(array_one, array_two): """ Computes the difference in means between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable Tw...
python
def diff_means(array_one, array_two): """ Computes the difference in means between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable Tw...
[ "def", "diff_means", "(", "array_one", ",", "array_two", ")", ":", "array_one", "=", "check_array", "(", "array_one", ")", "array_two", "=", "check_array", "(", "array_two", ")", "diff_means", "=", "np", ".", "ma", ".", "mean", "(", "array_one", ")", "-", ...
Computes the difference in means between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable Two arrays of values, possibly of different length. ...
[ "Computes", "the", "difference", "in", "means", "between", "two", "arrays", "of", "values", "." ]
train
https://github.com/raamana/hiwenet/blob/b12699b3722fd0a6a835e7d7ca4baf58fb181809/hiwenet/more_metrics.py#L81-L109
raamana/hiwenet
hiwenet/more_metrics.py
diff_means_abs
def diff_means_abs(array_one, array_two): """ Computes the absolute (symmetric) difference in means between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_...
python
def diff_means_abs(array_one, array_two): """ Computes the absolute (symmetric) difference in means between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_...
[ "def", "diff_means_abs", "(", "array_one", ",", "array_two", ")", ":", "abs_diff_means", "=", "np", ".", "abs", "(", "diff_means", "(", "array_one", ",", "array_two", ")", ")", "return", "abs_diff_means" ]
Computes the absolute (symmetric) difference in means between two arrays of values. Given arrays will be flattened (to 1D array) regardless of dimension, and any non-finite/NaN values will be ignored. Parameters ---------- array_one, array_two : iterable Two arrays of values, possibly ...
[ "Computes", "the", "absolute", "(", "symmetric", ")", "difference", "in", "means", "between", "two", "arrays", "of", "values", "." ]
train
https://github.com/raamana/hiwenet/blob/b12699b3722fd0a6a835e7d7ca4baf58fb181809/hiwenet/more_metrics.py#L112-L138
juju/juju-bundlelib
jujubundlelib/typeutils.py
isstring
def isstring(value): """Report whether the given value is a byte or unicode string.""" classes = (str, bytes) if pyutils.PY3 else basestring # noqa: F821 return isinstance(value, classes)
python
def isstring(value): """Report whether the given value is a byte or unicode string.""" classes = (str, bytes) if pyutils.PY3 else basestring # noqa: F821 return isinstance(value, classes)
[ "def", "isstring", "(", "value", ")", ":", "classes", "=", "(", "str", ",", "bytes", ")", "if", "pyutils", ".", "PY3", "else", "basestring", "# noqa: F821", "return", "isinstance", "(", "value", ",", "classes", ")" ]
Report whether the given value is a byte or unicode string.
[ "Report", "whether", "the", "given", "value", "is", "a", "byte", "or", "unicode", "string", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/typeutils.py#L21-L24
mitsei/dlkit
dlkit/json_/assessment/rules.py
Response.get_item
def get_item(self): """Gets the ``Item``. return: (osid.assessment.Item) - the assessment item *compliance: mandatory -- This method must be implemented.* """ # So, for now we're assuming that what should be returned here is the question. # We could change this class im...
python
def get_item(self): """Gets the ``Item``. return: (osid.assessment.Item) - the assessment item *compliance: mandatory -- This method must be implemented.* """ # So, for now we're assuming that what should be returned here is the question. # We could change this class im...
[ "def", "get_item", "(", "self", ")", ":", "# So, for now we're assuming that what should be returned here is the question.", "# We could change this class impl to \"know\" if it came from a ResponseLookupSession call", "# and return the whole Item if so.", "try", ":", "# an un-answered respons...
Gets the ``Item``. return: (osid.assessment.Item) - the assessment item *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Item", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/rules.py#L105-L129
mitsei/dlkit
dlkit/json_/assessment/rules.py
Response.get_response_record
def get_response_record(self, item_record_type): """Gets the response record corresponding to the given ``Item`` record ``Type``. This method is used to retrieve an object implementing the requested record. The ``item_record_type`` may be the ``Type`` returned in ``get_record_types()`` ...
python
def get_response_record(self, item_record_type): """Gets the response record corresponding to the given ``Item`` record ``Type``. This method is used to retrieve an object implementing the requested record. The ``item_record_type`` may be the ``Type`` returned in ``get_record_types()`` ...
[ "def", "get_response_record", "(", "self", ",", "item_record_type", ")", ":", "if", "not", "self", ".", "has_record_type", "(", "item_record_type", ")", ":", "raise", "errors", ".", "Unsupported", "(", ")", "if", "str", "(", "item_record_type", ")", "not", "...
Gets the response record corresponding to the given ``Item`` record ``Type``. This method is used to retrieve an object implementing the requested record. The ``item_record_type`` may be the ``Type`` returned in ``get_record_types()`` or any of its parents in a ``Type`` hierarchy where ...
[ "Gets", "the", "response", "record", "corresponding", "to", "the", "given", "Item", "record", "Type", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/rules.py#L134-L157
mitsei/dlkit
dlkit/records/adaptive/multi_choice_questions/randomized_questions.py
MultiChoiceRandomizeChoicesQuestionRecord.get_id
def get_id(self): """override get_id to generate our "magic" ids that encode choice order""" # Check first to make sure no one else has claimed authority on my object. # This will likely occur when an AssessmentSection returns a Question # During an AssessmentSession if self.my_...
python
def get_id(self): """override get_id to generate our "magic" ids that encode choice order""" # Check first to make sure no one else has claimed authority on my object. # This will likely occur when an AssessmentSection returns a Question # During an AssessmentSession if self.my_...
[ "def", "get_id", "(", "self", ")", ":", "# Check first to make sure no one else has claimed authority on my object.", "# This will likely occur when an AssessmentSection returns a Question", "# During an AssessmentSession", "if", "self", ".", "my_osid_object", ".", "_authority", "!=", ...
override get_id to generate our "magic" ids that encode choice order
[ "override", "get_id", "to", "generate", "our", "magic", "ids", "that", "encode", "choice", "order" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/multi_choice_questions/randomized_questions.py#L178-L195
mitsei/dlkit
dlkit/records/adaptive/multi_choice_questions/randomized_questions.py
MultiChoiceRandomizeChoicesQuestionRecord.set_values
def set_values(self, choice_ids): """assume choice_ids is a list of choiceIds, like ["57978959cdfc5c42eefb36d1", "57978959cdfc5c42eefb36d0", "57978959cdfc5c42eefb36cf", "57978959cdfc5c42eefb36ce"] """ # if not self.my_osid_object._my_map['choices']: # raise IllegalSta...
python
def set_values(self, choice_ids): """assume choice_ids is a list of choiceIds, like ["57978959cdfc5c42eefb36d1", "57978959cdfc5c42eefb36d0", "57978959cdfc5c42eefb36cf", "57978959cdfc5c42eefb36ce"] """ # if not self.my_osid_object._my_map['choices']: # raise IllegalSta...
[ "def", "set_values", "(", "self", ",", "choice_ids", ")", ":", "# if not self.my_osid_object._my_map['choices']:", "# raise IllegalState()", "organized_choices", "=", "[", "]", "for", "choice_id", "in", "choice_ids", ":", "choice_obj", "=", "[", "c", "for", "c", ...
assume choice_ids is a list of choiceIds, like ["57978959cdfc5c42eefb36d1", "57978959cdfc5c42eefb36d0", "57978959cdfc5c42eefb36cf", "57978959cdfc5c42eefb36ce"]
[ "assume", "choice_ids", "is", "a", "list", "of", "choiceIds", "like", "[", "57978959cdfc5c42eefb36d1", "57978959cdfc5c42eefb36d0", "57978959cdfc5c42eefb36cf", "57978959cdfc5c42eefb36ce", "]" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/multi_choice_questions/randomized_questions.py#L205-L216
mitsei/dlkit
dlkit/json_/repository/objects.py
Asset.get_source_id
def get_source_id(self): """Gets the ``Resource Id`` of the source of this asset. The source is the original owner of the copyright of this asset and may differ from the creator of this asset. The source for a published book written by Margaret Mitchell would be Macmillan. The s...
python
def get_source_id(self): """Gets the ``Resource Id`` of the source of this asset. The source is the original owner of the copyright of this asset and may differ from the creator of this asset. The source for a published book written by Margaret Mitchell would be Macmillan. The s...
[ "def", "get_source_id", "(", "self", ")", ":", "# Implemented from template for osid.resource.Resource.get_avatar_id_template", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'sourceId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'this Asse...
Gets the ``Resource Id`` of the source of this asset. The source is the original owner of the copyright of this asset and may differ from the creator of this asset. The source for a published book written by Margaret Mitchell would be Macmillan. The source for an unpublished painting by...
[ "Gets", "the", "Resource", "Id", "of", "the", "source", "of", "this", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L290-L316
mitsei/dlkit
dlkit/json_/repository/objects.py
Asset.get_provider_links
def get_provider_links(self): """Gets the ``Resources`` representing the source of this asset in order from the most recent provider to the originating source. return: (osid.resource.ResourceList) - the provider chain raise: OperationFailed - unable to complete request *compliance: man...
python
def get_provider_links(self): """Gets the ``Resources`` representing the source of this asset in order from the most recent provider to the originating source. return: (osid.resource.ResourceList) - the provider chain raise: OperationFailed - unable to complete request *compliance: man...
[ "def", "get_provider_links", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_assets_template", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'providerLinkIds'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'...
Gets the ``Resources`` representing the source of this asset in order from the most recent provider to the originating source. return: (osid.resource.ResourceList) - the provider chain raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented...
[ "Gets", "the", "Resources", "representing", "the", "source", "of", "this", "asset", "in", "order", "from", "the", "most", "recent", "provider", "to", "the", "originating", "source", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L358-L376
mitsei/dlkit
dlkit/json_/repository/objects.py
Asset.get_asset_content_ids
def get_asset_content_ids(self): """Gets the content ``Ids`` of this asset. return: (osid.id.IdList) - the asset content ``Ids`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.repository.Asset.get_asset_content_ids_template ...
python
def get_asset_content_ids(self): """Gets the content ``Ids`` of this asset. return: (osid.id.IdList) - the asset content ``Ids`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.repository.Asset.get_asset_content_ids_template ...
[ "def", "get_asset_content_ids", "(", "self", ")", ":", "# Implemented from template for osid.repository.Asset.get_asset_content_ids_template", "id_list", "=", "[", "]", "for", "asset_content", "in", "self", ".", "get_asset_contents", "(", ")", ":", "id_list", ".", "append...
Gets the content ``Ids`` of this asset. return: (osid.id.IdList) - the asset content ``Ids`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "content", "Ids", "of", "this", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L439-L450
mitsei/dlkit
dlkit/json_/repository/objects.py
Asset.get_asset_contents
def get_asset_contents(self): """Gets the content of this asset. return: (osid.repository.AssetContentList) - the asset contents raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # Implemented from templ...
python
def get_asset_contents(self): """Gets the content of this asset. return: (osid.repository.AssetContentList) - the asset contents raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # Implemented from templ...
[ "def", "get_asset_contents", "(", "self", ")", ":", "# Implemented from template for osid.repository.Asset.get_asset_contents_template", "return", "AssetContentList", "(", "self", ".", "_my_map", "[", "'assetContents'", "]", ",", "runtime", "=", "self", ".", "_runtime", "...
Gets the content of this asset. return: (osid.repository.AssetContentList) - the asset contents raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "content", "of", "this", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L454-L466
mitsei/dlkit
dlkit/json_/repository/objects.py
Asset.get_composition_id
def get_composition_id(self): """Gets the ``Composition`` ``Id`` corresponding to this asset. return: (osid.id.Id) - the composiiton ``Id`` raise: IllegalState - ``is_composition()`` is ``false`` *compliance: mandatory -- This method must be implemented.* """ # Implem...
python
def get_composition_id(self): """Gets the ``Composition`` ``Id`` corresponding to this asset. return: (osid.id.Id) - the composiiton ``Id`` raise: IllegalState - ``is_composition()`` is ``false`` *compliance: mandatory -- This method must be implemented.* """ # Implem...
[ "def", "get_composition_id", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective_id", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'compositionId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'compo...
Gets the ``Composition`` ``Id`` corresponding to this asset. return: (osid.id.Id) - the composiiton ``Id`` raise: IllegalState - ``is_composition()`` is ``false`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Composition", "Id", "corresponding", "to", "this", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L485-L496
mitsei/dlkit
dlkit/json_/repository/objects.py
Asset.get_composition
def get_composition(self): """Gets the Composition corresponding to this asset. return: (osid.repository.Composition) - the composiiton raise: IllegalState - ``is_composition()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This me...
python
def get_composition(self): """Gets the Composition corresponding to this asset. return: (osid.repository.Composition) - the composiiton raise: IllegalState - ``is_composition()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This me...
[ "def", "get_composition", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'compositionId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'composition...
Gets the Composition corresponding to this asset. return: (osid.repository.Composition) - the composiiton raise: IllegalState - ``is_composition()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Composition", "corresponding", "to", "this", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L500-L517
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm._init_metadata
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidSourceableForm._init_metadata(self) osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._copyright_registration_default = self._mdata['copyright_registration']['default_string_values'][0] ...
python
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidSourceableForm._init_metadata(self) osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._copyright_registration_default = self._mdata['copyright_registration']['default_string_values'][0] ...
[ "def", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidSourceableForm", ".", "_init_metadata", "(", "self", ")", "osid_objects", ".", "OsidObjectForm", ".", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", "...
Initialize form metadata
[ "Initialize", "form", "metadata" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L583-L604
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm._init_map
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidSourceableForm._init_map(self) osid_objects.OsidObjectForm._init_map(self, record_types=record_types) self._my_map['copyrightRegistration'] = self._copyright_registration_default self._m...
python
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidSourceableForm._init_map(self) osid_objects.OsidObjectForm._init_map(self, record_types=record_types) self._my_map['copyrightRegistration'] = self._copyright_registration_default self._m...
[ "def", "_init_map", "(", "self", ",", "record_types", "=", "None", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidSourceableForm", ".", "_init_map", "(", "self", ")", "osid_objects", ".", "OsidObjectForm", ".", "_init_map", "(", "self", ",", ...
Initialize form map
[ "Initialize", "form", "map" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L606-L626
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_title_metadata
def get_title_metadata(self): """Gets the metadata for an asset title. return: (osid.Metadata) - metadata for the title *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template ...
python
def get_title_metadata(self): """Gets the metadata for an asset title. return: (osid.Metadata) - metadata for the title *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template ...
[ "def", "get_title_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'title'", "]", ")", "metadata", ".", "update", "(", "{", "'existing_s...
Gets the metadata for an asset title. return: (osid.Metadata) - metadata for the title *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "an", "asset", "title", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L628-L638
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_title
def set_title(self, title): """Sets the title. arg: title (string): the new title raise: InvalidArgument - ``title`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``title`` is ``null`` *compliance: mandatory -- This method...
python
def set_title(self, title): """Sets the title. arg: title (string): the new title raise: InvalidArgument - ``title`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``title`` is ``null`` *compliance: mandatory -- This method...
[ "def", "set_title", "(", "self", ",", "title", ")", ":", "# Implemented from template for osid.repository.AssetForm.set_title_template", "self", ".", "_my_map", "[", "'title'", "]", "=", "self", ".", "_get_display_text", "(", "title", ",", "self", ".", "get_title_meta...
Sets the title. arg: title (string): the new title raise: InvalidArgument - ``title`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``title`` is ``null`` *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "title", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L643-L654
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_title
def clear_title(self): """Removes the title. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.repository.AssetFo...
python
def clear_title(self): """Removes the title. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.repository.AssetFo...
[ "def", "clear_title", "(", "self", ")", ":", "# Implemented from template for osid.repository.AssetForm.clear_title_template", "if", "(", "self", ".", "get_title_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_title_metadata", "(", ")", "."...
Removes the title. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "title", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L656-L668
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_public_domain_metadata
def get_public_domain_metadata(self): """Gets the metadata for the public domain flag. return: (osid.Metadata) - metadata for the public domain *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_m...
python
def get_public_domain_metadata(self): """Gets the metadata for the public domain flag. return: (osid.Metadata) - metadata for the public domain *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_m...
[ "def", "get_public_domain_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'public_domain'", "]", ")", "metadata", ".", "update", "(", "{"...
Gets the metadata for the public domain flag. return: (osid.Metadata) - metadata for the public domain *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "public", "domain", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L672-L682
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_public_domain
def set_public_domain(self, public_domain): """Sets the public domain flag. arg: public_domain (boolean): the public domain status raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented f...
python
def set_public_domain(self, public_domain): """Sets the public domain flag. arg: public_domain (boolean): the public domain status raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented f...
[ "def", "set_public_domain", "(", "self", ",", "public_domain", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_group_template", "if", "self", ".", "get_public_domain_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "errors", ".",...
Sets the public domain flag. arg: public_domain (boolean): the public domain status raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "public", "domain", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L687-L700
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_public_domain
def clear_public_domain(self): """Removes the public domain status. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for ...
python
def clear_public_domain(self): """Removes the public domain status. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for ...
[ "def", "clear_public_domain", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_group_template", "if", "(", "self", ".", "get_public_domain_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_public_domain_metad...
Removes the public domain status. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "public", "domain", "status", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L702-L714
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_copyright_metadata
def get_copyright_metadata(self): """Gets the metadata for the copyright. return: (osid.Metadata) - metadata for the copyright *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template ...
python
def get_copyright_metadata(self): """Gets the metadata for the copyright. return: (osid.Metadata) - metadata for the copyright *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template ...
[ "def", "get_copyright_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'copyright'", "]", ")", "metadata", ".", "update", "(", "{", "'ex...
Gets the metadata for the copyright. return: (osid.Metadata) - metadata for the copyright *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "copyright", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L718-L728
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_copyright
def set_copyright(self, copyright_): """Sets the copyright. arg: copyright (string): the new copyright raise: InvalidArgument - ``copyright`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``copyright`` is ``null`` *complia...
python
def set_copyright(self, copyright_): """Sets the copyright. arg: copyright (string): the new copyright raise: InvalidArgument - ``copyright`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``copyright`` is ``null`` *complia...
[ "def", "set_copyright", "(", "self", ",", "copyright_", ")", ":", "# Implemented from template for osid.repository.AssetForm.set_title_template", "self", ".", "_my_map", "[", "'copyright'", "]", "=", "self", ".", "_get_display_text", "(", "copyright_", ",", "self", ".",...
Sets the copyright. arg: copyright (string): the new copyright raise: InvalidArgument - ``copyright`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``copyright`` is ``null`` *compliance: mandatory -- This method must be implemente...
[ "Sets", "the", "copyright", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L733-L744
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_copyright
def clear_copyright(self): """Removes the copyright. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.repository...
python
def clear_copyright(self): """Removes the copyright. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.repository...
[ "def", "clear_copyright", "(", "self", ")", ":", "# Implemented from template for osid.repository.AssetForm.clear_title_template", "if", "(", "self", ".", "get_copyright_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_copyright_metadata", "(", ...
Removes the copyright. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "copyright", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L746-L758
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_copyright_registration_metadata
def get_copyright_registration_metadata(self): """Gets the metadata for the copyright registration. return: (osid.Metadata) - metadata for the copyright registration *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for ...
python
def get_copyright_registration_metadata(self): """Gets the metadata for the copyright registration. return: (osid.Metadata) - metadata for the copyright registration *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for ...
[ "def", "get_copyright_registration_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'copyright_registration'", "]", ")", "metadata", ".", "upd...
Gets the metadata for the copyright registration. return: (osid.Metadata) - metadata for the copyright registration *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "copyright", "registration", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L762-L773
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_copyright_registration
def clear_copyright_registration(self): """Removes the copyright registration. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from te...
python
def clear_copyright_registration(self): """Removes the copyright registration. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from te...
[ "def", "clear_copyright_registration", "(", "self", ")", ":", "# Implemented from template for osid.repository.AssetContentForm.clear_url_template", "if", "(", "self", ".", "get_copyright_registration_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "g...
Removes the copyright registration. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "copyright", "registration", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L797-L809
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_distribute_verbatim_metadata
def get_distribute_verbatim_metadata(self): """Gets the metadata for the distribute verbatim rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.* """ # Implemented from tem...
python
def get_distribute_verbatim_metadata(self): """Gets the metadata for the distribute verbatim rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.* """ # Implemented from tem...
[ "def", "get_distribute_verbatim_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'distribute_verbatim'", "]", ")", "metadata", ".", "update", ...
Gets the metadata for the distribute verbatim rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "distribute", "verbatim", "rights", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L813-L824
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_distribute_verbatim
def set_distribute_verbatim(self, distribute_verbatim): """Sets the distribution rights. arg: distribute_verbatim (boolean): right to distribute verbatim copies raise: InvalidArgument - ``distribute_verbatim`` is invalid raise: NoAccess - authorization failure ...
python
def set_distribute_verbatim(self, distribute_verbatim): """Sets the distribution rights. arg: distribute_verbatim (boolean): right to distribute verbatim copies raise: InvalidArgument - ``distribute_verbatim`` is invalid raise: NoAccess - authorization failure ...
[ "def", "set_distribute_verbatim", "(", "self", ",", "distribute_verbatim", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_group_template", "if", "self", ".", "get_distribute_verbatim_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", ...
Sets the distribution rights. arg: distribute_verbatim (boolean): right to distribute verbatim copies raise: InvalidArgument - ``distribute_verbatim`` is invalid raise: NoAccess - authorization failure *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "distribution", "rights", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L829-L844
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_distribute_verbatim
def clear_distribute_verbatim(self): """Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template...
python
def clear_distribute_verbatim(self): """Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template...
[ "def", "clear_distribute_verbatim", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_group_template", "if", "(", "self", ".", "get_distribute_verbatim_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_distrib...
Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "distribution", "rights", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L846-L858
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_distribute_alterations_metadata
def get_distribute_alterations_metadata(self): """Gets the metadata for the distribute alterations rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.* """ # Implemented fr...
python
def get_distribute_alterations_metadata(self): """Gets the metadata for the distribute alterations rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.* """ # Implemented fr...
[ "def", "get_distribute_alterations_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'distribute_alterations'", "]", ")", "metadata", ".", "upd...
Gets the metadata for the distribute alterations rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "distribute", "alterations", "rights", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L862-L873
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_distribute_alterations
def set_distribute_alterations(self, distribute_mods): """Sets the distribute alterations flag. This also sets distribute verbatim to ``true``. arg: distribute_mods (boolean): right to distribute modifications raise: InvalidArgument - ``distribute_mods`` is invalid ...
python
def set_distribute_alterations(self, distribute_mods): """Sets the distribute alterations flag. This also sets distribute verbatim to ``true``. arg: distribute_mods (boolean): right to distribute modifications raise: InvalidArgument - ``distribute_mods`` is invalid ...
[ "def", "set_distribute_alterations", "(", "self", ",", "distribute_mods", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_group_template", "if", "self", ".", "get_distribute_alterations_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise"...
Sets the distribute alterations flag. This also sets distribute verbatim to ``true``. arg: distribute_mods (boolean): right to distribute modifications raise: InvalidArgument - ``distribute_mods`` is invalid raise: NoAccess - authorization failure *complian...
[ "Sets", "the", "distribute", "alterations", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L878-L895
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_distribute_alterations
def clear_distribute_alterations(self): """Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from templ...
python
def clear_distribute_alterations(self): """Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from templ...
[ "def", "clear_distribute_alterations", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_group_template", "if", "(", "self", ".", "get_distribute_alterations_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_d...
Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "distribution", "rights", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L897-L909
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_distribute_compositions_metadata
def get_distribute_compositions_metadata(self): """Gets the metadata for the distribute compositions rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.* """ # Implemented ...
python
def get_distribute_compositions_metadata(self): """Gets the metadata for the distribute compositions rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.* """ # Implemented ...
[ "def", "get_distribute_compositions_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'distribute_compositions'", "]", ")", "metadata", ".", "u...
Gets the metadata for the distribute compositions rights flag. return: (osid.Metadata) - metadata for the distribution rights fields *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "distribute", "compositions", "rights", "flag", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L913-L924
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_distribute_compositions
def set_distribute_compositions(self, distribute_comps): """Sets the distribution rights. This sets distribute verbatim to ``true``. arg: distribute_comps (boolean): right to distribute modifications raise: InvalidArgument - ``distribute_comps`` is invalid r...
python
def set_distribute_compositions(self, distribute_comps): """Sets the distribution rights. This sets distribute verbatim to ``true``. arg: distribute_comps (boolean): right to distribute modifications raise: InvalidArgument - ``distribute_comps`` is invalid r...
[ "def", "set_distribute_compositions", "(", "self", ",", "distribute_comps", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_group_template", "if", "self", ".", "get_distribute_compositions_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "rai...
Sets the distribution rights. This sets distribute verbatim to ``true``. arg: distribute_comps (boolean): right to distribute modifications raise: InvalidArgument - ``distribute_comps`` is invalid raise: NoAccess - authorization failure *compliance: mandato...
[ "Sets", "the", "distribution", "rights", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L929-L946
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_distribute_compositions
def clear_distribute_compositions(self): """Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from temp...
python
def clear_distribute_compositions(self): """Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from temp...
[ "def", "clear_distribute_compositions", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_group_template", "if", "(", "self", ".", "get_distribute_compositions_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get...
Removes the distribution rights. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "distribution", "rights", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L948-L960
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_source_metadata
def get_source_metadata(self): """Gets the metadata for the source. return: (osid.Metadata) - metadata for the source *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template m...
python
def get_source_metadata(self): """Gets the metadata for the source. return: (osid.Metadata) - metadata for the source *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template m...
[ "def", "get_source_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'source'", "]", ")", "metadata", ".", "update", "(", "{", "'existing...
Gets the metadata for the source. return: (osid.Metadata) - metadata for the source *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "source", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L964-L974
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_source
def set_source(self, source_id): """Sets the source. arg: source_id (osid.id.Id): the new publisher raise: InvalidArgument - ``source_id`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``source_id`` is ``null`` *compliance...
python
def set_source(self, source_id): """Sets the source. arg: source_id (osid.id.Id): the new publisher raise: InvalidArgument - ``source_id`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``source_id`` is ``null`` *compliance...
[ "def", "set_source", "(", "self", ",", "source_id", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_avatar_template", "if", "self", ".", "get_source_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "errors", ".", "NoAccess", ...
Sets the source. arg: source_id (osid.id.Id): the new publisher raise: InvalidArgument - ``source_id`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``source_id`` is ``null`` *compliance: mandatory -- This method must be implement...
[ "Sets", "the", "source", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L979-L994
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_source
def clear_source(self): """Removes the source. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.Resourc...
python
def clear_source(self): """Removes the source. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.Resourc...
[ "def", "clear_source", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_avatar_template", "if", "(", "self", ".", "get_source_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_source_metadata", "(", ")", ...
Removes the source. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "source", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L996-L1008
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_provider_links_metadata
def get_provider_links_metadata(self): """Gets the metadata for the provider chain. return: (osid.Metadata) - metadata for the provider chain *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.ActivityForm.get_assets_me...
python
def get_provider_links_metadata(self): """Gets the metadata for the provider chain. return: (osid.Metadata) - metadata for the provider chain *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.ActivityForm.get_assets_me...
[ "def", "get_provider_links_metadata", "(", "self", ")", ":", "# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'provider_links'", "]", ")", "metadata", ".", "update", "(", ...
Gets the metadata for the provider chain. return: (osid.Metadata) - metadata for the provider chain *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "provider", "chain", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1012-L1022
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_provider_links
def set_provider_links(self, resource_ids): """Sets a provider chain in order from the most recent source to the originating source. arg: resource_ids (osid.id.Id[]): the new source raise: InvalidArgument - ``resource_ids`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ...
python
def set_provider_links(self, resource_ids): """Sets a provider chain in order from the most recent source to the originating source. arg: resource_ids (osid.id.Id[]): the new source raise: InvalidArgument - ``resource_ids`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ...
[ "def", "set_provider_links", "(", "self", ",", "resource_ids", ")", ":", "# Implemented from template for osid.learning.ActivityForm.set_assets_template", "if", "not", "isinstance", "(", "resource_ids", ",", "list", ")", ":", "raise", "errors", ".", "InvalidArgument", "("...
Sets a provider chain in order from the most recent source to the originating source. arg: resource_ids (osid.id.Id[]): the new source raise: InvalidArgument - ``resource_ids`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``resource_ids`...
[ "Sets", "a", "provider", "chain", "in", "order", "from", "the", "most", "recent", "source", "to", "the", "originating", "source", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1027-L1047
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_provider_links
def clear_provider_links(self): """Removes the provider chain. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid....
python
def clear_provider_links(self): """Removes the provider chain. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid....
[ "def", "clear_provider_links", "(", "self", ")", ":", "# Implemented from template for osid.learning.ActivityForm.clear_assets_template", "if", "(", "self", ".", "get_provider_links_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_provider_links_m...
Removes the provider chain. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "provider", "chain", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1049-L1061
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_created_date_metadata
def get_created_date_metadata(self): """Gets the metadata for the asset creation date. return: (osid.Metadata) - metadata for the created date *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_me...
python
def get_created_date_metadata(self): """Gets the metadata for the asset creation date. return: (osid.Metadata) - metadata for the created date *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_me...
[ "def", "get_created_date_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'created_date'", "]", ")", "metadata", ".", "update", "(", "{", ...
Gets the metadata for the asset creation date. return: (osid.Metadata) - metadata for the created date *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "asset", "creation", "date", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1065-L1075
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_created_date
def set_created_date(self, created_date): """Sets the created date. arg: created_date (osid.calendaring.DateTime): the new created date raise: InvalidArgument - ``created_date`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullA...
python
def set_created_date(self, created_date): """Sets the created date. arg: created_date (osid.calendaring.DateTime): the new created date raise: InvalidArgument - ``created_date`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullA...
[ "def", "set_created_date", "(", "self", ",", "created_date", ")", ":", "# Implemented from template for osid.assessment.AssessmentOfferedForm.set_start_time_template", "if", "self", ".", "get_created_date_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "er...
Sets the created date. arg: created_date (osid.calendaring.DateTime): the new created date raise: InvalidArgument - ``created_date`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``created_date`` is ``null`` *compl...
[ "Sets", "the", "created", "date", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1080-L1098
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_created_date
def clear_created_date(self): """Removes the created date. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.asse...
python
def clear_created_date(self): """Removes the created date. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.asse...
[ "def", "clear_created_date", "(", "self", ")", ":", "# Implemented from template for osid.assessment.AssessmentOfferedForm.clear_start_time_template", "if", "(", "self", ".", "get_created_date_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_creat...
Removes the created date. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "created", "date", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1100-L1112
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_published_metadata
def get_published_metadata(self): """Gets the metadata for the published status. return: (osid.Metadata) - metadata for the published field *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metad...
python
def get_published_metadata(self): """Gets the metadata for the published status. return: (osid.Metadata) - metadata for the published field *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metad...
[ "def", "get_published_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'published'", "]", ")", "metadata", ".", "update", "(", "{", "'ex...
Gets the metadata for the published status. return: (osid.Metadata) - metadata for the published field *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "published", "status", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1116-L1126
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_published
def set_published(self, published): """Sets the published status. arg: published (boolean): the published status raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for o...
python
def set_published(self, published): """Sets the published status. arg: published (boolean): the published status raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for o...
[ "def", "set_published", "(", "self", ",", "published", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_group_template", "if", "self", ".", "get_published_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "errors", ".", "NoAccess...
Sets the published status. arg: published (boolean): the published status raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "published", "status", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1131-L1144
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_published
def clear_published(self): """Removes the published status. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.res...
python
def clear_published(self): """Removes the published status. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.res...
[ "def", "clear_published", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_group_template", "if", "(", "self", ".", "get_published_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_published_metadata", "(",...
Removes the published status. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "published", "status", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1146-L1158
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_published_date_metadata
def get_published_date_metadata(self): """Gets the metadata for the published date. return: (osid.Metadata) - metadata for the published date *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_met...
python
def get_published_date_metadata(self): """Gets the metadata for the published date. return: (osid.Metadata) - metadata for the published date *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_met...
[ "def", "get_published_date_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'published_date'", "]", ")", "metadata", ".", "update", "(", "...
Gets the metadata for the published date. return: (osid.Metadata) - metadata for the published date *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "published", "date", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1162-L1172
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_published_date
def set_published_date(self, published_date): """Sets the published date. arg: published_date (osid.calendaring.DateTime): the new published date raise: InvalidArgument - ``published_date`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` r...
python
def set_published_date(self, published_date): """Sets the published date. arg: published_date (osid.calendaring.DateTime): the new published date raise: InvalidArgument - ``published_date`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` r...
[ "def", "set_published_date", "(", "self", ",", "published_date", ")", ":", "# Implemented from template for osid.assessment.AssessmentOfferedForm.set_start_time_template", "if", "self", ".", "get_published_date_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise",...
Sets the published date. arg: published_date (osid.calendaring.DateTime): the new published date raise: InvalidArgument - ``published_date`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``published_date`` is ``null`` ...
[ "Sets", "the", "published", "date", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1177-L1195
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_published_date
def clear_published_date(self): """Removes the puiblished date. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
python
def clear_published_date(self): """Removes the puiblished date. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
[ "def", "clear_published_date", "(", "self", ")", ":", "# Implemented from template for osid.assessment.AssessmentOfferedForm.clear_start_time_template", "if", "(", "self", ".", "get_published_date_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_p...
Removes the puiblished date. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "puiblished", "date", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1197-L1209
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_principal_credit_string_metadata
def get_principal_credit_string_metadata(self): """Gets the metadata for the principal credit string. return: (osid.Metadata) - metadata for the credit string *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceF...
python
def get_principal_credit_string_metadata(self): """Gets the metadata for the principal credit string. return: (osid.Metadata) - metadata for the credit string *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceF...
[ "def", "get_principal_credit_string_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'principal_credit_string'", "]", ")", "metadata", ".", "u...
Gets the metadata for the principal credit string. return: (osid.Metadata) - metadata for the credit string *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "principal", "credit", "string", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1213-L1223
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_principal_credit_string
def set_principal_credit_string(self, credit_string): """Sets the principal credit string. arg: credit_string (string): the new credit string raise: InvalidArgument - ``credit_string`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument -...
python
def set_principal_credit_string(self, credit_string): """Sets the principal credit string. arg: credit_string (string): the new credit string raise: InvalidArgument - ``credit_string`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument -...
[ "def", "set_principal_credit_string", "(", "self", ",", "credit_string", ")", ":", "# Implemented from template for osid.repository.AssetForm.set_title_template", "self", ".", "_my_map", "[", "'principalCreditString'", "]", "=", "self", ".", "_get_display_text", "(", "credit_...
Sets the principal credit string. arg: credit_string (string): the new credit string raise: InvalidArgument - ``credit_string`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``credit_string`` is ``null`` *compliance: mandatory -- ...
[ "Sets", "the", "principal", "credit", "string", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1228-L1239
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_principal_credit_string
def clear_principal_credit_string(self): """Removes the principal credit string. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from ...
python
def clear_principal_credit_string(self): """Removes the principal credit string. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from ...
[ "def", "clear_principal_credit_string", "(", "self", ")", ":", "# Implemented from template for osid.repository.AssetForm.clear_title_template", "if", "(", "self", ".", "get_principal_credit_string_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_...
Removes the principal credit string. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "principal", "credit", "string", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1241-L1253
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.get_composition_metadata
def get_composition_metadata(self): """Gets the metadata for linking this asset to a composition. return: (osid.Metadata) - metadata for the composition *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.ge...
python
def get_composition_metadata(self): """Gets the metadata for linking this asset to a composition. return: (osid.Metadata) - metadata for the composition *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.ge...
[ "def", "get_composition_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'composition'", "]", ")", "metadata", ".", "update", "(", "{", ...
Gets the metadata for linking this asset to a composition. return: (osid.Metadata) - metadata for the composition *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "linking", "this", "asset", "to", "a", "composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1257-L1267
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.set_composition
def set_composition(self, composition_id): """Sets the composition. arg: composition_id (osid.id.Id): a composition raise: InvalidArgument - ``composition_id`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``composition_id`` is ``...
python
def set_composition(self, composition_id): """Sets the composition. arg: composition_id (osid.id.Id): a composition raise: InvalidArgument - ``composition_id`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``composition_id`` is ``...
[ "def", "set_composition", "(", "self", ",", "composition_id", ")", ":", "# Implemented from template for osid.resource.ResourceForm.set_avatar_template", "if", "self", ".", "get_composition_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "errors", ".", ...
Sets the composition. arg: composition_id (osid.id.Id): a composition raise: InvalidArgument - ``composition_id`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``composition_id`` is ``null`` *compliance: mandatory -- This method m...
[ "Sets", "the", "composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1272-L1287
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetForm.clear_composition
def clear_composition(self): """Removes the composition link. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.r...
python
def clear_composition(self): """Removes the composition link. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.r...
[ "def", "clear_composition", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.clear_avatar_template", "if", "(", "self", ".", "get_composition_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_composition_metadata",...
Removes the composition link. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "composition", "link", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1289-L1301
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContent.get_asset_id
def get_asset_id(self): """Gets the ``Asset Id`` corresponding to this content. return: (osid.id.Id) - the asset ``Id`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective_id if not bool(se...
python
def get_asset_id(self): """Gets the ``Asset Id`` corresponding to this content. return: (osid.id.Id) - the asset ``Id`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective_id if not bool(se...
[ "def", "get_asset_id", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective_id", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'assetId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'asset empty'", ...
Gets the ``Asset Id`` corresponding to this content. return: (osid.id.Id) - the asset ``Id`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Asset", "Id", "corresponding", "to", "this", "content", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1392-L1402
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContent.get_asset
def get_asset(self): """Gets the ``Asset`` corresponding to this content. return: (osid.repository.Asset) - the asset *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective if not bool(self._m...
python
def get_asset(self): """Gets the ``Asset`` corresponding to this content. return: (osid.repository.Asset) - the asset *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective if not bool(self._m...
[ "def", "get_asset", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'assetId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'asset empty'", ")", ...
Gets the ``Asset`` corresponding to this content. return: (osid.repository.Asset) - the asset *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Asset", "corresponding", "to", "this", "content", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1406-L1421
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContent.get_data
def get_data(self): """Gets the asset content data. return: (osid.transport.DataInputStream) - the length of the content data raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ if not bool...
python
def get_data(self): """Gets the asset content data. return: (osid.transport.DataInputStream) - the length of the content data raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ if not bool...
[ "def", "get_data", "(", "self", ")", ":", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'data'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'no data'", ")", "dbase", "=", "JSONClientValidated", "(", "'repository'", ",", "runti...
Gets the asset content data. return: (osid.transport.DataInputStream) - the length of the content data raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "asset", "content", "data", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1459-L1473
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm._init_metadata
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._url_default = self._mdata['url']['default_string_values'][0] self._data_default = self._mdata['data']['default_object_values'][0] self._accessibilit...
python
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._url_default = self._mdata['url']['default_string_values'][0] self._data_default = self._mdata['data']['default_object_values'][0] self._accessibilit...
[ "def", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidObjectForm", ".", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", ")", "self", ".", "_url_default", "=", "self", ".", "_mdata", "[", "'url'", "]", ...
Initialize form metadata
[ "Initialize", "form", "metadata" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1564-L1569
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm._init_map
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidObjectForm._init_map(self, record_types=record_types) self._my_map['url'] = self._url_default self._my_map['data'] = self._data_default self._my_map['accessibilityTypeId'] = self._accessi...
python
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidObjectForm._init_map(self, record_types=record_types) self._my_map['url'] = self._url_default self._my_map['data'] = self._data_default self._my_map['accessibilityTypeId'] = self._accessi...
[ "def", "_init_map", "(", "self", ",", "record_types", "=", "None", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidObjectForm", ".", "_init_map", "(", "self", ",", "record_types", "=", "record_types", ")", "self", ".", "_my_map", "[", "'url'",...
Initialize form map
[ "Initialize", "form", "map" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1571-L1578
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm.get_accessibility_type_metadata
def get_accessibility_type_metadata(self): """Gets the metadata for an accessibility type. return: (osid.Metadata) - metadata for the accessibility types *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.logging.LogEntryForm.ge...
python
def get_accessibility_type_metadata(self): """Gets the metadata for an accessibility type. return: (osid.Metadata) - metadata for the accessibility types *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.logging.LogEntryForm.ge...
[ "def", "get_accessibility_type_metadata", "(", "self", ")", ":", "# Implemented from template for osid.logging.LogEntryForm.get_priority_metadata", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'accessibility_type'", "]", ")", "metadata", ".", "update", "(", ...
Gets the metadata for an accessibility type. return: (osid.Metadata) - metadata for the accessibility types *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "an", "accessibility", "type", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1580-L1590
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm.get_data_metadata
def get_data_metadata(self): """Gets the metadata for the content data. return: (osid.Metadata) - metadata for the content data *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template...
python
def get_data_metadata(self): """Gets the metadata for the content data. return: (osid.Metadata) - metadata for the content data *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template...
[ "def", "get_data_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'data'", "]", ")", "metadata", ".", "update", "(", "{", "'existing_obj...
Gets the metadata for the content data. return: (osid.Metadata) - metadata for the content data *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "content", "data", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1635-L1645
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm.set_data
def set_data(self, data): """Sets the content data. arg: data (osid.transport.DataInputStream): the content data raise: InvalidArgument - ``data`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``data`` is ``null`` *complia...
python
def set_data(self, data): """Sets the content data. arg: data (osid.transport.DataInputStream): the content data raise: InvalidArgument - ``data`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``data`` is ``null`` *complia...
[ "def", "set_data", "(", "self", ",", "data", ")", ":", "if", "data", "is", "None", ":", "raise", "errors", ".", "NullArgument", "(", "'data cannot be None'", ")", "if", "not", "isinstance", "(", "data", ",", "DataInputStream", ")", ":", "raise", "errors", ...
Sets the content data. arg: data (osid.transport.DataInputStream): the content data raise: InvalidArgument - ``data`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``data`` is ``null`` *compliance: mandatory -- This method must be...
[ "Sets", "the", "content", "data", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1650-L1669
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm.clear_data
def clear_data(self): """Removes the content data. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if (self.get_data_metadata().is_read_only() or ...
python
def clear_data(self): """Removes the content data. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if (self.get_data_metadata().is_read_only() or ...
[ "def", "clear_data", "(", "self", ")", ":", "if", "(", "self", ".", "get_data_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_data_metadata", "(", ")", ".", "is_required", "(", ")", ")", ":", "raise", "errors", ".", "NoAcces...
Removes the content data. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "content", "data", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1671-L1689
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm.get_url_metadata
def get_url_metadata(self): """Gets the metadata for the url. return: (osid.Metadata) - metadata for the url *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template metadata =...
python
def get_url_metadata(self): """Gets the metadata for the url. return: (osid.Metadata) - metadata for the url *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template metadata =...
[ "def", "get_url_metadata", "(", "self", ")", ":", "# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'url'", "]", ")", "metadata", ".", "update", "(", "{", "'existing_strin...
Gets the metadata for the url. return: (osid.Metadata) - metadata for the url *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "the", "url", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1693-L1703
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm.set_url
def set_url(self, url): """Sets the url. arg: url (string): the new copyright raise: InvalidArgument - ``url`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``url`` is ``null`` *compliance: mandatory -- This method must be...
python
def set_url(self, url): """Sets the url. arg: url (string): the new copyright raise: InvalidArgument - ``url`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``url`` is ``null`` *compliance: mandatory -- This method must be...
[ "def", "set_url", "(", "self", ",", "url", ")", ":", "# Implemented from template for osid.repository.AssetContentForm.set_url_template", "if", "self", ".", "get_url_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "errors", ".", "NoAccess", "(", ")...
Sets the url. arg: url (string): the new copyright raise: InvalidArgument - ``url`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``url`` is ``null`` *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "url", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1708-L1725
mitsei/dlkit
dlkit/json_/repository/objects.py
AssetContentForm.clear_url
def clear_url(self): """Removes the url. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.repository.AssetConten...
python
def clear_url(self): """Removes the url. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.repository.AssetConten...
[ "def", "clear_url", "(", "self", ")", ":", "# Implemented from template for osid.repository.AssetContentForm.clear_url_template", "if", "(", "self", ".", "get_url_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_url_metadata", "(", ")", ".",...
Removes the url. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Removes", "the", "url", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1727-L1739
mitsei/dlkit
dlkit/json_/repository/objects.py
Composition.get_children
def get_children(self): """Gets the children of this composition. return: (osid.repository.CompositionList) - the composition children raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # ...
python
def get_children(self): """Gets the children of this composition. return: (osid.repository.CompositionList) - the composition children raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # ...
[ "def", "get_children", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_assets_template", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'childIds'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'no childIds'"...
Gets the children of this composition. return: (osid.repository.CompositionList) - the composition children raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "children", "of", "this", "composition", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1843-L1862
mitsei/dlkit
dlkit/json_/repository/objects.py
CompositionForm._init_metadata
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidContainableForm._init_metadata(self) osid_objects.OsidSourceableForm._init_metadata(self) osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._children_default = self._mdata['children...
python
def _init_metadata(self, **kwargs): """Initialize form metadata""" osid_objects.OsidContainableForm._init_metadata(self) osid_objects.OsidSourceableForm._init_metadata(self) osid_objects.OsidObjectForm._init_metadata(self, **kwargs) self._children_default = self._mdata['children...
[ "def", "_init_metadata", "(", "self", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidContainableForm", ".", "_init_metadata", "(", "self", ")", "osid_objects", ".", "OsidSourceableForm", ".", "_init_metadata", "(", "self", ")", "osid_objects", ".",...
Initialize form metadata
[ "Initialize", "form", "metadata" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1918-L1924
mitsei/dlkit
dlkit/json_/repository/objects.py
CompositionForm._init_map
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidContainableForm._init_map(self) osid_objects.OsidSourceableForm._init_map(self) osid_objects.OsidObjectForm._init_map(self, record_types=record_types) self._my_map['childIds'] = self._ch...
python
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidContainableForm._init_map(self) osid_objects.OsidSourceableForm._init_map(self) osid_objects.OsidObjectForm._init_map(self, record_types=record_types) self._my_map['childIds'] = self._ch...
[ "def", "_init_map", "(", "self", ",", "record_types", "=", "None", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidContainableForm", ".", "_init_map", "(", "self", ")", "osid_objects", ".", "OsidSourceableForm", ".", "_init_map", "(", "self", ")...
Initialize form map
[ "Initialize", "form", "map" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1926-L1933
mitsei/dlkit
dlkit/json_/repository/objects.py
CompositionForm.get_children_metadata
def get_children_metadata(self): """Gets the metadata for children. return: (osid.Metadata) - metadata for the children *compliance: mandatory -- This method must be implemented.* """ metadata = dict(self._mdata['children']) metadata.update({'existing_children_values': ...
python
def get_children_metadata(self): """Gets the metadata for children. return: (osid.Metadata) - metadata for the children *compliance: mandatory -- This method must be implemented.* """ metadata = dict(self._mdata['children']) metadata.update({'existing_children_values': ...
[ "def", "get_children_metadata", "(", "self", ")", ":", "metadata", "=", "dict", "(", "self", ".", "_mdata", "[", "'children'", "]", ")", "metadata", ".", "update", "(", "{", "'existing_children_values'", ":", "self", ".", "_my_map", "[", "'childIds'", "]", ...
Gets the metadata for children. return: (osid.Metadata) - metadata for the children *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "metadata", "for", "children", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1953-L1962
mitsei/dlkit
dlkit/json_/repository/objects.py
CompositionForm.set_children
def set_children(self, child_ids): """Sets the children. arg: child_ids (osid.id.Id[]): the children``Ids`` raise: InvalidArgument - ``child_ids`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* ...
python
def set_children(self, child_ids): """Sets the children. arg: child_ids (osid.id.Id[]): the children``Ids`` raise: InvalidArgument - ``child_ids`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* ...
[ "def", "set_children", "(", "self", ",", "child_ids", ")", ":", "if", "not", "isinstance", "(", "child_ids", ",", "list", ")", ":", "raise", "errors", ".", "InvalidArgument", "(", ")", "if", "self", ".", "get_children_metadata", "(", ")", ".", "is_read_onl...
Sets the children. arg: child_ids (osid.id.Id[]): the children``Ids`` raise: InvalidArgument - ``child_ids`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Sets", "the", "children", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1967-L1986
mitsei/dlkit
dlkit/json_/repository/objects.py
CompositionForm.clear_children
def clear_children(self): """Clears the children. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if (self.get_children_metadata().is_read_only() or ...
python
def clear_children(self): """Clears the children. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ if (self.get_children_metadata().is_read_only() or ...
[ "def", "clear_children", "(", "self", ")", ":", "if", "(", "self", ".", "get_children_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_children_metadata", "(", ")", ".", "is_required", "(", ")", ")", ":", "raise", "errors", "."...
Clears the children. raise: NoAccess - ``Metadata.isRequired()`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.*
[ "Clears", "the", "children", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L1988-L1999
mitsei/dlkit
dlkit/json_/repository/objects.py
RepositoryForm._init_map
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidCatalogForm._init_map(self, record_types, **kwargs)
python
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidCatalogForm._init_map(self, record_types, **kwargs)
[ "def", "_init_map", "(", "self", ",", "record_types", "=", "None", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidCatalogForm", ".", "_init_map", "(", "self", ",", "record_types", ",", "*", "*", "kwargs", ")" ]
Initialize form map
[ "Initialize", "form", "map" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L2112-L2114
mitsei/dlkit
dlkit/json_/repository/objects.py
RepositoryNode.get_repository
def get_repository(self): """Gets the ``Repository`` at this node. return: (osid.repository.Repository) - the repository represented by this node *compliance: mandatory -- This method must be implemented.* """ if self._lookup_session is None: mgr = g...
python
def get_repository(self): """Gets the ``Repository`` at this node. return: (osid.repository.Repository) - the repository represented by this node *compliance: mandatory -- This method must be implemented.* """ if self._lookup_session is None: mgr = g...
[ "def", "get_repository", "(", "self", ")", ":", "if", "self", ".", "_lookup_session", "is", "None", ":", "mgr", "=", "get_provider_manager", "(", "'REPOSITORY'", ",", "runtime", "=", "self", ".", "_runtime", ",", "proxy", "=", "self", ".", "_proxy", ")", ...
Gets the ``Repository`` at this node. return: (osid.repository.Repository) - the repository represented by this node *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Repository", "at", "this", "node", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L2213-L2224
mitsei/dlkit
dlkit/json_/repository/objects.py
RepositoryNode.get_parent_repository_nodes
def get_parent_repository_nodes(self): """Gets the parents of this repository. return: (osid.repository.RepositoryNodeList) - the parents of the ``id`` *compliance: mandatory -- This method must be implemented.* """ parent_repository_nodes = [] for node ...
python
def get_parent_repository_nodes(self): """Gets the parents of this repository. return: (osid.repository.RepositoryNodeList) - the parents of the ``id`` *compliance: mandatory -- This method must be implemented.* """ parent_repository_nodes = [] for node ...
[ "def", "get_parent_repository_nodes", "(", "self", ")", ":", "parent_repository_nodes", "=", "[", "]", "for", "node", "in", "self", ".", "_my_map", "[", "'parentNodes'", "]", ":", "parent_repository_nodes", ".", "append", "(", "RepositoryNode", "(", "node", ".",...
Gets the parents of this repository. return: (osid.repository.RepositoryNodeList) - the parents of the ``id`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "parents", "of", "this", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/objects.py#L2228-L2243
mitsei/dlkit
dlkit/records/repository/edx/compositions.py
valid_for
def valid_for(whitelist): """ descriptor to check the genus type of an item, to see if the method is valid for that type From http://stackoverflow.com/questions/30809814/python-descriptors-with-arguments :param whitelist: list of OLX tag names, like 'chapter' or 'vertical' :return: """ def d...
python
def valid_for(whitelist): """ descriptor to check the genus type of an item, to see if the method is valid for that type From http://stackoverflow.com/questions/30809814/python-descriptors-with-arguments :param whitelist: list of OLX tag names, like 'chapter' or 'vertical' :return: """ def d...
[ "def", "valid_for", "(", "whitelist", ")", ":", "def", "decorator", "(", "func", ")", ":", "@", "functools", ".", "wraps", "(", "func", ")", "def", "wrapper", "(", "self", ",", "*", "args", ")", ":", "valid_item", "=", "False", "try", ":", "if", "I...
descriptor to check the genus type of an item, to see if the method is valid for that type From http://stackoverflow.com/questions/30809814/python-descriptors-with-arguments :param whitelist: list of OLX tag names, like 'chapter' or 'vertical' :return:
[ "descriptor", "to", "check", "the", "genus", "type", "of", "an", "item", "to", "see", "if", "the", "method", "is", "valid", "for", "that", "type", "From", "http", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "30809814", "/", "python", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/edx/compositions.py#L30-L53
mitsei/dlkit
dlkit/records/repository/edx/compositions.py
EdXCompositionFormRecord._init_map
def _init_map(self): """stub""" super(EdXCompositionFormRecord, self)._init_map() TextsFormRecord._init_map(self) # because the OsidForm breaks the MRO chain for super, in TemporalFormRecord ProvenanceFormRecord._init_map(self) # because the OsidForm breaks the MRO chain for super, in ...
python
def _init_map(self): """stub""" super(EdXCompositionFormRecord, self)._init_map() TextsFormRecord._init_map(self) # because the OsidForm breaks the MRO chain for super, in TemporalFormRecord ProvenanceFormRecord._init_map(self) # because the OsidForm breaks the MRO chain for super, in ...
[ "def", "_init_map", "(", "self", ")", ":", "super", "(", "EdXCompositionFormRecord", ",", "self", ")", ".", "_init_map", "(", ")", "TextsFormRecord", ".", "_init_map", "(", "self", ")", "# because the OsidForm breaks the MRO chain for super, in TemporalFormRecord", "Pro...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/edx/compositions.py#L73-L92
mitsei/dlkit
dlkit/records/repository/edx/compositions.py
EdXCompositionFormRecord._init_metadata
def _init_metadata(self): """stub""" super(EdXCompositionFormRecord, self)._init_metadata() TextsFormRecord._init_metadata(self) # because the OsidForm breaks the MRO chain for super, in TemporalFormRecord ProvenanceFormRecord._init_metadata(self) # because the OsidForm breaks the MRO ...
python
def _init_metadata(self): """stub""" super(EdXCompositionFormRecord, self)._init_metadata() TextsFormRecord._init_metadata(self) # because the OsidForm breaks the MRO chain for super, in TemporalFormRecord ProvenanceFormRecord._init_metadata(self) # because the OsidForm breaks the MRO ...
[ "def", "_init_metadata", "(", "self", ")", ":", "super", "(", "EdXCompositionFormRecord", ",", "self", ")", ".", "_init_metadata", "(", ")", "TextsFormRecord", ".", "_init_metadata", "(", "self", ")", "# because the OsidForm breaks the MRO chain for super, in TemporalForm...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/edx/compositions.py#L94-L142
mitsei/dlkit
dlkit/records/repository/edx/compositions.py
EdXCompositionQueryRecord.match_any_learning_objective
def match_any_learning_objective(self, match): """Matches an item with any objective. arg: match (boolean): ``true`` to match items with any learning objective, ``false`` to match items with no learning objectives *compliance: mandatory -- This method must be ...
python
def match_any_learning_objective(self, match): """Matches an item with any objective. arg: match (boolean): ``true`` to match items with any learning objective, ``false`` to match items with no learning objectives *compliance: mandatory -- This method must be ...
[ "def", "match_any_learning_objective", "(", "self", ",", "match", ")", ":", "match_key", "=", "'learningObjectiveIds'", "param", "=", "'$exists'", "if", "match", ":", "flag", "=", "'true'", "else", ":", "flag", "=", "'false'", "if", "match_key", "in", "self", ...
Matches an item with any objective. arg: match (boolean): ``true`` to match items with any learning objective, ``false`` to match items with no learning objectives *compliance: mandatory -- This method must be implemented.*
[ "Matches", "an", "item", "with", "any", "objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/edx/compositions.py#L215-L234
mitsei/dlkit
dlkit/records/repository/edx/compositions.py
EdXCompositionRecord.get_group_id_to_child
def get_group_id_to_child(self): """ At a minimum need a course composition parent and two children to the split test course composition | split_test composition | | vertical vertical And the expected output is a URL...
python
def get_group_id_to_child(self): """ At a minimum need a course composition parent and two children to the split test course composition | split_test composition | | vertical vertical And the expected output is a URL...
[ "def", "get_group_id_to_child", "(", "self", ")", ":", "# get the children compositions, then construct", "# the escaped-JSON structure for this split_test", "group_ids", "=", "{", "}", "# also need the course name...so go up the composition tree", "course_node", "=", "None", "found_...
At a minimum need a course composition parent and two children to the split test course composition | split_test composition | | vertical vertical And the expected output is a URL-safe (" instead of ") JSON string, of t...
[ "At", "a", "minimum", "need", "a", "course", "composition", "parent", "and", "two", "children", "to", "the", "split", "test" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/edx/compositions.py#L306-L358
mitsei/dlkit
dlkit/records/repository/edx/compositions.py
EdXCompositionRecord.export_olx
def export_olx(self, tarball, root_path): """if sequestered, only export the assets""" def append_asset_to_soup_and_export(asset_): if isinstance(asset_, Item): try: unique_url = asset_.export_olx(tarball, root_path) except AttributeError: ...
python
def export_olx(self, tarball, root_path): """if sequestered, only export the assets""" def append_asset_to_soup_and_export(asset_): if isinstance(asset_, Item): try: unique_url = asset_.export_olx(tarball, root_path) except AttributeError: ...
[ "def", "export_olx", "(", "self", ",", "tarball", ",", "root_path", ")", ":", "def", "append_asset_to_soup_and_export", "(", "asset_", ")", ":", "if", "isinstance", "(", "asset_", ",", "Item", ")", ":", "try", ":", "unique_url", "=", "asset_", ".", "export...
if sequestered, only export the assets
[ "if", "sequestered", "only", "export", "the", "assets" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/edx/compositions.py#L522-L604
HDI-Project/mit-d3m
mit_d3m/loaders.py
Loader.load
def load(self, d3mds): """Load X, y and context from D3MDS.""" X, y = d3mds.get_data() return Dataset(d3mds.dataset_id, X, y)
python
def load(self, d3mds): """Load X, y and context from D3MDS.""" X, y = d3mds.get_data() return Dataset(d3mds.dataset_id, X, y)
[ "def", "load", "(", "self", ",", "d3mds", ")", ":", "X", ",", "y", "=", "d3mds", ".", "get_data", "(", ")", "return", "Dataset", "(", "d3mds", ".", "dataset_id", ",", "X", ",", "y", ")" ]
Load X, y and context from D3MDS.
[ "Load", "X", "y", "and", "context", "from", "D3MDS", "." ]
train
https://github.com/HDI-Project/mit-d3m/blob/3ab44eb5db8de8e28a29ca4b695a7a4becf45275/mit_d3m/loaders.py#L56-L60
HDI-Project/mit-d3m
mit_d3m/loaders.py
ResourceLoader.load
def load(self, d3mds): """Load X, y and context from D3MDS.""" X, y = d3mds.get_data() resource_columns = d3mds.get_related_resources(self.data_modality) for resource_column in resource_columns: X = self.load_resources(X, resource_column, d3mds) context = self.get_c...
python
def load(self, d3mds): """Load X, y and context from D3MDS.""" X, y = d3mds.get_data() resource_columns = d3mds.get_related_resources(self.data_modality) for resource_column in resource_columns: X = self.load_resources(X, resource_column, d3mds) context = self.get_c...
[ "def", "load", "(", "self", ",", "d3mds", ")", ":", "X", ",", "y", "=", "d3mds", ".", "get_data", "(", ")", "resource_columns", "=", "d3mds", ".", "get_related_resources", "(", "self", ".", "data_modality", ")", "for", "resource_column", "in", "resource_co...
Load X, y and context from D3MDS.
[ "Load", "X", "y", "and", "context", "from", "D3MDS", "." ]
train
https://github.com/HDI-Project/mit-d3m/blob/3ab44eb5db8de8e28a29ca4b695a7a4becf45275/mit_d3m/loaders.py#L426-L436
claudep/translitcodec
translitcodec/__init__.py
long_encode
def long_encode(input, errors='strict'): """Transliterate to 8 bit using as many letters as needed. For example, \u00e4 LATIN SMALL LETTER A WITH DIAERESIS ``ä`` will be replaced with ``ae``. """ if not isinstance(input, text_type): input = text_type(input, sys.getdefaultencoding(), errors...
python
def long_encode(input, errors='strict'): """Transliterate to 8 bit using as many letters as needed. For example, \u00e4 LATIN SMALL LETTER A WITH DIAERESIS ``ä`` will be replaced with ``ae``. """ if not isinstance(input, text_type): input = text_type(input, sys.getdefaultencoding(), errors...
[ "def", "long_encode", "(", "input", ",", "errors", "=", "'strict'", ")", ":", "if", "not", "isinstance", "(", "input", ",", "text_type", ")", ":", "input", "=", "text_type", "(", "input", ",", "sys", ".", "getdefaultencoding", "(", ")", ",", "errors", ...
Transliterate to 8 bit using as many letters as needed. For example, \u00e4 LATIN SMALL LETTER A WITH DIAERESIS ``ä`` will be replaced with ``ae``.
[ "Transliterate", "to", "8", "bit", "using", "as", "many", "letters", "as", "needed", "." ]
train
https://github.com/claudep/translitcodec/blob/63b4a928afcb1e7721b33936e4d56254f415ddaf/translitcodec/__init__.py#L25-L36
claudep/translitcodec
translitcodec/__init__.py
short_encode
def short_encode(input, errors='strict'): """Transliterate to 8 bit using as few letters as possible. For example, \u00e4 LATIN SMALL LETTER A WITH DIAERESIS ``ä`` will be replaced with ``a``. """ if not isinstance(input, text_type): input = text_type(input, sys.getdefaultencoding(), error...
python
def short_encode(input, errors='strict'): """Transliterate to 8 bit using as few letters as possible. For example, \u00e4 LATIN SMALL LETTER A WITH DIAERESIS ``ä`` will be replaced with ``a``. """ if not isinstance(input, text_type): input = text_type(input, sys.getdefaultencoding(), error...
[ "def", "short_encode", "(", "input", ",", "errors", "=", "'strict'", ")", ":", "if", "not", "isinstance", "(", "input", ",", "text_type", ")", ":", "input", "=", "text_type", "(", "input", ",", "sys", ".", "getdefaultencoding", "(", ")", ",", "errors", ...
Transliterate to 8 bit using as few letters as possible. For example, \u00e4 LATIN SMALL LETTER A WITH DIAERESIS ``ä`` will be replaced with ``a``.
[ "Transliterate", "to", "8", "bit", "using", "as", "few", "letters", "as", "possible", "." ]
train
https://github.com/claudep/translitcodec/blob/63b4a928afcb1e7721b33936e4d56254f415ddaf/translitcodec/__init__.py#L39-L50
claudep/translitcodec
translitcodec/__init__.py
single_encode
def single_encode(input, errors='strict'): """Transliterate to 8 bit using only single letter replacements. For example, \u2639 WHITE FROWNING FACE ``☹`` will be passed through unchanged. """ if not isinstance(input, text_type): input = text_type(input, sys.getdefaultencoding(), errors) ...
python
def single_encode(input, errors='strict'): """Transliterate to 8 bit using only single letter replacements. For example, \u2639 WHITE FROWNING FACE ``☹`` will be passed through unchanged. """ if not isinstance(input, text_type): input = text_type(input, sys.getdefaultencoding(), errors) ...
[ "def", "single_encode", "(", "input", ",", "errors", "=", "'strict'", ")", ":", "if", "not", "isinstance", "(", "input", ",", "text_type", ")", ":", "input", "=", "text_type", "(", "input", ",", "sys", ".", "getdefaultencoding", "(", ")", ",", "errors", ...
Transliterate to 8 bit using only single letter replacements. For example, \u2639 WHITE FROWNING FACE ``☹`` will be passed through unchanged.
[ "Transliterate", "to", "8", "bit", "using", "only", "single", "letter", "replacements", "." ]
train
https://github.com/claudep/translitcodec/blob/63b4a928afcb1e7721b33936e4d56254f415ddaf/translitcodec/__init__.py#L53-L64
claudep/translitcodec
translitcodec/__init__.py
_double_encoding_factory
def _double_encoding_factory(encoder, byte_encoder, byte_encoding): """Send the transliterated output to another codec.""" def dbl_encode(input, errors='strict'): uni, length = encoder(input, errors) return byte_encoder(uni, errors)[0], length dbl_encode.__name__ = '%s_%s' % (encoder.__name_...
python
def _double_encoding_factory(encoder, byte_encoder, byte_encoding): """Send the transliterated output to another codec.""" def dbl_encode(input, errors='strict'): uni, length = encoder(input, errors) return byte_encoder(uni, errors)[0], length dbl_encode.__name__ = '%s_%s' % (encoder.__name_...
[ "def", "_double_encoding_factory", "(", "encoder", ",", "byte_encoder", ",", "byte_encoding", ")", ":", "def", "dbl_encode", "(", "input", ",", "errors", "=", "'strict'", ")", ":", "uni", ",", "length", "=", "encoder", "(", "input", ",", "errors", ")", "re...
Send the transliterated output to another codec.
[ "Send", "the", "transliterated", "output", "to", "another", "codec", "." ]
train
https://github.com/claudep/translitcodec/blob/63b4a928afcb1e7721b33936e4d56254f415ddaf/translitcodec/__init__.py#L71-L77
claudep/translitcodec
translitcodec/__init__.py
trans_search
def trans_search(encoding): """Lookup transliterating codecs.""" if encoding == 'transliterate': return codecs.CodecInfo(long_encode, no_decode) # translit/long/utf8 # translit/one # translit/short/ascii if encoding.startswith('translit/'): parts = encoding.split('/') i...
python
def trans_search(encoding): """Lookup transliterating codecs.""" if encoding == 'transliterate': return codecs.CodecInfo(long_encode, no_decode) # translit/long/utf8 # translit/one # translit/short/ascii if encoding.startswith('translit/'): parts = encoding.split('/') i...
[ "def", "trans_search", "(", "encoding", ")", ":", "if", "encoding", "==", "'transliterate'", ":", "return", "codecs", ".", "CodecInfo", "(", "long_encode", ",", "no_decode", ")", "# translit/long/utf8", "# translit/one", "# translit/short/ascii", "if", "encoding", "...
Lookup transliterating codecs.
[ "Lookup", "transliterating", "codecs", "." ]
train
https://github.com/claudep/translitcodec/blob/63b4a928afcb1e7721b33936e4d56254f415ddaf/translitcodec/__init__.py#L80-L109
mdiener/grace
grace/py27/slimit/visitors/nodevisitor.py
NodeVisitor.visit
def visit(self, node): """Returns a generator that walks all children recursively.""" for child in node: yield child for subchild in self.visit(child): yield subchild
python
def visit(self, node): """Returns a generator that walks all children recursively.""" for child in node: yield child for subchild in self.visit(child): yield subchild
[ "def", "visit", "(", "self", ",", "node", ")", ":", "for", "child", "in", "node", ":", "yield", "child", "for", "subchild", "in", "self", ".", "visit", "(", "child", ")", ":", "yield", "subchild" ]
Returns a generator that walks all children recursively.
[ "Returns", "a", "generator", "that", "walks", "all", "children", "recursively", "." ]
train
https://github.com/mdiener/grace/blob/2dab13a2cf636da5da989904c5885166fc94d36d/grace/py27/slimit/visitors/nodevisitor.py#L75-L80
mitsei/dlkit
dlkit/json_/learning/default_mdata.py
get_objective_mdata
def get_objective_mdata(): """Return default mdata map for Objective""" return { 'cognitive_process': { 'element_label': { 'text': 'cognitive process', 'languageTypeId': str(DEFAULT_LANGUAGE_TYPE), 'scriptTypeId': str(DEFAULT_SCRIPT_TYPE), ...
python
def get_objective_mdata(): """Return default mdata map for Objective""" return { 'cognitive_process': { 'element_label': { 'text': 'cognitive process', 'languageTypeId': str(DEFAULT_LANGUAGE_TYPE), 'scriptTypeId': str(DEFAULT_SCRIPT_TYPE), ...
[ "def", "get_objective_mdata", "(", ")", ":", "return", "{", "'cognitive_process'", ":", "{", "'element_label'", ":", "{", "'text'", ":", "'cognitive process'", ",", "'languageTypeId'", ":", "str", "(", "DEFAULT_LANGUAGE_TYPE", ")", ",", "'scriptTypeId'", ":", "str...
Return default mdata map for Objective
[ "Return", "default", "mdata", "map", "for", "Objective" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/default_mdata.py#L11-L77
mitsei/dlkit
dlkit/json_/learning/default_mdata.py
get_activity_mdata
def get_activity_mdata(): """Return default mdata map for Activity""" return { 'courses': { 'element_label': { 'text': 'courses', 'languageTypeId': str(DEFAULT_LANGUAGE_TYPE), 'scriptTypeId': str(DEFAULT_SCRIPT_TYPE), 'formatTyp...
python
def get_activity_mdata(): """Return default mdata map for Activity""" return { 'courses': { 'element_label': { 'text': 'courses', 'languageTypeId': str(DEFAULT_LANGUAGE_TYPE), 'scriptTypeId': str(DEFAULT_SCRIPT_TYPE), 'formatTyp...
[ "def", "get_activity_mdata", "(", ")", ":", "return", "{", "'courses'", ":", "{", "'element_label'", ":", "{", "'text'", ":", "'courses'", ",", "'languageTypeId'", ":", "str", "(", "DEFAULT_LANGUAGE_TYPE", ")", ",", "'scriptTypeId'", ":", "str", "(", "DEFAULT_...
Return default mdata map for Activity
[ "Return", "default", "mdata", "map", "for", "Activity" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/default_mdata.py#L80-L167
mitsei/dlkit
dlkit/json_/learning/default_mdata.py
get_proficiency_mdata
def get_proficiency_mdata(): """Return default mdata map for Proficiency""" return { 'completion': { 'element_label': { 'text': 'completion', 'languageTypeId': str(DEFAULT_LANGUAGE_TYPE), 'scriptTypeId': str(DEFAULT_SCRIPT_TYPE), ...
python
def get_proficiency_mdata(): """Return default mdata map for Proficiency""" return { 'completion': { 'element_label': { 'text': 'completion', 'languageTypeId': str(DEFAULT_LANGUAGE_TYPE), 'scriptTypeId': str(DEFAULT_SCRIPT_TYPE), ...
[ "def", "get_proficiency_mdata", "(", ")", ":", "return", "{", "'completion'", ":", "{", "'element_label'", ":", "{", "'text'", ":", "'completion'", ",", "'languageTypeId'", ":", "str", "(", "DEFAULT_LANGUAGE_TYPE", ")", ",", "'scriptTypeId'", ":", "str", "(", ...
Return default mdata map for Proficiency
[ "Return", "default", "mdata", "map", "for", "Proficiency" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/default_mdata.py#L170-L260
cloudnull/cloudlib
cloudlib/logger.py
getLogger
def getLogger(name): """Return a logger from a given name. If the name does not have a log handler, this will create one for it based on the module name which will log everything to a log file in a location the executing user will have access to. :param name: ``str`` :return: ``object`` ""...
python
def getLogger(name): """Return a logger from a given name. If the name does not have a log handler, this will create one for it based on the module name which will log everything to a log file in a location the executing user will have access to. :param name: ``str`` :return: ``object`` ""...
[ "def", "getLogger", "(", "name", ")", ":", "log", "=", "logging", ".", "getLogger", "(", "name", "=", "name", ")", "for", "handler", "in", "log", ".", "handlers", ":", "if", "name", "==", "handler", ".", "name", ":", "return", "log", "else", ":", "...
Return a logger from a given name. If the name does not have a log handler, this will create one for it based on the module name which will log everything to a log file in a location the executing user will have access to. :param name: ``str`` :return: ``object``
[ "Return", "a", "logger", "from", "a", "given", "name", "." ]
train
https://github.com/cloudnull/cloudlib/blob/5038111ce02521caa2558117e3bae9e1e806d315/cloudlib/logger.py#L69-L84
cloudnull/cloudlib
cloudlib/logger.py
ColorLogRecord.getMessage
def getMessage(self): """Returns a colorized log message based on the log level. If the platform is windows the original message will be returned without colorization windows escape codes are crazy. :returns: ``str`` """ msg = str(self.msg) if self.args: ...
python
def getMessage(self): """Returns a colorized log message based on the log level. If the platform is windows the original message will be returned without colorization windows escape codes are crazy. :returns: ``str`` """ msg = str(self.msg) if self.args: ...
[ "def", "getMessage", "(", "self", ")", ":", "msg", "=", "str", "(", "self", ".", "msg", ")", "if", "self", ".", "args", ":", "msg", "=", "msg", "%", "self", ".", "args", "if", "platform", ".", "system", "(", ")", ".", "lower", "(", ")", "==", ...
Returns a colorized log message based on the log level. If the platform is windows the original message will be returned without colorization windows escape codes are crazy. :returns: ``str``
[ "Returns", "a", "colorized", "log", "message", "based", "on", "the", "log", "level", "." ]
train
https://github.com/cloudnull/cloudlib/blob/5038111ce02521caa2558117e3bae9e1e806d315/cloudlib/logger.py#L43-L66