_id stringlengths 2 7 | title stringlengths 1 88 | partition stringclasses 3
values | text stringlengths 75 19.8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q47000 | action | train | def action(callback=None, name=None, path=None, methods=Method.GET, resource=None, tags=None,
summary=None, middleware=None):
# type: (Callable, Path, Path, Methods, Type[Resource], Tags, str, List[Any]) -> Operation
"""
Decorator to apply an action to a resource. An action is applied to a `detai... | python | {
"resource": ""
} |
q47001 | listing | train | def listing(callback=None, path=None, method=Method.GET, resource=None, tags=None, summary="List resources",
middleware=None, default_limit=50, max_limit=None, use_wrapper=True):
# type: (Callable, Path, Methods, Resource, Tags, str, List[Any], int, int) -> Operation
"""
Decorator to configure a... | python | {
"resource": ""
} |
q47002 | create | train | def create(callback=None, path=None, method=Method.POST, resource=None, tags=None, summary="Create a new resource",
middleware=None):
# type: (Callable, Path, Methods, Resource, Tags, str, List[Any]) -> Operation
"""
Decorator to configure an operation that creates a resource.
"""
def inn... | python | {
"resource": ""
} |
q47003 | detail | train | def detail(callback=None, path=None, method=Method.GET, resource=None, tags=None, summary="Get specified resource.",
middleware=None):
# type: (Callable, Path, Methods, Resource, Tags, str, List[Any]) -> Operation
"""
Decorator to configure an operation that fetches a resource.
"""
def in... | python | {
"resource": ""
} |
q47004 | update | train | def update(callback=None, path=None, method=Method.PUT, resource=None, tags=None, summary="Update specified resource.",
middleware=None):
# type: (Callable, Path, Methods, Resource, Tags, str, List[Any]) -> Operation
"""
Decorator to configure an operation that updates a resource.
"""
def... | python | {
"resource": ""
} |
q47005 | patch | train | def patch(callback=None, path=None, method=Method.PATCH, resource=None, tags=None, summary="Patch specified resource.",
middleware=None):
# type: (Callable, Path, Methods, Resource, Tags, str, List[Any]) -> Operation
"""
Decorator to configure an operation that patches a resource.
"""
def ... | python | {
"resource": ""
} |
q47006 | delete | train | def delete(callback=None, path=None, method=Method.DELETE, tags=None, summary="Delete specified resource.",
middleware=None):
# type: (Callable, Path, Methods, Tags, str, List[Any]) -> Operation
"""
Decorator to configure an operation that deletes resource.
"""
def inner(c):
op = ... | python | {
"resource": ""
} |
q47007 | Operation.bind_to_instance | train | def bind_to_instance(self, instance):
"""
Bind a ResourceApi instance to an operation.
"""
self.binding = instance
self.middleware.append(instance) | python | {
"resource": ""
} |
q47008 | Operation.op_paths | train | def op_paths(self, path_prefix=None):
# type: (Path) -> Generator[Tuple[UrlPath, Operation]]
"""
Yield operations paths stored in containers.
"""
url_path = self.path
if path_prefix:
url_path = path_prefix + url_path
yield url_path, self | python | {
"resource": ""
} |
q47009 | Operation.resource | train | def resource(self):
"""
Resource associated with operation.
"""
if self._resource:
return self._resource
elif self.binding:
return self.binding.resource | python | {
"resource": ""
} |
q47010 | Operation.key_field_name | train | def key_field_name(self):
"""
Field identified as the key.
"""
name = 'resource_id'
if self.resource:
key_field = getmeta(self.resource).key_field
if key_field:
name = key_field.attname
return name | python | {
"resource": ""
} |
q47011 | Operation.to_swagger | train | def to_swagger(self):
"""
Generate a dictionary for documentation generation.
"""
return dict_filter(
operationId=self.operation_id,
description=(self.callback.__doc__ or '').strip() or None,
summary=self.summary or None,
tags=list(self.tag... | python | {
"resource": ""
} |
q47012 | Operation.tags | train | def tags(self):
# type: () -> Set[str]
"""
Tags applied to operation.
"""
tags = set()
if self._tags:
tags.update(self._tags)
if self.binding:
binding_tags = getattr(self.binding, 'tags', None)
if binding_tags:
t... | python | {
"resource": ""
} |
q47013 | Runner.run_container | train | def run_container(self, conf, images, **kwargs):
"""Run this image and all dependency images"""
with self._run_container(conf, images, **kwargs):
pass | python | {
"resource": ""
} |
q47014 | Runner.delete_deps | train | def delete_deps(self, conf, images):
"""Delete any deleteable images"""
for dependency_name, _ in conf.dependency_images():
image = images[dependency_name]
if image.deleteable_image:
log.info("Removing un-needed image {0}".format(image.image_name))
... | python | {
"resource": ""
} |
q47015 | Runner.run_deps | train | def run_deps(self, conf, images):
"""Start containers for all our dependencies"""
for dependency_name, detached in conf.dependency_images(for_running=True):
try:
self.run_container(images[dependency_name], images, detach=detached, dependency=True)
except Exception... | python | {
"resource": ""
} |
q47016 | Runner.stop_deps | train | def stop_deps(self, conf, images):
"""Stop the containers for all our dependencies"""
for dependency, _ in conf.dependency_images():
self.stop_deps(images[dependency], images)
try:
self.stop_container(images[dependency], fail_on_bad_exit=True, fail_reason="Failed ... | python | {
"resource": ""
} |
q47017 | Runner.wait_for_dep | train | def wait_for_dep(self, api, conf, wait_condition, start, last_attempt):
"""Wait for this image"""
from harpoon.option_spec.image_objs import WaitCondition
conditions = list(wait_condition.conditions(start, last_attempt))
if conditions[0] in (WaitCondition.KeepWaiting, WaitCondition.Timed... | python | {
"resource": ""
} |
q47018 | Runner.start_container | train | def start_container(self, conf, tty=True, detach=False, is_dependency=False, no_intervention=False):
"""Start up a single container"""
# Make sure we can bind to our specified ports!
if not conf.harpoon.docker_api.base_url.startswith("http"):
self.find_bound_ports(conf.ports)
... | python | {
"resource": ""
} |
q47019 | Runner.start_tty | train | def start_tty(self, conf, interactive):
"""Startup a tty"""
try:
api = conf.harpoon.docker_context_maker().api
container_id = conf.container_id
stdin = conf.harpoon.tty_stdin
stdout = conf.harpoon.tty_stdout
stderr = conf.harpoon.tty_stderr
... | python | {
"resource": ""
} |
q47020 | Runner.wait_till_stopped | train | def wait_till_stopped(self, conf, container_id, timeout=10, message=None, waiting=True):
"""Wait till a container is stopped"""
stopped = False
inspection = None
for _ in until(timeout=timeout, action=message):
try:
inspection = conf.harpoon.docker_api.inspect... | python | {
"resource": ""
} |
q47021 | Runner.is_stopped | train | def is_stopped(self, *args, **kwargs):
"""Return whether this container is stopped"""
kwargs["waiting"] = False
return self.wait_till_stopped(*args, **kwargs) | python | {
"resource": ""
} |
q47022 | Runner.get_exit_code | train | def get_exit_code(self, conf):
"""Determine how a container exited"""
for _ in until(timeout=0.5, step=0.1, silent=True):
try:
inspection = conf.harpoon.docker_api.inspect_container(conf.container_id)
if not isinstance(inspection, dict) or "State" not in inspe... | python | {
"resource": ""
} |
q47023 | Runner.find_bound_ports | train | def find_bound_ports(self, ports):
"""Find any ports that are already bound and complain about them"""
bound = []
for port in ports:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.bind((port.ip if port.ip is not NotSpecified else "127.0.0.1",... | python | {
"resource": ""
} |
q47024 | Runner.stage_run_intervention | train | def stage_run_intervention(self, conf, just_do_it=False):
"""Start an intervention!"""
if not conf.harpoon.interactive or conf.harpoon.no_intervention:
return
if just_do_it:
answer = 'y'
else:
hp.write_to(conf.harpoon.stdout, "!!!!\n")
hp.... | python | {
"resource": ""
} |
q47025 | Runner.intervention | train | def intervention(self, commit, conf):
"""Ask the user if they want to commit this container and run sh in it"""
if not conf.harpoon.interactive or conf.harpoon.no_intervention:
yield
return
hp.write_to(conf.harpoon.stdout, "!!!!\n")
hp.write_to(conf.harpoon.stdou... | python | {
"resource": ""
} |
q47026 | Runner.commit_and_run | train | def commit_and_run(self, commit, conf, command="sh"):
"""Commit this container id and run the provided command in it and clean up afterwards"""
image_hash = None
try:
image_hash = conf.harpoon.docker_api.commit(commit)["Id"]
new_conf = conf.clone()
new_conf.b... | python | {
"resource": ""
} |
q47027 | MongoListener.initialize | train | def initialize(self, runtime):
"""Initialize this listener. Finds most recent timestamp"""
if self.is_alive():
raise IllegalState('notification thread is already initialized')
if not JSON_CLIENT.is_json_client_set() and runtime is not None:
JSON_CLIENT.set_json_client(run... | python | {
"resource": ""
} |
q47028 | MongoListener._notify_receiver | train | def _notify_receiver(self, receiver, params, doc):
"""Send notification to the receiver"""
verb = VMAP[doc['op']]
ns = doc['ns']
notification_id = Id(ns + 'Notification:' + str(ObjectId()) + '@' + params['authority'])
object_id = Id(ns + ':' + str(doc['o']['_id']) + '@' + params[... | python | {
"resource": ""
} |
q47029 | MongoListener._run_namespace | train | def _run_namespace(self, doc):
"""Run through all receivers related to the doc's namespace"""
for receiver in self.receivers[doc['ns']]:
params = self.receivers[doc['ns']][receiver]
if params[doc['op']]:
if params[doc['op']] is True or str(doc['o']['_id']) in para... | python | {
"resource": ""
} |
q47030 | MongoListener._retry | train | def _retry(self):
"""Deal with unacknowledged notifications."""
notifications_to_delete = []
for notification_id in self.notifications:
if datetime.datetime.utcnow() > self.notifications[notification_id]['ts'] + self._wait_period:
self._notify_receiver(
... | python | {
"resource": ""
} |
q47031 | MongoListener.run | train | def run(self):
"""main control loop for thread"""
while True:
try:
cursor = JSON_CLIENT.json_client['local']['oplog.rs'].find(
{'ts': {'$gt': self.last_timestamp}})
except TypeError:
# filesystem, so .json_client is a bool and n... | python | {
"resource": ""
} |
q47032 | range_return | train | def range_return(request, items):
"""
Determine what range of objects to return.
Will check fot both `Range` and `X-Range` headers in the request and
set both `Content-Range` and 'X-Content-Range' headers.
:rtype: list
"""
if ('Range' in request.headers):
range = parse_range_header... | python | {
"resource": ""
} |
q47033 | set_http_caching | train | def set_http_caching(request, gateway='crab', region='permanent'):
"""
Set an HTTP Cache Control header on a request.
:param pyramid.request.Request request: Request to set headers on.
:param str gateway: What gateway are we caching for? Defaults to `crab`.
:param str region: What caching region to... | python | {
"resource": ""
} |
q47034 | AssessmentSessionSection._initialize_part_map | train | def _initialize_part_map(self):
"""Sets up assessmentPartMap with as much information as is initially available."""
self._my_map['assessmentParts'] = []
self._my_map['questions'] = []
item_ids = self._assessment_part.get_item_ids()
if item_ids.available():
# This is a... | python | {
"resource": ""
} |
q47035 | AssessmentSessionSection._save | train | def _save(self):
"""Saves the current state of this AssessmentSection to database.
Should be called every time the question map changes.
"""
collection = JSONClientValidated('assessment',
collection='AssessmentSection',
... | python | {
"resource": ""
} |
q47036 | AssessmentSessionSection._delete | train | def _delete(self):
"""Deletes this AssessmentSection from database.
Will be called by AssessmentTaken._delete() for clean-up purposes.
"""
collection = JSONClientValidated('assessment',
collection='AssessmentSection',
... | python | {
"resource": ""
} |
q47037 | AssessmentSessionSection._get_assessment_part | train | def _get_assessment_part(self, part_id=None):
"""Gets an AssessmentPart given a part_id.
Returns this Section's own part if part_id is None.
Make this a private part, so that it doesn't collide with the AssessmentPart.get_assessment_part
method, which does not expect any arguments...
... | python | {
"resource": ""
} |
q47038 | AssessmentSessionSection._update_from_database | train | def _update_from_database(self):
"""Updates map to latest state in database.
Should be called prior to major object events to assure that an
assessment being taken on multiple devices are reasonably synchronized.
"""
collection = JSONClientValidated('assessment',
... | python | {
"resource": ""
} |
q47039 | AssessmentSessionSection._update_questions | train | def _update_questions(self):
"""Updates questions known to this Section"""
if self.is_simple_section():
return # we don't need to go through any this for simple sections
# ideally, we would update the parts map and questions list
# at the same time as _get_parts(), to not ru... | python | {
"resource": ""
} |
q47040 | AssessmentSessionSection._update_assessment_parts_map | train | def _update_assessment_parts_map(self, part_list):
"""Updates the part map.
Called before question list gets updated if it is determined that the
sections assessmentPart map is out of date with the current part list.
"""
for part in part_list:
# perhaps look for a "... | python | {
"resource": ""
} |
q47041 | AssessmentSessionSection._get_question_map | train | def _get_question_map(self, question_id):
"""get question map from questions matching question_id
This can make sense of both Section assigned Ids or normal Question/Item Ids
"""
if question_id.get_authority() == ASSESSMENT_AUTHORITY:
key = '_id'
match_value = O... | python | {
"resource": ""
} |
q47042 | AssessmentSessionSection.get_question_ids_for_assessment_part | train | def get_question_ids_for_assessment_part(self, assessment_part_id):
"""convenience method returns unique question ids associated with an assessment_part_id"""
question_ids = []
for question_map in self._my_map['questions']:
if question_map['assessmentPartId'] == str(assessment_part_i... | python | {
"resource": ""
} |
q47043 | AssessmentSessionSection.get_item_ids_for_assessment_part | train | def get_item_ids_for_assessment_part(self, assessment_part_id):
"""convenience method returns item ids associated with an assessment_part_id"""
item_ids = []
for question_map in self._my_map['questions']:
if question_map['assessmentPartId'] == str(assessment_part_id):
... | python | {
"resource": ""
} |
q47044 | AssessmentSessionSection.get_questions | train | def get_questions(self, answered=None, honor_sequential=True, update=True):
"""gets all available questions for this section
if answered == False: only return next unanswered question
if answered == True: only return next answered question
if answered in None: return next question wheth... | python | {
"resource": ""
} |
q47045 | AssessmentSessionSection.get_next_question | train | def get_next_question(self, question_id, answered=None, reverse=False, honor_sequential=True):
"""Inspects question map to return the next available question.
if answered == False: only return next unanswered question
if answered == True: only return next answered question
if answered i... | python | {
"resource": ""
} |
q47046 | AssessmentSessionSection.submit_response | train | def submit_response(self, question_id, answer_form=None):
"""Updates assessmentParts map to insert an item response.
answer_form is None indicates that the current response is to be cleared
"""
if answer_form is None:
response = {'missingResponse': NULL_RESPONSE,
... | python | {
"resource": ""
} |
q47047 | AssessmentSessionSection.get_response | train | def get_response(self, question_id):
"""Gets the response for question_id"""
question_map = self._get_question_map(question_id) # will raise NotFound()
return self._get_response_from_question_map(question_map) | python | {
"resource": ""
} |
q47048 | AssessmentSessionSection.get_responses | train | def get_responses(self):
"""Gets list of the latest responses"""
response_list = []
for question_map in self._my_map['questions']:
response_list.append(self._get_response_from_question_map(question_map))
return ResponseList(response_list) | python | {
"resource": ""
} |
q47049 | AssessmentSessionSection.is_question_answered | train | def is_question_answered(self, question_id):
"""has the question matching item_id been answered and not skipped"""
question_map = self._get_question_map(question_id) # will raise NotFound()
if 'missingResponse' in question_map['responses'][0]:
return False
else:
... | python | {
"resource": ""
} |
q47050 | AssessmentSessionSection.is_feedback_available | train | def is_feedback_available(self, question_id):
"""is feedback available for item"""
response = self.get_response(question_id)
item = self._get_item(question_id)
if response.is_answered():
return item.is_feedback_available_for_response(response)
return item.is_feedback_... | python | {
"resource": ""
} |
q47051 | AssessmentSessionSection.get_feedback | train | def get_feedback(self, question_id):
"""get feedback for item"""
response = self.get_response(question_id)
item = self._get_item(response.get_item_id())
if response.is_answered():
try:
return item.get_feedback_for_response(response)
except errors.I... | python | {
"resource": ""
} |
q47052 | AssessmentSessionSection.get_confused_learning_objective_ids | train | def get_confused_learning_objective_ids(self, question_id):
"""get confused objective ids available for the question"""
response = self.get_response(question_id)
if response.is_answered():
item = self._get_item(response.get_item_id())
return item.get_confused_learning_obj... | python | {
"resource": ""
} |
q47053 | AssessmentSessionSection.is_correctness_available | train | def is_correctness_available(self, question_id):
"""is a measure of correctness available for the question"""
response = self.get_response(question_id)
if response.is_answered():
item = self._get_item(response.get_item_id())
return item.is_correctness_available_for_respon... | python | {
"resource": ""
} |
q47054 | AssessmentSessionSection.is_correct | train | def is_correct(self, question_id):
"""is the question answered correctly"""
response = self.get_response(question_id=question_id)
if response.is_answered():
item = self._get_item(response.get_item_id())
return item.is_response_correct(response)
raise errors.Illega... | python | {
"resource": ""
} |
q47055 | AssessmentSessionSection.get_correctness | train | def get_correctness(self, question_id):
"""get measure of correctness for the question"""
response = self.get_response(question_id)
if response.is_answered():
item = self._get_item(response.get_item_id())
return item.get_correctness_for_response(response)
raise er... | python | {
"resource": ""
} |
q47056 | AssessmentSessionSection.finish | train | def finish(self):
"""Declare this section finished"""
self._my_map['over'] = True # finished == over?
self._my_map['completionTime'] = DateTime.utcnow()
self._save() | python | {
"resource": ""
} |
q47057 | AssessmentSessionSection.is_complete | train | def is_complete(self):
"""Check all Questions for completeness
For now, completeness simply means that all questions have been
responded to and not skipped or cleared.
"""
self._update_questions() # Make sure questions list is current
for question_map in self._my_map['... | python | {
"resource": ""
} |
q47058 | Unit.add_option | train | def add_option(self, section, name, value):
"""Add an option to a section of the unit file
Args:
section (str): The name of the section, If it doesn't exist it will be created
name (str): The name of the option to add
value (str): The value of the option
Ret... | python | {
"resource": ""
} |
q47059 | Unit.remove_option | train | def remove_option(self, section, name, value=None):
"""Remove an option from a unit
Args:
section (str): The section to remove from.
name (str): The item to remove.
value (str, optional): If specified, only the option matching this value will be removed
... | python | {
"resource": ""
} |
q47060 | Unit.destroy | train | 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 | {
"resource": ""
} |
q47061 | Unit.set_desired_state | train | 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 | {
"resource": ""
} |
q47062 | diff_medians | train | 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 | {
"resource": ""
} |
q47063 | diff_means | train | 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 | {
"resource": ""
} |
q47064 | isstring | train | 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 | {
"resource": ""
} |
q47065 | Response.get_item | train | 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 | {
"resource": ""
} |
q47066 | Response.get_response_record | train | 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 | {
"resource": ""
} |
q47067 | MultiChoiceRandomizeChoicesQuestionRecord.get_id | train | 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 | {
"resource": ""
} |
q47068 | Asset.get_source_id | train | 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 | {
"resource": ""
} |
q47069 | Asset.get_provider_links | train | 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 | {
"resource": ""
} |
q47070 | Asset.get_asset_content_ids | train | 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 | {
"resource": ""
} |
q47071 | Asset.get_asset_contents | train | 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 | {
"resource": ""
} |
q47072 | Asset.get_composition_id | train | 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 | {
"resource": ""
} |
q47073 | Asset.get_composition | train | 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 | {
"resource": ""
} |
q47074 | AssetForm.get_title_metadata | train | 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 | {
"resource": ""
} |
q47075 | AssetForm.get_public_domain_metadata | train | 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 | {
"resource": ""
} |
q47076 | AssetForm.clear_public_domain | train | 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 | {
"resource": ""
} |
q47077 | AssetForm.get_copyright_metadata | train | 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 | {
"resource": ""
} |
q47078 | AssetForm.clear_copyright | train | 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 | {
"resource": ""
} |
q47079 | AssetForm.get_copyright_registration_metadata | train | 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 | {
"resource": ""
} |
q47080 | AssetForm.clear_copyright_registration | train | 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 | {
"resource": ""
} |
q47081 | AssetForm.get_distribute_verbatim_metadata | train | 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 | {
"resource": ""
} |
q47082 | AssetForm.get_distribute_alterations_metadata | train | 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 | {
"resource": ""
} |
q47083 | AssetForm.get_distribute_compositions_metadata | train | 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 | {
"resource": ""
} |
q47084 | AssetForm.get_source_metadata | train | 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 | {
"resource": ""
} |
q47085 | AssetForm.clear_source | train | 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 | {
"resource": ""
} |
q47086 | AssetForm.get_provider_links_metadata | train | 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 | {
"resource": ""
} |
q47087 | AssetForm.clear_provider_links | train | 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 | {
"resource": ""
} |
q47088 | AssetForm.get_created_date_metadata | train | 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 | {
"resource": ""
} |
q47089 | AssetForm.clear_created_date | train | 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 | {
"resource": ""
} |
q47090 | AssetForm.get_published_metadata | train | 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 | {
"resource": ""
} |
q47091 | AssetForm.get_published_date_metadata | train | 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 | {
"resource": ""
} |
q47092 | AssetForm.clear_published_date | train | 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 | {
"resource": ""
} |
q47093 | AssetForm.get_principal_credit_string_metadata | train | 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 | {
"resource": ""
} |
q47094 | AssetForm.clear_principal_credit_string | train | 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 | {
"resource": ""
} |
q47095 | AssetForm.get_composition_metadata | train | 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 | {
"resource": ""
} |
q47096 | AssetForm.clear_composition | train | 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 | {
"resource": ""
} |
q47097 | AssetContent.get_asset_id | train | 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 | {
"resource": ""
} |
q47098 | AssetContent.get_asset | train | 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 | {
"resource": ""
} |
q47099 | AssetContentForm.get_accessibility_type_metadata | train | 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 | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.