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 |
|---|---|---|---|---|---|---|---|---|---|---|
mitsei/dlkit | dlkit/records/assessment/clix/assessment_offered_records.py | UnlockPreviousButtonAssessmentOfferedFormRecord._init_metadata | def _init_metadata(self):
"""stub"""
self._min_string_length = None
self._max_string_length = None
self._unlock_previous_metadata = {
'element_id': Id(self.my_osid_object_form._authority,
self.my_osid_object_form._namespace,
... | python | def _init_metadata(self):
"""stub"""
self._min_string_length = None
self._max_string_length = None
self._unlock_previous_metadata = {
'element_id': Id(self.my_osid_object_form._authority,
self.my_osid_object_form._namespace,
... | [
"def",
"_init_metadata",
"(",
"self",
")",
":",
"self",
".",
"_min_string_length",
"=",
"None",
"self",
".",
"_max_string_length",
"=",
"None",
"self",
".",
"_unlock_previous_metadata",
"=",
"{",
"'element_id'",
":",
"Id",
"(",
"self",
".",
"my_osid_object_form"... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/clix/assessment_offered_records.py#L150-L169 |
mitsei/dlkit | dlkit/records/assessment/clix/assessment_offered_records.py | UnlockPreviousButtonAssessmentOfferedFormRecord.set_unlock_previous | def set_unlock_previous(self, unlock_previous):
"""use a string -- for now, ``always`` and ``never`` are the options"""
if unlock_previous is None:
raise NullArgument('unlock_previous cannot be None')
if unlock_previous is not None and not utilities.is_string(unlock_previous):
... | python | def set_unlock_previous(self, unlock_previous):
"""use a string -- for now, ``always`` and ``never`` are the options"""
if unlock_previous is None:
raise NullArgument('unlock_previous cannot be None')
if unlock_previous is not None and not utilities.is_string(unlock_previous):
... | [
"def",
"set_unlock_previous",
"(",
"self",
",",
"unlock_previous",
")",
":",
"if",
"unlock_previous",
"is",
"None",
":",
"raise",
"NullArgument",
"(",
"'unlock_previous cannot be None'",
")",
"if",
"unlock_previous",
"is",
"not",
"None",
"and",
"not",
"utilities",
... | use a string -- for now, ``always`` and ``never`` are the options | [
"use",
"a",
"string",
"--",
"for",
"now",
"always",
"and",
"never",
"are",
"the",
"options"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/clix/assessment_offered_records.py#L175-L181 |
mitsei/dlkit | dlkit/records/assessment/clix/assessment_offered_records.py | UnlockPreviousButtonAssessmentOfferedFormRecord.clear_unlock_previous | def clear_unlock_previous(self):
"""stub"""
if (self.get_unlock_previous_metadata().is_read_only() or
self.get_unlock_previous_metadata().is_required()):
raise NoAccess()
self.my_osid_object_form._my_map['unlockPrevious'] = \
str(self._unlock_previous_meta... | python | def clear_unlock_previous(self):
"""stub"""
if (self.get_unlock_previous_metadata().is_read_only() or
self.get_unlock_previous_metadata().is_required()):
raise NoAccess()
self.my_osid_object_form._my_map['unlockPrevious'] = \
str(self._unlock_previous_meta... | [
"def",
"clear_unlock_previous",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"get_unlock_previous_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_unlock_previous_metadata",
"(",
")",
".",
"is_required",
"(",
")",
")",
":",
"rais... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/clix/assessment_offered_records.py#L183-L189 |
cmcdowell/weatherpy | weatherpy/response.py | Response._get_xml | def _get_xml(self, metric):
"""Returns the channel element of the RSS feed"""
self._opener = urllib2.build_opener()
self._opener.addheaders = [('User-agent', self.user_agent)]
if metric:
url = self.base_url + '?w={0}&u=c'.format(self.woeid)
else:
url = se... | python | def _get_xml(self, metric):
"""Returns the channel element of the RSS feed"""
self._opener = urllib2.build_opener()
self._opener.addheaders = [('User-agent', self.user_agent)]
if metric:
url = self.base_url + '?w={0}&u=c'.format(self.woeid)
else:
url = se... | [
"def",
"_get_xml",
"(",
"self",
",",
"metric",
")",
":",
"self",
".",
"_opener",
"=",
"urllib2",
".",
"build_opener",
"(",
")",
"self",
".",
"_opener",
".",
"addheaders",
"=",
"[",
"(",
"'User-agent'",
",",
"self",
".",
"user_agent",
")",
"]",
"if",
... | Returns the channel element of the RSS feed | [
"Returns",
"the",
"channel",
"element",
"of",
"the",
"RSS",
"feed"
] | train | https://github.com/cmcdowell/weatherpy/blob/7da7bed9db946dfab9318d67aab5fbda1e4fed21/weatherpy/response.py#L137-L149 |
cmcdowell/weatherpy | weatherpy/response.py | Response._parse_text | def _parse_text(self, element_name, namespace=''):
"""
Returns the text, as a string, of the specified element in the specified
namespace of the RSS feed.
Takes element_name and namespace as strings.
"""
try:
text = self._channel.find('.//' + namespace + elem... | python | def _parse_text(self, element_name, namespace=''):
"""
Returns the text, as a string, of the specified element in the specified
namespace of the RSS feed.
Takes element_name and namespace as strings.
"""
try:
text = self._channel.find('.//' + namespace + elem... | [
"def",
"_parse_text",
"(",
"self",
",",
"element_name",
",",
"namespace",
"=",
"''",
")",
":",
"try",
":",
"text",
"=",
"self",
".",
"_channel",
".",
"find",
"(",
"'.//'",
"+",
"namespace",
"+",
"element_name",
")",
".",
"text",
"except",
"AttributeError... | Returns the text, as a string, of the specified element in the specified
namespace of the RSS feed.
Takes element_name and namespace as strings. | [
"Returns",
"the",
"text",
"as",
"a",
"string",
"of",
"the",
"specified",
"element",
"in",
"the",
"specified",
"namespace",
"of",
"the",
"RSS",
"feed",
"."
] | train | https://github.com/cmcdowell/weatherpy/blob/7da7bed9db946dfab9318d67aab5fbda1e4fed21/weatherpy/response.py#L151-L165 |
cmcdowell/weatherpy | weatherpy/response.py | Response._parse_attributes | def _parse_attributes(self, element_name, package_class, namespace=''):
"""
Returns an instance of the package_class instantiated with a
dictionary of the attributes from element_name in the specified
namespace of the RSS feed.
"""
return package_class(
self._... | python | def _parse_attributes(self, element_name, package_class, namespace=''):
"""
Returns an instance of the package_class instantiated with a
dictionary of the attributes from element_name in the specified
namespace of the RSS feed.
"""
return package_class(
self._... | [
"def",
"_parse_attributes",
"(",
"self",
",",
"element_name",
",",
"package_class",
",",
"namespace",
"=",
"''",
")",
":",
"return",
"package_class",
"(",
"self",
".",
"_channel",
".",
"find",
"(",
"'.//{0}{1}'",
".",
"format",
"(",
"namespace",
",",
"elemen... | Returns an instance of the package_class instantiated with a
dictionary of the attributes from element_name in the specified
namespace of the RSS feed. | [
"Returns",
"an",
"instance",
"of",
"the",
"package_class",
"instantiated",
"with",
"a",
"dictionary",
"of",
"the",
"attributes",
"from",
"element_name",
"in",
"the",
"specified",
"namespace",
"of",
"the",
"RSS",
"feed",
"."
] | train | https://github.com/cmcdowell/weatherpy/blob/7da7bed9db946dfab9318d67aab5fbda1e4fed21/weatherpy/response.py#L167-L177 |
cmcdowell/weatherpy | weatherpy/response.py | Response._parse_forecasts | def _parse_forecasts(self):
"""
Returns a list of instances of the forecast.Forecast class. Each
instance of the class is instantiated with the attributes of the
forecast elements in the RSS feed.
"""
forecasts = self._channel.findall(
'.//{0}{1}'.format(self.... | python | def _parse_forecasts(self):
"""
Returns a list of instances of the forecast.Forecast class. Each
instance of the class is instantiated with the attributes of the
forecast elements in the RSS feed.
"""
forecasts = self._channel.findall(
'.//{0}{1}'.format(self.... | [
"def",
"_parse_forecasts",
"(",
"self",
")",
":",
"forecasts",
"=",
"self",
".",
"_channel",
".",
"findall",
"(",
"'.//{0}{1}'",
".",
"format",
"(",
"self",
".",
"weather_namespace",
",",
"'forecast'",
")",
")",
"return",
"[",
"Forecast",
"(",
"forecast",
... | Returns a list of instances of the forecast.Forecast class. Each
instance of the class is instantiated with the attributes of the
forecast elements in the RSS feed. | [
"Returns",
"a",
"list",
"of",
"instances",
"of",
"the",
"forecast",
".",
"Forecast",
"class",
".",
"Each",
"instance",
"of",
"the",
"class",
"is",
"instantiated",
"with",
"the",
"attributes",
"of",
"the",
"forecast",
"elements",
"in",
"the",
"RSS",
"feed",
... | train | https://github.com/cmcdowell/weatherpy/blob/7da7bed9db946dfab9318d67aab5fbda1e4fed21/weatherpy/response.py#L179-L188 |
cmcdowell/weatherpy | weatherpy/response.py | Response._parse_image | def _parse_image(self):
"""
Returns an instance of the image.Image class for the RSS feed.
"""
image = {
'title': self._channel.find('./image/title').text,
'width': int(self._channel.find('./image/width').text),
'height': int(self._channel.find('./imag... | python | def _parse_image(self):
"""
Returns an instance of the image.Image class for the RSS feed.
"""
image = {
'title': self._channel.find('./image/title').text,
'width': int(self._channel.find('./image/width').text),
'height': int(self._channel.find('./imag... | [
"def",
"_parse_image",
"(",
"self",
")",
":",
"image",
"=",
"{",
"'title'",
":",
"self",
".",
"_channel",
".",
"find",
"(",
"'./image/title'",
")",
".",
"text",
",",
"'width'",
":",
"int",
"(",
"self",
".",
"_channel",
".",
"find",
"(",
"'./image/width... | Returns an instance of the image.Image class for the RSS feed. | [
"Returns",
"an",
"instance",
"of",
"the",
"image",
".",
"Image",
"class",
"for",
"the",
"RSS",
"feed",
"."
] | train | https://github.com/cmcdowell/weatherpy/blob/7da7bed9db946dfab9318d67aab5fbda1e4fed21/weatherpy/response.py#L190-L202 |
cmcdowell/weatherpy | weatherpy/response.py | Response._parse_last_build_date | def _parse_last_build_date(self):
"""
Returns the last build date of the RSS feed as datetime.datetime
object. Returned datetime is not time-zone aware
"""
date = self._channel.find('lastBuildDate').text
date = parser.parse(date, ignoretz=True)
return date | python | def _parse_last_build_date(self):
"""
Returns the last build date of the RSS feed as datetime.datetime
object. Returned datetime is not time-zone aware
"""
date = self._channel.find('lastBuildDate').text
date = parser.parse(date, ignoretz=True)
return date | [
"def",
"_parse_last_build_date",
"(",
"self",
")",
":",
"date",
"=",
"self",
".",
"_channel",
".",
"find",
"(",
"'lastBuildDate'",
")",
".",
"text",
"date",
"=",
"parser",
".",
"parse",
"(",
"date",
",",
"ignoretz",
"=",
"True",
")",
"return",
"date"
] | Returns the last build date of the RSS feed as datetime.datetime
object. Returned datetime is not time-zone aware | [
"Returns",
"the",
"last",
"build",
"date",
"of",
"the",
"RSS",
"feed",
"as",
"datetime",
".",
"datetime",
"object",
".",
"Returned",
"datetime",
"is",
"not",
"time",
"-",
"zone",
"aware"
] | train | https://github.com/cmcdowell/weatherpy/blob/7da7bed9db946dfab9318d67aab5fbda1e4fed21/weatherpy/response.py#L204-L211 |
cnelson/python-fleet | fleet/v1/client.py | SSHTunnel.forward_tcp | def forward_tcp(self, host, port):
"""Open a connection to host:port via an ssh tunnel.
Args:
host (str): The host to connect to.
port (int): The port to connect to.
Returns:
A socket-like object that is connected to the provided host:port.
"""
... | python | def forward_tcp(self, host, port):
"""Open a connection to host:port via an ssh tunnel.
Args:
host (str): The host to connect to.
port (int): The port to connect to.
Returns:
A socket-like object that is connected to the provided host:port.
"""
... | [
"def",
"forward_tcp",
"(",
"self",
",",
"host",
",",
"port",
")",
":",
"return",
"self",
".",
"transport",
".",
"open_channel",
"(",
"'direct-tcpip'",
",",
"(",
"host",
",",
"port",
")",
",",
"self",
".",
"transport",
".",
"getpeername",
"(",
")",
")"
... | Open a connection to host:port via an ssh tunnel.
Args:
host (str): The host to connect to.
port (int): The port to connect to.
Returns:
A socket-like object that is connected to the provided host:port. | [
"Open",
"a",
"connection",
"to",
"host",
":",
"port",
"via",
"an",
"ssh",
"tunnel",
"."
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L97-L113 |
cnelson/python-fleet | fleet/v1/client.py | Client._split_hostport | def _split_hostport(self, hostport, default_port=None):
"""Split a string in the format of '<host>:<port>' into it's component parts
default_port will be used if a port is not included in the string
Args:
str ('<host>' or '<host>:<port>'): A string to split into it's parts
... | python | def _split_hostport(self, hostport, default_port=None):
"""Split a string in the format of '<host>:<port>' into it's component parts
default_port will be used if a port is not included in the string
Args:
str ('<host>' or '<host>:<port>'): A string to split into it's parts
... | [
"def",
"_split_hostport",
"(",
"self",
",",
"hostport",
",",
"default_port",
"=",
"None",
")",
":",
"try",
":",
"(",
"host",
",",
"port",
")",
"=",
"hostport",
".",
"split",
"(",
"':'",
",",
"1",
")",
"except",
"ValueError",
":",
"# no colon in the strin... | Split a string in the format of '<host>:<port>' into it's component parts
default_port will be used if a port is not included in the string
Args:
str ('<host>' or '<host>:<port>'): A string to split into it's parts
Returns:
two item tuple: (host, port)
Raises:... | [
"Split",
"a",
"string",
"in",
"the",
"format",
"of",
"<host",
">",
":",
"<port",
">",
"into",
"it",
"s",
"component",
"parts"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L296-L328 |
cnelson/python-fleet | fleet/v1/client.py | Client._endpoint_to_target | def _endpoint_to_target(self, endpoint):
"""Convert a URL into a host / port, or into a path to a unix domain socket
Args:
endpoint (str): A URL parsable by urlparse
Returns:
3 item tuple: (host, port, path).
host and port will None, and path will be not Non... | python | def _endpoint_to_target(self, endpoint):
"""Convert a URL into a host / port, or into a path to a unix domain socket
Args:
endpoint (str): A URL parsable by urlparse
Returns:
3 item tuple: (host, port, path).
host and port will None, and path will be not Non... | [
"def",
"_endpoint_to_target",
"(",
"self",
",",
"endpoint",
")",
":",
"parsed",
"=",
"urlparse",
".",
"urlparse",
"(",
"endpoint",
")",
"scheme",
"=",
"parsed",
"[",
"0",
"]",
"hostport",
"=",
"parsed",
"[",
"1",
"]",
"if",
"'unix'",
"in",
"scheme",
":... | Convert a URL into a host / port, or into a path to a unix domain socket
Args:
endpoint (str): A URL parsable by urlparse
Returns:
3 item tuple: (host, port, path).
host and port will None, and path will be not None if a a unix domain socket URL is passed
... | [
"Convert",
"a",
"URL",
"into",
"a",
"host",
"/",
"port",
"or",
"into",
"a",
"path",
"to",
"a",
"unix",
"domain",
"socket"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L330-L355 |
cnelson/python-fleet | fleet/v1/client.py | Client._get_proxy_info | def _get_proxy_info(self, _=None):
"""Generate a ProxyInfo class from a connected SSH transport
Args:
_ (None): Ignored. This is just here as the ProxyInfo spec requires it.
Returns:
SSHTunnelProxyInfo: A ProxyInfo with an active socket tunneled through SSH
"... | python | def _get_proxy_info(self, _=None):
"""Generate a ProxyInfo class from a connected SSH transport
Args:
_ (None): Ignored. This is just here as the ProxyInfo spec requires it.
Returns:
SSHTunnelProxyInfo: A ProxyInfo with an active socket tunneled through SSH
"... | [
"def",
"_get_proxy_info",
"(",
"self",
",",
"_",
"=",
"None",
")",
":",
"# parse the fleet endpoint url, to establish a tunnel to that host",
"(",
"target_host",
",",
"target_port",
",",
"target_path",
")",
"=",
"self",
".",
"_endpoint_to_target",
"(",
"self",
".",
... | Generate a ProxyInfo class from a connected SSH transport
Args:
_ (None): Ignored. This is just here as the ProxyInfo spec requires it.
Returns:
SSHTunnelProxyInfo: A ProxyInfo with an active socket tunneled through SSH | [
"Generate",
"a",
"ProxyInfo",
"class",
"from",
"a",
"connected",
"SSH",
"transport"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L357-L385 |
cnelson/python-fleet | fleet/v1/client.py | Client._single_request | def _single_request(self, method, *args, **kwargs):
"""Make a single request to the fleet API endpoint
Args:
method (str): A dot delimited string indicating the method to call. Example: 'Machines.List'
*args: Passed directly to the method being called.
**kwargs: Pas... | python | def _single_request(self, method, *args, **kwargs):
"""Make a single request to the fleet API endpoint
Args:
method (str): A dot delimited string indicating the method to call. Example: 'Machines.List'
*args: Passed directly to the method being called.
**kwargs: Pas... | [
"def",
"_single_request",
"(",
"self",
",",
"method",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# The auto generated client binding require instantiating each object you want to call a method on",
"# For example to make a request to /machines for the list of machines you ... | Make a single request to the fleet API endpoint
Args:
method (str): A dot delimited string indicating the method to call. Example: 'Machines.List'
*args: Passed directly to the method being called.
**kwargs: Passed directly to the method being called.
Returns:
... | [
"Make",
"a",
"single",
"request",
"to",
"the",
"fleet",
"API",
"endpoint"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L387-L435 |
cnelson/python-fleet | fleet/v1/client.py | Client._request | def _request(self, method, *args, **kwargs):
"""Make a request with automatic pagination handling
Args:
method (str): A dot delimited string indicating the method to call. Example: 'Machines.List'
*args: Passed directly to the method being called.
**kwargs: Passed d... | python | def _request(self, method, *args, **kwargs):
"""Make a request with automatic pagination handling
Args:
method (str): A dot delimited string indicating the method to call. Example: 'Machines.List'
*args: Passed directly to the method being called.
**kwargs: Passed d... | [
"def",
"_request",
"(",
"self",
",",
"method",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# This is set to False and not None so that the while loop below will execute at least once",
"next_page_token",
"=",
"False",
"while",
"next_page_token",
"is",
"not",
"... | Make a request with automatic pagination handling
Args:
method (str): A dot delimited string indicating the method to call. Example: 'Machines.List'
*args: Passed directly to the method being called.
**kwargs: Passed directly to the method being called.
... | [
"Make",
"a",
"request",
"with",
"automatic",
"pagination",
"handling"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L437-L475 |
cnelson/python-fleet | fleet/v1/client.py | Client.create_unit | def create_unit(self, name, unit):
"""Create a new Unit in the cluster
Create and modify Unit entities to communicate to fleet the desired state of the cluster.
This simply declares what should be happening; the backend system still has to react to
the changes in this desired state. The... | python | def create_unit(self, name, unit):
"""Create a new Unit in the cluster
Create and modify Unit entities to communicate to fleet the desired state of the cluster.
This simply declares what should be happening; the backend system still has to react to
the changes in this desired state. The... | [
"def",
"create_unit",
"(",
"self",
",",
"name",
",",
"unit",
")",
":",
"self",
".",
"_single_request",
"(",
"'Units.Set'",
",",
"unitName",
"=",
"name",
",",
"body",
"=",
"{",
"'desiredState'",
":",
"unit",
".",
"desiredState",
",",
"'options'",
":",
"un... | Create a new Unit in the cluster
Create and modify Unit entities to communicate to fleet the desired state of the cluster.
This simply declares what should be happening; the backend system still has to react to
the changes in this desired state. The actual state of the system is communicated wi... | [
"Create",
"a",
"new",
"Unit",
"in",
"the",
"cluster"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L477-L503 |
cnelson/python-fleet | fleet/v1/client.py | Client.set_unit_desired_state | def set_unit_desired_state(self, unit, desired_state):
"""Update the desired state of a unit running in the cluster
Args:
unit (str, Unit): The Unit, or name of the unit to update
desired_state: State the user wishes the Unit to be in
("inactive", "loa... | python | def set_unit_desired_state(self, unit, desired_state):
"""Update the desired state of a unit running in the cluster
Args:
unit (str, Unit): The Unit, or name of the unit to update
desired_state: State the user wishes the Unit to be in
("inactive", "loa... | [
"def",
"set_unit_desired_state",
"(",
"self",
",",
"unit",
",",
"desired_state",
")",
":",
"if",
"desired_state",
"not",
"in",
"self",
".",
"_STATES",
":",
"raise",
"ValueError",
"(",
"'state must be one of: {0}'",
".",
"format",
"(",
"self",
".",
"_STATES",
"... | Update the desired state of a unit running in the cluster
Args:
unit (str, Unit): The Unit, or name of the unit to update
desired_state: State the user wishes the Unit to be in
("inactive", "loaded", or "launched")
Returns:
Unit: The unit t... | [
"Update",
"the",
"desired",
"state",
"of",
"a",
"unit",
"running",
"in",
"the",
"cluster"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L505-L538 |
cnelson/python-fleet | fleet/v1/client.py | Client.destroy_unit | def destroy_unit(self, unit):
"""Delete a unit from the cluster
Args:
unit (str, Unit): The Unit, or name of the unit to delete
Returns:
True: The unit was deleted
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400
"""
... | python | def destroy_unit(self, unit):
"""Delete a unit from the cluster
Args:
unit (str, Unit): The Unit, or name of the unit to delete
Returns:
True: The unit was deleted
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400
"""
... | [
"def",
"destroy_unit",
"(",
"self",
",",
"unit",
")",
":",
"# if we are given an object, grab it's name property",
"# otherwise, convert to unicode",
"if",
"isinstance",
"(",
"unit",
",",
"Unit",
")",
":",
"unit",
"=",
"unit",
".",
"name",
"else",
":",
"unit",
"="... | Delete a unit from the cluster
Args:
unit (str, Unit): The Unit, or name of the unit to delete
Returns:
True: The unit was deleted
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400 | [
"Delete",
"a",
"unit",
"from",
"the",
"cluster"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L540-L562 |
cnelson/python-fleet | fleet/v1/client.py | Client.list_units | def list_units(self):
"""Return the current list of the Units in the fleet cluster
Yields:
Unit: The next Unit in the cluster
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400
"""
for page in self._request('Units.List'):
... | python | def list_units(self):
"""Return the current list of the Units in the fleet cluster
Yields:
Unit: The next Unit in the cluster
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400
"""
for page in self._request('Units.List'):
... | [
"def",
"list_units",
"(",
"self",
")",
":",
"for",
"page",
"in",
"self",
".",
"_request",
"(",
"'Units.List'",
")",
":",
"for",
"unit",
"in",
"page",
".",
"get",
"(",
"'units'",
",",
"[",
"]",
")",
":",
"yield",
"Unit",
"(",
"client",
"=",
"self",
... | Return the current list of the Units in the fleet cluster
Yields:
Unit: The next Unit in the cluster
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400 | [
"Return",
"the",
"current",
"list",
"of",
"the",
"Units",
"in",
"the",
"fleet",
"cluster"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L564-L576 |
cnelson/python-fleet | fleet/v1/client.py | Client.get_unit | def get_unit(self, name):
"""Retreive a specifi unit from the fleet cluster by name
Args:
name (str): If specified, only this unit name is returned
Returns:
Unit: The unit identified by ``name`` in the fleet cluster
Raises:
fleet.v1.errors.APIError:... | python | def get_unit(self, name):
"""Retreive a specifi unit from the fleet cluster by name
Args:
name (str): If specified, only this unit name is returned
Returns:
Unit: The unit identified by ``name`` in the fleet cluster
Raises:
fleet.v1.errors.APIError:... | [
"def",
"get_unit",
"(",
"self",
",",
"name",
")",
":",
"return",
"Unit",
"(",
"client",
"=",
"self",
",",
"data",
"=",
"self",
".",
"_single_request",
"(",
"'Units.Get'",
",",
"unitName",
"=",
"name",
")",
")"
] | Retreive a specifi unit from the fleet cluster by name
Args:
name (str): If specified, only this unit name is returned
Returns:
Unit: The unit identified by ``name`` in the fleet cluster
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 40... | [
"Retreive",
"a",
"specifi",
"unit",
"from",
"the",
"fleet",
"cluster",
"by",
"name"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L578-L591 |
cnelson/python-fleet | fleet/v1/client.py | Client.list_unit_states | def list_unit_states(self, machine_id=None, unit_name=None):
"""Return the current UnitState for the fleet cluster
Args:
machine_id (str): filter all UnitState objects to those
originating from a specific machine
unit_name (str): filter all UnitSt... | python | def list_unit_states(self, machine_id=None, unit_name=None):
"""Return the current UnitState for the fleet cluster
Args:
machine_id (str): filter all UnitState objects to those
originating from a specific machine
unit_name (str): filter all UnitSt... | [
"def",
"list_unit_states",
"(",
"self",
",",
"machine_id",
"=",
"None",
",",
"unit_name",
"=",
"None",
")",
":",
"for",
"page",
"in",
"self",
".",
"_request",
"(",
"'UnitState.List'",
",",
"machineID",
"=",
"machine_id",
",",
"unitName",
"=",
"unit_name",
... | Return the current UnitState for the fleet cluster
Args:
machine_id (str): filter all UnitState objects to those
originating from a specific machine
unit_name (str): filter all UnitState objects to those related
to a specific... | [
"Return",
"the",
"current",
"UnitState",
"for",
"the",
"fleet",
"cluster"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L593-L612 |
cnelson/python-fleet | fleet/v1/client.py | Client.list_machines | def list_machines(self):
"""Retrieve a list of machines in the fleet cluster
Yields:
Machine: The next machine in the cluster
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400
"""
# loop through each page of results
for pag... | python | def list_machines(self):
"""Retrieve a list of machines in the fleet cluster
Yields:
Machine: The next machine in the cluster
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400
"""
# loop through each page of results
for pag... | [
"def",
"list_machines",
"(",
"self",
")",
":",
"# loop through each page of results",
"for",
"page",
"in",
"self",
".",
"_request",
"(",
"'Machines.List'",
")",
":",
"# return each machine in the current page",
"for",
"machine",
"in",
"page",
".",
"get",
"(",
"'mach... | Retrieve a list of machines in the fleet cluster
Yields:
Machine: The next machine in the cluster
Raises:
fleet.v1.errors.APIError: Fleet returned a response code >= 400 | [
"Retrieve",
"a",
"list",
"of",
"machines",
"in",
"the",
"fleet",
"cluster"
] | train | https://github.com/cnelson/python-fleet/blob/a11dcd8bb3986d1d8f0af90d2da7399c9cc54b4d/fleet/v1/client.py#L614-L628 |
mulkieran/justbases | src/justbases/_nats.py | Nats.convert | def convert(cls, value, from_base, to_base):
"""
Convert value from a base to a base.
:param value: the value to convert
:type value: sequence of int
:param int from_base: base of value
:param int to_base: base of result
:returns: the conversion result
:r... | python | def convert(cls, value, from_base, to_base):
"""
Convert value from a base to a base.
:param value: the value to convert
:type value: sequence of int
:param int from_base: base of value
:param int to_base: base of result
:returns: the conversion result
:r... | [
"def",
"convert",
"(",
"cls",
",",
"value",
",",
"from_base",
",",
"to_base",
")",
":",
"return",
"cls",
".",
"convert_from_int",
"(",
"cls",
".",
"convert_to_int",
"(",
"value",
",",
"from_base",
")",
",",
"to_base",
")"
] | Convert value from a base to a base.
:param value: the value to convert
:type value: sequence of int
:param int from_base: base of value
:param int to_base: base of result
:returns: the conversion result
:rtype: list of int
:raises ConvertError: if from_base is l... | [
"Convert",
"value",
"from",
"a",
"base",
"to",
"a",
"base",
"."
] | train | https://github.com/mulkieran/justbases/blob/dd52ff4b3d11609f54b2673599ee4eeb20f9734f/src/justbases/_nats.py#L33-L56 |
mulkieran/justbases | src/justbases/_nats.py | Nats.convert_to_int | def convert_to_int(value, from_base):
"""
Convert value to an int.
:param value: the value to convert
:type value: sequence of int
:param int from_base: base of value
:returns: the conversion result
:rtype: int
:raises ConvertError: if from_base is less t... | python | def convert_to_int(value, from_base):
"""
Convert value to an int.
:param value: the value to convert
:type value: sequence of int
:param int from_base: base of value
:returns: the conversion result
:rtype: int
:raises ConvertError: if from_base is less t... | [
"def",
"convert_to_int",
"(",
"value",
",",
"from_base",
")",
":",
"if",
"from_base",
"<",
"2",
":",
"raise",
"BasesValueError",
"(",
"from_base",
",",
"\"from_base\"",
",",
"\"must be greater than 2\"",
")",
"if",
"any",
"(",
"x",
"<",
"0",
"or",
"x",
">=... | Convert value to an int.
:param value: the value to convert
:type value: sequence of int
:param int from_base: base of value
:returns: the conversion result
:rtype: int
:raises ConvertError: if from_base is less than 2
:raises ConvertError: if elements in value o... | [
"Convert",
"value",
"to",
"an",
"int",
"."
] | train | https://github.com/mulkieran/justbases/blob/dd52ff4b3d11609f54b2673599ee4eeb20f9734f/src/justbases/_nats.py#L59-L91 |
mulkieran/justbases | src/justbases/_nats.py | Nats.convert_from_int | def convert_from_int(value, to_base):
"""
Convert int value to a base.
:param int value: the value to convert, must be at least 0
:param int to_base: base of result, must be at least 2
:returns: the conversion result
:rtype: list of int
:raises BasesValueError: i... | python | def convert_from_int(value, to_base):
"""
Convert int value to a base.
:param int value: the value to convert, must be at least 0
:param int to_base: base of result, must be at least 2
:returns: the conversion result
:rtype: list of int
:raises BasesValueError: i... | [
"def",
"convert_from_int",
"(",
"value",
",",
"to_base",
")",
":",
"if",
"value",
"<",
"0",
":",
"raise",
"BasesValueError",
"(",
"value",
",",
"\"value\"",
",",
"\"must be at least 0\"",
")",
"if",
"to_base",
"<",
"2",
":",
"raise",
"BasesValueError",
"(",
... | Convert int value to a base.
:param int value: the value to convert, must be at least 0
:param int to_base: base of result, must be at least 2
:returns: the conversion result
:rtype: list of int
:raises BasesValueError: if value is less than 0
:raises BasesValueError: if... | [
"Convert",
"int",
"value",
"to",
"a",
"base",
"."
] | train | https://github.com/mulkieran/justbases/blob/dd52ff4b3d11609f54b2673599ee4eeb20f9734f/src/justbases/_nats.py#L94-L121 |
mulkieran/justbases | src/justbases/_nats.py | Nats.carry_in | def carry_in(value, carry, base):
"""
Add a carry digit to a number represented by ``value``.
:param value: the value
:type value: list of int
:param int carry: the carry digit (>= 0)
:param int base: the base (>= 2)
:returns: carry-out and result
:rtype... | python | def carry_in(value, carry, base):
"""
Add a carry digit to a number represented by ``value``.
:param value: the value
:type value: list of int
:param int carry: the carry digit (>= 0)
:param int base: the base (>= 2)
:returns: carry-out and result
:rtype... | [
"def",
"carry_in",
"(",
"value",
",",
"carry",
",",
"base",
")",
":",
"if",
"base",
"<",
"2",
":",
"raise",
"BasesValueError",
"(",
"base",
",",
"\"base\"",
",",
"\"must be at least 2\"",
")",
"if",
"any",
"(",
"x",
"<",
"0",
"or",
"x",
">=",
"base",... | Add a carry digit to a number represented by ``value``.
:param value: the value
:type value: list of int
:param int carry: the carry digit (>= 0)
:param int base: the base (>= 2)
:returns: carry-out and result
:rtype: tuple of int * (list of int)
Complexity: O(len(val... | [
"Add",
"a",
"carry",
"digit",
"to",
"a",
"number",
"represented",
"by",
"value",
"."
] | train | https://github.com/mulkieran/justbases/blob/dd52ff4b3d11609f54b2673599ee4eeb20f9734f/src/justbases/_nats.py#L124-L160 |
joequant/cryptoexchange | cryptoexchange/util/bitmex-generate-api-key.py | BitMEX.create_key | def create_key(self):
"""Create an API key."""
print("Creating key. Please input the following options:")
name = input("Key name (optional): ")
print("To make this key more secure, you should restrict the IP addresses that can use it. ")
print("To use with all IPs, leave blank or... | python | def create_key(self):
"""Create an API key."""
print("Creating key. Please input the following options:")
name = input("Key name (optional): ")
print("To make this key more secure, you should restrict the IP addresses that can use it. ")
print("To use with all IPs, leave blank or... | [
"def",
"create_key",
"(",
"self",
")",
":",
"print",
"(",
"\"Creating key. Please input the following options:\"",
")",
"name",
"=",
"input",
"(",
"\"Key name (optional): \"",
")",
"print",
"(",
"\"To make this key more secure, you should restrict the IP addresses that can use it... | Create an API key. | [
"Create",
"an",
"API",
"key",
"."
] | train | https://github.com/joequant/cryptoexchange/blob/6690fbd9a2ba00e40d7484425808c84d44233f0c/cryptoexchange/util/bitmex-generate-api-key.py#L74-L91 |
joequant/cryptoexchange | cryptoexchange/util/bitmex-generate-api-key.py | BitMEX.list_keys | def list_keys(self):
"""List your API Keys."""
keys = self._curl_bitmex("/apiKey/")
print(json.dumps(keys, sort_keys=True, indent=4)) | python | def list_keys(self):
"""List your API Keys."""
keys = self._curl_bitmex("/apiKey/")
print(json.dumps(keys, sort_keys=True, indent=4)) | [
"def",
"list_keys",
"(",
"self",
")",
":",
"keys",
"=",
"self",
".",
"_curl_bitmex",
"(",
"\"/apiKey/\"",
")",
"print",
"(",
"json",
".",
"dumps",
"(",
"keys",
",",
"sort_keys",
"=",
"True",
",",
"indent",
"=",
"4",
")",
")"
] | List your API Keys. | [
"List",
"your",
"API",
"Keys",
"."
] | train | https://github.com/joequant/cryptoexchange/blob/6690fbd9a2ba00e40d7484425808c84d44233f0c/cryptoexchange/util/bitmex-generate-api-key.py#L93-L96 |
joequant/cryptoexchange | cryptoexchange/util/bitmex-generate-api-key.py | BitMEX.enable_key | def enable_key(self):
"""Enable an existing API Key."""
print("This command will enable a disabled key.")
apiKeyID = input("API Key ID: ")
try:
key = self._curl_bitmex("/apiKey/enable",
postdict={"apiKeyID": apiKeyID})
print("Ke... | python | def enable_key(self):
"""Enable an existing API Key."""
print("This command will enable a disabled key.")
apiKeyID = input("API Key ID: ")
try:
key = self._curl_bitmex("/apiKey/enable",
postdict={"apiKeyID": apiKeyID})
print("Ke... | [
"def",
"enable_key",
"(",
"self",
")",
":",
"print",
"(",
"\"This command will enable a disabled key.\"",
")",
"apiKeyID",
"=",
"input",
"(",
"\"API Key ID: \"",
")",
"try",
":",
"key",
"=",
"self",
".",
"_curl_bitmex",
"(",
"\"/apiKey/enable\"",
",",
"postdict",
... | Enable an existing API Key. | [
"Enable",
"an",
"existing",
"API",
"Key",
"."
] | train | https://github.com/joequant/cryptoexchange/blob/6690fbd9a2ba00e40d7484425808c84d44233f0c/cryptoexchange/util/bitmex-generate-api-key.py#L98-L108 |
joequant/cryptoexchange | cryptoexchange/util/bitmex-generate-api-key.py | BitMEX.disable_key | def disable_key(self):
"""Disable an existing API Key."""
print("This command will disable a enabled key.")
apiKeyID = input("API Key ID: ")
try:
key = self._curl_bitmex("/apiKey/disable",
postdict={"apiKeyID": apiKeyID})
print(... | python | def disable_key(self):
"""Disable an existing API Key."""
print("This command will disable a enabled key.")
apiKeyID = input("API Key ID: ")
try:
key = self._curl_bitmex("/apiKey/disable",
postdict={"apiKeyID": apiKeyID})
print(... | [
"def",
"disable_key",
"(",
"self",
")",
":",
"print",
"(",
"\"This command will disable a enabled key.\"",
")",
"apiKeyID",
"=",
"input",
"(",
"\"API Key ID: \"",
")",
"try",
":",
"key",
"=",
"self",
".",
"_curl_bitmex",
"(",
"\"/apiKey/disable\"",
",",
"postdict"... | Disable an existing API Key. | [
"Disable",
"an",
"existing",
"API",
"Key",
"."
] | train | https://github.com/joequant/cryptoexchange/blob/6690fbd9a2ba00e40d7484425808c84d44233f0c/cryptoexchange/util/bitmex-generate-api-key.py#L110-L120 |
joequant/cryptoexchange | cryptoexchange/util/bitmex-generate-api-key.py | BitMEX.delete_key | def delete_key(self):
"""Delete an existing API Key."""
print("This command will delete an API key.")
apiKeyID = input("API Key ID: ")
try:
self._curl_bitmex("/apiKey/",
postdict={"apiKeyID": apiKeyID}, verb='DELETE')
print("Key with ... | python | def delete_key(self):
"""Delete an existing API Key."""
print("This command will delete an API key.")
apiKeyID = input("API Key ID: ")
try:
self._curl_bitmex("/apiKey/",
postdict={"apiKeyID": apiKeyID}, verb='DELETE')
print("Key with ... | [
"def",
"delete_key",
"(",
"self",
")",
":",
"print",
"(",
"\"This command will delete an API key.\"",
")",
"apiKeyID",
"=",
"input",
"(",
"\"API Key ID: \"",
")",
"try",
":",
"self",
".",
"_curl_bitmex",
"(",
"\"/apiKey/\"",
",",
"postdict",
"=",
"{",
"\"apiKeyI... | Delete an existing API Key. | [
"Delete",
"an",
"existing",
"API",
"Key",
"."
] | train | https://github.com/joequant/cryptoexchange/blob/6690fbd9a2ba00e40d7484425808c84d44233f0c/cryptoexchange/util/bitmex-generate-api-key.py#L122-L132 |
mitsei/dlkit | dlkit/handcar/type/objects.py | TypeList.get_next_type | def get_next_type(self):
"""Gets the next Type in this list.
return: (osid.type.Type) - the next Type in this list. The
has_next() method should be used to test that a next
Type is available before calling this method.
raise: IllegalState - no more elements avai... | python | def get_next_type(self):
"""Gets the next Type in this list.
return: (osid.type.Type) - the next Type in this list. The
has_next() method should be used to test that a next
Type is available before calling this method.
raise: IllegalState - no more elements avai... | [
"def",
"get_next_type",
"(",
"self",
")",
":",
"try",
":",
"next_object",
"=",
"next",
"(",
"self",
")",
"except",
"StopIteration",
":",
"raise",
"IllegalState",
"(",
"'no more elements available in this list'",
")",
"except",
"Exception",
":",
"# Need to specify ex... | Gets the next Type in this list.
return: (osid.type.Type) - the next Type in this list. The
has_next() method should be used to test that a next
Type is available before calling this method.
raise: IllegalState - no more elements available in this list
raise: O... | [
"Gets",
"the",
"next",
"Type",
"in",
"this",
"list",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/type/objects.py#L29-L47 |
AbdealiJK/pycolorname | pycolorname/color_system.py | ColorSystem.load | def load(self, filename=None, refresh=False):
"""
Try to load the data from a pre existing data file if it exists.
If the data file does not exist, refresh the data and save it in
the data file for future use.
The data file is a json file.
:param filename: The filename t... | python | def load(self, filename=None, refresh=False):
"""
Try to load the data from a pre existing data file if it exists.
If the data file does not exist, refresh the data and save it in
the data file for future use.
The data file is a json file.
:param filename: The filename t... | [
"def",
"load",
"(",
"self",
",",
"filename",
"=",
"None",
",",
"refresh",
"=",
"False",
")",
":",
"filename",
"=",
"filename",
"or",
"self",
".",
"data_file",
"(",
")",
"dirname",
"=",
"os",
".",
"path",
".",
"dirname",
"(",
"filename",
")",
"if",
... | Try to load the data from a pre existing data file if it exists.
If the data file does not exist, refresh the data and save it in
the data file for future use.
The data file is a json file.
:param filename: The filename to save or fetch the data from.
:param refresh: Whether to... | [
"Try",
"to",
"load",
"the",
"data",
"from",
"a",
"pre",
"existing",
"data",
"file",
"if",
"it",
"exists",
".",
"If",
"the",
"data",
"file",
"does",
"not",
"exist",
"refresh",
"the",
"data",
"and",
"save",
"it",
"in",
"the",
"data",
"file",
"for",
"fu... | train | https://github.com/AbdealiJK/pycolorname/blob/d535de3d340a1673906cb484cc4c49c87d296ec0/pycolorname/color_system.py#L35-L70 |
AbdealiJK/pycolorname | pycolorname/color_system.py | ColorSystem.request | def request(self, *args, **kwargs):
"""
Gets the request using the `_url` and converts it into a
beautiful soup object.
:param args: The args to pass on to `requests`.
:param kwargs: The kwargs to pass on to `requests`.
"""
response = requests... | python | def request(self, *args, **kwargs):
"""
Gets the request using the `_url` and converts it into a
beautiful soup object.
:param args: The args to pass on to `requests`.
:param kwargs: The kwargs to pass on to `requests`.
"""
response = requests... | [
"def",
"request",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"response",
"=",
"requests",
".",
"request",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"return",
"BeautifulSoup",
".",
"BeautifulSoup",
"(",
"response",
".",
"t... | Gets the request using the `_url` and converts it into a
beautiful soup object.
:param args: The args to pass on to `requests`.
:param kwargs: The kwargs to pass on to `requests`. | [
"Gets",
"the",
"request",
"using",
"the",
"_url",
"and",
"converts",
"it",
"into",
"a",
"beautiful",
"soup",
"object",
"."
] | train | https://github.com/AbdealiJK/pycolorname/blob/d535de3d340a1673906cb484cc4c49c87d296ec0/pycolorname/color_system.py#L78-L87 |
AbdealiJK/pycolorname | pycolorname/color_system.py | ColorSystem.find_closest | def find_closest(self, color):
"""
Find the closest color in the system to the given rgb values.
:param color: Tuple of r, g, b values (scaled to 255).
:returns: Tuple of name and rgb closest to the given color.
"""
# Find distance between colors and find name based ... | python | def find_closest(self, color):
"""
Find the closest color in the system to the given rgb values.
:param color: Tuple of r, g, b values (scaled to 255).
:returns: Tuple of name and rgb closest to the given color.
"""
# Find distance between colors and find name based ... | [
"def",
"find_closest",
"(",
"self",
",",
"color",
")",
":",
"# Find distance between colors and find name based on closest color",
"rgb",
"=",
"sRGBColor",
"(",
"*",
"color",
")",
"lab",
"=",
"convert_color",
"(",
"rgb",
",",
"LabColor",
",",
"target_illuminant",
"=... | Find the closest color in the system to the given rgb values.
:param color: Tuple of r, g, b values (scaled to 255).
:returns: Tuple of name and rgb closest to the given color. | [
"Find",
"the",
"closest",
"color",
"in",
"the",
"system",
"to",
"the",
"given",
"rgb",
"values",
"."
] | train | https://github.com/AbdealiJK/pycolorname/blob/d535de3d340a1673906cb484cc4c49c87d296ec0/pycolorname/color_system.py#L105-L126 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_lookup_session | def get_asset_lookup_session(self):
"""Gets the ``OsidSession`` associated with the asset lookup service.
return: (osid.repository.AssetLookupSession) - the new
``AssetLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports... | python | def get_asset_lookup_session(self):
"""Gets the ``OsidSession`` associated with the asset lookup service.
return: (osid.repository.AssetLookupSession) - the new
``AssetLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports... | [
"def",
"get_asset_lookup_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"AssetLookupSession",
"(",
"run... | Gets the ``OsidSession`` associated with the asset lookup service.
return: (osid.repository.AssetLookupSession) - the new
``AssetLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_lookup()`` is ``false``
*complia... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"asset",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L492-L506 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_lookup_session_for_repository | def get_asset_lookup_session_for_repository(self, repository_id):
"""Gets the ``OsidSession`` associated with the asset lookup service for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.AssetLookupSession) - the new
... | python | def get_asset_lookup_session_for_repository(self, repository_id):
"""Gets the ``OsidSession`` associated with the asset lookup service for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.AssetLookupSession) - the new
... | [
"def",
"get_asset_lookup_session_for_repository",
"(",
"self",
",",
"repository_id",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the catalog Id is fo... | Gets the ``OsidSession`` associated with the asset lookup service for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.AssetLookupSession) - the new
``AssetLookupSession``
raise: NotFound - ``repository_id`` not fou... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"asset",
"lookup",
"service",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L512-L534 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_query_session | def get_asset_query_session(self):
"""Gets an asset query session.
return: (osid.repository.AssetQuerySession) - an
``AssetQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_query()`` is ``false``
*complia... | python | def get_asset_query_session(self):
"""Gets an asset query session.
return: (osid.repository.AssetQuerySession) - an
``AssetQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_query()`` is ``false``
*complia... | [
"def",
"get_asset_query_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"AssetQuerySession",
"(",
"runtim... | Gets an asset query session.
return: (osid.repository.AssetQuerySession) - an
``AssetQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_query()`` is ``false``
*compliance: optional -- This method must be implement... | [
"Gets",
"an",
"asset",
"query",
"session",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L537-L551 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_query_session_for_repository | def get_asset_query_session_for_repository(self, repository_id):
"""Gets an asset query session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.AssetQuerySession) - an
``AssetQuerySession``
raise: NotFo... | python | def get_asset_query_session_for_repository(self, repository_id):
"""Gets an asset query session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.AssetQuerySession) - an
``AssetQuerySession``
raise: NotFo... | [
"def",
"get_asset_query_session_for_repository",
"(",
"self",
",",
"repository_id",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the catalog Id is foun... | Gets an asset query session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.AssetQuerySession) - an
``AssetQuerySession``
raise: NotFound - ``repository_id`` not found
raise: NullArgument - ``repositor... | [
"Gets",
"an",
"asset",
"query",
"session",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L557-L579 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_search_session | def get_asset_search_session(self):
"""Gets an asset search session.
return: (osid.repository.AssetSearchSession) - an
``AssetSearchSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_search()`` is ``false``
*co... | python | def get_asset_search_session(self):
"""Gets an asset search session.
return: (osid.repository.AssetSearchSession) - an
``AssetSearchSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_search()`` is ``false``
*co... | [
"def",
"get_asset_search_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_search",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"AssetSearchSession",
"(",
"run... | Gets an asset search session.
return: (osid.repository.AssetSearchSession) - an
``AssetSearchSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_search()`` is ``false``
*compliance: optional -- This method must be imple... | [
"Gets",
"an",
"asset",
"search",
"session",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L582-L596 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_notification_session | def get_asset_notification_session(self, asset_receiver):
"""Gets the notification session for notifications pertaining to asset changes.
arg: asset_receiver (osid.repository.AssetReceiver): the
notification callback
return: (osid.repository.AssetNotificationSession) - an
... | python | def get_asset_notification_session(self, asset_receiver):
"""Gets the notification session for notifications pertaining to asset changes.
arg: asset_receiver (osid.repository.AssetReceiver): the
notification callback
return: (osid.repository.AssetNotificationSession) - an
... | [
"def",
"get_asset_notification_session",
"(",
"self",
",",
"asset_receiver",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_notification",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
"."... | Gets the notification session for notifications pertaining to asset changes.
arg: asset_receiver (osid.repository.AssetReceiver): the
notification callback
return: (osid.repository.AssetNotificationSession) - an
``AssetNotificationSession``
raise: NullArgumen... | [
"Gets",
"the",
"notification",
"session",
"for",
"notifications",
"pertaining",
"to",
"asset",
"changes",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L673-L691 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_notification_session_for_repository | def get_asset_notification_session_for_repository(self, asset_receiver, repository_id):
"""Gets the asset notification session for the given repository.
arg: asset_receiver (osid.repository.AssetReceiver): the
notification callback
arg: repository_id (osid.id.Id): the ``Id... | python | def get_asset_notification_session_for_repository(self, asset_receiver, repository_id):
"""Gets the asset notification session for the given repository.
arg: asset_receiver (osid.repository.AssetReceiver): the
notification callback
arg: repository_id (osid.id.Id): the ``Id... | [
"def",
"get_asset_notification_session_for_repository",
"(",
"self",
",",
"asset_receiver",
",",
"repository_id",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_notification",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also inclu... | Gets the asset notification session for the given repository.
arg: asset_receiver (osid.repository.AssetReceiver): the
notification callback
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.AssetNotificationSession) - an
... | [
"Gets",
"the",
"asset",
"notification",
"session",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L695-L720 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_repository_session | def get_asset_repository_session(self):
"""Gets the session for retrieving asset to repository mappings.
return: (osid.repository.AssetRepositorySession) - an
``AssetRepositorySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``suppor... | python | def get_asset_repository_session(self):
"""Gets the session for retrieving asset to repository mappings.
return: (osid.repository.AssetRepositorySession) - an
``AssetRepositorySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``suppor... | [
"def",
"get_asset_repository_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_repository",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"AssetRepositorySession",
... | Gets the session for retrieving asset to repository mappings.
return: (osid.repository.AssetRepositorySession) - an
``AssetRepositorySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_repository()`` is
``false`... | [
"Gets",
"the",
"session",
"for",
"retrieving",
"asset",
"to",
"repository",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L723-L738 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_repository_assignment_session | def get_asset_repository_assignment_session(self):
"""Gets the session for assigning asset to repository mappings.
return: (osid.repository.AssetRepositoryAssignmentSession) - an
``AssetRepositoryAsignmentSession``
raise: OperationFailed - unable to complete request
rai... | python | def get_asset_repository_assignment_session(self):
"""Gets the session for assigning asset to repository mappings.
return: (osid.repository.AssetRepositoryAssignmentSession) - an
``AssetRepositoryAsignmentSession``
raise: OperationFailed - unable to complete request
rai... | [
"def",
"get_asset_repository_assignment_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_repository_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Asse... | Gets the session for assigning asset to repository mappings.
return: (osid.repository.AssetRepositoryAssignmentSession) - an
``AssetRepositoryAsignmentSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented -
``supports_asset_reposito... | [
"Gets",
"the",
"session",
"for",
"assigning",
"asset",
"to",
"repository",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L743-L758 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_asset_composition_session | def get_asset_composition_session(self):
"""Gets the session for retrieving asset compositions.
return: (osid.repository.AssetCompositionSession) - an
``AssetCompositionSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asse... | python | def get_asset_composition_session(self):
"""Gets the session for retrieving asset compositions.
return: (osid.repository.AssetCompositionSession) - an
``AssetCompositionSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asse... | [
"def",
"get_asset_composition_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_composition",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"AssetCompositionSession"... | Gets the session for retrieving asset compositions.
return: (osid.repository.AssetCompositionSession) - an
``AssetCompositionSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_asset_composition()`` is
``false``
... | [
"Gets",
"the",
"session",
"for",
"retrieving",
"asset",
"compositions",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L763-L778 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_composition_query_session | def get_composition_query_session(self):
"""Gets a composition query session.
return: (osid.repository.CompositionQuerySession) - a
``CompositionQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_composition_query()`` i... | python | def get_composition_query_session(self):
"""Gets a composition query session.
return: (osid.repository.CompositionQuerySession) - a
``CompositionQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_composition_query()`` i... | [
"def",
"get_composition_query_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"CompositionQuerySession"... | Gets a composition query session.
return: (osid.repository.CompositionQuerySession) - a
``CompositionQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_composition_query()`` is
``false``
*compliance: opt... | [
"Gets",
"a",
"composition",
"query",
"session",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L849-L864 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_composition_query_session_for_repository | def get_composition_query_session_for_repository(self, repository_id):
"""Gets a composition query session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.CompositionQuerySession) - a
``CompositionQuerySession``... | python | def get_composition_query_session_for_repository(self, repository_id):
"""Gets a composition query session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.CompositionQuerySession) - a
``CompositionQuerySession``... | [
"def",
"get_composition_query_session_for_repository",
"(",
"self",
",",
"repository_id",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the catalo... | Gets a composition query session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.CompositionQuerySession) - a
``CompositionQuerySession``
raise: NotFound - ``repository_id`` not found
raise: NullArgume... | [
"Gets",
"a",
"composition",
"query",
"session",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L870-L892 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_composition_search_session | def get_composition_search_session(self):
"""Gets a composition search session.
return: (osid.repository.CompositionSearchSession) - a
``CompositionSearchSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_composition_search(... | python | def get_composition_search_session(self):
"""Gets a composition search session.
return: (osid.repository.CompositionSearchSession) - a
``CompositionSearchSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_composition_search(... | [
"def",
"get_composition_search_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_search",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"CompositionSearchSessi... | Gets a composition search session.
return: (osid.repository.CompositionSearchSession) - a
``CompositionSearchSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_composition_search()`` is
``false``
*compliance:... | [
"Gets",
"a",
"composition",
"search",
"session",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L895-L910 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_composition_search_session_for_repository | def get_composition_search_session_for_repository(self, repository_id):
"""Gets a composition search session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.CompositionSearchSession) - a
``CompositionSearchSessi... | python | def get_composition_search_session_for_repository(self, repository_id):
"""Gets a composition search session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.CompositionSearchSession) - a
``CompositionSearchSessi... | [
"def",
"get_composition_search_session_for_repository",
"(",
"self",
",",
"repository_id",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_search",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the cata... | Gets a composition search session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
return: (osid.repository.CompositionSearchSession) - a
``CompositionSearchSession``
raise: NotFound - ``repository_id`` not found
raise: NullArg... | [
"Gets",
"a",
"composition",
"search",
"session",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L916-L938 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_composition_admin_session | def get_composition_admin_session(self):
"""Gets a composition administration session for creating, updating and deleting compositions.
return: (osid.repository.CompositionAdminSession) - a
``CompositionAdminSession``
raise: OperationFailed - unable to complete request
... | python | def get_composition_admin_session(self):
"""Gets a composition administration session for creating, updating and deleting compositions.
return: (osid.repository.CompositionAdminSession) - a
``CompositionAdminSession``
raise: OperationFailed - unable to complete request
... | [
"def",
"get_composition_admin_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"CompositionAdminSession"... | Gets a composition administration session for creating, updating and deleting compositions.
return: (osid.repository.CompositionAdminSession) - a
``CompositionAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_composition_admin... | [
"Gets",
"a",
"composition",
"administration",
"session",
"for",
"creating",
"updating",
"and",
"deleting",
"compositions",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L941-L956 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_repository_lookup_session | def get_repository_lookup_session(self):
"""Gets the repository lookup session.
return: (osid.repository.RepositoryLookupSession) - a
``RepositoryLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_repository_lookup()``... | python | def get_repository_lookup_session(self):
"""Gets the repository lookup session.
return: (osid.repository.RepositoryLookupSession) - a
``RepositoryLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_repository_lookup()``... | [
"def",
"get_repository_lookup_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_repository_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"RepositoryLookupSession"... | Gets the repository lookup session.
return: (osid.repository.RepositoryLookupSession) - a
``RepositoryLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_repository_lookup()`` is
``false``
*compliance: o... | [
"Gets",
"the",
"repository",
"lookup",
"session",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1028-L1043 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_repository_query_session | def get_repository_query_session(self):
"""Gets the repository query session.
return: (osid.repository.RepositoryQuerySession) - a
``RepositoryQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_repository_query()`` is
... | python | def get_repository_query_session(self):
"""Gets the repository query session.
return: (osid.repository.RepositoryQuerySession) - a
``RepositoryQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_repository_query()`` is
... | [
"def",
"get_repository_query_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_repository_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"RepositoryQuerySession",
... | Gets the repository query session.
return: (osid.repository.RepositoryQuerySession) - a
``RepositoryQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_repository_query()`` is
``false``
*compliance: optio... | [
"Gets",
"the",
"repository",
"query",
"session",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1048-L1063 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_repository_admin_session | def get_repository_admin_session(self):
"""Gets the repository administrative session for creating, updating and deleteing repositories.
return: (osid.repository.RepositoryAdminSession) - a
``RepositoryAdminSession``
raise: OperationFailed - unable to complete request
r... | python | def get_repository_admin_session(self):
"""Gets the repository administrative session for creating, updating and deleteing repositories.
return: (osid.repository.RepositoryAdminSession) - a
``RepositoryAdminSession``
raise: OperationFailed - unable to complete request
r... | [
"def",
"get_repository_admin_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_repository_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"RepositoryAdminSession",
... | Gets the repository administrative session for creating, updating and deleteing repositories.
return: (osid.repository.RepositoryAdminSession) - a
``RepositoryAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_repository_admin(... | [
"Gets",
"the",
"repository",
"administrative",
"session",
"for",
"creating",
"updating",
"and",
"deleteing",
"repositories",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1068-L1083 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_repository_hierarchy_session | def get_repository_hierarchy_session(self):
"""Gets the repository hierarchy traversal session.
return: (osid.repository.RepositoryHierarchySession) - ``a
RepositoryHierarchySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports... | python | def get_repository_hierarchy_session(self):
"""Gets the repository hierarchy traversal session.
return: (osid.repository.RepositoryHierarchySession) - ``a
RepositoryHierarchySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports... | [
"def",
"get_repository_hierarchy_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_repository_hierarchy",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"RepositoryHierarch... | Gets the repository hierarchy traversal session.
return: (osid.repository.RepositoryHierarchySession) - ``a
RepositoryHierarchySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_repository_hierarchy()`` is
``false``
... | [
"Gets",
"the",
"repository",
"hierarchy",
"traversal",
"session",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1088-L1103 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryManager.get_repository_hierarchy_design_session | def get_repository_hierarchy_design_session(self):
"""Gets the repository hierarchy design session.
return: (osid.repository.RepositoryHierarchyDesignSession) - a
``RepostoryHierarchyDesignSession``
raise: OperationFailed - unable to complete request
raise: Unimplement... | python | def get_repository_hierarchy_design_session(self):
"""Gets the repository hierarchy design session.
return: (osid.repository.RepositoryHierarchyDesignSession) - a
``RepostoryHierarchyDesignSession``
raise: OperationFailed - unable to complete request
raise: Unimplement... | [
"def",
"get_repository_hierarchy_design_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_repository_hierarchy_design",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Repo... | Gets the repository hierarchy design session.
return: (osid.repository.RepositoryHierarchyDesignSession) - a
``RepostoryHierarchyDesignSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented -
``supports_repository_hierarchy_design()`... | [
"Gets",
"the",
"repository",
"hierarchy",
"design",
"session",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1108-L1123 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_asset_search_session_for_repository | def get_asset_search_session_for_repository(self, repository_id, proxy):
"""Gets an asset search session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetSearchSession) - an... | python | def get_asset_search_session_for_repository(self, repository_id, proxy):
"""Gets an asset search session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetSearchSession) - an... | [
"def",
"get_asset_search_session_for_repository",
"(",
"self",
",",
"repository_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_search",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if th... | Gets an asset search session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetSearchSession) - an
``AssetSearchSession``
raise: NotFound - ``repository_id``... | [
"Gets",
"an",
"asset",
"search",
"session",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1369-L1393 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_asset_admin_session | def get_asset_admin_session(self, proxy):
"""Gets an asset administration session for creating, updating and deleting assets.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetAdminSession) - an
``AssetAdminSession``
raise: NullArgument - ``proxy``... | python | def get_asset_admin_session(self, proxy):
"""Gets an asset administration session for creating, updating and deleting assets.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetAdminSession) - an
``AssetAdminSession``
raise: NullArgument - ``proxy``... | [
"def",
"get_asset_admin_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"AssetAdminSession"... | Gets an asset administration session for creating, updating and deleting assets.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetAdminSession) - an
``AssetAdminSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable... | [
"Gets",
"an",
"asset",
"administration",
"session",
"for",
"creating",
"updating",
"and",
"deleting",
"assets",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1396-L1412 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_asset_admin_session_for_repository | def get_asset_admin_session_for_repository(self, repository_id, proxy):
"""Gets an asset administration session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetAdminSession... | python | def get_asset_admin_session_for_repository(self, repository_id, proxy):
"""Gets an asset administration session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetAdminSession... | [
"def",
"get_asset_admin_session_for_repository",
"(",
"self",
",",
"repository_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the ... | Gets an asset administration session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetAdminSession) - an
``AssetAdminSession``
raise: NotFound - ``repositor... | [
"Gets",
"an",
"asset",
"administration",
"session",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1415-L1439 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_asset_composition_design_session | def get_asset_composition_design_session(self, proxy):
"""Gets the session for creating asset compositions.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetCompositionDesignSession) - an
``AssetCompositionDesignSession``
raise: NullArgument - ``p... | python | def get_asset_composition_design_session(self, proxy):
"""Gets the session for creating asset compositions.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetCompositionDesignSession) - an
``AssetCompositionDesignSession``
raise: NullArgument - ``p... | [
"def",
"get_asset_composition_design_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_asset_composition_design",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
... | Gets the session for creating asset compositions.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.AssetCompositionDesignSession) - an
``AssetCompositionDesignSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to com... | [
"Gets",
"the",
"session",
"for",
"creating",
"asset",
"compositions",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1554-L1571 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_composition_lookup_session | def get_composition_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the composition lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionLookupSession) - the new
``CompositionLookupSession``
raise: NullAr... | python | def get_composition_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the composition lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionLookupSession) - the new
``CompositionLookupSession``
raise: NullAr... | [
"def",
"get_composition_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Comp... | Gets the ``OsidSession`` associated with the composition lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionLookupSession) - the new
``CompositionLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFail... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"composition",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1574-L1591 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_composition_lookup_session_for_repository | def get_composition_lookup_session_for_repository(self, repository_id, proxy):
"""Gets the ``OsidSession`` associated with the composition lookup service for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
... | python | def get_composition_lookup_session_for_repository(self, repository_id, proxy):
"""Gets the ``OsidSession`` associated with the composition lookup service for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
... | [
"def",
"get_composition_lookup_session_for_repository",
"(",
"self",
",",
"repository_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check ... | Gets the ``OsidSession`` associated with the composition lookup service for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionLookupSession) - the new
``Composition... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"composition",
"lookup",
"service",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1594-L1618 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_composition_admin_session_for_repository | def get_composition_admin_session_for_repository(self, repository_id, proxy):
"""Gets a composiiton administrative session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.Compos... | python | def get_composition_admin_session_for_repository(self, repository_id, proxy):
"""Gets a composiiton administrative session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.Compos... | [
"def",
"get_composition_admin_session_for_repository",
"(",
"self",
",",
"repository_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to... | Gets a composiiton administrative session for the given repository.
arg: repository_id (osid.id.Id): the ``Id`` of the repository
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionAdminSession) - a
``CompositionAdminSession``
raise: NotFou... | [
"Gets",
"a",
"composiiton",
"administrative",
"session",
"for",
"the",
"given",
"repository",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1735-L1759 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_composition_repository_session | def get_composition_repository_session(self, proxy):
"""Gets the session for retrieving composition to repository mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionRepositorySession) - a
``CompositionRepositorySession``
raise: NullA... | python | def get_composition_repository_session(self, proxy):
"""Gets the session for retrieving composition to repository mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionRepositorySession) - a
``CompositionRepositorySession``
raise: NullA... | [
"def",
"get_composition_repository_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_repository",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",... | Gets the session for retrieving composition to repository mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionRepositorySession) - a
``CompositionRepositorySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed ... | [
"Gets",
"the",
"session",
"for",
"retrieving",
"composition",
"to",
"repository",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1762-L1779 |
mitsei/dlkit | dlkit/json_/repository/managers.py | RepositoryProxyManager.get_composition_repository_assignment_session | def get_composition_repository_assignment_session(self, proxy):
"""Gets the session for assigning composition to repository mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionRepositoryAssignmentSession)
- a ``CompositionRepositoryAssignmentS... | python | def get_composition_repository_assignment_session(self, proxy):
"""Gets the session for assigning composition to repository mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionRepositoryAssignmentSession)
- a ``CompositionRepositoryAssignmentS... | [
"def",
"get_composition_repository_assignment_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_composition_repository_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return"... | Gets the session for assigning composition to repository mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.repository.CompositionRepositoryAssignmentSession)
- a ``CompositionRepositoryAssignmentSession``
raise: NullArgument - ``proxy`` is ``null``
raise... | [
"Gets",
"the",
"session",
"for",
"assigning",
"composition",
"to",
"repository",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/repository/managers.py#L1782-L1800 |
mitsei/dlkit | dlkit/json_/learning/objects.py | Objective.get_assessment_id | def get_assessment_id(self):
"""Gets the assessment ``Id`` associated with this learning objective.
return: (osid.id.Id) - the assessment ``Id``
raise: IllegalState - ``has_assessment()`` is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
# Im... | python | def get_assessment_id(self):
"""Gets the assessment ``Id`` associated with this learning objective.
return: (osid.id.Id) - the assessment ``Id``
raise: IllegalState - ``has_assessment()`` is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
# Im... | [
"def",
"get_assessment_id",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.Resource.get_avatar_id_template",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'assessmentId'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState",
"(",
"'t... | Gets the assessment ``Id`` associated with this learning objective.
return: (osid.id.Id) - the assessment ``Id``
raise: IllegalState - ``has_assessment()`` is ``false``
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"assessment",
"Id",
"associated",
"with",
"this",
"learning",
"objective",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L53-L65 |
mitsei/dlkit | dlkit/json_/learning/objects.py | Objective.get_knowledge_category_id | def get_knowledge_category_id(self):
"""Gets the grade ``Id`` associated with the knowledge dimension.
return: (osid.id.Id) - the grade ``Id``
raise: IllegalState - ``has_knowledge_category()`` is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
... | python | def get_knowledge_category_id(self):
"""Gets the grade ``Id`` associated with the knowledge dimension.
return: (osid.id.Id) - the grade ``Id``
raise: IllegalState - ``has_knowledge_category()`` is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
... | [
"def",
"get_knowledge_category_id",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.Resource.get_avatar_id_template",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'knowledgeCategoryId'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState... | Gets the grade ``Id`` associated with the knowledge dimension.
return: (osid.id.Id) - the grade ``Id``
raise: IllegalState - ``has_knowledge_category()`` is ``false``
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"grade",
"Id",
"associated",
"with",
"the",
"knowledge",
"dimension",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L102-L114 |
mitsei/dlkit | dlkit/json_/learning/objects.py | Objective.get_cognitive_process_id | def get_cognitive_process_id(self):
"""Gets the grade ``Id`` associated with the cognitive process.
return: (osid.id.Id) - the grade ``Id``
raise: IllegalState - ``has_cognitive_process()`` is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
# ... | python | def get_cognitive_process_id(self):
"""Gets the grade ``Id`` associated with the cognitive process.
return: (osid.id.Id) - the grade ``Id``
raise: IllegalState - ``has_cognitive_process()`` is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
# ... | [
"def",
"get_cognitive_process_id",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.Resource.get_avatar_id_template",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'cognitiveProcessId'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState",... | Gets the grade ``Id`` associated with the cognitive process.
return: (osid.id.Id) - the grade ``Id``
raise: IllegalState - ``has_cognitive_process()`` is ``false``
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"grade",
"Id",
"associated",
"with",
"the",
"cognitive",
"process",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L151-L163 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm._init_metadata | def _init_metadata(self, **kwargs):
"""Initialize form metadata"""
osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
self._cognitive_process_default = self._mdata['cognitive_process']['default_id_values'][0]
self._assessment_default = self._mdata['assessment']['default_id_values... | python | def _init_metadata(self, **kwargs):
"""Initialize form metadata"""
osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
self._cognitive_process_default = self._mdata['cognitive_process']['default_id_values'][0]
self._assessment_default = self._mdata['assessment']['default_id_values... | [
"def",
"_init_metadata",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"osid_objects",
".",
"OsidObjectForm",
".",
"_init_metadata",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
"self",
".",
"_cognitive_process_default",
"=",
"self",
".",
"_mdata",
"[",
"'... | Initialize form metadata | [
"Initialize",
"form",
"metadata"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L232-L237 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm._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['assignedObjectiveBankIds'] = [str(kwargs['objective_bank_id'])]
self._my_map['cognitiveProcessId'] = self._cognitive_process_de... | 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['assignedObjectiveBankIds'] = [str(kwargs['objective_bank_id'])]
self._my_map['cognitiveProcessId'] = self._cognitive_process_de... | [
"def",
"_init_map",
"(",
"self",
",",
"record_types",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"osid_objects",
".",
"OsidObjectForm",
".",
"_init_map",
"(",
"self",
",",
"record_types",
"=",
"record_types",
")",
"self",
".",
"_my_map",
"[",
"'assign... | Initialize form map | [
"Initialize",
"form",
"map"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L239-L245 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.get_assessment_metadata | def get_assessment_metadata(self):
"""Gets the metadata for an assessment.
return: (osid.Metadata) - metadata for the assessment
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_group_metadata_templat... | python | def get_assessment_metadata(self):
"""Gets the metadata for an assessment.
return: (osid.Metadata) - metadata for the assessment
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_group_metadata_templat... | [
"def",
"get_assessment_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'assessment'",
"]",
")",
"metadata",
".",
"update",
"(",
"{",
"'... | Gets the metadata for an assessment.
return: (osid.Metadata) - metadata for the assessment
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"an",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L247-L257 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.set_assessment | def set_assessment(self, assessment_id):
"""Sets the assessment.
arg: assessment_id (osid.id.Id): the new assessment
raise: InvalidArgument - ``assessment_id`` is invalid
raise: NoAccess - ``assessment_id`` cannot be modified
raise: NullArgument - ``assessment_id`` is ``nu... | python | def set_assessment(self, assessment_id):
"""Sets the assessment.
arg: assessment_id (osid.id.Id): the new assessment
raise: InvalidArgument - ``assessment_id`` is invalid
raise: NoAccess - ``assessment_id`` cannot be modified
raise: NullArgument - ``assessment_id`` is ``nu... | [
"def",
"set_assessment",
"(",
"self",
",",
"assessment_id",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.set_avatar_template",
"if",
"self",
".",
"get_assessment_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
":",
"raise",
"errors",
".",
"N... | Sets the assessment.
arg: assessment_id (osid.id.Id): the new assessment
raise: InvalidArgument - ``assessment_id`` is invalid
raise: NoAccess - ``assessment_id`` cannot be modified
raise: NullArgument - ``assessment_id`` is ``null``
*compliance: mandatory -- This method m... | [
"Sets",
"the",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L262-L277 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.clear_assessment | def clear_assessment(self):
"""Clears the assessment.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm... | python | def clear_assessment(self):
"""Clears the assessment.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm... | [
"def",
"clear_assessment",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.clear_avatar_template",
"if",
"(",
"self",
".",
"get_assessment_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_assessment_metadata",
... | Clears the assessment.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L279-L291 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.get_knowledge_category_metadata | def get_knowledge_category_metadata(self):
"""Gets the metadata for a knowledge category.
return: (osid.Metadata) - metadata for the knowledge category
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get... | python | def get_knowledge_category_metadata(self):
"""Gets the metadata for a knowledge category.
return: (osid.Metadata) - metadata for the knowledge category
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get... | [
"def",
"get_knowledge_category_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'knowledge_category'",
"]",
")",
"metadata",
".",
"update",
... | Gets the metadata for a knowledge category.
return: (osid.Metadata) - metadata for the knowledge category
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"a",
"knowledge",
"category",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L295-L305 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.set_knowledge_category | def set_knowledge_category(self, grade_id):
"""Sets the knowledge category.
arg: grade_id (osid.id.Id): the new knowledge category
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``grade_id`` cannot be modified
raise: NullArgument - ``grade_id`` is ``nul... | python | def set_knowledge_category(self, grade_id):
"""Sets the knowledge category.
arg: grade_id (osid.id.Id): the new knowledge category
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``grade_id`` cannot be modified
raise: NullArgument - ``grade_id`` is ``nul... | [
"def",
"set_knowledge_category",
"(",
"self",
",",
"grade_id",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.set_avatar_template",
"if",
"self",
".",
"get_knowledge_category_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
":",
"raise",
"errors",
... | Sets the knowledge category.
arg: grade_id (osid.id.Id): the new knowledge category
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``grade_id`` cannot be modified
raise: NullArgument - ``grade_id`` is ``null``
*compliance: mandatory -- This method must ... | [
"Sets",
"the",
"knowledge",
"category",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L310-L325 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.clear_knowledge_category | def clear_knowledge_category(self):
"""Clears the knowledge category.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resou... | python | def clear_knowledge_category(self):
"""Clears the knowledge category.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resou... | [
"def",
"clear_knowledge_category",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.clear_avatar_template",
"if",
"(",
"self",
".",
"get_knowledge_category_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_knowledg... | Clears the knowledge category.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"knowledge",
"category",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L327-L339 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.get_cognitive_process_metadata | def get_cognitive_process_metadata(self):
"""Gets the metadata for a cognitive process.
return: (osid.Metadata) - metadata for the cognitive process
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_gr... | python | def get_cognitive_process_metadata(self):
"""Gets the metadata for a cognitive process.
return: (osid.Metadata) - metadata for the cognitive process
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_gr... | [
"def",
"get_cognitive_process_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'cognitive_process'",
"]",
")",
"metadata",
".",
"update",
"(... | Gets the metadata for a cognitive process.
return: (osid.Metadata) - metadata for the cognitive process
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"a",
"cognitive",
"process",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L343-L353 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.set_cognitive_process | def set_cognitive_process(self, grade_id):
"""Sets the cognitive process.
arg: grade_id (osid.id.Id): the new cognitive process
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``grade_id`` cannot be modified
raise: NullArgument - ``grade_id`` is ``null``... | python | def set_cognitive_process(self, grade_id):
"""Sets the cognitive process.
arg: grade_id (osid.id.Id): the new cognitive process
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``grade_id`` cannot be modified
raise: NullArgument - ``grade_id`` is ``null``... | [
"def",
"set_cognitive_process",
"(",
"self",
",",
"grade_id",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.set_avatar_template",
"if",
"self",
".",
"get_cognitive_process_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
":",
"raise",
"errors",
... | Sets the cognitive process.
arg: grade_id (osid.id.Id): the new cognitive process
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``grade_id`` cannot be modified
raise: NullArgument - ``grade_id`` is ``null``
*compliance: mandatory -- This method must be... | [
"Sets",
"the",
"cognitive",
"process",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L358-L373 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ObjectiveForm.clear_cognitive_process | def clear_cognitive_process(self):
"""Clears the cognitive process.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resourc... | python | def clear_cognitive_process(self):
"""Clears the cognitive process.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resourc... | [
"def",
"clear_cognitive_process",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.clear_avatar_template",
"if",
"(",
"self",
".",
"get_cognitive_process_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_cognitive_... | Clears the cognitive process.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"cognitive",
"process",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L375-L387 |
mitsei/dlkit | dlkit/json_/learning/objects.py | Activity.get_objective_id | def get_objective_id(self):
"""Gets the ``Id`` of the related objective.
return: (osid.id.Id) - the objective ``Id``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.Activity.get_objective_id
if not bool(self.... | python | def get_objective_id(self):
"""Gets the ``Id`` of the related objective.
return: (osid.id.Id) - the objective ``Id``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.Activity.get_objective_id
if not bool(self.... | [
"def",
"get_objective_id",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.Activity.get_objective_id",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'objectiveId'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState",
"(",
"'objective... | Gets the ``Id`` of the related objective.
return: (osid.id.Id) - the objective ``Id``
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"Id",
"of",
"the",
"related",
"objective",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L584-L594 |
mitsei/dlkit | dlkit/json_/learning/objects.py | Activity.get_objective | def get_objective(self):
"""Gets the related objective.
return: (osid.learning.Objective) - the related objective
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.le... | python | def get_objective(self):
"""Gets the related objective.
return: (osid.learning.Objective) - the related objective
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.le... | [
"def",
"get_objective",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.Activity.get_objective",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'objectiveId'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState",
"(",
"'objective empty... | Gets the related objective.
return: (osid.learning.Objective) - the related objective
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"related",
"objective",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L598-L614 |
mitsei/dlkit | dlkit/json_/learning/objects.py | Activity.get_assets | def get_assets(self):
"""Gets any assets associated with this activity.
return: (osid.repository.AssetList) - list of assets
raise: IllegalState - ``is_asset_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
*compliance: mandat... | python | def get_assets(self):
"""Gets any assets associated with this activity.
return: (osid.repository.AssetList) - list of assets
raise: IllegalState - ``is_asset_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
*compliance: mandat... | [
"def",
"get_assets",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.Activity.get_assets_template",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'assetIds'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState",
"(",
"'no assetIds'",
... | Gets any assets associated with this activity.
return: (osid.repository.AssetList) - list of assets
raise: IllegalState - ``is_asset_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This method must be implem... | [
"Gets",
"any",
"assets",
"associated",
"with",
"this",
"activity",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L642-L662 |
mitsei/dlkit | dlkit/json_/learning/objects.py | Activity.get_courses | def get_courses(self):
"""Gets any courses associated with this activity.
return: (osid.course.CourseList) - list of courses
raise: IllegalState - ``is_course_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
*compliance: manda... | python | def get_courses(self):
"""Gets any courses associated with this activity.
return: (osid.course.CourseList) - list of courses
raise: IllegalState - ``is_course_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
*compliance: manda... | [
"def",
"get_courses",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.Activity.get_assets_template",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'courseIds'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState",
"(",
"'no courseIds'... | Gets any courses associated with this activity.
return: (osid.course.CourseList) - list of courses
raise: IllegalState - ``is_course_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This method must be implem... | [
"Gets",
"any",
"courses",
"associated",
"with",
"this",
"activity",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L690-L710 |
mitsei/dlkit | dlkit/json_/learning/objects.py | Activity.get_assessments | def get_assessments(self):
"""Gets any assessments associated with this activity.
return: (osid.assessment.AssessmentList) - list of assessments
raise: IllegalState - ``is_assessment_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
... | python | def get_assessments(self):
"""Gets any assessments associated with this activity.
return: (osid.assessment.AssessmentList) - list of assessments
raise: IllegalState - ``is_assessment_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
... | [
"def",
"get_assessments",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.Activity.get_assets_template",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'assessmentIds'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState",
"(",
"'no as... | Gets any assessments associated with this activity.
return: (osid.assessment.AssessmentList) - list of assessments
raise: IllegalState - ``is_assessment_based_activity()`` is
``false``
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This m... | [
"Gets",
"any",
"assessments",
"associated",
"with",
"this",
"activity",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L741-L761 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm._init_metadata | def _init_metadata(self, **kwargs):
"""Initialize form metadata"""
osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
self._courses_default = self._mdata['courses']['default_id_values']
self._assessments_default = self._mdata['assessments']['default_id_values']
self._asse... | python | def _init_metadata(self, **kwargs):
"""Initialize form metadata"""
osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
self._courses_default = self._mdata['courses']['default_id_values']
self._assessments_default = self._mdata['assessments']['default_id_values']
self._asse... | [
"def",
"_init_metadata",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"osid_objects",
".",
"OsidObjectForm",
".",
"_init_metadata",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
"self",
".",
"_courses_default",
"=",
"self",
".",
"_mdata",
"[",
"'courses'",... | Initialize form metadata | [
"Initialize",
"form",
"metadata"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L808-L813 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm._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['assignedObjectiveBankIds'] = [str(kwargs['objective_bank_id'])]
self._my_map['courseIds'] = self._courses_default
self.... | 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['assignedObjectiveBankIds'] = [str(kwargs['objective_bank_id'])]
self._my_map['courseIds'] = self._courses_default
self.... | [
"def",
"_init_map",
"(",
"self",
",",
"record_types",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"osid_objects",
".",
"OsidObjectForm",
".",
"_init_map",
"(",
"self",
",",
"record_types",
"=",
"record_types",
")",
"self",
".",
"_my_map",
"[",
"'assign... | Initialize form map | [
"Initialize",
"form",
"map"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L815-L822 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.get_assets_metadata | def get_assets_metadata(self):
"""Gets the metadata for the assets.
return: (osid.Metadata) - metadata for the assets
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_template
... | python | def get_assets_metadata(self):
"""Gets the metadata for the assets.
return: (osid.Metadata) - metadata for the assets
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_template
... | [
"def",
"get_assets_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'assets'",
"]",
")",
"metadata",
".",
"update",
"(",
"{",
"'existin... | Gets the metadata for the assets.
return: (osid.Metadata) - metadata for the assets
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"the",
"assets",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L824-L834 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.set_assets | def set_assets(self, asset_ids):
"""Sets the assets.
arg: asset_ids (osid.id.Id[]): the asset ``Ids``
raise: InvalidArgument - ``asset_ids`` is invalid
raise: NullArgument - ``asset_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*complian... | python | def set_assets(self, asset_ids):
"""Sets the assets.
arg: asset_ids (osid.id.Id[]): the asset ``Ids``
raise: InvalidArgument - ``asset_ids`` is invalid
raise: NullArgument - ``asset_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*complian... | [
"def",
"set_assets",
"(",
"self",
",",
"asset_ids",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.set_assets_template",
"if",
"not",
"isinstance",
"(",
"asset_ids",
",",
"list",
")",
":",
"raise",
"errors",
".",
"InvalidArgument",
"(",
")",
"if... | Sets the assets.
arg: asset_ids (osid.id.Id[]): the asset ``Ids``
raise: InvalidArgument - ``asset_ids`` is invalid
raise: NullArgument - ``asset_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be impleme... | [
"Sets",
"the",
"assets",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L839-L859 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.clear_assets | def clear_assets(self):
"""Clears the assets.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.clear_a... | python | def clear_assets(self):
"""Clears the assets.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.clear_a... | [
"def",
"clear_assets",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.clear_assets_template",
"if",
"(",
"self",
".",
"get_assets_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_assets_metadata",
"(",
")",
... | Clears the assets.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"assets",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L861-L873 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.get_courses_metadata | def get_courses_metadata(self):
"""Gets the metadata for the courses.
return: (osid.Metadata) - metadata for the courses
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_template
... | python | def get_courses_metadata(self):
"""Gets the metadata for the courses.
return: (osid.Metadata) - metadata for the courses
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_template
... | [
"def",
"get_courses_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'courses'",
"]",
")",
"metadata",
".",
"update",
"(",
"{",
"'exist... | Gets the metadata for the courses.
return: (osid.Metadata) - metadata for the courses
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"the",
"courses",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L877-L887 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.set_courses | def set_courses(self, course_ids):
"""Sets the courses.
arg: course_ids (osid.id.Id[]): the course ``Ids``
raise: InvalidArgument - ``course_ids`` is invalid
raise: NullArgument - ``course_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*c... | python | def set_courses(self, course_ids):
"""Sets the courses.
arg: course_ids (osid.id.Id[]): the course ``Ids``
raise: InvalidArgument - ``course_ids`` is invalid
raise: NullArgument - ``course_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*c... | [
"def",
"set_courses",
"(",
"self",
",",
"course_ids",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.set_assets_template",
"if",
"not",
"isinstance",
"(",
"course_ids",
",",
"list",
")",
":",
"raise",
"errors",
".",
"InvalidArgument",
"(",
")",
... | Sets the courses.
arg: course_ids (osid.id.Id[]): the course ``Ids``
raise: InvalidArgument - ``course_ids`` is invalid
raise: NullArgument - ``course_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be im... | [
"Sets",
"the",
"courses",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L892-L912 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.clear_courses | def clear_courses(self):
"""Clears the courses.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.clear... | python | def clear_courses(self):
"""Clears the courses.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.clear... | [
"def",
"clear_courses",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.clear_assets_template",
"if",
"(",
"self",
".",
"get_courses_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_courses_metadata",
"(",
")... | Clears the courses.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"courses",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L914-L926 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.get_assessments_metadata | def get_assessments_metadata(self):
"""Gets the metadata for the assessments.
return: (osid.Metadata) - metadata for the assessments
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_te... | python | def get_assessments_metadata(self):
"""Gets the metadata for the assessments.
return: (osid.Metadata) - metadata for the assessments
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_te... | [
"def",
"get_assessments_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.get_assets_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'assessments'",
"]",
")",
"metadata",
".",
"update",
"(",
"{",
... | Gets the metadata for the assessments.
return: (osid.Metadata) - metadata for the assessments
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"the",
"assessments",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L930-L940 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.set_assessments | def set_assessments(self, assessment_ids):
"""Sets the assessments.
arg: assessment_ids (osid.id.Id[]): the assessment ``Ids``
raise: InvalidArgument - ``assessment_ids`` is invalid
raise: NullArgument - ``assessment_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnl... | python | def set_assessments(self, assessment_ids):
"""Sets the assessments.
arg: assessment_ids (osid.id.Id[]): the assessment ``Ids``
raise: InvalidArgument - ``assessment_ids`` is invalid
raise: NullArgument - ``assessment_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnl... | [
"def",
"set_assessments",
"(",
"self",
",",
"assessment_ids",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.set_assets_template",
"if",
"not",
"isinstance",
"(",
"assessment_ids",
",",
"list",
")",
":",
"raise",
"errors",
".",
"InvalidArgument",
"(... | Sets the assessments.
arg: assessment_ids (osid.id.Id[]): the assessment ``Ids``
raise: InvalidArgument - ``assessment_ids`` is invalid
raise: NullArgument - ``assessment_ids`` is ``null``
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- Th... | [
"Sets",
"the",
"assessments",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L945-L965 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ActivityForm.clear_assessments | def clear_assessments(self):
"""Clears the assessments.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityFo... | python | def clear_assessments(self):
"""Clears the assessments.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.learning.ActivityFo... | [
"def",
"clear_assessments",
"(",
"self",
")",
":",
"# Implemented from template for osid.learning.ActivityForm.clear_assets_template",
"if",
"(",
"self",
".",
"get_assessments_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_assessments_metadata",... | Clears the assessments.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"assessments",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L967-L979 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ProficiencyForm._init_metadata | def _init_metadata(self, **kwargs):
"""Initialize form metadata"""
osid_objects.OsidRelationshipForm._init_metadata(self, **kwargs)
self._completion_default = self._mdata['completion']['default_decimal_values'][0]
self._level_default = self._mdata['level']['default_id_values'][0] | python | def _init_metadata(self, **kwargs):
"""Initialize form metadata"""
osid_objects.OsidRelationshipForm._init_metadata(self, **kwargs)
self._completion_default = self._mdata['completion']['default_decimal_values'][0]
self._level_default = self._mdata['level']['default_id_values'][0] | [
"def",
"_init_metadata",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"osid_objects",
".",
"OsidRelationshipForm",
".",
"_init_metadata",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
"self",
".",
"_completion_default",
"=",
"self",
".",
"_mdata",
"[",
"'c... | Initialize form metadata | [
"Initialize",
"form",
"metadata"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L1240-L1244 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ProficiencyForm._init_map | def _init_map(self, record_types=None, **kwargs):
"""Initialize form map"""
osid_objects.OsidRelationshipForm._init_map(self, record_types=record_types)
self._my_map['assignedObjectiveBankIds'] = [str(kwargs['objective_bank_id'])]
self._my_map['completion'] = self._completion_default
... | python | def _init_map(self, record_types=None, **kwargs):
"""Initialize form map"""
osid_objects.OsidRelationshipForm._init_map(self, record_types=record_types)
self._my_map['assignedObjectiveBankIds'] = [str(kwargs['objective_bank_id'])]
self._my_map['completion'] = self._completion_default
... | [
"def",
"_init_map",
"(",
"self",
",",
"record_types",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"osid_objects",
".",
"OsidRelationshipForm",
".",
"_init_map",
"(",
"self",
",",
"record_types",
"=",
"record_types",
")",
"self",
".",
"_my_map",
"[",
"'... | Initialize form map | [
"Initialize",
"form",
"map"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L1246-L1253 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ProficiencyForm.get_completion_metadata | def get_completion_metadata(self):
"""Gets the metadata for completion percentage.
return: (osid.Metadata) - metadata for the completion percentage
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_gro... | python | def get_completion_metadata(self):
"""Gets the metadata for completion percentage.
return: (osid.Metadata) - metadata for the completion percentage
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_gro... | [
"def",
"get_completion_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'completion'",
"]",
")",
"metadata",
".",
"update",
"(",
"{",
"'... | Gets the metadata for completion percentage.
return: (osid.Metadata) - metadata for the completion percentage
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"completion",
"percentage",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L1255-L1265 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ProficiencyForm.set_completion | def set_completion(self, completion):
"""Sets the completion percentage.
arg: completion (decimal): the completion percentage
raise: InvalidArgument - ``completion`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method mus... | python | def set_completion(self, completion):
"""Sets the completion percentage.
arg: completion (decimal): the completion percentage
raise: InvalidArgument - ``completion`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method mus... | [
"def",
"set_completion",
"(",
"self",
",",
"completion",
")",
":",
"# Implemented from template for osid.grading.GradeSystemForm.set_lowest_numeric_score",
"if",
"self",
".",
"get_completion_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
":",
"raise",
"errors",
".",
... | Sets the completion percentage.
arg: completion (decimal): the completion percentage
raise: InvalidArgument - ``completion`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Sets",
"the",
"completion",
"percentage",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L1270-L1288 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ProficiencyForm.clear_completion | def clear_completion(self):
"""Clears the completion.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.grading.GradeSystemFo... | python | def clear_completion(self):
"""Clears the completion.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.grading.GradeSystemFo... | [
"def",
"clear_completion",
"(",
"self",
")",
":",
"# Implemented from template for osid.grading.GradeSystemForm.clear_lowest_numeric_score",
"if",
"(",
"self",
".",
"get_completion_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_completion_metada... | Clears the completion.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"completion",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L1290-L1302 |
mitsei/dlkit | dlkit/json_/learning/objects.py | ProficiencyForm.clear_level | def clear_level(self):
"""Clears the level.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
if (self.get_level_metadata().is_read_only() or
self... | python | def clear_level(self):
"""Clears the level.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
if (self.get_level_metadata().is_read_only() or
self... | [
"def",
"clear_level",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"get_level_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_level_metadata",
"(",
")",
".",
"is_required",
"(",
")",
")",
":",
"raise",
"errors",
".",
"NoAc... | Clears the level.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"level",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/objects.py#L1344-L1356 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.