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 |
|---|---|---|---|---|---|---|---|---|---|---|
jason-weirather/py-seq-tools | seqtools/format/bgzf.py | get_block_bounds | def get_block_bounds(filename):
"""Pre block starts
start 0-indexted, end 1-indexted
:param filename: filename
:type filename: string
:return: 0-index start and 1-index end
:rtype: array of arrays with the [start end] of each block
"""
bs = []
with open(filename,'rb') as inf:
while True:
bytes1 = inf.... | python | def get_block_bounds(filename):
"""Pre block starts
start 0-indexted, end 1-indexted
:param filename: filename
:type filename: string
:return: 0-index start and 1-index end
:rtype: array of arrays with the [start end] of each block
"""
bs = []
with open(filename,'rb') as inf:
while True:
bytes1 = inf.... | [
"def",
"get_block_bounds",
"(",
"filename",
")",
":",
"bs",
"=",
"[",
"]",
"with",
"open",
"(",
"filename",
",",
"'rb'",
")",
"as",
"inf",
":",
"while",
"True",
":",
"bytes1",
"=",
"inf",
".",
"read",
"(",
"12",
")",
"if",
"len",
"(",
"bytes1",
"... | Pre block starts
start 0-indexted, end 1-indexted
:param filename: filename
:type filename: string
:return: 0-index start and 1-index end
:rtype: array of arrays with the [start end] of each block | [
"Pre",
"block",
"starts",
"start",
"0",
"-",
"indexted",
"end",
"1",
"-",
"indexted"
] | train | https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/bgzf.py#L3-L41 |
jason-weirather/py-seq-tools | seqtools/format/bgzf.py | is_bgzf | def is_bgzf(filename):
"""Pre: filename to test if it is a bgzf format
Post: True or False
:param filename:
:type filename: string
:return: if its a bgzf
:rtype: bool
"""
with open(filename,'rb') as inf:
bytes1 = inf.read(12)
if len(bytes1) != 12:
sys.stderr.write("File length ERROR\n")
... | python | def is_bgzf(filename):
"""Pre: filename to test if it is a bgzf format
Post: True or False
:param filename:
:type filename: string
:return: if its a bgzf
:rtype: bool
"""
with open(filename,'rb') as inf:
bytes1 = inf.read(12)
if len(bytes1) != 12:
sys.stderr.write("File length ERROR\n")
... | [
"def",
"is_bgzf",
"(",
"filename",
")",
":",
"with",
"open",
"(",
"filename",
",",
"'rb'",
")",
"as",
"inf",
":",
"bytes1",
"=",
"inf",
".",
"read",
"(",
"12",
")",
"if",
"len",
"(",
"bytes1",
")",
"!=",
"12",
":",
"sys",
".",
"stderr",
".",
"w... | Pre: filename to test if it is a bgzf format
Post: True or False
:param filename:
:type filename: string
:return: if its a bgzf
:rtype: bool | [
"Pre",
":",
"filename",
"to",
"test",
"if",
"it",
"is",
"a",
"bgzf",
"format"
] | train | https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/bgzf.py#L43-L102 |
jason-weirather/py-seq-tools | seqtools/format/bgzf.py | reader.read | def read(self,size):
"""read size bytes and return them"""
done = 0 #number of bytes that have been read so far
v = ''
while True:
if size-done < len(self._buffer['data']) - self._buffer_pos:
v += self._buffer['data'][self._buffer_pos:self._buffer_pos+(size-done)]
self._buffer_pos... | python | def read(self,size):
"""read size bytes and return them"""
done = 0 #number of bytes that have been read so far
v = ''
while True:
if size-done < len(self._buffer['data']) - self._buffer_pos:
v += self._buffer['data'][self._buffer_pos:self._buffer_pos+(size-done)]
self._buffer_pos... | [
"def",
"read",
"(",
"self",
",",
"size",
")",
":",
"done",
"=",
"0",
"#number of bytes that have been read so far",
"v",
"=",
"''",
"while",
"True",
":",
"if",
"size",
"-",
"done",
"<",
"len",
"(",
"self",
".",
"_buffer",
"[",
"'data'",
"]",
")",
"-",
... | read size bytes and return them | [
"read",
"size",
"bytes",
"and",
"return",
"them"
] | train | https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/bgzf.py#L138-L154 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_objective_admin_session | def get_objective_admin_session(self):
"""Gets the ``OsidSession`` associated with the objective administration service.
return: (osid.learning.ObjectiveAdminSession) - an
``ObjectiveAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplemente... | python | def get_objective_admin_session(self):
"""Gets the ``OsidSession`` associated with the objective administration service.
return: (osid.learning.ObjectiveAdminSession) - an
``ObjectiveAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplemente... | [
"def",
"get_objective_admin_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"ObjectiveAdminSession",
"(... | Gets the ``OsidSession`` associated with the objective administration service.
return: (osid.learning.ObjectiveAdminSession) - an
``ObjectiveAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_objective_admin()`` is
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L628-L643 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_objective_admin_session_for_objective_bank | def get_objective_admin_session_for_objective_bank(self, objective_bank_id):
"""Gets the ``OsidSession`` associated with the objective admin service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
return: (osid.learning.Obje... | python | def get_objective_admin_session_for_objective_bank(self, objective_bank_id):
"""Gets the ``OsidSession`` associated with the objective admin service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
return: (osid.learning.Obje... | [
"def",
"get_objective_admin_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the ca... | Gets the ``OsidSession`` associated with the objective admin service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
return: (osid.learning.ObjectiveAdminSession) - ``an
_objective_admin_session``
raise: Not... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"admin",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L649-L672 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_objective_objective_bank_session | def get_objective_objective_bank_session(self):
"""Gets the session for retrieving objective to objective bank mappings.
return: (osid.learning.ObjectiveObjectiveBankSession) - an
``ObjectiveObjectiveBankSession``
raise: OperationFailed - unable to complete request
rais... | python | def get_objective_objective_bank_session(self):
"""Gets the session for retrieving objective to objective bank mappings.
return: (osid.learning.ObjectiveObjectiveBankSession) - an
``ObjectiveObjectiveBankSession``
raise: OperationFailed - unable to complete request
rais... | [
"def",
"get_objective_objective_bank_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_objective_bank",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"ObjectiveO... | Gets the session for retrieving objective to objective bank mappings.
return: (osid.learning.ObjectiveObjectiveBankSession) - an
``ObjectiveObjectiveBankSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_objective_objective_bank()``... | [
"Gets",
"the",
"session",
"for",
"retrieving",
"objective",
"to",
"objective",
"bank",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L817-L832 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_objective_objective_bank_assignment_session | def get_objective_objective_bank_assignment_session(self):
"""Gets the session for assigning objective to objective bank mappings.
return: (osid.learning.ObjectiveObjectiveBankAssignmentSession)
- an ``ObjectiveObjectiveBankAssignmentSession``
raise: OperationFailed - unable to... | python | def get_objective_objective_bank_assignment_session(self):
"""Gets the session for assigning objective to objective bank mappings.
return: (osid.learning.ObjectiveObjectiveBankAssignmentSession)
- an ``ObjectiveObjectiveBankAssignmentSession``
raise: OperationFailed - unable to... | [
"def",
"get_objective_objective_bank_assignment_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_objective_bank_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions"... | Gets the session for assigning objective to objective bank mappings.
return: (osid.learning.ObjectiveObjectiveBankAssignmentSession)
- an ``ObjectiveObjectiveBankAssignmentSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented -
``su... | [
"Gets",
"the",
"session",
"for",
"assigning",
"objective",
"to",
"objective",
"bank",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L837-L853 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_activity_query_session | def get_activity_query_session(self):
"""Gets the ``OsidSession`` associated with the activity query service.
return: (osid.learning.ActivityQuerySession) - a
``ActivityQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports... | python | def get_activity_query_session(self):
"""Gets the ``OsidSession`` associated with the activity query service.
return: (osid.learning.ActivityQuerySession) - a
``ActivityQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports... | [
"def",
"get_activity_query_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_activity_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"ActivityQuerySession",
"(",
... | Gets the ``OsidSession`` associated with the activity query service.
return: (osid.learning.ActivityQuerySession) - a
``ActivityQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_activity_query()`` is
``false``
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"activity",
"query",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1001-L1016 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_activity_query_session_for_objective_bank | def get_activity_query_session_for_objective_bank(self, objective_bank_id):
"""Gets the ``OsidSession`` associated with the activity query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
return: (osid.learning.Activi... | python | def get_activity_query_session_for_objective_bank(self, objective_bank_id):
"""Gets the ``OsidSession`` associated with the activity query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
return: (osid.learning.Activi... | [
"def",
"get_activity_query_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
")",
":",
"if",
"not",
"self",
".",
"supports_activity_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the cata... | Gets the ``OsidSession`` associated with the activity query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
return: (osid.learning.ActivityQuerySession) - an
``ActivityQuerySession``
raise: NotFound ... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"activity",
"query",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1022-L1045 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_proficiency_query_session | def get_proficiency_query_session(self):
"""Gets the ``OsidSession`` associated with the proficiency query service.
return: (osid.learning.ProficiencyQuerySession) - a
``ProficiencyQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented ... | python | def get_proficiency_query_session(self):
"""Gets the ``OsidSession`` associated with the proficiency query service.
return: (osid.learning.ProficiencyQuerySession) - a
``ProficiencyQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented ... | [
"def",
"get_proficiency_query_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_proficiency_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"ProficiencyQuerySession"... | Gets the ``OsidSession`` associated with the proficiency query service.
return: (osid.learning.ProficiencyQuerySession) - a
``ProficiencyQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_proficiency_query()`` is
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"proficiency",
"query",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1184-L1199 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_proficiency_query_session_for_objective_bank | def get_proficiency_query_session_for_objective_bank(self, objective_bank_id):
"""Gets the ``OsidSession`` associated with the proficiency query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
obective bank
return: (osid.learning.P... | python | def get_proficiency_query_session_for_objective_bank(self, objective_bank_id):
"""Gets the ``OsidSession`` associated with the proficiency query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
obective bank
return: (osid.learning.P... | [
"def",
"get_proficiency_query_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
")",
":",
"if",
"not",
"self",
".",
"supports_proficiency_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if th... | Gets the ``OsidSession`` associated with the proficiency query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
obective bank
return: (osid.learning.ProficiencyQuerySession) - a
``ProficiencyQuerySession``
raise: No... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"proficiency",
"query",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1205-L1229 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningManager.get_objective_bank_hierarchy_design_session | def get_objective_bank_hierarchy_design_session(self):
"""Gets the session designing objective bank hierarchies.
return: (osid.learning.ObjectiveBankHierarchyDesignSession) - an
``ObjectiveBankHierarchyDesignSession``
raise: OperationFailed - unable to complete request
... | python | def get_objective_bank_hierarchy_design_session(self):
"""Gets the session designing objective bank hierarchies.
return: (osid.learning.ObjectiveBankHierarchyDesignSession) - an
``ObjectiveBankHierarchyDesignSession``
raise: OperationFailed - unable to complete request
... | [
"def",
"get_objective_bank_hierarchy_design_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_bank_hierarchy_design",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",... | Gets the session designing objective bank hierarchies.
return: (osid.learning.ObjectiveBankHierarchyDesignSession) - an
``ObjectiveBankHierarchyDesignSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented -
``supports_objective_bank_... | [
"Gets",
"the",
"session",
"designing",
"objective",
"bank",
"hierarchies",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1362-L1377 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_lookup_session | def get_objective_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the objective lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveLookupSession) - an
``ObjectiveLookupSession``
raise: NullArgument - ``prox... | python | def get_objective_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the objective lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveLookupSession) - an
``ObjectiveLookupSession``
raise: NullArgument - ``prox... | [
"def",
"get_objective_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Objectiv... | Gets the ``OsidSession`` associated with the objective lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveLookupSession) - an
``ObjectiveLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable t... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1481-L1498 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_lookup_session_for_objective_bank | def get_objective_lookup_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osi... | python | def get_objective_lookup_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osi... | [
"def",
"get_objective_lookup_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include ch... | Gets the ``OsidSession`` associated with the objective lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveLookupSession) - ``an
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"lookup",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1501-L1526 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_query_session | def get_objective_query_session(self, proxy):
"""Gets the ``OsidSession`` associated with the objective query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveQuerySession) - an
``ObjectiveQuerySession``
raise: NullArgument - ``proxy`` ... | python | def get_objective_query_session(self, proxy):
"""Gets the ``OsidSession`` associated with the objective query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveQuerySession) - an
``ObjectiveQuerySession``
raise: NullArgument - ``proxy`` ... | [
"def",
"get_objective_query_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"ObjectiveQ... | Gets the ``OsidSession`` associated with the objective query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveQuerySession) - an
``ObjectiveQuerySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to c... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"query",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1529-L1546 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_query_session_for_objective_bank | def get_objective_query_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.... | python | def get_objective_query_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.... | [
"def",
"get_objective_query_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include chec... | Gets the ``OsidSession`` associated with the objective query service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveQuerySession) - ``an
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"query",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1549-L1574 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_hierarchy_session | def get_objective_hierarchy_session(self, proxy):
"""Gets the session for traversing objective hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveHierarchySession) - an
``ObjectiveHierarchySession``
raise: NullArgument - ``proxy`` is ... | python | def get_objective_hierarchy_session(self, proxy):
"""Gets the session for traversing objective hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveHierarchySession) - an
``ObjectiveHierarchySession``
raise: NullArgument - ``proxy`` is ... | [
"def",
"get_objective_hierarchy_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_hierarchy",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Ob... | Gets the session for traversing objective hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveHierarchySession) - an
``ObjectiveHierarchySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to complete... | [
"Gets",
"the",
"session",
"for",
"traversing",
"objective",
"hierarchies",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1625-L1642 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_hierarchy_session_for_objective_bank | def get_objective_hierarchy_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective hierarchy traversal service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
ar... | python | def get_objective_hierarchy_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective hierarchy traversal service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
ar... | [
"def",
"get_objective_hierarchy_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_hierarchy",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also incl... | Gets the ``OsidSession`` associated with the objective hierarchy traversal service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveHierarchySession) -... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"hierarchy",
"traversal",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1645-L1670 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_hierarchy_design_session | def get_objective_hierarchy_design_session(self, proxy):
"""Gets the session for designing objective hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveHierarchyDesignSession) - an
``ObjectiveHierarchyDesignSession``
raise: NullArgume... | python | def get_objective_hierarchy_design_session(self, proxy):
"""Gets the session for designing objective hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveHierarchyDesignSession) - an
``ObjectiveHierarchyDesignSession``
raise: NullArgume... | [
"def",
"get_objective_hierarchy_design_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_hierarchy_design",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions"... | Gets the session for designing objective hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveHierarchyDesignSession) - an
``ObjectiveHierarchyDesignSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable ... | [
"Gets",
"the",
"session",
"for",
"designing",
"objective",
"hierarchies",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1673-L1690 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_hierarchy_design_session_for_objective_bank | def get_objective_hierarchy_design_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective hierarchy design service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
... | python | def get_objective_hierarchy_design_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective hierarchy design service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
... | [
"def",
"get_objective_hierarchy_design_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_hierarchy_design",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
... | Gets the ``OsidSession`` associated with the objective hierarchy design service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveHierarchyDesignSession... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"hierarchy",
"design",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1693-L1719 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_sequencing_session | def get_objective_sequencing_session(self, proxy):
"""Gets the session for sequencing objectives.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveSequencingSession) - an
``ObjectiveSequencingSession``
raise: NullArgument - ``proxy`` is ``null``... | python | def get_objective_sequencing_session(self, proxy):
"""Gets the session for sequencing objectives.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveSequencingSession) - an
``ObjectiveSequencingSession``
raise: NullArgument - ``proxy`` is ``null``... | [
"def",
"get_objective_sequencing_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_sequencing",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"... | Gets the session for sequencing objectives.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveSequencingSession) - an
``ObjectiveSequencingSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to complete request
... | [
"Gets",
"the",
"session",
"for",
"sequencing",
"objectives",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1722-L1739 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_sequencing_session_for_objective_bank | def get_objective_sequencing_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: pr... | python | def get_objective_sequencing_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: pr... | [
"def",
"get_objective_sequencing_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_sequencing",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also in... | Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveSequencingSession) - an
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"sequencing",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1742-L1767 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_requisite_session | def get_objective_requisite_session(self, proxy):
"""Gets the session for examining objective requisites.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveRequisiteSession) - an
``ObjectiveRequisiteSession``
raise: NullArgument - ``proxy`` is ``... | python | def get_objective_requisite_session(self, proxy):
"""Gets the session for examining objective requisites.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveRequisiteSession) - an
``ObjectiveRequisiteSession``
raise: NullArgument - ``proxy`` is ``... | [
"def",
"get_objective_requisite_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_requisite",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Ob... | Gets the session for examining objective requisites.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveRequisiteSession) - an
``ObjectiveRequisiteSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to complete r... | [
"Gets",
"the",
"session",
"for",
"examining",
"objective",
"requisites",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1811-L1828 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_requisite_session_for_objective_bank | def get_objective_requisite_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: pro... | python | def get_objective_requisite_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: pro... | [
"def",
"get_objective_requisite_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_requisite",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also incl... | Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveRequisiteSession) - an
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"sequencing",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1831-L1856 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_requisite_assignment_session | def get_objective_requisite_assignment_session(self, proxy):
"""Gets the session for managing objective requisites.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveRequisiteAssignmentSession) - an
``ObjectiveRequisiteAssignmentSession``
raise: ... | python | def get_objective_requisite_assignment_session(self, proxy):
"""Gets the session for managing objective requisites.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveRequisiteAssignmentSession) - an
``ObjectiveRequisiteAssignmentSession``
raise: ... | [
"def",
"get_objective_requisite_assignment_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_requisite_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"s... | Gets the session for managing objective requisites.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveRequisiteAssignmentSession) - an
``ObjectiveRequisiteAssignmentSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - u... | [
"Gets",
"the",
"session",
"for",
"managing",
"objective",
"requisites",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1859-L1877 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_requisite_assignment_session_for_objective_bank | def get_objective_requisite_assignment_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
... | python | def get_objective_requisite_assignment_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
... | [
"def",
"get_objective_requisite_assignment_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_requisite_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
... | Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveRequisiteAssignmentSession) ... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"sequencing",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1880-L1906 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_activity_lookup_session | def get_activity_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the activity lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityLookupSession) - an
``ActivityLookupSession``
raise: NullArgument - ``proxy`` ... | python | def get_activity_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the activity lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityLookupSession) - an
``ActivityLookupSession``
raise: NullArgument - ``proxy`` ... | [
"def",
"get_activity_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_activity_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"ActivityLo... | Gets the ``OsidSession`` associated with the activity lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityLookupSession) - an
``ActivityLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to c... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"activity",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1909-L1926 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_activity_lookup_session_for_objective_bank | def get_activity_lookup_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the activity lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.... | python | def get_activity_lookup_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the activity lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.... | [
"def",
"get_activity_lookup_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_activity_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include chec... | Gets the ``OsidSession`` associated with the activity lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityLookupSession) - an
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"activity",
"lookup",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L1929-L1954 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_activity_admin_session | def get_activity_admin_session(self, proxy):
"""Gets the ``OsidSession`` associated with the activity administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityAdminSession) - an
``ActivityAdminSession``
raise: NullArgument - ``pro... | python | def get_activity_admin_session(self, proxy):
"""Gets the ``OsidSession`` associated with the activity administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityAdminSession) - an
``ActivityAdminSession``
raise: NullArgument - ``pro... | [
"def",
"get_activity_admin_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_activity_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"ActivityAdmi... | Gets the ``OsidSession`` associated with the activity administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityAdminSession) - an
``ActivityAdminSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unabl... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"activity",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2005-L2022 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_activity_admin_session_for_objective_bank | def get_activity_admin_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the activity admin service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.pr... | python | def get_activity_admin_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the activity admin service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.pr... | [
"def",
"get_activity_admin_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_activity_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check ... | Gets the ``OsidSession`` associated with the activity admin service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
objective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityAdminSession) - a
`... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"activity",
"admin",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2025-L2050 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_activity_objective_bank_session | def get_activity_objective_bank_session(self, proxy):
"""Gets the session for retrieving activity to objective bank mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityObjectiveBankSession) - an
``ActivityObjectiveBankSession``
raise: Null... | python | def get_activity_objective_bank_session(self, proxy):
"""Gets the session for retrieving activity to objective bank mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityObjectiveBankSession) - an
``ActivityObjectiveBankSession``
raise: Null... | [
"def",
"get_activity_objective_bank_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_activity_objective_bank",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".... | Gets the session for retrieving activity to objective bank mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityObjectiveBankSession) - an
``ActivityObjectiveBankSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed ... | [
"Gets",
"the",
"session",
"for",
"retrieving",
"activity",
"to",
"objective",
"bank",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2053-L2070 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_activity_objective_bank_assignment_session | def get_activity_objective_bank_assignment_session(self, proxy):
"""Gets the session for assigning activity to objective bank mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityObjectiveBankAssignmentSession) -
an ``ActivityObjectiveBankAssignment... | python | def get_activity_objective_bank_assignment_session(self, proxy):
"""Gets the session for assigning activity to objective bank mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityObjectiveBankAssignmentSession) -
an ``ActivityObjectiveBankAssignment... | [
"def",
"get_activity_objective_bank_assignment_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_activity_objective_bank_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"retur... | Gets the session for assigning activity to objective bank mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ActivityObjectiveBankAssignmentSession) -
an ``ActivityObjectiveBankAssignmentSession``
raise: NullArgument - ``proxy`` is ``null``
raise... | [
"Gets",
"the",
"session",
"for",
"assigning",
"activity",
"to",
"objective",
"bank",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2073-L2091 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_proficiency_lookup_session | def get_proficiency_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the proficiency lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ProficiencyLookupSession) - a
``ProficiencyLookupSession``
raise: NullArgument -... | python | def get_proficiency_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the proficiency lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ProficiencyLookupSession) - a
``ProficiencyLookupSession``
raise: NullArgument -... | [
"def",
"get_proficiency_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_proficiency_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Prof... | Gets the ``OsidSession`` associated with the proficiency lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ProficiencyLookupSession) - a
``ProficiencyLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - una... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"proficiency",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2094-L2111 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_proficiency_lookup_session_for_objective_bank | def get_proficiency_lookup_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the proficiency lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
obective bank
arg: proxy (... | python | def get_proficiency_lookup_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the proficiency lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
obective bank
arg: proxy (... | [
"def",
"get_proficiency_lookup_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_proficiency_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also includ... | Gets the ``OsidSession`` associated with the proficiency lookup service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
obective bank
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ProficiencyLookupSession) - a
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"proficiency",
"lookup",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2114-L2140 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_proficiency_admin_session | def get_proficiency_admin_session(self, proxy):
"""Gets the ``OsidSession`` associated with the proficiency administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ProficiencyAdminSession) - a
``ProficiencyAdminSession``
raise: NullArgum... | python | def get_proficiency_admin_session(self, proxy):
"""Gets the ``OsidSession`` associated with the proficiency administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ProficiencyAdminSession) - a
``ProficiencyAdminSession``
raise: NullArgum... | [
"def",
"get_proficiency_admin_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_proficiency_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Profic... | Gets the ``OsidSession`` associated with the proficiency administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ProficiencyAdminSession) - a
``ProficiencyAdminSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"proficiency",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2192-L2209 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_proficiency_admin_session_for_objective_bank | def get_proficiency_admin_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the proficiency administration service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
``ObjectiveBank``
arg:... | python | def get_proficiency_admin_session_for_objective_bank(self, objective_bank_id, proxy):
"""Gets the ``OsidSession`` associated with the proficiency administration service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
``ObjectiveBank``
arg:... | [
"def",
"get_proficiency_admin_session_for_objective_bank",
"(",
"self",
",",
"objective_bank_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_proficiency_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include ... | Gets the ``OsidSession`` associated with the proficiency administration service for the given objective bank.
arg: objective_bank_id (osid.id.Id): the ``Id`` of the
``ObjectiveBank``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ProficiencyAdminSession) - a... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"proficiency",
"administration",
"service",
"for",
"the",
"given",
"objective",
"bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2212-L2237 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_proficiency_objective_bank_assignment_session | def get_proficiency_objective_bank_assignment_session(self, proxy):
"""Gets the ``OsidSession`` associated with assigning proficiencies to objective banks.
arg: proxy (osid.proxy.Proxy): a proxy
return:
(osid.learning.ProficiencyObjectiveBankAssignmentSession
... | python | def get_proficiency_objective_bank_assignment_session(self, proxy):
"""Gets the ``OsidSession`` associated with assigning proficiencies to objective banks.
arg: proxy (osid.proxy.Proxy): a proxy
return:
(osid.learning.ProficiencyObjectiveBankAssignmentSession
... | [
"def",
"get_proficiency_objective_bank_assignment_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_proficiency_objective_bank_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
... | Gets the ``OsidSession`` associated with assigning proficiencies to objective banks.
arg: proxy (osid.proxy.Proxy): a proxy
return:
(osid.learning.ProficiencyObjectiveBankAssignmentSession
) - a ``ProficiencyObjectiveBankAssignmentSession``
raise: NullArgumen... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"assigning",
"proficiencies",
"to",
"objective",
"banks",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2240-L2260 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_bank_lookup_session | def get_objective_bank_lookup_session(self, proxy):
"""Gets the OsidSession associated with the objective bank lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankLookupSession) - an
``ObjectiveBankLookupSession``
raise: NullArg... | python | def get_objective_bank_lookup_session(self, proxy):
"""Gets the OsidSession associated with the objective bank lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankLookupSession) - an
``ObjectiveBankLookupSession``
raise: NullArg... | [
"def",
"get_objective_bank_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_bank_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
... | Gets the OsidSession associated with the objective bank lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankLookupSession) - an
``ObjectiveBankLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed -... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"bank",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2263-L2280 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_bank_admin_session | def get_objective_bank_admin_session(self, proxy):
"""Gets the OsidSession associated with the objective bank administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankAdminSession) - an
``ObjectiveBankAdminSession``
raise: Nu... | python | def get_objective_bank_admin_session(self, proxy):
"""Gets the OsidSession associated with the objective bank administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankAdminSession) - an
``ObjectiveBankAdminSession``
raise: Nu... | [
"def",
"get_objective_bank_admin_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_bank_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"... | Gets the OsidSession associated with the objective bank administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankAdminSession) - an
``ObjectiveBankAdminSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFa... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"objective",
"bank",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2283-L2300 |
mitsei/dlkit | dlkit/json_/learning/managers.py | LearningProxyManager.get_objective_bank_hierarchy_session | def get_objective_bank_hierarchy_session(self, proxy):
"""Gets the session traversing objective bank hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankHierarchySession) - an
``ObjectiveBankHierarchySession``
raise: NullArgument -... | python | def get_objective_bank_hierarchy_session(self, proxy):
"""Gets the session traversing objective bank hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankHierarchySession) - an
``ObjectiveBankHierarchySession``
raise: NullArgument -... | [
"def",
"get_objective_bank_hierarchy_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_objective_bank_hierarchy",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
... | Gets the session traversing objective bank hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.learning.ObjectiveBankHierarchySession) - an
``ObjectiveBankHierarchySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to... | [
"Gets",
"the",
"session",
"traversing",
"objective",
"bank",
"hierarchies",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/learning/managers.py#L2303-L2320 |
mitsei/dlkit | dlkit/json_/osid/searches.py | OsidSearch.limit_result_set | def limit_result_set(self, start, end):
"""By default, searches return all matching results.
This method restricts the number of results by setting the start
and end of the result set, starting from 1. The starting and
ending results can be used for paging results when a certain
... | python | def limit_result_set(self, start, end):
"""By default, searches return all matching results.
This method restricts the number of results by setting the start
and end of the result set, starting from 1. The starting and
ending results can be used for paging results when a certain
... | [
"def",
"limit_result_set",
"(",
"self",
",",
"start",
",",
"end",
")",
":",
"if",
"not",
"isinstance",
"(",
"start",
",",
"int",
")",
"or",
"not",
"isinstance",
"(",
"end",
",",
"int",
")",
":",
"raise",
"errors",
".",
"InvalidArgument",
"(",
"'start a... | By default, searches return all matching results.
This method restricts the number of results by setting the start
and end of the result set, starting from 1. The starting and
ending results can be used for paging results when a certain
ordering is requested. The ending position must be... | [
"By",
"default",
"searches",
"return",
"all",
"matching",
"results",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/searches.py#L65-L91 |
mitsei/dlkit | dlkit/records/repository/vcb/vcb_records.py | TimeStampFormRecord._init_map | def _init_map(self):
"""stub"""
self.my_osid_object_form._my_map['startTimestamp'] = \
self._start_timestamp_metadata['default_integer_values'][0]
self.my_osid_object_form._my_map['endTimestamp'] = \
self._end_timestamp_metadata['default_integer_values'][0] | python | def _init_map(self):
"""stub"""
self.my_osid_object_form._my_map['startTimestamp'] = \
self._start_timestamp_metadata['default_integer_values'][0]
self.my_osid_object_form._my_map['endTimestamp'] = \
self._end_timestamp_metadata['default_integer_values'][0] | [
"def",
"_init_map",
"(",
"self",
")",
":",
"self",
".",
"my_osid_object_form",
".",
"_my_map",
"[",
"'startTimestamp'",
"]",
"=",
"self",
".",
"_start_timestamp_metadata",
"[",
"'default_integer_values'",
"]",
"[",
"0",
"]",
"self",
".",
"my_osid_object_form",
"... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/vcb/vcb_records.py#L65-L70 |
mitsei/dlkit | dlkit/records/repository/vcb/vcb_records.py | TimeStampFormRecord._init_metadata | def _init_metadata(self):
"""stub"""
self._start_timestamp_metadata = {
'element_id': Id(self.my_osid_object_form._authority,
self.my_osid_object_form._namespace,
'start_timestamp'),
'element_label': 'start timestamp',
... | python | def _init_metadata(self):
"""stub"""
self._start_timestamp_metadata = {
'element_id': Id(self.my_osid_object_form._authority,
self.my_osid_object_form._namespace,
'start_timestamp'),
'element_label': 'start timestamp',
... | [
"def",
"_init_metadata",
"(",
"self",
")",
":",
"self",
".",
"_start_timestamp_metadata",
"=",
"{",
"'element_id'",
":",
"Id",
"(",
"self",
".",
"my_osid_object_form",
".",
"_authority",
",",
"self",
".",
"my_osid_object_form",
".",
"_namespace",
",",
"'start_ti... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/vcb/vcb_records.py#L72-L105 |
mitsei/dlkit | dlkit/records/repository/vcb/vcb_records.py | TimeStampFormRecord.set_start_timestamp | def set_start_timestamp(self, start_timestamp=None):
"""stub"""
if start_timestamp is None:
raise NullArgument()
if self.get_start_timestamp_metadata().is_read_only():
raise NoAccess()
if not self.my_osid_object_form._is_valid_integer(
start_timest... | python | def set_start_timestamp(self, start_timestamp=None):
"""stub"""
if start_timestamp is None:
raise NullArgument()
if self.get_start_timestamp_metadata().is_read_only():
raise NoAccess()
if not self.my_osid_object_form._is_valid_integer(
start_timest... | [
"def",
"set_start_timestamp",
"(",
"self",
",",
"start_timestamp",
"=",
"None",
")",
":",
"if",
"start_timestamp",
"is",
"None",
":",
"raise",
"NullArgument",
"(",
")",
"if",
"self",
".",
"get_start_timestamp_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/vcb/vcb_records.py#L111-L121 |
mitsei/dlkit | dlkit/records/repository/vcb/vcb_records.py | TimeStampFormRecord.clear_start_timestamp | def clear_start_timestamp(self):
"""stub"""
if (self.get_start_timestamp_metadata().is_read_only() or
self.get_start_timestamp_metadata().is_required()):
raise NoAccess()
self.my_osid_object_form._my_map['startTimestamp'] = \
self.get_start_timestamp_metad... | python | def clear_start_timestamp(self):
"""stub"""
if (self.get_start_timestamp_metadata().is_read_only() or
self.get_start_timestamp_metadata().is_required()):
raise NoAccess()
self.my_osid_object_form._my_map['startTimestamp'] = \
self.get_start_timestamp_metad... | [
"def",
"clear_start_timestamp",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"get_start_timestamp_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_start_timestamp_metadata",
"(",
")",
".",
"is_required",
"(",
")",
")",
":",
"rais... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/vcb/vcb_records.py#L123-L129 |
mitsei/dlkit | dlkit/records/repository/vcb/vcb_records.py | TimeStampFormRecord.set_end_timestamp | def set_end_timestamp(self, end_timestamp=None):
"""stub"""
if end_timestamp is None:
raise NullArgument()
if self.get_end_timestamp_metadata().is_read_only():
raise NoAccess()
if not self.my_osid_object_form._is_valid_integer(
end_timestamp,
... | python | def set_end_timestamp(self, end_timestamp=None):
"""stub"""
if end_timestamp is None:
raise NullArgument()
if self.get_end_timestamp_metadata().is_read_only():
raise NoAccess()
if not self.my_osid_object_form._is_valid_integer(
end_timestamp,
... | [
"def",
"set_end_timestamp",
"(",
"self",
",",
"end_timestamp",
"=",
"None",
")",
":",
"if",
"end_timestamp",
"is",
"None",
":",
"raise",
"NullArgument",
"(",
")",
"if",
"self",
".",
"get_end_timestamp_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
":",
... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/vcb/vcb_records.py#L135-L145 |
mitsei/dlkit | dlkit/records/repository/vcb/vcb_records.py | TimeStampFormRecord.clear_end_timestamp | def clear_end_timestamp(self):
"""stub"""
if (self.get_end_timestamp_metadata().is_read_only() or
self.get_end_timestamp_metadata().is_required()):
raise NoAccess()
self.my_osid_object_form._my_map['endTimestamp'] = \
self.get_end_timestamp_metadata().get_... | python | def clear_end_timestamp(self):
"""stub"""
if (self.get_end_timestamp_metadata().is_read_only() or
self.get_end_timestamp_metadata().is_required()):
raise NoAccess()
self.my_osid_object_form._my_map['endTimestamp'] = \
self.get_end_timestamp_metadata().get_... | [
"def",
"clear_end_timestamp",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"get_end_timestamp_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_end_timestamp_metadata",
"(",
")",
".",
"is_required",
"(",
")",
")",
":",
"raise",
... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/repository/vcb/vcb_records.py#L147-L153 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingManager.get_comment_lookup_session | def get_comment_lookup_session(self):
"""Gets the ``OsidSession`` associated with the comment lookup service.
return: (osid.commenting.CommentLookupSession) - a
``CommentLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``suppor... | python | def get_comment_lookup_session(self):
"""Gets the ``OsidSession`` associated with the comment lookup service.
return: (osid.commenting.CommentLookupSession) - a
``CommentLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``suppor... | [
"def",
"get_comment_lookup_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_comment_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"CommentLookupSession",
"(",
... | Gets the ``OsidSession`` associated with the comment lookup service.
return: (osid.commenting.CommentLookupSession) - a
``CommentLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_comment_lookup()`` is
``false`... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"comment",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L248-L263 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingManager.get_comment_book_session | def get_comment_book_session(self):
"""Gets the session for retrieving comment to book mappings.
return: (osid.commenting.CommentBookSession) - a
``CommentBookSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_comment_book()... | python | def get_comment_book_session(self):
"""Gets the session for retrieving comment to book mappings.
return: (osid.commenting.CommentBookSession) - a
``CommentBookSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_comment_book()... | [
"def",
"get_comment_book_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_comment_book",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"CommentBookSession",
"(",
"run... | Gets the session for retrieving comment to book mappings.
return: (osid.commenting.CommentBookSession) - a
``CommentBookSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_comment_book()`` is ``false``
*compliance: optional -... | [
"Gets",
"the",
"session",
"for",
"retrieving",
"comment",
"to",
"book",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L386-L400 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingManager.get_comment_book_assignment_session | def get_comment_book_assignment_session(self):
"""Gets the session for assigning comment to book mappings.
return: (osid.commenting.CommentBookAssignmentSession) - a
``CommentBookAssignmentSession``
raise: OperationFailed - unable to complete request
raise: Unimplement... | python | def get_comment_book_assignment_session(self):
"""Gets the session for assigning comment to book mappings.
return: (osid.commenting.CommentBookAssignmentSession) - a
``CommentBookAssignmentSession``
raise: OperationFailed - unable to complete request
raise: Unimplement... | [
"def",
"get_comment_book_assignment_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_comment_book_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"CommentBookA... | Gets the session for assigning comment to book mappings.
return: (osid.commenting.CommentBookAssignmentSession) - a
``CommentBookAssignmentSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_comment_book_assignment()``
... | [
"Gets",
"the",
"session",
"for",
"assigning",
"comment",
"to",
"book",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L405-L420 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingManager.get_book_lookup_session | def get_book_lookup_session(self):
"""Gets the ``OsidSession`` associated with the book lookup service.
return: (osid.commenting.BookLookupSession) - a
``BookLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_book_look... | python | def get_book_lookup_session(self):
"""Gets the ``OsidSession`` associated with the book lookup service.
return: (osid.commenting.BookLookupSession) - a
``BookLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_book_look... | [
"def",
"get_book_lookup_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_book_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"BookLookupSession",
"(",
"runtim... | Gets the ``OsidSession`` associated with the book lookup service.
return: (osid.commenting.BookLookupSession) - a
``BookLookupSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_book_lookup()`` is ``false``
*compliance: optio... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"book",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L425-L439 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingProxyManager.get_comment_lookup_session_for_book | def get_comment_lookup_session_for_book(self, book_id, proxy):
"""Gets the ``OsidSession`` associated with the comment lookup service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentLo... | python | def get_comment_lookup_session_for_book(self, book_id, proxy):
"""Gets the ``OsidSession`` associated with the comment lookup service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentLo... | [
"def",
"get_comment_lookup_session_for_book",
"(",
"self",
",",
"book_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_comment_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the catalo... | Gets the ``OsidSession`` associated with the comment lookup service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentLookupSession) - a
``CommentLookupSession``
raise: ... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"comment",
"lookup",
"service",
"for",
"the",
"given",
"book",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L580-L603 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingProxyManager.get_comment_query_session | def get_comment_query_session(self, proxy):
"""Gets the ``OsidSession`` associated with the comment query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentQuerySession) - a
``CommentQuerySession``
raise: NullArgument - ``proxy`` is ``nu... | python | def get_comment_query_session(self, proxy):
"""Gets the ``OsidSession`` associated with the comment query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentQuerySession) - a
``CommentQuerySession``
raise: NullArgument - ``proxy`` is ``nu... | [
"def",
"get_comment_query_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_comment_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"CommentQuerySe... | Gets the ``OsidSession`` associated with the comment query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentQuerySession) - a
``CommentQuerySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to comple... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"comment",
"query",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L606-L623 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingProxyManager.get_comment_query_session_for_book | def get_comment_query_session_for_book(self, book_id, proxy):
"""Gets the ``OsidSession`` associated with the comment query service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentQuer... | python | def get_comment_query_session_for_book(self, book_id, proxy):
"""Gets the ``OsidSession`` associated with the comment query service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentQuer... | [
"def",
"get_comment_query_session_for_book",
"(",
"self",
",",
"book_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_comment_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the catalog ... | Gets the ``OsidSession`` associated with the comment query service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentQuerySession) - a
``CommentQuerySession``
raise: Not... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"comment",
"query",
"service",
"for",
"the",
"given",
"book",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L626-L649 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingProxyManager.get_comment_admin_session | def get_comment_admin_session(self, proxy):
"""Gets the ``OsidSession`` associated with the comment administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentAdminSession) - a
``CommentAdminSession``
raise: NullArgument - ``proxy`... | python | def get_comment_admin_session(self, proxy):
"""Gets the ``OsidSession`` associated with the comment administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentAdminSession) - a
``CommentAdminSession``
raise: NullArgument - ``proxy`... | [
"def",
"get_comment_admin_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_comment_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"CommentAdminSe... | Gets the ``OsidSession`` associated with the comment administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentAdminSession) - a
``CommentAdminSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable ... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"comment",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L652-L669 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingProxyManager.get_comment_admin_session_for_book | def get_comment_admin_session_for_book(self, book_id, proxy):
"""Gets the ``OsidSession`` associated with the comment administration service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.Co... | python | def get_comment_admin_session_for_book(self, book_id, proxy):
"""Gets the ``OsidSession`` associated with the comment administration service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.Co... | [
"def",
"get_comment_admin_session_for_book",
"(",
"self",
",",
"book_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_comment_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the catalog ... | Gets the ``OsidSession`` associated with the comment administration service for the given book.
arg: book_id (osid.id.Id): the ``Id`` of the ``Book``
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.CommentAdminSession) - a
``CommentAdminSession``
ra... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"comment",
"administration",
"service",
"for",
"the",
"given",
"book",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L672-L695 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingProxyManager.get_book_admin_session | def get_book_admin_session(self, proxy):
"""Gets the ``OsidSession`` associated with the book administrative service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookAdminSession) - a
``BookAdminSession``
raise: NullArgument - ``proxy`` is ``null`... | python | def get_book_admin_session(self, proxy):
"""Gets the ``OsidSession`` associated with the book administrative service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookAdminSession) - a
``BookAdminSession``
raise: NullArgument - ``proxy`` is ``null`... | [
"def",
"get_book_admin_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_book_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"BookAdminSession",
... | Gets the ``OsidSession`` associated with the book administrative service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookAdminSession) - a
``BookAdminSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to comple... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"book",
"administrative",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L756-L772 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingProxyManager.get_book_hierarchy_session | def get_book_hierarchy_session(self, proxy):
"""Gets the ``OsidSession`` associated with the book hierarchy service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookHierarchySession) - a
``BookHierarchySession``
raise: NullArgument - ``proxy`` is ... | python | def get_book_hierarchy_session(self, proxy):
"""Gets the ``OsidSession`` associated with the book hierarchy service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookHierarchySession) - a
``BookHierarchySession``
raise: NullArgument - ``proxy`` is ... | [
"def",
"get_book_hierarchy_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_book_hierarchy",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"BookHierarch... | Gets the ``OsidSession`` associated with the book hierarchy service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookHierarchySession) - a
``BookHierarchySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to com... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"book",
"hierarchy",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L775-L792 |
mitsei/dlkit | dlkit/json_/commenting/managers.py | CommentingProxyManager.get_book_hierarchy_design_session | def get_book_hierarchy_design_session(self, proxy):
"""Gets the ``OsidSession`` associated with the book hierarchy design service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookHierarchyDesignSession) - a
``BookHierarchyDesignSession``
raise: Nu... | python | def get_book_hierarchy_design_session(self, proxy):
"""Gets the ``OsidSession`` associated with the book hierarchy design service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookHierarchyDesignSession) - a
``BookHierarchyDesignSession``
raise: Nu... | [
"def",
"get_book_hierarchy_design_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_book_hierarchy_design",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
... | Gets the ``OsidSession`` associated with the book hierarchy design service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.commenting.BookHierarchyDesignSession) - a
``BookHierarchyDesignSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFai... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"book",
"hierarchy",
"design",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/managers.py#L795-L812 |
Vagrants/blackbird | blackbird/plugins/zabbix_sender.py | ConcreteJob.build_items | def build_items(self):
"""
main loop
"""
conn = self.connect(address=self.server_address, port=self.server_port)
if conn:
while not self.queue.empty():
item = self.queue.get()
self.pool.append(item)
if type(item.data)... | python | def build_items(self):
"""
main loop
"""
conn = self.connect(address=self.server_address, port=self.server_port)
if conn:
while not self.queue.empty():
item = self.queue.get()
self.pool.append(item)
if type(item.data)... | [
"def",
"build_items",
"(",
"self",
")",
":",
"conn",
"=",
"self",
".",
"connect",
"(",
"address",
"=",
"self",
".",
"server_address",
",",
"port",
"=",
"self",
".",
"server_port",
")",
"if",
"conn",
":",
"while",
"not",
"self",
".",
"queue",
".",
"em... | main loop | [
"main",
"loop"
] | train | https://github.com/Vagrants/blackbird/blob/3b38cd5650caae362e0668dbd38bf8f88233e079/blackbird/plugins/zabbix_sender.py#L36-L72 |
Vagrants/blackbird | blackbird/plugins/zabbix_sender.py | ConcreteJob._reverse_queue | def _reverse_queue(self):
u"""When socket.timeout has occurred for Zabbix server,
this method is called.
Enqueue items in self.pool[].
"""
while self.pool:
item = self.pool.pop()
self.queue.put(item, block=False) | python | def _reverse_queue(self):
u"""When socket.timeout has occurred for Zabbix server,
this method is called.
Enqueue items in self.pool[].
"""
while self.pool:
item = self.pool.pop()
self.queue.put(item, block=False) | [
"def",
"_reverse_queue",
"(",
"self",
")",
":",
"while",
"self",
".",
"pool",
":",
"item",
"=",
"self",
".",
"pool",
".",
"pop",
"(",
")",
"self",
".",
"queue",
".",
"put",
"(",
"item",
",",
"block",
"=",
"False",
")"
] | u"""When socket.timeout has occurred for Zabbix server,
this method is called.
Enqueue items in self.pool[]. | [
"u",
"When",
"socket",
".",
"timeout",
"has",
"occurred",
"for",
"Zabbix",
"server",
"this",
"method",
"is",
"called",
".",
"Enqueue",
"items",
"in",
"self",
".",
"pool",
"[]",
"."
] | train | https://github.com/Vagrants/blackbird/blob/3b38cd5650caae362e0668dbd38bf8f88233e079/blackbird/plugins/zabbix_sender.py#L107-L115 |
Vagrants/blackbird | blackbird/plugins/zabbix_sender.py | ConcreteJob.build_statistics_item | def build_statistics_item(self):
"""
Statistics items are as following:
* zabbix_sender result
+ processed, failed, total and more...
"""
if self.result is not None:
stats = dict()
result = self.get_result()
info = result['info']
... | python | def build_statistics_item(self):
"""
Statistics items are as following:
* zabbix_sender result
+ processed, failed, total and more...
"""
if self.result is not None:
stats = dict()
result = self.get_result()
info = result['info']
... | [
"def",
"build_statistics_item",
"(",
"self",
")",
":",
"if",
"self",
".",
"result",
"is",
"not",
"None",
":",
"stats",
"=",
"dict",
"(",
")",
"result",
"=",
"self",
".",
"get_result",
"(",
")",
"info",
"=",
"result",
"[",
"'info'",
"]",
"info",
"=",
... | Statistics items are as following:
* zabbix_sender result
+ processed, failed, total and more... | [
"Statistics",
"items",
"are",
"as",
"following",
":",
"*",
"zabbix_sender",
"result",
"+",
"processed",
"failed",
"total",
"and",
"more",
"..."
] | train | https://github.com/Vagrants/blackbird/blob/3b38cd5650caae362e0668dbd38bf8f88233e079/blackbird/plugins/zabbix_sender.py#L117-L183 |
planetlabs/es_fluent | es_fluent/script_fields/__init__.py | ScriptFields.add_field | def add_field(self, field_instance):
"""
Appends a field.
"""
if isinstance(field_instance, BaseScriptField):
field_instance = field_instance
else:
raise ValueError('Expected a basetring or Field instance')
self.fields.append(field_instance)
... | python | def add_field(self, field_instance):
"""
Appends a field.
"""
if isinstance(field_instance, BaseScriptField):
field_instance = field_instance
else:
raise ValueError('Expected a basetring or Field instance')
self.fields.append(field_instance)
... | [
"def",
"add_field",
"(",
"self",
",",
"field_instance",
")",
":",
"if",
"isinstance",
"(",
"field_instance",
",",
"BaseScriptField",
")",
":",
"field_instance",
"=",
"field_instance",
"else",
":",
"raise",
"ValueError",
"(",
"'Expected a basetring or Field instance'",... | Appends a field. | [
"Appends",
"a",
"field",
"."
] | train | https://github.com/planetlabs/es_fluent/blob/74f8db3a1bf9aa1d54512cf2d5e0ec58ee2f4b1c/es_fluent/script_fields/__init__.py#L8-L19 |
planetlabs/es_fluent | es_fluent/script_fields/__init__.py | ScriptFields.to_query | def to_query(self):
"""
Returns a json-serializable representation.
"""
query = {}
for field_instance in self.fields:
query.update(field_instance.to_query())
return query | python | def to_query(self):
"""
Returns a json-serializable representation.
"""
query = {}
for field_instance in self.fields:
query.update(field_instance.to_query())
return query | [
"def",
"to_query",
"(",
"self",
")",
":",
"query",
"=",
"{",
"}",
"for",
"field_instance",
"in",
"self",
".",
"fields",
":",
"query",
".",
"update",
"(",
"field_instance",
".",
"to_query",
"(",
")",
")",
"return",
"query"
] | Returns a json-serializable representation. | [
"Returns",
"a",
"json",
"-",
"serializable",
"representation",
"."
] | train | https://github.com/planetlabs/es_fluent/blob/74f8db3a1bf9aa1d54512cf2d5e0ec58ee2f4b1c/es_fluent/script_fields/__init__.py#L27-L36 |
planetlabs/es_fluent | es_fluent/script_fields/__init__.py | ScriptField.to_query | def to_query(self):
"""
Returns a json-serializable representation.
"""
return {
self.name: {
'lang': self.lang,
'script': self.script,
'params': self.script_params
}
} | python | def to_query(self):
"""
Returns a json-serializable representation.
"""
return {
self.name: {
'lang': self.lang,
'script': self.script,
'params': self.script_params
}
} | [
"def",
"to_query",
"(",
"self",
")",
":",
"return",
"{",
"self",
".",
"name",
":",
"{",
"'lang'",
":",
"self",
".",
"lang",
",",
"'script'",
":",
"self",
".",
"script",
",",
"'params'",
":",
"self",
".",
"script_params",
"}",
"}"
] | Returns a json-serializable representation. | [
"Returns",
"a",
"json",
"-",
"serializable",
"representation",
"."
] | train | https://github.com/planetlabs/es_fluent/blob/74f8db3a1bf9aa1d54512cf2d5e0ec58ee2f4b1c/es_fluent/script_fields/__init__.py#L63-L73 |
linzhonghong/zapi | zapi/core/input.py | getfield | def getfield(f):
"""convert values from cgi.Field objects to plain values."""
if isinstance(f, list):
return [getfield(x) for x in f]
else:
return f.value | python | def getfield(f):
"""convert values from cgi.Field objects to plain values."""
if isinstance(f, list):
return [getfield(x) for x in f]
else:
return f.value | [
"def",
"getfield",
"(",
"f",
")",
":",
"if",
"isinstance",
"(",
"f",
",",
"list",
")",
":",
"return",
"[",
"getfield",
"(",
"x",
")",
"for",
"x",
"in",
"f",
"]",
"else",
":",
"return",
"f",
".",
"value"
] | convert values from cgi.Field objects to plain values. | [
"convert",
"values",
"from",
"cgi",
".",
"Field",
"objects",
"to",
"plain",
"values",
"."
] | train | https://github.com/linzhonghong/zapi/blob/ac55c3ddbc4153561472faaf59fb72ef794f13a5/zapi/core/input.py#L24-L29 |
linzhonghong/zapi | zapi/core/input.py | Input.data | def data(self):
"""Returns the data sent with the request."""
# the environment variable CONTENT_LENGTH may be empty or missing
try:
request_body_size = int(self.environ.get('CONTENT_LENGTH', 0))
except (ValueError):
request_body_size = 0
data = self.env... | python | def data(self):
"""Returns the data sent with the request."""
# the environment variable CONTENT_LENGTH may be empty or missing
try:
request_body_size = int(self.environ.get('CONTENT_LENGTH', 0))
except (ValueError):
request_body_size = 0
data = self.env... | [
"def",
"data",
"(",
"self",
")",
":",
"# the environment variable CONTENT_LENGTH may be empty or missing",
"try",
":",
"request_body_size",
"=",
"int",
"(",
"self",
".",
"environ",
".",
"get",
"(",
"'CONTENT_LENGTH'",
",",
"0",
")",
")",
"except",
"(",
"ValueError... | Returns the data sent with the request. | [
"Returns",
"the",
"data",
"sent",
"with",
"the",
"request",
"."
] | train | https://github.com/linzhonghong/zapi/blob/ac55c3ddbc4153561472faaf59fb72ef794f13a5/zapi/core/input.py#L79-L90 |
cloudnull/cloudlib | cloudlib/package_installer.py | distro_check | def distro_check():
"""Return a string containing the distro package manager."""
distro_data = platform.linux_distribution()
distro = [d.lower() for d in distro_data if d.isalpha()]
if any(['ubuntu' in distro, 'debian' in distro]) is True:
return 'apt'
elif any(['centos' in distro, 'redhat'... | python | def distro_check():
"""Return a string containing the distro package manager."""
distro_data = platform.linux_distribution()
distro = [d.lower() for d in distro_data if d.isalpha()]
if any(['ubuntu' in distro, 'debian' in distro]) is True:
return 'apt'
elif any(['centos' in distro, 'redhat'... | [
"def",
"distro_check",
"(",
")",
":",
"distro_data",
"=",
"platform",
".",
"linux_distribution",
"(",
")",
"distro",
"=",
"[",
"d",
".",
"lower",
"(",
")",
"for",
"d",
"in",
"distro_data",
"if",
"d",
".",
"isalpha",
"(",
")",
"]",
"if",
"any",
"(",
... | Return a string containing the distro package manager. | [
"Return",
"a",
"string",
"containing",
"the",
"distro",
"package",
"manager",
"."
] | train | https://github.com/cloudnull/cloudlib/blob/5038111ce02521caa2558117e3bae9e1e806d315/cloudlib/package_installer.py#L41-L55 |
cloudnull/cloudlib | cloudlib/package_installer.py | PackageInstaller._installer | def _installer(self, package_list, install_string=None):
"""Install operating system packages for the system.
:param: package_list: ``list``
:param install_string: ``str``
"""
packages = ' '.join(package_list)
if install_string is None:
self.install_string =... | python | def _installer(self, package_list, install_string=None):
"""Install operating system packages for the system.
:param: package_list: ``list``
:param install_string: ``str``
"""
packages = ' '.join(package_list)
if install_string is None:
self.install_string =... | [
"def",
"_installer",
"(",
"self",
",",
"package_list",
",",
"install_string",
"=",
"None",
")",
":",
"packages",
"=",
"' '",
".",
"join",
"(",
"package_list",
")",
"if",
"install_string",
"is",
"None",
":",
"self",
".",
"install_string",
"=",
"self",
".",
... | Install operating system packages for the system.
:param: package_list: ``list``
:param install_string: ``str`` | [
"Install",
"operating",
"system",
"packages",
"for",
"the",
"system",
"."
] | train | https://github.com/cloudnull/cloudlib/blob/5038111ce02521caa2558117e3bae9e1e806d315/cloudlib/package_installer.py#L83-L99 |
cloudnull/cloudlib | cloudlib/package_installer.py | PackageInstaller.install | def install(self):
"""Install packages from the packages_dict."""
self.distro = distro_check()
package_list = self.packages_dict.get(self.distro)
self._installer(package_list=package_list.get('packages')) | python | def install(self):
"""Install packages from the packages_dict."""
self.distro = distro_check()
package_list = self.packages_dict.get(self.distro)
self._installer(package_list=package_list.get('packages')) | [
"def",
"install",
"(",
"self",
")",
":",
"self",
".",
"distro",
"=",
"distro_check",
"(",
")",
"package_list",
"=",
"self",
".",
"packages_dict",
".",
"get",
"(",
"self",
".",
"distro",
")",
"self",
".",
"_installer",
"(",
"package_list",
"=",
"package_l... | Install packages from the packages_dict. | [
"Install",
"packages",
"from",
"the",
"packages_dict",
"."
] | train | https://github.com/cloudnull/cloudlib/blob/5038111ce02521caa2558117e3bae9e1e806d315/cloudlib/package_installer.py#L101-L105 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | Comment.get_commenting_agent | def get_commenting_agent(self):
"""Gets the agent who created this comment.
return: (osid.authentication.Agent) - the ``Agent``
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This method must be implemented.*
"""
if not self.has_commentor... | python | def get_commenting_agent(self):
"""Gets the agent who created this comment.
return: (osid.authentication.Agent) - the ``Agent``
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This method must be implemented.*
"""
if not self.has_commentor... | [
"def",
"get_commenting_agent",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"has_commentor",
"(",
")",
":",
"raise",
"errors",
".",
"IllegalState",
"(",
"'this Comment has no commenting_agent'",
")",
"try",
":",
"from",
".",
".",
"authentication",
"import",
... | Gets the agent who created this comment.
return: (osid.authentication.Agent) - the ``Agent``
raise: OperationFailed - unable to complete request
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"agent",
"who",
"created",
"this",
"comment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L85-L110 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | Comment.get_rating_id | def get_rating_id(self):
"""Gets the ``Id`` of the ``Grade``.
return: (osid.id.Id) - the ``Agent`` ``Id``
raise: IllegalState - ``has_rating()`` is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.... | python | def get_rating_id(self):
"""Gets the ``Id`` of the ``Grade``.
return: (osid.id.Id) - the ``Agent`` ``Id``
raise: IllegalState - ``has_rating()`` is ``false``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.... | [
"def",
"get_rating_id",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.Resource.get_avatar_id_template",
"if",
"not",
"bool",
"(",
"self",
".",
"_my_map",
"[",
"'ratingId'",
"]",
")",
":",
"raise",
"errors",
".",
"IllegalState",
"(",
"'this Comm... | Gets the ``Id`` of the ``Grade``.
return: (osid.id.Id) - the ``Agent`` ``Id``
raise: IllegalState - ``has_rating()`` is ``false``
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"Id",
"of",
"the",
"Grade",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L137-L149 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | CommentForm._init_metadata | def _init_metadata(self, **kwargs):
"""Initialize form metadata"""
osid_objects.OsidRelationshipForm._init_metadata(self, **kwargs)
update_display_text_defaults(self._mdata['text'], self._locale_map)
self._text_default = dict(self._mdata['text']['default_string_values'][0])
self.... | python | def _init_metadata(self, **kwargs):
"""Initialize form metadata"""
osid_objects.OsidRelationshipForm._init_metadata(self, **kwargs)
update_display_text_defaults(self._mdata['text'], self._locale_map)
self._text_default = dict(self._mdata['text']['default_string_values'][0])
self.... | [
"def",
"_init_metadata",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"osid_objects",
".",
"OsidRelationshipForm",
".",
"_init_metadata",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
"update_display_text_defaults",
"(",
"self",
".",
"_mdata",
"[",
"'text'",
... | Initialize form metadata | [
"Initialize",
"form",
"metadata"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L228-L233 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | CommentForm.get_text_metadata | def get_text_metadata(self):
"""Gets the metadata for the text.
return: (osid.Metadata) - metadata for the text
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
metadat... | python | def get_text_metadata(self):
"""Gets the metadata for the text.
return: (osid.Metadata) - metadata for the text
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
metadat... | [
"def",
"get_text_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'text'",
"]",
")",
"metadata",
".",
"update",
"(",
"{",
"'existing_str... | Gets the metadata for the text.
return: (osid.Metadata) - metadata for the text
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"the",
"text",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L244-L254 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | CommentForm.set_text | def set_text(self, text):
"""Sets the text.
arg: text (string): the new text
raise: InvalidArgument - ``text`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
raise: NullArgument - ``text`` is ``null``
*compliance: mandatory -- This method must b... | python | def set_text(self, text):
"""Sets the text.
arg: text (string): the new text
raise: InvalidArgument - ``text`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
raise: NullArgument - ``text`` is ``null``
*compliance: mandatory -- This method must b... | [
"def",
"set_text",
"(",
"self",
",",
"text",
")",
":",
"# Implemented from template for osid.repository.AssetForm.set_title_template",
"self",
".",
"_my_map",
"[",
"'text'",
"]",
"=",
"self",
".",
"_get_display_text",
"(",
"text",
",",
"self",
".",
"get_text_metadata"... | Sets the text.
arg: text (string): the new text
raise: InvalidArgument - ``text`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
raise: NullArgument - ``text`` is ``null``
*compliance: mandatory -- This method must be implemented.* | [
"Sets",
"the",
"text",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L259-L270 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | CommentForm.clear_text | def clear_text(self):
"""Clears the text.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.repository.AssetForm.clear_title_... | python | def clear_text(self):
"""Clears the text.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.repository.AssetForm.clear_title_... | [
"def",
"clear_text",
"(",
"self",
")",
":",
"# Implemented from template for osid.repository.AssetForm.clear_title_template",
"if",
"(",
"self",
".",
"get_text_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_text_metadata",
"(",
")",
".",
... | Clears the text.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"text",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L272-L284 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | CommentForm.get_rating_metadata | def get_rating_metadata(self):
"""Gets the metadata for a rating.
return: (osid.Metadata) - metadata for the rating
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
met... | python | def get_rating_metadata(self):
"""Gets the metadata for a rating.
return: (osid.Metadata) - metadata for the rating
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
met... | [
"def",
"get_rating_metadata",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.get_group_metadata_template",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'rating'",
"]",
")",
"metadata",
".",
"update",
"(",
"{",
"'existing... | Gets the metadata for a rating.
return: (osid.Metadata) - metadata for the rating
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"a",
"rating",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L288-L298 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | CommentForm.set_rating | def set_rating(self, grade_id):
"""Sets the rating.
arg: grade_id (osid.id.Id): the new rating
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
raise: NullArgument - ``grade_id`` is ``null``
*compliance: manda... | python | def set_rating(self, grade_id):
"""Sets the rating.
arg: grade_id (osid.id.Id): the new rating
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
raise: NullArgument - ``grade_id`` is ``null``
*compliance: manda... | [
"def",
"set_rating",
"(",
"self",
",",
"grade_id",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.set_avatar_template",
"if",
"self",
".",
"get_rating_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
":",
"raise",
"errors",
".",
"NoAccess",
"... | Sets the rating.
arg: grade_id (osid.id.Id): the new rating
raise: InvalidArgument - ``grade_id`` is invalid
raise: NoAccess - ``Metadata.isReadOnly()`` is ``true``
raise: NullArgument - ``grade_id`` is ``null``
*compliance: mandatory -- This method must be implemented.* | [
"Sets",
"the",
"rating",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L303-L318 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | CommentForm.clear_rating | def clear_rating(self):
"""Clears the rating.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.clear_a... | python | def clear_rating(self):
"""Clears the rating.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.*
"""
# Implemented from template for osid.resource.ResourceForm.clear_a... | [
"def",
"clear_rating",
"(",
"self",
")",
":",
"# Implemented from template for osid.resource.ResourceForm.clear_avatar_template",
"if",
"(",
"self",
".",
"get_rating_metadata",
"(",
")",
".",
"is_read_only",
"(",
")",
"or",
"self",
".",
"get_rating_metadata",
"(",
")",
... | Clears the rating.
raise: NoAccess - ``Metadata.isRequired()`` or
``Metadata.isReadOnly()`` is ``true``
*compliance: mandatory -- This method must be implemented.* | [
"Clears",
"the",
"rating",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L320-L332 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | BookNode.get_book | def get_book(self):
"""Gets the ``Book`` at this node.
return: (osid.commenting.Book) - the book represented by this
node
*compliance: mandatory -- This method must be implemented.*
"""
if self._lookup_session is None:
mgr = get_provider_manager('COM... | python | def get_book(self):
"""Gets the ``Book`` at this node.
return: (osid.commenting.Book) - the book represented by this
node
*compliance: mandatory -- This method must be implemented.*
"""
if self._lookup_session is None:
mgr = get_provider_manager('COM... | [
"def",
"get_book",
"(",
"self",
")",
":",
"if",
"self",
".",
"_lookup_session",
"is",
"None",
":",
"mgr",
"=",
"get_provider_manager",
"(",
"'COMMENTING'",
",",
"runtime",
"=",
"self",
".",
"_runtime",
",",
"proxy",
"=",
"self",
".",
"_proxy",
")",
"self... | Gets the ``Book`` at this node.
return: (osid.commenting.Book) - the book represented by this
node
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"Book",
"at",
"this",
"node",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L569-L580 |
mitsei/dlkit | dlkit/json_/commenting/objects.py | BookNode.get_parent_book_nodes | def get_parent_book_nodes(self):
"""Gets the parents of this book.
return: (osid.commenting.BookNodeList) - the parents of this
book
*compliance: mandatory -- This method must be implemented.*
"""
parent_book_nodes = []
for node in self._my_map['parentNo... | python | def get_parent_book_nodes(self):
"""Gets the parents of this book.
return: (osid.commenting.BookNodeList) - the parents of this
book
*compliance: mandatory -- This method must be implemented.*
"""
parent_book_nodes = []
for node in self._my_map['parentNo... | [
"def",
"get_parent_book_nodes",
"(",
"self",
")",
":",
"parent_book_nodes",
"=",
"[",
"]",
"for",
"node",
"in",
"self",
".",
"_my_map",
"[",
"'parentNodes'",
"]",
":",
"parent_book_nodes",
".",
"append",
"(",
"BookNode",
"(",
"node",
".",
"_my_map",
",",
"... | Gets the parents of this book.
return: (osid.commenting.BookNodeList) - the parents of this
book
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"parents",
"of",
"this",
"book",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/commenting/objects.py#L584-L599 |
mitsei/dlkit | dlkit/authz_adapter/commenting/sessions.py | CommentLookupSession.get_comments_for_reference_on_date | def get_comments_for_reference_on_date(self, reference_id, from_, to):
"""Pass through to provider CommentLookupSession.get_comments_for_reference_on_date"""
# Implemented from azosid template for -
# osid.relationship.RelationshipLookupSession.get_relationships_for_source_on_date_template
... | python | def get_comments_for_reference_on_date(self, reference_id, from_, to):
"""Pass through to provider CommentLookupSession.get_comments_for_reference_on_date"""
# Implemented from azosid template for -
# osid.relationship.RelationshipLookupSession.get_relationships_for_source_on_date_template
... | [
"def",
"get_comments_for_reference_on_date",
"(",
"self",
",",
"reference_id",
",",
"from_",
",",
"to",
")",
":",
"# Implemented from azosid template for -",
"# osid.relationship.RelationshipLookupSession.get_relationships_for_source_on_date_template",
"if",
"self",
".",
"_can",
... | Pass through to provider CommentLookupSession.get_comments_for_reference_on_date | [
"Pass",
"through",
"to",
"provider",
"CommentLookupSession",
".",
"get_comments_for_reference_on_date"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/authz_adapter/commenting/sessions.py#L220-L230 |
mitsei/dlkit | dlkit/authz_adapter/commenting/sessions.py | CommentSearchSession.get_comments_by_search | def get_comments_by_search(self, comment_query, comment_search):
"""Pass through to provider CommentSearchSession.get_comments_by_search"""
# Implemented from azosid template for -
# osid.resource.ResourceSearchSession.get_resources_by_search_template
if not self._can('search'):
... | python | def get_comments_by_search(self, comment_query, comment_search):
"""Pass through to provider CommentSearchSession.get_comments_by_search"""
# Implemented from azosid template for -
# osid.resource.ResourceSearchSession.get_resources_by_search_template
if not self._can('search'):
... | [
"def",
"get_comments_by_search",
"(",
"self",
",",
"comment_query",
",",
"comment_search",
")",
":",
"# Implemented from azosid template for -",
"# osid.resource.ResourceSearchSession.get_resources_by_search_template",
"if",
"not",
"self",
".",
"_can",
"(",
"'search'",
")",
"... | Pass through to provider CommentSearchSession.get_comments_by_search | [
"Pass",
"through",
"to",
"provider",
"CommentSearchSession",
".",
"get_comments_by_search"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/authz_adapter/commenting/sessions.py#L481-L487 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidObject.get_genus_type | def get_genus_type(self):
"""Gets the genus type of this object.
return: (osid.type.Type) - the genus type of this object
*compliance: mandatory -- This method must be implemented.*
"""
try:
# Try to stand up full Type objects if they can be found
# (Als... | python | def get_genus_type(self):
"""Gets the genus type of this object.
return: (osid.type.Type) - the genus type of this object
*compliance: mandatory -- This method must be implemented.*
"""
try:
# Try to stand up full Type objects if they can be found
# (Als... | [
"def",
"get_genus_type",
"(",
"self",
")",
":",
"try",
":",
"# Try to stand up full Type objects if they can be found",
"# (Also need to LOOK FOR THE TYPE IN types or through type lookup)",
"genus_type_identifier",
"=",
"Id",
"(",
"self",
".",
"_my_map",
"[",
"'genusTypeId'",
"... | Gets the genus type of this object.
return: (osid.type.Type) - the genus type of this object
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"genus",
"type",
"of",
"this",
"object",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L192-L206 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._init_metadata | def _init_metadata(self):
"""Initialize OsidObjectForm metadata."""
# pylint: disable=attribute-defined-outside-init
# this method is called from descendent __init__
self._mdata.update(default_mdata.get_osid_form_mdata())
update_display_text_defaults(self._mdata['journal_comment... | python | def _init_metadata(self):
"""Initialize OsidObjectForm metadata."""
# pylint: disable=attribute-defined-outside-init
# this method is called from descendent __init__
self._mdata.update(default_mdata.get_osid_form_mdata())
update_display_text_defaults(self._mdata['journal_comment... | [
"def",
"_init_metadata",
"(",
"self",
")",
":",
"# pylint: disable=attribute-defined-outside-init",
"# this method is called from descendent __init__",
"self",
".",
"_mdata",
".",
"update",
"(",
"default_mdata",
".",
"get_osid_form_mdata",
"(",
")",
")",
"update_display_text_... | Initialize OsidObjectForm metadata. | [
"Initialize",
"OsidObjectForm",
"metadata",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L828-L841 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_input | def _is_valid_input(self, inpt, metadata, array):
"""The _is_valid_input method takes three arguments:
the user input to be checked, the associated osid.Metadata object
containing validation requirements and a boolean value indicating
whether this is an array value.
"""
... | python | def _is_valid_input(self, inpt, metadata, array):
"""The _is_valid_input method takes three arguments:
the user input to be checked, the associated osid.Metadata object
containing validation requirements and a boolean value indicating
whether this is an array value.
"""
... | [
"def",
"_is_valid_input",
"(",
"self",
",",
"inpt",
",",
"metadata",
",",
"array",
")",
":",
"# pylint: disable=too-many-branches,no-self-use",
"# Please redesign, and move to utility module",
"syntax",
"=",
"metadata",
".",
"get_syntax",
"(",
")",
"# First check if this is... | The _is_valid_input method takes three arguments:
the user input to be checked, the associated osid.Metadata object
containing validation requirements and a boolean value indicating
whether this is an array value. | [
"The",
"_is_valid_input",
"method",
"takes",
"three",
"arguments",
":"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L859-L912 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_id | def _is_valid_id(self, inpt):
"""Checks if input is a valid Id"""
from dlkit.abstract_osid.id.primitives import Id as abc_id
if isinstance(inpt, abc_id):
return True
else:
return False | python | def _is_valid_id(self, inpt):
"""Checks if input is a valid Id"""
from dlkit.abstract_osid.id.primitives import Id as abc_id
if isinstance(inpt, abc_id):
return True
else:
return False | [
"def",
"_is_valid_id",
"(",
"self",
",",
"inpt",
")",
":",
"from",
"dlkit",
".",
"abstract_osid",
".",
"id",
".",
"primitives",
"import",
"Id",
"as",
"abc_id",
"if",
"isinstance",
"(",
"inpt",
",",
"abc_id",
")",
":",
"return",
"True",
"else",
":",
"re... | Checks if input is a valid Id | [
"Checks",
"if",
"input",
"is",
"a",
"valid",
"Id"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L914-L920 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_type | def _is_valid_type(self, inpt):
"""Checks if input is a valid Type"""
from dlkit.abstract_osid.type.primitives import Type as abc_type
if isinstance(inpt, abc_type):
return True
else:
return False | python | def _is_valid_type(self, inpt):
"""Checks if input is a valid Type"""
from dlkit.abstract_osid.type.primitives import Type as abc_type
if isinstance(inpt, abc_type):
return True
else:
return False | [
"def",
"_is_valid_type",
"(",
"self",
",",
"inpt",
")",
":",
"from",
"dlkit",
".",
"abstract_osid",
".",
"type",
".",
"primitives",
"import",
"Type",
"as",
"abc_type",
"if",
"isinstance",
"(",
"inpt",
",",
"abc_type",
")",
":",
"return",
"True",
"else",
... | Checks if input is a valid Type | [
"Checks",
"if",
"input",
"is",
"a",
"valid",
"Type"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L922-L928 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_string | def _is_valid_string(self, inpt, metadata):
"""Checks if input is a valid string"""
if not is_string(inpt):
return False
if metadata.get_minimum_string_length() and len(inpt) < metadata.get_minimum_string_length():
return False
elif metadata.get_maximum_string_len... | python | def _is_valid_string(self, inpt, metadata):
"""Checks if input is a valid string"""
if not is_string(inpt):
return False
if metadata.get_minimum_string_length() and len(inpt) < metadata.get_minimum_string_length():
return False
elif metadata.get_maximum_string_len... | [
"def",
"_is_valid_string",
"(",
"self",
",",
"inpt",
",",
"metadata",
")",
":",
"if",
"not",
"is_string",
"(",
"inpt",
")",
":",
"return",
"False",
"if",
"metadata",
".",
"get_minimum_string_length",
"(",
")",
"and",
"len",
"(",
"inpt",
")",
"<",
"metada... | Checks if input is a valid string | [
"Checks",
"if",
"input",
"is",
"a",
"valid",
"string"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L937-L948 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_cardinal | def _is_valid_cardinal(self, inpt, metadata):
"""Checks if input is a valid cardinal value"""
if not isinstance(inpt, int):
return False
if metadata.get_minimum_cardinal() and inpt < metadata.get_maximum_cardinal():
return False
if metadata.get_maximum_cardinal() ... | python | def _is_valid_cardinal(self, inpt, metadata):
"""Checks if input is a valid cardinal value"""
if not isinstance(inpt, int):
return False
if metadata.get_minimum_cardinal() and inpt < metadata.get_maximum_cardinal():
return False
if metadata.get_maximum_cardinal() ... | [
"def",
"_is_valid_cardinal",
"(",
"self",
",",
"inpt",
",",
"metadata",
")",
":",
"if",
"not",
"isinstance",
"(",
"inpt",
",",
"int",
")",
":",
"return",
"False",
"if",
"metadata",
".",
"get_minimum_cardinal",
"(",
")",
"and",
"inpt",
"<",
"metadata",
".... | Checks if input is a valid cardinal value | [
"Checks",
"if",
"input",
"is",
"a",
"valid",
"cardinal",
"value"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L967-L978 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_integer | def _is_valid_integer(self, inpt, metadata):
"""Checks if input is a valid integer value"""
if not isinstance(inpt, int):
return False
if metadata.get_minimum_integer() and inpt < metadata.get_maximum_integer():
return False
if metadata.get_maximum_integer() and i... | python | def _is_valid_integer(self, inpt, metadata):
"""Checks if input is a valid integer value"""
if not isinstance(inpt, int):
return False
if metadata.get_minimum_integer() and inpt < metadata.get_maximum_integer():
return False
if metadata.get_maximum_integer() and i... | [
"def",
"_is_valid_integer",
"(",
"self",
",",
"inpt",
",",
"metadata",
")",
":",
"if",
"not",
"isinstance",
"(",
"inpt",
",",
"int",
")",
":",
"return",
"False",
"if",
"metadata",
".",
"get_minimum_integer",
"(",
")",
"and",
"inpt",
"<",
"metadata",
".",... | Checks if input is a valid integer value | [
"Checks",
"if",
"input",
"is",
"a",
"valid",
"integer",
"value"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L980-L991 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_decimal | def _is_valid_decimal(self, inpt, metadata):
"""Checks if input is a valid decimal value"""
if not (isinstance(inpt, float) or isinstance(inpt, Decimal)):
return False
if not isinstance(inpt, Decimal):
inpt = Decimal(str(inpt))
if metadata.get_minimum_decimal() an... | python | def _is_valid_decimal(self, inpt, metadata):
"""Checks if input is a valid decimal value"""
if not (isinstance(inpt, float) or isinstance(inpt, Decimal)):
return False
if not isinstance(inpt, Decimal):
inpt = Decimal(str(inpt))
if metadata.get_minimum_decimal() an... | [
"def",
"_is_valid_decimal",
"(",
"self",
",",
"inpt",
",",
"metadata",
")",
":",
"if",
"not",
"(",
"isinstance",
"(",
"inpt",
",",
"float",
")",
"or",
"isinstance",
"(",
"inpt",
",",
"Decimal",
")",
")",
":",
"return",
"False",
"if",
"not",
"isinstance... | Checks if input is a valid decimal value | [
"Checks",
"if",
"input",
"is",
"a",
"valid",
"decimal",
"value"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L993-L1008 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_date_time | def _is_valid_date_time(self, inpt, metadata):
"""Checks if input is a valid DateTime object"""
# NEED TO ADD CHECKS FOR OTHER METADATA, LIKE MINIMUM, MAXIMUM, ETC.
from dlkit.abstract_osid.calendaring.primitives import DateTime as abc_datetime
if isinstance(inpt, abc_datetime):
... | python | def _is_valid_date_time(self, inpt, metadata):
"""Checks if input is a valid DateTime object"""
# NEED TO ADD CHECKS FOR OTHER METADATA, LIKE MINIMUM, MAXIMUM, ETC.
from dlkit.abstract_osid.calendaring.primitives import DateTime as abc_datetime
if isinstance(inpt, abc_datetime):
... | [
"def",
"_is_valid_date_time",
"(",
"self",
",",
"inpt",
",",
"metadata",
")",
":",
"# NEED TO ADD CHECKS FOR OTHER METADATA, LIKE MINIMUM, MAXIMUM, ETC.",
"from",
"dlkit",
".",
"abstract_osid",
".",
"calendaring",
".",
"primitives",
"import",
"DateTime",
"as",
"abc_dateti... | Checks if input is a valid DateTime object | [
"Checks",
"if",
"input",
"is",
"a",
"valid",
"DateTime",
"object"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L1010-L1017 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_valid_duration | def _is_valid_duration(self, inpt, metadata):
"""Checks if input is a valid Duration"""
# NEED TO ADD CHECKS FOR OTHER METADATA, LIKE MINIMUM, MAXIMUM, ETC.
from dlkit.abstract_osid.calendaring.primitives import Duration as abc_duration
if isinstance(inpt, abc_duration):
retu... | python | def _is_valid_duration(self, inpt, metadata):
"""Checks if input is a valid Duration"""
# NEED TO ADD CHECKS FOR OTHER METADATA, LIKE MINIMUM, MAXIMUM, ETC.
from dlkit.abstract_osid.calendaring.primitives import Duration as abc_duration
if isinstance(inpt, abc_duration):
retu... | [
"def",
"_is_valid_duration",
"(",
"self",
",",
"inpt",
",",
"metadata",
")",
":",
"# NEED TO ADD CHECKS FOR OTHER METADATA, LIKE MINIMUM, MAXIMUM, ETC.",
"from",
"dlkit",
".",
"abstract_osid",
".",
"calendaring",
".",
"primitives",
"import",
"Duration",
"as",
"abc_duratio... | Checks if input is a valid Duration | [
"Checks",
"if",
"input",
"is",
"a",
"valid",
"Duration"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L1026-L1033 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm._is_in_set | def _is_in_set(self, inpt, metadata):
"""checks if the input is in the metadata's *_set list"""
# makes an assumption there is only one _set in the metadata dict
get_set_methods = [m for m in dir(metadata) if 'get_' in m and '_set' in m]
set_results = None
for m in get_set_method... | python | def _is_in_set(self, inpt, metadata):
"""checks if the input is in the metadata's *_set list"""
# makes an assumption there is only one _set in the metadata dict
get_set_methods = [m for m in dir(metadata) if 'get_' in m and '_set' in m]
set_results = None
for m in get_set_method... | [
"def",
"_is_in_set",
"(",
"self",
",",
"inpt",
",",
"metadata",
")",
":",
"# makes an assumption there is only one _set in the metadata dict",
"get_set_methods",
"=",
"[",
"m",
"for",
"m",
"in",
"dir",
"(",
"metadata",
")",
"if",
"'get_'",
"in",
"m",
"and",
"'_s... | checks if the input is in the metadata's *_set list | [
"checks",
"if",
"the",
"input",
"is",
"in",
"the",
"metadata",
"s",
"*",
"_set",
"list"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L1035-L1048 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm.set_locale | def set_locale(self, language_type, script_type):
"""Specifies a language and script type for ``DisplayText`` fields in this form.
Setting a locale to something other than the default locale may
affect the ``Metadata`` in this form.
If multiple locales are available for managing transl... | python | def set_locale(self, language_type, script_type):
"""Specifies a language and script type for ``DisplayText`` fields in this form.
Setting a locale to something other than the default locale may
affect the ``Metadata`` in this form.
If multiple locales are available for managing transl... | [
"def",
"set_locale",
"(",
"self",
",",
"language_type",
",",
"script_type",
")",
":",
"# Someday I might have a real implementation",
"# For now only default Locale is supported",
"self",
".",
"_locale_map",
"[",
"'languageType'",
"]",
"=",
"language_type",
"self",
".",
"... | Specifies a language and script type for ``DisplayText`` fields in this form.
Setting a locale to something other than the default locale may
affect the ``Metadata`` in this form.
If multiple locales are available for managing translations, the
``Metadata`` indicates the fields are uns... | [
"Specifies",
"a",
"language",
"and",
"script",
"type",
"for",
"DisplayText",
"fields",
"in",
"this",
"form",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L1091-L1113 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidForm.set_journal_comment | def set_journal_comment(self, comment):
"""Sets a comment.
arg: comment (string): the new comment
raise: InvalidArgument - ``comment`` is invalid
raise: NoAccess - ``Metadata.isReadonly()`` is ``true``
raise: NullArgument - ``comment`` is ``null``
*compliance: mand... | python | def set_journal_comment(self, comment):
"""Sets a comment.
arg: comment (string): the new comment
raise: InvalidArgument - ``comment`` is invalid
raise: NoAccess - ``Metadata.isReadonly()`` is ``true``
raise: NullArgument - ``comment`` is ``null``
*compliance: mand... | [
"def",
"set_journal_comment",
"(",
"self",
",",
"comment",
")",
":",
"self",
".",
"_my_map",
"[",
"'journal_comment'",
"]",
"=",
"self",
".",
"_get_display_text",
"(",
"comment",
",",
"self",
".",
"get_journal_comment_metadata",
"(",
")",
")"
] | Sets a comment.
arg: comment (string): the new comment
raise: InvalidArgument - ``comment`` is invalid
raise: NoAccess - ``Metadata.isReadonly()`` is ``true``
raise: NullArgument - ``comment`` is ``null``
*compliance: mandatory -- This method must be implemented.* | [
"Sets",
"a",
"comment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L1131-L1141 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidExtensibleForm._get_record | def _get_record(self, record_type):
"""This overrides _get_record in osid.Extensible.
Perhaps we should leverage it somehow?
"""
if (not self.has_record_type(record_type) and
record_type.get_identifier() not in self._record_type_data_sets):
raise errors.Unsu... | python | def _get_record(self, record_type):
"""This overrides _get_record in osid.Extensible.
Perhaps we should leverage it somehow?
"""
if (not self.has_record_type(record_type) and
record_type.get_identifier() not in self._record_type_data_sets):
raise errors.Unsu... | [
"def",
"_get_record",
"(",
"self",
",",
"record_type",
")",
":",
"if",
"(",
"not",
"self",
".",
"has_record_type",
"(",
"record_type",
")",
"and",
"record_type",
".",
"get_identifier",
"(",
")",
"not",
"in",
"self",
".",
"_record_type_data_sets",
")",
":",
... | This overrides _get_record in osid.Extensible.
Perhaps we should leverage it somehow? | [
"This",
"overrides",
"_get_record",
"in",
"osid",
".",
"Extensible",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L1212-L1225 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidExtensibleForm._init_record | def _init_record(self, record_type_idstr):
"""Override this from osid.Extensible because Forms use a different
attribute in record_type_data."""
record_type_data = self._record_type_data_sets[Id(record_type_idstr).get_identifier()]
module = importlib.import_module(record_type_data['modul... | python | def _init_record(self, record_type_idstr):
"""Override this from osid.Extensible because Forms use a different
attribute in record_type_data."""
record_type_data = self._record_type_data_sets[Id(record_type_idstr).get_identifier()]
module = importlib.import_module(record_type_data['modul... | [
"def",
"_init_record",
"(",
"self",
",",
"record_type_idstr",
")",
":",
"record_type_data",
"=",
"self",
".",
"_record_type_data_sets",
"[",
"Id",
"(",
"record_type_idstr",
")",
".",
"get_identifier",
"(",
")",
"]",
"module",
"=",
"importlib",
".",
"import_modul... | Override this from osid.Extensible because Forms use a different
attribute in record_type_data. | [
"Override",
"this",
"from",
"osid",
".",
"Extensible",
"because",
"Forms",
"use",
"a",
"different",
"attribute",
"in",
"record_type_data",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L1227-L1237 |
mitsei/dlkit | dlkit/json_/osid/objects.py | OsidTemporalForm.get_start_date_metadata | def get_start_date_metadata(self):
"""Gets the metadata for a start date.
return: (osid.Metadata) - metadata for the date
*compliance: mandatory -- This method must be implemented.*
"""
metadata = dict(self._mdata['start_date'])
metadata.update({'existing_date_time_valu... | python | def get_start_date_metadata(self):
"""Gets the metadata for a start date.
return: (osid.Metadata) - metadata for the date
*compliance: mandatory -- This method must be implemented.*
"""
metadata = dict(self._mdata['start_date'])
metadata.update({'existing_date_time_valu... | [
"def",
"get_start_date_metadata",
"(",
"self",
")",
":",
"metadata",
"=",
"dict",
"(",
"self",
".",
"_mdata",
"[",
"'start_date'",
"]",
")",
"metadata",
".",
"update",
"(",
"{",
"'existing_date_time_values'",
":",
"self",
".",
"_my_map",
"[",
"'startDate'",
... | Gets the metadata for a start date.
return: (osid.Metadata) - metadata for the date
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"metadata",
"for",
"a",
"start",
"date",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/osid/objects.py#L1285-L1294 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.