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
raamana/hiwenet
hiwenet/utils.py
preprocess_histogram
def preprocess_histogram(hist, values, edges): """Handles edge-cases and extremely-skewed histograms""" # working with extremely skewed histograms if np.count_nonzero(hist) == 0: # all of them above upper bound if np.all(values >= edges[-1]): hist[-1] = 1 # all of them b...
python
def preprocess_histogram(hist, values, edges): """Handles edge-cases and extremely-skewed histograms""" # working with extremely skewed histograms if np.count_nonzero(hist) == 0: # all of them above upper bound if np.all(values >= edges[-1]): hist[-1] = 1 # all of them b...
[ "def", "preprocess_histogram", "(", "hist", ",", "values", ",", "edges", ")", ":", "# working with extremely skewed histograms", "if", "np", ".", "count_nonzero", "(", "hist", ")", "==", "0", ":", "# all of them above upper bound", "if", "np", ".", "all", "(", "...
Handles edge-cases and extremely-skewed histograms
[ "Handles", "edge", "-", "cases", "and", "extremely", "-", "skewed", "histograms" ]
train
https://github.com/raamana/hiwenet/blob/b12699b3722fd0a6a835e7d7ca4baf58fb181809/hiwenet/utils.py#L25-L37
raamana/hiwenet
hiwenet/utils.py
check_array
def check_array(array): "Converts to flattened numpy arrays and ensures its not empty." if len(array) < 1: raise ValueError('Input array is empty! Must have atleast 1 element.') return np.ma.masked_invalid(array).flatten()
python
def check_array(array): "Converts to flattened numpy arrays and ensures its not empty." if len(array) < 1: raise ValueError('Input array is empty! Must have atleast 1 element.') return np.ma.masked_invalid(array).flatten()
[ "def", "check_array", "(", "array", ")", ":", "if", "len", "(", "array", ")", "<", "1", ":", "raise", "ValueError", "(", "'Input array is empty! Must have atleast 1 element.'", ")", "return", "np", ".", "ma", ".", "masked_invalid", "(", "array", ")", ".", "f...
Converts to flattened numpy arrays and ensures its not empty.
[ "Converts", "to", "flattened", "numpy", "arrays", "and", "ensures", "its", "not", "empty", "." ]
train
https://github.com/raamana/hiwenet/blob/b12699b3722fd0a6a835e7d7ca4baf58fb181809/hiwenet/utils.py#L72-L78
andreagrandi/toshl-python
toshl/account.py
Account.list
def list(self): """ Return a list of Accounts from Toshl for the current user """ response = self.client._make_request('/accounts') response = response.json() return self.client._list_response(response)
python
def list(self): """ Return a list of Accounts from Toshl for the current user """ response = self.client._make_request('/accounts') response = response.json() return self.client._list_response(response)
[ "def", "list", "(", "self", ")", ":", "response", "=", "self", ".", "client", ".", "_make_request", "(", "'/accounts'", ")", "response", "=", "response", ".", "json", "(", ")", "return", "self", ".", "client", ".", "_list_response", "(", "response", ")" ...
Return a list of Accounts from Toshl for the current user
[ "Return", "a", "list", "of", "Accounts", "from", "Toshl", "for", "the", "current", "user" ]
train
https://github.com/andreagrandi/toshl-python/blob/16a2aef8a0d389db73db3253b0bea3fcc33cc2bf/toshl/account.py#L5-L11
andreagrandi/toshl-python
toshl/account.py
Account.search
def search(self, account_name): """ Get a list of all the Accounts for the current user and return the ID of the one with the specified name. """ accounts = self.list() for a in accounts: if a['name'] == account_name: return a['id']
python
def search(self, account_name): """ Get a list of all the Accounts for the current user and return the ID of the one with the specified name. """ accounts = self.list() for a in accounts: if a['name'] == account_name: return a['id']
[ "def", "search", "(", "self", ",", "account_name", ")", ":", "accounts", "=", "self", ".", "list", "(", ")", "for", "a", "in", "accounts", ":", "if", "a", "[", "'name'", "]", "==", "account_name", ":", "return", "a", "[", "'id'", "]" ]
Get a list of all the Accounts for the current user and return the ID of the one with the specified name.
[ "Get", "a", "list", "of", "all", "the", "Accounts", "for", "the", "current", "user", "and", "return", "the", "ID", "of", "the", "one", "with", "the", "specified", "name", "." ]
train
https://github.com/andreagrandi/toshl-python/blob/16a2aef8a0d389db73db3253b0bea3fcc33cc2bf/toshl/account.py#L13-L21
andreagrandi/toshl-python
toshl/account.py
Account.get
def get(self, account_id): """ Return a specific account given its ID """ response = self.client._make_request('/accounts/{0}'.format(account_id)) return response.json()
python
def get(self, account_id): """ Return a specific account given its ID """ response = self.client._make_request('/accounts/{0}'.format(account_id)) return response.json()
[ "def", "get", "(", "self", ",", "account_id", ")", ":", "response", "=", "self", ".", "client", ".", "_make_request", "(", "'/accounts/{0}'", ".", "format", "(", "account_id", ")", ")", "return", "response", ".", "json", "(", ")" ]
Return a specific account given its ID
[ "Return", "a", "specific", "account", "given", "its", "ID" ]
train
https://github.com/andreagrandi/toshl-python/blob/16a2aef8a0d389db73db3253b0bea3fcc33cc2bf/toshl/account.py#L23-L28
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringManager.get_assessment_part_bank_session
def get_assessment_part_bank_session(self): """Gets the ``OsidSession`` to lookup assessment part/bank mappings for assessment parts. return: (osid.assessment.authoring.AssessmentPartBankSession) - an ``AssessmentPartBankSession`` raise: OperationFailed - unable to complete req...
python
def get_assessment_part_bank_session(self): """Gets the ``OsidSession`` to lookup assessment part/bank mappings for assessment parts. return: (osid.assessment.authoring.AssessmentPartBankSession) - an ``AssessmentPartBankSession`` raise: OperationFailed - unable to complete req...
[ "def", "get_assessment_part_bank_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_assessment_part_bank", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "AssessmentPartBank...
Gets the ``OsidSession`` to lookup assessment part/bank mappings for assessment parts. return: (osid.assessment.authoring.AssessmentPartBankSession) - an ``AssessmentPartBankSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_assessm...
[ "Gets", "the", "OsidSession", "to", "lookup", "assessment", "part", "/", "bank", "mappings", "for", "assessment", "parts", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L451-L466
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringManager.get_assessment_part_bank_assignment_session
def get_assessment_part_bank_assignment_session(self): """Gets the ``OsidSession`` associated with assigning assessment part to bank. return: (osid.assessment.authoring.AssessmentPartBankAssignmentS ession) - an ``AssessmentPartBankAssignmentSession`` raise: Ope...
python
def get_assessment_part_bank_assignment_session(self): """Gets the ``OsidSession`` associated with assigning assessment part to bank. return: (osid.assessment.authoring.AssessmentPartBankAssignmentS ession) - an ``AssessmentPartBankAssignmentSession`` raise: Ope...
[ "def", "get_assessment_part_bank_assignment_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_assessment_part_bank_assignment", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".",...
Gets the ``OsidSession`` associated with assigning assessment part to bank. return: (osid.assessment.authoring.AssessmentPartBankAssignmentS ession) - an ``AssessmentPartBankAssignmentSession`` raise: OperationFailed - unable to complete request raise: Unimplem...
[ "Gets", "the", "OsidSession", "associated", "with", "assigning", "assessment", "part", "to", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L471-L488
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringManager.get_sequence_rule_lookup_session
def get_sequence_rule_lookup_session(self): """Gets the ``OsidSession`` associated with the sequence rule lookup service. return: (osid.assessment.authoring.SequenceRuleLookupSession) - a ``SequenceRuleLookupSession`` raise: OperationFailed - unable to complete request ...
python
def get_sequence_rule_lookup_session(self): """Gets the ``OsidSession`` associated with the sequence rule lookup service. return: (osid.assessment.authoring.SequenceRuleLookupSession) - a ``SequenceRuleLookupSession`` raise: OperationFailed - unable to complete request ...
[ "def", "get_sequence_rule_lookup_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_sequence_rule_lookup", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "SequenceRuleLookup...
Gets the ``OsidSession`` associated with the sequence rule lookup service. return: (osid.assessment.authoring.SequenceRuleLookupSession) - a ``SequenceRuleLookupSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_sequence_rule_lookup...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "sequence", "rule", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L493-L508
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringManager.get_sequence_rule_admin_session
def get_sequence_rule_admin_session(self): """Gets the ``OsidSession`` associated with the sequence rule administration service. return: (osid.assessment.authoring.SequenceRuleAdminSession) - a ``SequenceRuleAdminSession`` raise: OperationFailed - unable to complete request ...
python
def get_sequence_rule_admin_session(self): """Gets the ``OsidSession`` associated with the sequence rule administration service. return: (osid.assessment.authoring.SequenceRuleAdminSession) - a ``SequenceRuleAdminSession`` raise: OperationFailed - unable to complete request ...
[ "def", "get_sequence_rule_admin_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_sequence_rule_admin", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "SequenceRuleAdminSes...
Gets the ``OsidSession`` associated with the sequence rule administration service. return: (osid.assessment.authoring.SequenceRuleAdminSession) - a ``SequenceRuleAdminSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_sequence_rule_...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "sequence", "rule", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L539-L554
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringManager.get_sequence_rule_admin_session_for_bank
def get_sequence_rule_admin_session_for_bank(self, bank_id): """Gets the ``OsidSession`` associated with the sequence rule administration service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.SequenceRuleAdminSession) - a ...
python
def get_sequence_rule_admin_session_for_bank(self, bank_id): """Gets the ``OsidSession`` associated with the sequence rule administration service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.SequenceRuleAdminSession) - a ...
[ "def", "get_sequence_rule_admin_session_for_bank", "(", "self", ",", "bank_id", ")", ":", "if", "not", "self", ".", "supports_sequence_rule_admin", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "##", "# Also include check to see if the catalog Id is ...
Gets the ``OsidSession`` associated with the sequence rule administration service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.SequenceRuleAdminSession) - a ``SequenceRuleAdminSession`` raise: NotFound - no ``Ba...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "sequence", "rule", "administration", "service", "for", "the", "given", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L560-L582
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringManager.get_assessment_part_item_session
def get_assessment_part_item_session(self, *args, **kwargs): """Gets the ``OsidSession`` associated with the assessment part item service. return: (osid.assessment.authoring.AssessmentPartItemSession) - an ``AssessmentPartItemSession`` raise: OperationFailed - unable to complet...
python
def get_assessment_part_item_session(self, *args, **kwargs): """Gets the ``OsidSession`` associated with the assessment part item service. return: (osid.assessment.authoring.AssessmentPartItemSession) - an ``AssessmentPartItemSession`` raise: OperationFailed - unable to complet...
[ "def", "get_assessment_part_item_session", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_assessment_part_lookup", "(", ")", ":", "# This is kludgy, but only until Tom fixes spec", "raise", "errors", ".", "Unimp...
Gets the ``OsidSession`` associated with the assessment part item service. return: (osid.assessment.authoring.AssessmentPartItemSession) - an ``AssessmentPartItemSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_assessment_part_ite...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "item", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L586-L603
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringManager.get_assessment_part_item_design_session
def get_assessment_part_item_design_session(self, *args, **kwargs): """Gets the ``OsidSession`` associated with the assessment part item design service. return: (osid.assessment.authoring.AssessmentPartItemDesignSession) - an ``AssessmentPartItemDesignSession`` raise: Operation...
python
def get_assessment_part_item_design_session(self, *args, **kwargs): """Gets the ``OsidSession`` associated with the assessment part item design service. return: (osid.assessment.authoring.AssessmentPartItemDesignSession) - an ``AssessmentPartItemDesignSession`` raise: Operation...
[ "def", "get_assessment_part_item_design_session", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_assessment_part_lookup", "(", ")", ":", "# This is kludgy, but only until Tom fixes spec", "raise", "errors", ".", ...
Gets the ``OsidSession`` associated with the assessment part item design service. return: (osid.assessment.authoring.AssessmentPartItemDesignSession) - an ``AssessmentPartItemDesignSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "item", "design", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L636-L653
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_lookup_session
def get_assessment_part_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartLookupSession) - an ``AssessmentPartLookupSession`` ...
python
def get_assessment_part_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartLookupSession) - an ``AssessmentPartLookupSession`` ...
[ "def", "get_assessment_part_lookup_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_lookup", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".",...
Gets the ``OsidSession`` associated with the assessment part lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartLookupSession) - an ``AssessmentPartLookupSession`` raise: NullArgument - ``proxy`` is ``null`` raise:...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L755-L772
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_lookup_session_for_bank
def get_assessment_part_lookup_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part lookup service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.asse...
python
def get_assessment_part_lookup_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part lookup service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.asse...
[ "def", "get_assessment_part_lookup_session_for_bank", "(", "self", ",", "bank_id", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_lookup", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "##", "# Also include check to s...
Gets the ``OsidSession`` associated with the assessment part lookup service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartLookupSession) - an ``AssessmentPar...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "lookup", "service", "for", "the", "given", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L775-L798
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_query_session
def get_assessment_part_query_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part query service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartQuerySession) - an ``AssessmentPartQuerySession`` ...
python
def get_assessment_part_query_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part query service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartQuerySession) - an ``AssessmentPartQuerySession`` ...
[ "def", "get_assessment_part_query_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_query", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", ...
Gets the ``OsidSession`` associated with the assessment part query service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartQuerySession) - an ``AssessmentPartQuerySession`` raise: NullArgument - ``proxy`` is ``null`` raise: O...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "query", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L801-L818
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_query_session_for_bank
def get_assessment_part_query_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part query service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assess...
python
def get_assessment_part_query_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part query service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assess...
[ "def", "get_assessment_part_query_session_for_bank", "(", "self", ",", "bank_id", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_query", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "##", "# Also include check to see...
Gets the ``OsidSession`` associated with the assessment part query service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartQuerySession) - an ``AssessmentPartQ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "query", "service", "for", "the", "given", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L821-L844
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_admin_session
def get_assessment_part_admin_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part administration service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartAdminSession) - an ``AssessmentPartAdminSession`...
python
def get_assessment_part_admin_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part administration service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartAdminSession) - an ``AssessmentPartAdminSession`...
[ "def", "get_assessment_part_admin_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_admin", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", ...
Gets the ``OsidSession`` associated with the assessment part administration service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartAdminSession) - an ``AssessmentPartAdminSession`` raise: NullArgument - ``proxy`` is ``null`` ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L847-L864
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_admin_session_for_bank
def get_assessment_part_admin_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part administration service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (os...
python
def get_assessment_part_admin_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part administration service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (os...
[ "def", "get_assessment_part_admin_session_for_bank", "(", "self", ",", "bank_id", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_admin", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "##", "# Also include check to see...
Gets the ``OsidSession`` associated with the assessment part administration service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.AssessmentPartAdminSession) - an ``Assess...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "administration", "service", "for", "the", "given", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L867-L890
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_sequence_rule_lookup_session_for_bank
def get_sequence_rule_lookup_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the sequence rule lookup service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessme...
python
def get_sequence_rule_lookup_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the sequence rule lookup service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessme...
[ "def", "get_sequence_rule_lookup_session_for_bank", "(", "self", ",", "bank_id", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_sequence_rule_lookup", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "##", "# Also include check to see i...
Gets the ``OsidSession`` associated with the sequence rule lookup service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.assessment.authoring.SequenceRuleLookupSession) - a ``SequenceRuleLookup...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "sequence", "rule", "lookup", "service", "for", "the", "given", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L955-L978
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_item_session
def get_assessment_part_item_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part item service. return: (osid.assessment.authoring.AssessmentPartItemSession) - an ``AssessmentPartItemSession`` raise: OperationFailed - unable to complete request ...
python
def get_assessment_part_item_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part item service. return: (osid.assessment.authoring.AssessmentPartItemSession) - an ``AssessmentPartItemSession`` raise: OperationFailed - unable to complete request ...
[ "def", "get_assessment_part_item_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_lookup", "(", ")", ":", "# This is kludgy, but only until Tom fixes spec", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: d...
Gets the ``OsidSession`` associated with the assessment part item service. return: (osid.assessment.authoring.AssessmentPartItemSession) - an ``AssessmentPartItemSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_assessment_part_ite...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "item", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L1027-L1042
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_item_session_for_bank
def get_assessment_part_item_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part item service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.AssessmentPartItemSession) ...
python
def get_assessment_part_item_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part item service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.AssessmentPartItemSession) ...
[ "def", "get_assessment_part_item_session_for_bank", "(", "self", ",", "bank_id", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_lookup", "(", ")", ":", "# This is kludgy, but only until Tom fixes spec", "raise", "errors", ".", "Unimplemented",...
Gets the ``OsidSession`` associated with the assessment part item service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.AssessmentPartItemSession) - an ``AssessmentPartItemSession`` raise: NotFound - no ``Bank`` ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "item", "service", "for", "the", "given", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L1047-L1068
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_item_design_session
def get_assessment_part_item_design_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part item design service. return: (osid.assessment.authoring.AssessmentPartItemDesignSession) - an ``AssessmentPartItemDesignSession`` raise: OperationFailed - u...
python
def get_assessment_part_item_design_session(self, proxy): """Gets the ``OsidSession`` associated with the assessment part item design service. return: (osid.assessment.authoring.AssessmentPartItemDesignSession) - an ``AssessmentPartItemDesignSession`` raise: OperationFailed - u...
[ "def", "get_assessment_part_item_design_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_lookup", "(", ")", ":", "# This is kludgy, but only until Tom fixes spec", "raise", "errors", ".", "Unimplemented", "(", ")", "# py...
Gets the ``OsidSession`` associated with the assessment part item design service. return: (osid.assessment.authoring.AssessmentPartItemDesignSession) - an ``AssessmentPartItemDesignSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "item", "design", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L1071-L1086
mitsei/dlkit
dlkit/json_/assessment_authoring/managers.py
AssessmentAuthoringProxyManager.get_assessment_part_item_design_session_for_bank
def get_assessment_part_item_design_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part item design service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.AssessmentPartItemDesig...
python
def get_assessment_part_item_design_session_for_bank(self, bank_id, proxy): """Gets the ``OsidSession`` associated with the assessment part item design service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.AssessmentPartItemDesig...
[ "def", "get_assessment_part_item_design_session_for_bank", "(", "self", ",", "bank_id", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_assessment_part_lookup", "(", ")", ":", "# This is kludgy, but only until Tom fixes spec", "raise", "errors", ".", "Unimplem...
Gets the ``OsidSession`` associated with the assessment part item design service for the given bank. arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank`` return: (osid.assessment.authoring.AssessmentPartItemDesignSession) - an ``AssessmentPartItemDesignSession`` raise: NotF...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "assessment", "part", "item", "design", "service", "for", "the", "given", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment_authoring/managers.py#L1091-L1112
python-odin/odinweb
odinweb/doc.py
deprecated
def deprecated(operation=None): """ Mark an operation deprecated. """ def inner(o): o.deprecated = True return o return inner(operation) if operation else inner
python
def deprecated(operation=None): """ Mark an operation deprecated. """ def inner(o): o.deprecated = True return o return inner(operation) if operation else inner
[ "def", "deprecated", "(", "operation", "=", "None", ")", ":", "def", "inner", "(", "o", ")", ":", "o", ".", "deprecated", "=", "True", "return", "o", "return", "inner", "(", "operation", ")", "if", "operation", "else", "inner" ]
Mark an operation deprecated.
[ "Mark", "an", "operation", "deprecated", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/doc.py#L20-L27
python-odin/odinweb
odinweb/doc.py
add_param
def add_param(param): # type: (Param) -> Callable """ Add parameter, you should probably use on of :meth:`path_param`, :meth:`query_param`, :meth:`body_param`, or :meth:`header_param`. """ def inner(o): try: getattr(o, 'parameters').add(param) except AttributeError: ...
python
def add_param(param): # type: (Param) -> Callable """ Add parameter, you should probably use on of :meth:`path_param`, :meth:`query_param`, :meth:`body_param`, or :meth:`header_param`. """ def inner(o): try: getattr(o, 'parameters').add(param) except AttributeError: ...
[ "def", "add_param", "(", "param", ")", ":", "# type: (Param) -> Callable", "def", "inner", "(", "o", ")", ":", "try", ":", "getattr", "(", "o", ",", "'parameters'", ")", ".", "add", "(", "param", ")", "except", "AttributeError", ":", "setattr", "(", "o",...
Add parameter, you should probably use on of :meth:`path_param`, :meth:`query_param`, :meth:`body_param`, or :meth:`header_param`.
[ "Add", "parameter", "you", "should", "probably", "use", "on", "of", ":", "meth", ":", "path_param", ":", "meth", ":", "query_param", ":", "meth", ":", "body_param", "or", ":", "meth", ":", "header_param", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/doc.py#L30-L42
python-odin/odinweb
odinweb/doc.py
response
def response(status, description, resource=DefaultResource): # type: (HTTPStatus, str, Optional[Resource]) -> Callable """ Define an expected response. The values are based off `Swagger <https://swagger.io/specification>`_. """ def inner(o): value = Response(status, description, resour...
python
def response(status, description, resource=DefaultResource): # type: (HTTPStatus, str, Optional[Resource]) -> Callable """ Define an expected response. The values are based off `Swagger <https://swagger.io/specification>`_. """ def inner(o): value = Response(status, description, resour...
[ "def", "response", "(", "status", ",", "description", ",", "resource", "=", "DefaultResource", ")", ":", "# type: (HTTPStatus, str, Optional[Resource]) -> Callable", "def", "inner", "(", "o", ")", ":", "value", "=", "Response", "(", "status", ",", "description", "...
Define an expected response. The values are based off `Swagger <https://swagger.io/specification>`_.
[ "Define", "an", "expected", "response", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/doc.py#L45-L60
python-odin/odinweb
odinweb/doc.py
produces
def produces(*content_types): """ Define content types produced by an endpoint. """ def inner(o): if not all(isinstance(content_type, _compat.string_types) for content_type in content_types): raise ValueError("In parameter not a valid value.") try: getattr(o, 'pro...
python
def produces(*content_types): """ Define content types produced by an endpoint. """ def inner(o): if not all(isinstance(content_type, _compat.string_types) for content_type in content_types): raise ValueError("In parameter not a valid value.") try: getattr(o, 'pro...
[ "def", "produces", "(", "*", "content_types", ")", ":", "def", "inner", "(", "o", ")", ":", "if", "not", "all", "(", "isinstance", "(", "content_type", ",", "_compat", ".", "string_types", ")", "for", "content_type", "in", "content_types", ")", ":", "rai...
Define content types produced by an endpoint.
[ "Define", "content", "types", "produced", "by", "an", "endpoint", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/doc.py#L63-L75
mitsei/dlkit
dlkit/json_/authorization/objects.py
Authorization.get_resource_id
def get_resource_id(self): """Gets the ``resource _id`` for this authorization. return: (osid.id.Id) - the ``Resource Id`` raise: IllegalState - ``has_resource()`` is ``false`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template ...
python
def get_resource_id(self): """Gets the ``resource _id`` for this authorization. return: (osid.id.Id) - the ``Resource Id`` raise: IllegalState - ``has_resource()`` is ``false`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template ...
[ "def", "get_resource_id", "(", "self", ")", ":", "# Implemented from template for osid.resource.Resource.get_avatar_id_template", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'resourceId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'this ...
Gets the ``resource _id`` for this authorization. return: (osid.id.Id) - the ``Resource Id`` raise: IllegalState - ``has_resource()`` is ``false`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "resource", "_id", "for", "this", "authorization", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L88-L100
mitsei/dlkit
dlkit/json_/authorization/objects.py
Authorization.get_resource
def get_resource(self): """Gets the ``Resource`` for this authorization. return: (osid.resource.Resource) - the ``Resource`` raise: IllegalState - ``has_resource()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be ...
python
def get_resource(self): """Gets the ``Resource`` for this authorization. return: (osid.resource.Resource) - the ``Resource`` raise: IllegalState - ``has_resource()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be ...
[ "def", "get_resource", "(", "self", ")", ":", "# Implemented from template for osid.resource.Resource.get_avatar_template", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'resourceId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'this Author...
Gets the ``Resource`` for this authorization. return: (osid.resource.Resource) - the ``Resource`` raise: IllegalState - ``has_resource()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Resource", "for", "this", "authorization", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L104-L122
mitsei/dlkit
dlkit/json_/authorization/objects.py
Authorization.get_trust_id
def get_trust_id(self): """Gets the ``Trust`` ``Id`` for this authorization. return: (osid.id.Id) - the trust ``Id`` raise: IllegalState - ``has_trust()`` is ``false`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
python
def get_trust_id(self): """Gets the ``Trust`` ``Id`` for this authorization. return: (osid.id.Id) - the trust ``Id`` raise: IllegalState - ``has_trust()`` is ``false`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid...
[ "def", "get_trust_id", "(", "self", ")", ":", "# Implemented from template for osid.resource.Resource.get_avatar_id_template", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'trustId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'this Author...
Gets the ``Trust`` ``Id`` for this authorization. return: (osid.id.Id) - the trust ``Id`` raise: IllegalState - ``has_trust()`` is ``false`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Trust", "Id", "for", "this", "authorization", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L137-L149
mitsei/dlkit
dlkit/json_/authorization/objects.py
Authorization.get_trust
def get_trust(self): """Gets the ``Trust`` for this authorization. return: (osid.authentication.process.Trust) - the ``Trust`` raise: IllegalState - ``has_trust()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be i...
python
def get_trust(self): """Gets the ``Trust`` for this authorization. return: (osid.authentication.process.Trust) - the ``Trust`` raise: IllegalState - ``has_trust()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be i...
[ "def", "get_trust", "(", "self", ")", ":", "# Implemented from template for osid.resource.Resource.get_avatar_template", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'trustId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'this Authorizatio...
Gets the ``Trust`` for this authorization. return: (osid.authentication.process.Trust) - the ``Trust`` raise: IllegalState - ``has_trust()`` is ``false`` raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Trust", "for", "this", "authorization", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L153-L171
mitsei/dlkit
dlkit/json_/authorization/objects.py
Authorization.get_function_id
def get_function_id(self): """Gets the ``Function Id`` for this authorization. return: (osid.id.Id) - the function ``Id`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective_id if not bool(...
python
def get_function_id(self): """Gets the ``Function Id`` for this authorization. return: (osid.id.Id) - the function ``Id`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective_id if not bool(...
[ "def", "get_function_id", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective_id", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'functionId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'function em...
Gets the ``Function Id`` for this authorization. return: (osid.id.Id) - the function ``Id`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Function", "Id", "for", "this", "authorization", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L227-L237
mitsei/dlkit
dlkit/json_/authorization/objects.py
Authorization.get_function
def get_function(self): """Gets the ``Function`` for this authorization. return: (osid.authorization.Function) - the function raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # Implemented from template...
python
def get_function(self): """Gets the ``Function`` for this authorization. return: (osid.authorization.Function) - the function raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # Implemented from template...
[ "def", "get_function", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'functionId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'function empty'",...
Gets the ``Function`` for this authorization. return: (osid.authorization.Function) - the function raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Function", "for", "this", "authorization", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L241-L257
mitsei/dlkit
dlkit/json_/authorization/objects.py
Authorization.get_qualifier_id
def get_qualifier_id(self): """Gets the ``Qualifier Id`` for this authorization. return: (osid.id.Id) - the qualifier ``Id`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective_id if not bo...
python
def get_qualifier_id(self): """Gets the ``Qualifier Id`` for this authorization. return: (osid.id.Id) - the qualifier ``Id`` *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for osid.learning.Activity.get_objective_id if not bo...
[ "def", "get_qualifier_id", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective_id", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'qualifierId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'qualifier...
Gets the ``Qualifier Id`` for this authorization. return: (osid.id.Id) - the qualifier ``Id`` *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Qualifier", "Id", "for", "this", "authorization", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L261-L271
mitsei/dlkit
dlkit/json_/authorization/objects.py
Authorization.get_qualifier
def get_qualifier(self): """Gets the qualifier for this authorization. return: (osid.authorization.Qualifier) - the qualifier raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # Implemented from template...
python
def get_qualifier(self): """Gets the qualifier for this authorization. return: (osid.authorization.Qualifier) - the qualifier raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* """ # Implemented from template...
[ "def", "get_qualifier", "(", "self", ")", ":", "# Implemented from template for osid.learning.Activity.get_objective", "if", "not", "bool", "(", "self", ".", "_my_map", "[", "'qualifierId'", "]", ")", ":", "raise", "errors", ".", "IllegalState", "(", "'qualifier empty...
Gets the qualifier for this authorization. return: (osid.authorization.Qualifier) - the qualifier raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "qualifier", "for", "this", "authorization", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L275-L291
mitsei/dlkit
dlkit/json_/authorization/objects.py
AuthorizationForm._init_map
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidRelationshipForm._init_map(self, record_types=record_types) self._my_map['assignedVaultIds'] = [str(kwargs['vault_id'])] self._my_map['functionId'] = str(kwargs['function_id']) self._my_m...
python
def _init_map(self, record_types=None, **kwargs): """Initialize form map""" osid_objects.OsidRelationshipForm._init_map(self, record_types=record_types) self._my_map['assignedVaultIds'] = [str(kwargs['vault_id'])] self._my_map['functionId'] = str(kwargs['function_id']) self._my_m...
[ "def", "_init_map", "(", "self", ",", "record_types", "=", "None", ",", "*", "*", "kwargs", ")", ":", "osid_objects", ".", "OsidRelationshipForm", ".", "_init_map", "(", "self", ",", "record_types", "=", "record_types", ")", "self", ".", "_my_map", "[", "'...
Initialize form map
[ "Initialize", "form", "map" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L370-L383
mitsei/dlkit
dlkit/json_/authorization/objects.py
VaultNode.get_vault
def get_vault(self): """Gets the ``Vault`` at this node. return: (osid.authorization.Vault) - the vault represented by this node *compliance: mandatory -- This method must be implemented.* """ if self._lookup_session is None: mgr = get_provider_manag...
python
def get_vault(self): """Gets the ``Vault`` at this node. return: (osid.authorization.Vault) - the vault represented by this node *compliance: mandatory -- This method must be implemented.* """ if self._lookup_session is None: mgr = get_provider_manag...
[ "def", "get_vault", "(", "self", ")", ":", "if", "self", ".", "_lookup_session", "is", "None", ":", "mgr", "=", "get_provider_manager", "(", "'AUTHORIZATION'", ",", "runtime", "=", "self", ".", "_runtime", ",", "proxy", "=", "self", ".", "_proxy", ")", "...
Gets the ``Vault`` at this node. return: (osid.authorization.Vault) - the vault represented by this node *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "Vault", "at", "this", "node", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L610-L621
mitsei/dlkit
dlkit/json_/authorization/objects.py
VaultNode.get_parent_vault_nodes
def get_parent_vault_nodes(self): """Gets the parents of this vault. return: (osid.authorization.VaultNodeList) - the parents of this vault *compliance: mandatory -- This method must be implemented.* """ parent_vault_nodes = [] for node in self._my_map['...
python
def get_parent_vault_nodes(self): """Gets the parents of this vault. return: (osid.authorization.VaultNodeList) - the parents of this vault *compliance: mandatory -- This method must be implemented.* """ parent_vault_nodes = [] for node in self._my_map['...
[ "def", "get_parent_vault_nodes", "(", "self", ")", ":", "parent_vault_nodes", "=", "[", "]", "for", "node", "in", "self", ".", "_my_map", "[", "'parentNodes'", "]", ":", "parent_vault_nodes", ".", "append", "(", "VaultNode", "(", "node", ".", "_my_map", ",",...
Gets the parents of this vault. return: (osid.authorization.VaultNodeList) - the parents of this vault *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "parents", "of", "this", "vault", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/objects.py#L625-L640
jason-weirather/py-seq-tools
seqtools/simulation/permute.py
random_flip
def random_flip(sequence,rnum=None): """Flip a sequence direction with 0.5 probability""" randin = rnum if not randin: randin = RandomSource() if randin.random() < 0.5: return rc(sequence) return sequence
python
def random_flip(sequence,rnum=None): """Flip a sequence direction with 0.5 probability""" randin = rnum if not randin: randin = RandomSource() if randin.random() < 0.5: return rc(sequence) return sequence
[ "def", "random_flip", "(", "sequence", ",", "rnum", "=", "None", ")", ":", "randin", "=", "rnum", "if", "not", "randin", ":", "randin", "=", "RandomSource", "(", ")", "if", "randin", ".", "random", "(", ")", "<", "0.5", ":", "return", "rc", "(", "s...
Flip a sequence direction with 0.5 probability
[ "Flip", "a", "sequence", "direction", "with", "0", ".", "5", "probability" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/simulation/permute.py#L285-L291
jason-weirather/py-seq-tools
seqtools/simulation/permute.py
ErrorMaker.random_substitution
def random_substitution(self,fastq,rate): """Perform the permutation on the sequence :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: float :return: Permutted FASTQ :rtype: format.fastq.FASTQ """ sequence = fa...
python
def random_substitution(self,fastq,rate): """Perform the permutation on the sequence :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: float :return: Permutted FASTQ :rtype: format.fastq.FASTQ """ sequence = fa...
[ "def", "random_substitution", "(", "self", ",", "fastq", ",", "rate", ")", ":", "sequence", "=", "fastq", ".", "sequence", "seq", "=", "''", "for", "i", "in", "range", "(", "len", "(", "sequence", ")", ")", ":", "# check context", "prev", "=", "None", ...
Perform the permutation on the sequence :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: float :return: Permutted FASTQ :rtype: format.fastq.FASTQ
[ "Perform", "the", "permutation", "on", "the", "sequence" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/simulation/permute.py#L96-L132
jason-weirather/py-seq-tools
seqtools/simulation/permute.py
ErrorMaker.random_deletion
def random_deletion(self,fastq,rate): """Perform the permutation on the sequence :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: float :return: Permutted FASTQ :rtype: format.fastq.FASTQ """ sequence = fastq....
python
def random_deletion(self,fastq,rate): """Perform the permutation on the sequence :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: float :return: Permutted FASTQ :rtype: format.fastq.FASTQ """ sequence = fastq....
[ "def", "random_deletion", "(", "self", ",", "fastq", ",", "rate", ")", ":", "sequence", "=", "fastq", ".", "sequence", "quality", "=", "fastq", ".", "qual", "seq", "=", "''", "qual", "=", "None", "if", "quality", ":", "qual", "=", "''", "for", "i", ...
Perform the permutation on the sequence :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: float :return: Permutted FASTQ :rtype: format.fastq.FASTQ
[ "Perform", "the", "permutation", "on", "the", "sequence" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/simulation/permute.py#L134-L172
jason-weirather/py-seq-tools
seqtools/simulation/permute.py
ErrorMaker.random_insertion
def random_insertion(self,fastq,rate,max_inserts=1): """Perform the permutation on the sequence. If authorized to do multiple bases they are done at hte rate defined here. :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: floa...
python
def random_insertion(self,fastq,rate,max_inserts=1): """Perform the permutation on the sequence. If authorized to do multiple bases they are done at hte rate defined here. :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: floa...
[ "def", "random_insertion", "(", "self", ",", "fastq", ",", "rate", ",", "max_inserts", "=", "1", ")", ":", "sequence", "=", "fastq", ".", "sequence", "quality", "=", "fastq", ".", "qual", "seq", "=", "''", "qual", "=", "None", "ibase", "=", "rate_to_ph...
Perform the permutation on the sequence. If authorized to do multiple bases they are done at hte rate defined here. :param fastq: FASTQ sequence to permute :type fastq: format.fastq.FASTQ :param rate: how frequently to permute :type rate: float :param max_inserts: the maximum number of bases to ins...
[ "Perform", "the", "permutation", "on", "the", "sequence", ".", "If", "authorized", "to", "do", "multiple", "bases", "they", "are", "done", "at", "hte", "rate", "defined", "here", "." ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/simulation/permute.py#L174-L230
jason-weirather/py-seq-tools
seqtools/simulation/permute.py
CutMaker.set_custom
def set_custom(self,gmin,gmu,gsigma): """Set a minimum lengtha, and then the gaussian distribution parameters for cutting For any sequence longer than the minimum the guassian parameters will be used""" self._gauss_min = gmin self._gauss_mu = gmu self._gauss_sigma = gsigma
python
def set_custom(self,gmin,gmu,gsigma): """Set a minimum lengtha, and then the gaussian distribution parameters for cutting For any sequence longer than the minimum the guassian parameters will be used""" self._gauss_min = gmin self._gauss_mu = gmu self._gauss_sigma = gsigma
[ "def", "set_custom", "(", "self", ",", "gmin", ",", "gmu", ",", "gsigma", ")", ":", "self", ".", "_gauss_min", "=", "gmin", "self", ".", "_gauss_mu", "=", "gmu", "self", ".", "_gauss_sigma", "=", "gsigma" ]
Set a minimum lengtha, and then the gaussian distribution parameters for cutting For any sequence longer than the minimum the guassian parameters will be used
[ "Set", "a", "minimum", "lengtha", "and", "then", "the", "gaussian", "distribution", "parameters", "for", "cutting", "For", "any", "sequence", "longer", "than", "the", "minimum", "the", "guassian", "parameters", "will", "be", "used" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/simulation/permute.py#L270-L275
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropItemRecord._is_match
def _is_match(self, response, answer): """Does the response match the answer """ def compare_conditions(droppable_id, spatial_units, response_conditions): """Compare response coordinates with spatial units for droppable_id""" coordinate_match = True for coordinate in...
python
def _is_match(self, response, answer): """Does the response match the answer """ def compare_conditions(droppable_id, spatial_units, response_conditions): """Compare response coordinates with spatial units for droppable_id""" coordinate_match = True for coordinate in...
[ "def", "_is_match", "(", "self", ",", "response", ",", "answer", ")", ":", "def", "compare_conditions", "(", "droppable_id", ",", "spatial_units", ",", "response_conditions", ")", ":", "\"\"\"Compare response coordinates with spatial units for droppable_id\"\"\"", "coordina...
Does the response match the answer
[ "Does", "the", "response", "match", "the", "answer" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L79-L118
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropItemRecord.get_correctness_for_response
def get_correctness_for_response(self, response): """get measure of correctness available for a particular response""" for answer in self.my_osid_object.get_answers(): if self._is_match(response, answer): try: return answer.get_score() exce...
python
def get_correctness_for_response(self, response): """get measure of correctness available for a particular response""" for answer in self.my_osid_object.get_answers(): if self._is_match(response, answer): try: return answer.get_score() exce...
[ "def", "get_correctness_for_response", "(", "self", ",", "response", ")", ":", "for", "answer", "in", "self", ".", "my_osid_object", ".", "get_answers", "(", ")", ":", "if", "self", ".", "_is_match", "(", "response", ",", "answer", ")", ":", "try", ":", ...
get measure of correctness available for a particular response
[ "get", "measure", "of", "correctness", "available", "for", "a", "particular", "response" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L131-L145
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerRecord.get_coordinate_conditions
def get_coordinate_conditions(self): """stub""" condition_list = deepcopy(self.my_osid_object._my_map['coordinateConditions']) for condition in condition_list: condition['coordinate'] = BasicCoordinate(condition['coordinate']) return condition_list
python
def get_coordinate_conditions(self): """stub""" condition_list = deepcopy(self.my_osid_object._my_map['coordinateConditions']) for condition in condition_list: condition['coordinate'] = BasicCoordinate(condition['coordinate']) return condition_list
[ "def", "get_coordinate_conditions", "(", "self", ")", ":", "condition_list", "=", "deepcopy", "(", "self", ".", "my_osid_object", ".", "_my_map", "[", "'coordinateConditions'", "]", ")", "for", "condition", "in", "condition_list", ":", "condition", "[", "'coordina...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L228-L233
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerRecord.get_spatial_unit_conditions
def get_spatial_unit_conditions(self): """stub""" condition_list = deepcopy(self.my_osid_object._my_map['spatialUnitConditions']) for condition in condition_list: condition['spatialUnit'] = SpatialUnitFactory().get_spatial_unit(spatial_unit_map=condition['spatialUnit']) retur...
python
def get_spatial_unit_conditions(self): """stub""" condition_list = deepcopy(self.my_osid_object._my_map['spatialUnitConditions']) for condition in condition_list: condition['spatialUnit'] = SpatialUnitFactory().get_spatial_unit(spatial_unit_map=condition['spatialUnit']) retur...
[ "def", "get_spatial_unit_conditions", "(", "self", ")", ":", "condition_list", "=", "deepcopy", "(", "self", ".", "my_osid_object", ".", "_my_map", "[", "'spatialUnitConditions'", "]", ")", "for", "condition", "in", "condition_list", ":", "condition", "[", "'spati...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L238-L243
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerFormRecord._init_map
def _init_map(self): """stub""" self.my_osid_object_form._my_map['zoneConditions'] = \ self._zone_conditions_metadata['default_object_values'][0] self.my_osid_object_form._my_map['coordinateConditions'] = \ self._coordinate_conditions_metadata['default_object_values'][0] ...
python
def _init_map(self): """stub""" self.my_osid_object_form._my_map['zoneConditions'] = \ self._zone_conditions_metadata['default_object_values'][0] self.my_osid_object_form._my_map['coordinateConditions'] = \ self._coordinate_conditions_metadata['default_object_values'][0] ...
[ "def", "_init_map", "(", "self", ")", ":", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'zoneConditions'", "]", "=", "self", ".", "_zone_conditions_metadata", "[", "'default_object_values'", "]", "[", "0", "]", "self", ".", "my_osid_object_form", "....
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L303-L310
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerFormRecord._init_metadata
def _init_metadata(self): """stub""" self._zone_conditions_metadata = { 'zone_matches': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'zone_conditions'), 'element_label': 'zone conditions...
python
def _init_metadata(self): """stub""" self._zone_conditions_metadata = { 'zone_matches': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'zone_conditions'), 'element_label': 'zone conditions...
[ "def", "_init_metadata", "(", "self", ")", ":", "self", ".", "_zone_conditions_metadata", "=", "{", "'zone_matches'", ":", "Id", "(", "self", ".", "my_osid_object_form", ".", "_authority", ",", "self", ".", "my_osid_object_form", ".", "_namespace", ",", "'zone_c...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L312-L352
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerFormRecord.add_zone_condition
def add_zone_condition(self, droppable_id, zone_id, match=True): """stub""" self.my_osid_object_form._my_map['zoneConditions'].append( {'droppableId': droppable_id, 'zoneId': zone_id, 'match': match}) self.my_osid_object_form._my_map['zoneConditions'].sort(key=lambda k: k['zoneId'])
python
def add_zone_condition(self, droppable_id, zone_id, match=True): """stub""" self.my_osid_object_form._my_map['zoneConditions'].append( {'droppableId': droppable_id, 'zoneId': zone_id, 'match': match}) self.my_osid_object_form._my_map['zoneConditions'].sort(key=lambda k: k['zoneId'])
[ "def", "add_zone_condition", "(", "self", ",", "droppable_id", ",", "zone_id", ",", "match", "=", "True", ")", ":", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'zoneConditions'", "]", ".", "append", "(", "{", "'droppableId'", ":", "droppable_id",...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L358-L362
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerFormRecord.clear_zone_conditions
def clear_zone_conditions(self): """stub""" if (self.get_zone_conditions_metadata().is_read_only() or self.get_zone_conditions_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['zoneConditions'] = \ self._zone_conditions_metadata...
python
def clear_zone_conditions(self): """stub""" if (self.get_zone_conditions_metadata().is_read_only() or self.get_zone_conditions_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['zoneConditions'] = \ self._zone_conditions_metadata...
[ "def", "clear_zone_conditions", "(", "self", ")", ":", "if", "(", "self", ".", "get_zone_conditions_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_zone_conditions_metadata", "(", ")", ".", "is_required", "(", ")", ")", ":", "rais...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L364-L370
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerFormRecord.add_coordinate_condition
def add_coordinate_condition(self, droppable_id, container_id, coordinate, match=True): """stub""" if not isinstance(coordinate, BasicCoordinate): raise InvalidArgument('coordinate is not a BasicCoordinate') self.my_osid_object_form._my_map['coordinateConditions'].append( ...
python
def add_coordinate_condition(self, droppable_id, container_id, coordinate, match=True): """stub""" if not isinstance(coordinate, BasicCoordinate): raise InvalidArgument('coordinate is not a BasicCoordinate') self.my_osid_object_form._my_map['coordinateConditions'].append( ...
[ "def", "add_coordinate_condition", "(", "self", ",", "droppable_id", ",", "container_id", ",", "coordinate", ",", "match", "=", "True", ")", ":", "if", "not", "isinstance", "(", "coordinate", ",", "BasicCoordinate", ")", ":", "raise", "InvalidArgument", "(", "...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L376-L382
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerFormRecord.clear_coordinate_conditions
def clear_coordinate_conditions(self): """stub""" if (self.get_zone_conditions_metadata().is_read_only() or self.get_zone_conditions_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['coordinateConditions'] = \ self._coordinate_c...
python
def clear_coordinate_conditions(self): """stub""" if (self.get_zone_conditions_metadata().is_read_only() or self.get_zone_conditions_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['coordinateConditions'] = \ self._coordinate_c...
[ "def", "clear_coordinate_conditions", "(", "self", ")", ":", "if", "(", "self", ".", "get_zone_conditions_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_zone_conditions_metadata", "(", ")", ".", "is_required", "(", ")", ")", ":", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L384-L390
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerFormRecord.add_spatial_unit_condition
def add_spatial_unit_condition(self, droppable_id, container_id, spatial_unit, match=True): """stub""" if not isinstance(spatial_unit, abc_mapping_primitives.SpatialUnit): raise InvalidArgument('spatial_unit is not a SpatialUnit') self.my_osid_object_form._my_map['spatialUnitConditi...
python
def add_spatial_unit_condition(self, droppable_id, container_id, spatial_unit, match=True): """stub""" if not isinstance(spatial_unit, abc_mapping_primitives.SpatialUnit): raise InvalidArgument('spatial_unit is not a SpatialUnit') self.my_osid_object_form._my_map['spatialUnitConditi...
[ "def", "add_spatial_unit_condition", "(", "self", ",", "droppable_id", ",", "container_id", ",", "spatial_unit", ",", "match", "=", "True", ")", ":", "if", "not", "isinstance", "(", "spatial_unit", ",", "abc_mapping_primitives", ".", "SpatialUnit", ")", ":", "ra...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L396-L403
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
DragAndDropAnswerFormRecord.clear_spatial_unit_conditions
def clear_spatial_unit_conditions(self): """stub""" if (self.get_spatial_unit_conditions_metadata().is_read_only() or self.get_zone_conditions_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['spatialUnitConditions'] = \ self._z...
python
def clear_spatial_unit_conditions(self): """stub""" if (self.get_spatial_unit_conditions_metadata().is_read_only() or self.get_zone_conditions_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['spatialUnitConditions'] = \ self._z...
[ "def", "clear_spatial_unit_conditions", "(", "self", ")", ":", "if", "(", "self", ".", "get_spatial_unit_conditions_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_zone_conditions_metadata", "(", ")", ".", "is_required", "(", ")", ")"...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L405-L411
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionRecord.get_droppables
def get_droppables(self): """stub""" droppables = [] for current_droppable in self.my_osid_object._my_map['droppables']: droppables.append({ 'id': current_droppable['id'], 'text': self.get_matching_language_value('texts', ...
python
def get_droppables(self): """stub""" droppables = [] for current_droppable in self.my_osid_object._my_map['droppables']: droppables.append({ 'id': current_droppable['id'], 'text': self.get_matching_language_value('texts', ...
[ "def", "get_droppables", "(", "self", ")", ":", "droppables", "=", "[", "]", "for", "current_droppable", "in", "self", ".", "my_osid_object", ".", "_my_map", "[", "'droppables'", "]", ":", "droppables", ".", "append", "(", "{", "'id'", ":", "current_droppabl...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L458-L471
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionRecord.get_targets
def get_targets(self): """stub""" targets = [] for current_target in self.my_osid_object._my_map['targets']: targets.append({ 'id': current_target['id'], 'text': self.get_matching_language_value('texts', ...
python
def get_targets(self): """stub""" targets = [] for current_target in self.my_osid_object._my_map['targets']: targets.append({ 'id': current_target['id'], 'text': self.get_matching_language_value('texts', ...
[ "def", "get_targets", "(", "self", ")", ":", "targets", "=", "[", "]", "for", "current_target", "in", "self", ".", "my_osid_object", ".", "_my_map", "[", "'targets'", "]", ":", "targets", ".", "append", "(", "{", "'id'", ":", "current_target", "[", "'id'...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L478-L490
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionRecord.get_zones
def get_zones(self): """stub""" zones = [] for current_zone in self.my_osid_object._my_map['zones']: zones.append({ 'id': current_zone['id'], 'name': self.get_matching_language_value('names', dic...
python
def get_zones(self): """stub""" zones = [] for current_zone in self.my_osid_object._my_map['zones']: zones.append({ 'id': current_zone['id'], 'name': self.get_matching_language_value('names', dic...
[ "def", "get_zones", "(", "self", ")", ":", "zones", "=", "[", "]", "for", "current_zone", "in", "self", ".", "my_osid_object", ".", "_my_map", "[", "'zones'", "]", ":", "zones", ".", "append", "(", "{", "'id'", ":", "current_zone", "[", "'id'", "]", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L497-L513
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionRecord._update_object_map
def _update_object_map(self, obj_map): """unclear if it's better to use this method or get_object_map My main consideration is that MultiLanguageQuestionRecord already overrides get_object_map """ obj_map['droppables'] = self.get_droppables() obj_map['targets'] = self.get...
python
def _update_object_map(self, obj_map): """unclear if it's better to use this method or get_object_map My main consideration is that MultiLanguageQuestionRecord already overrides get_object_map """ obj_map['droppables'] = self.get_droppables() obj_map['targets'] = self.get...
[ "def", "_update_object_map", "(", "self", ",", "obj_map", ")", ":", "obj_map", "[", "'droppables'", "]", "=", "self", ".", "get_droppables", "(", ")", "obj_map", "[", "'targets'", "]", "=", "self", ".", "get_targets", "(", ")", "obj_map", "[", "'zones'", ...
unclear if it's better to use this method or get_object_map My main consideration is that MultiLanguageQuestionRecord already overrides get_object_map
[ "unclear", "if", "it", "s", "better", "to", "use", "this", "method", "or", "get_object_map", "My", "main", "consideration", "is", "that", "MultiLanguageQuestionRecord", "already", "overrides", "get_object_map" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L517-L524
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord._init_map
def _init_map(self): """stub""" super(MultiLanguageDragAndDropQuestionFormRecord, self)._init_map() self.my_osid_object_form._my_map['droppables'] = \ self._droppables_metadata['default_object_values'][0] self.my_osid_object_form._my_map['targets'] = \ self._targe...
python
def _init_map(self): """stub""" super(MultiLanguageDragAndDropQuestionFormRecord, self)._init_map() self.my_osid_object_form._my_map['droppables'] = \ self._droppables_metadata['default_object_values'][0] self.my_osid_object_form._my_map['targets'] = \ self._targe...
[ "def", "_init_map", "(", "self", ")", ":", "super", "(", "MultiLanguageDragAndDropQuestionFormRecord", ",", "self", ")", ".", "_init_map", "(", ")", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'droppables'", "]", "=", "self", ".", "_droppables_meta...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L612-L626
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord._init_metadata
def _init_metadata(self): """stub""" super(MultiLanguageDragAndDropQuestionFormRecord, self)._init_metadata() self._droppables_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, ...
python
def _init_metadata(self): """stub""" super(MultiLanguageDragAndDropQuestionFormRecord, self)._init_metadata() self._droppables_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, ...
[ "def", "_init_metadata", "(", "self", ")", ":", "super", "(", "MultiLanguageDragAndDropQuestionFormRecord", ",", "self", ")", ".", "_init_metadata", "(", ")", "self", ".", "_droppables_metadata", "=", "{", "'element_id'", ":", "Id", "(", "self", ".", "my_osid_ob...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L628-L711
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.add_droppable
def add_droppable(self, droppable_text, name='', reuse=1, drop_behavior_type=None): """stub""" if not isinstance(droppable_text, DisplayText): raise InvalidArgument('droppable_text is not a DisplayText object') if not isinstance(reuse, int): raise InvalidArgument('reuse m...
python
def add_droppable(self, droppable_text, name='', reuse=1, drop_behavior_type=None): """stub""" if not isinstance(droppable_text, DisplayText): raise InvalidArgument('droppable_text is not a DisplayText object') if not isinstance(reuse, int): raise InvalidArgument('reuse m...
[ "def", "add_droppable", "(", "self", ",", "droppable_text", ",", "name", "=", "''", ",", "reuse", "=", "1", ",", "drop_behavior_type", "=", "None", ")", ":", "if", "not", "isinstance", "(", "droppable_text", ",", "DisplayText", ")", ":", "raise", "InvalidA...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L756-L775
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.clear_droppables
def clear_droppables(self): """stub""" if self.get_droppables_metadata().is_read_only(): raise NoAccess() self.my_osid_object_form._my_map['droppables'] = \ self._droppables_metadata['default_object_values'][0]
python
def clear_droppables(self): """stub""" if self.get_droppables_metadata().is_read_only(): raise NoAccess() self.my_osid_object_form._my_map['droppables'] = \ self._droppables_metadata['default_object_values'][0]
[ "def", "clear_droppables", "(", "self", ")", ":", "if", "self", ".", "get_droppables_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'droppables'", "]", "=", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L777-L782
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.clear_droppable_texts
def clear_droppable_texts(self, droppable_id): """stub""" if self.get_droppables_metadata().is_read_only(): raise NoAccess() updated_droppables = [] for current_droppable in self.my_osid_object_form._my_map['droppables']: if current_droppable['id'] != droppable_id...
python
def clear_droppable_texts(self, droppable_id): """stub""" if self.get_droppables_metadata().is_read_only(): raise NoAccess() updated_droppables = [] for current_droppable in self.my_osid_object_form._my_map['droppables']: if current_droppable['id'] != droppable_id...
[ "def", "clear_droppable_texts", "(", "self", ",", "droppable_id", ")", ":", "if", "self", ".", "get_droppables_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "updated_droppables", "=", "[", "]", "for", "current_droppabl...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L785-L801
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.remove_droppable
def remove_droppable(self, droppable_id): """remove a droppable, given the id""" updated_droppables = [] for droppable in self.my_osid_object_form._my_map['droppables']: if droppable['id'] != droppable_id: updated_droppables.append(droppable) self.my_osid_obje...
python
def remove_droppable(self, droppable_id): """remove a droppable, given the id""" updated_droppables = [] for droppable in self.my_osid_object_form._my_map['droppables']: if droppable['id'] != droppable_id: updated_droppables.append(droppable) self.my_osid_obje...
[ "def", "remove_droppable", "(", "self", ",", "droppable_id", ")", ":", "updated_droppables", "=", "[", "]", "for", "droppable", "in", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'droppables'", "]", ":", "if", "droppable", "[", "'id'", "]", "!="...
remove a droppable, given the id
[ "remove", "a", "droppable", "given", "the", "id" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L879-L885
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.set_droppable_order
def set_droppable_order(self, droppable_ids): """ reorder droppables per the passed in list :param droppable_ids: :return: """ reordered_droppables = [] current_droppable_ids = [d['id'] for d in self.my_osid_object_form._my_map['droppables']] if set(droppable_ids)...
python
def set_droppable_order(self, droppable_ids): """ reorder droppables per the passed in list :param droppable_ids: :return: """ reordered_droppables = [] current_droppable_ids = [d['id'] for d in self.my_osid_object_form._my_map['droppables']] if set(droppable_ids)...
[ "def", "set_droppable_order", "(", "self", ",", "droppable_ids", ")", ":", "reordered_droppables", "=", "[", "]", "current_droppable_ids", "=", "[", "d", "[", "'id'", "]", "for", "d", "in", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'droppables'...
reorder droppables per the passed in list :param droppable_ids: :return:
[ "reorder", "droppables", "per", "the", "passed", "in", "list", ":", "param", "droppable_ids", ":", ":", "return", ":" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L888-L904
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.add_target
def add_target(self, target_text, name='', drop_behavior_type=None): """stub""" if not isinstance(target_text, DisplayText): raise InvalidArgument('target_text is not a DisplayText object') if not isinstance(name, DisplayText): # if default '' name = self._str...
python
def add_target(self, target_text, name='', drop_behavior_type=None): """stub""" if not isinstance(target_text, DisplayText): raise InvalidArgument('target_text is not a DisplayText object') if not isinstance(name, DisplayText): # if default '' name = self._str...
[ "def", "add_target", "(", "self", ",", "target_text", ",", "name", "=", "''", ",", "drop_behavior_type", "=", "None", ")", ":", "if", "not", "isinstance", "(", "target_text", ",", "DisplayText", ")", ":", "raise", "InvalidArgument", "(", "'target_text is not a...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L910-L924
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.clear_targets
def clear_targets(self): """stub""" if self.get_targets_metadata().is_read_only(): raise NoAccess() self.my_osid_object_form._my_map['targets'] = \ self._targets_metadata['default_object_values'][0]
python
def clear_targets(self): """stub""" if self.get_targets_metadata().is_read_only(): raise NoAccess() self.my_osid_object_form._my_map['targets'] = \ self._targets_metadata['default_object_values'][0]
[ "def", "clear_targets", "(", "self", ")", ":", "if", "self", ".", "get_targets_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'targets'", "]", "=", "self", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L926-L931
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.clear_target_names
def clear_target_names(self, target_id): """stub""" if self.get_targets_metadata().is_read_only(): raise NoAccess() updated_targets = [] for current_target in self.my_osid_object_form._my_map['targets']: if current_target['id'] != target_id: update...
python
def clear_target_names(self, target_id): """stub""" if self.get_targets_metadata().is_read_only(): raise NoAccess() updated_targets = [] for current_target in self.my_osid_object_form._my_map['targets']: if current_target['id'] != target_id: update...
[ "def", "clear_target_names", "(", "self", ",", "target_id", ")", ":", "if", "self", ".", "get_targets_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "updated_targets", "=", "[", "]", "for", "current_target", "in", "...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L952-L967
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.remove_target
def remove_target(self, target_id): """remove a target, given the id""" updated_targets = [] for target in self.my_osid_object_form._my_map['targets']: if target['id'] != target_id: updated_targets.append(target) self.my_osid_object_form._my_map['targets'] = u...
python
def remove_target(self, target_id): """remove a target, given the id""" updated_targets = [] for target in self.my_osid_object_form._my_map['targets']: if target['id'] != target_id: updated_targets.append(target) self.my_osid_object_form._my_map['targets'] = u...
[ "def", "remove_target", "(", "self", ",", "target_id", ")", ":", "updated_targets", "=", "[", "]", "for", "target", "in", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'targets'", "]", ":", "if", "target", "[", "'id'", "]", "!=", "target_id", ...
remove a target, given the id
[ "remove", "a", "target", "given", "the", "id" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L1020-L1026
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.set_target_order
def set_target_order(self, target_ids): """ reorder targets per the passed in list :param target_ids: :return: """ reordered_targets = [] current_target_ids = [t['id'] for t in self.my_osid_object_form._my_map['targets']] if set(target_ids) != set(current_target_i...
python
def set_target_order(self, target_ids): """ reorder targets per the passed in list :param target_ids: :return: """ reordered_targets = [] current_target_ids = [t['id'] for t in self.my_osid_object_form._my_map['targets']] if set(target_ids) != set(current_target_i...
[ "def", "set_target_order", "(", "self", ",", "target_ids", ")", ":", "reordered_targets", "=", "[", "]", "current_target_ids", "=", "[", "t", "[", "'id'", "]", "for", "t", "in", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'targets'", "]", "]"...
reorder targets per the passed in list :param target_ids: :return:
[ "reorder", "targets", "per", "the", "passed", "in", "list", ":", "param", "target_ids", ":", ":", "return", ":" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L1029-L1045
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.add_zone
def add_zone(self, spatial_unit, container_id, name='', description='', visible=True, reuse=0, drop_behavior_type=None): """container_id is a targetId that the zone belongs to """ if not isinstance(spatial_unit, abc_mapping_primitives.SpatialUnit): raise InvalidArgument('zone is not ...
python
def add_zone(self, spatial_unit, container_id, name='', description='', visible=True, reuse=0, drop_behavior_type=None): """container_id is a targetId that the zone belongs to """ if not isinstance(spatial_unit, abc_mapping_primitives.SpatialUnit): raise InvalidArgument('zone is not ...
[ "def", "add_zone", "(", "self", ",", "spatial_unit", ",", "container_id", ",", "name", "=", "''", ",", "description", "=", "''", ",", "visible", "=", "True", ",", "reuse", "=", "0", ",", "drop_behavior_type", "=", "None", ")", ":", "if", "not", "isinst...
container_id is a targetId that the zone belongs to
[ "container_id", "is", "a", "targetId", "that", "the", "zone", "belongs", "to" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L1051-L1079
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.clear_zones
def clear_zones(self): """stub""" if self.get_zones_metadata().is_read_only(): raise NoAccess() self.my_osid_object_form._my_map['zones'] = \ self._zones_metadata['default_object_values'][0]
python
def clear_zones(self): """stub""" if self.get_zones_metadata().is_read_only(): raise NoAccess() self.my_osid_object_form._my_map['zones'] = \ self._zones_metadata['default_object_values'][0]
[ "def", "clear_zones", "(", "self", ")", ":", "if", "self", ".", "get_zones_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'zones'", "]", "=", "self", ".", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L1081-L1086
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.remove_zone
def remove_zone(self, zone_id): """remove a zone, given the id""" updated_zones = [] for zone in self.my_osid_object_form._my_map['zones']: if zone['id'] != zone_id: updated_zones.append(zone) self.my_osid_object_form._my_map['zones'] = updated_zones
python
def remove_zone(self, zone_id): """remove a zone, given the id""" updated_zones = [] for zone in self.my_osid_object_form._my_map['zones']: if zone['id'] != zone_id: updated_zones.append(zone) self.my_osid_object_form._my_map['zones'] = updated_zones
[ "def", "remove_zone", "(", "self", ",", "zone_id", ")", ":", "updated_zones", "=", "[", "]", "for", "zone", "in", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'zones'", "]", ":", "if", "zone", "[", "'id'", "]", "!=", "zone_id", ":", "updat...
remove a zone, given the id
[ "remove", "a", "zone", "given", "the", "id" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L1193-L1199
mitsei/dlkit
dlkit/records/assessment/basic/drag_and_drop_records.py
MultiLanguageDragAndDropQuestionFormRecord.set_zone_order
def set_zone_order(self, zone_ids): """ reorder zones per the passed in list :param zone_ids: :return: """ reordered_zones = [] current_zone_ids = [z['id'] for z in self.my_osid_object_form._my_map['zones']] if set(zone_ids) != set(current_zone_ids): r...
python
def set_zone_order(self, zone_ids): """ reorder zones per the passed in list :param zone_ids: :return: """ reordered_zones = [] current_zone_ids = [z['id'] for z in self.my_osid_object_form._my_map['zones']] if set(zone_ids) != set(current_zone_ids): r...
[ "def", "set_zone_order", "(", "self", ",", "zone_ids", ")", ":", "reordered_zones", "=", "[", "]", "current_zone_ids", "=", "[", "z", "[", "'id'", "]", "for", "z", "in", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'zones'", "]", "]", "if", ...
reorder zones per the passed in list :param zone_ids: :return:
[ "reorder", "zones", "per", "the", "passed", "in", "list", ":", "param", "zone_ids", ":", ":", "return", ":" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/basic/drag_and_drop_records.py#L1202-L1218
juju/juju-bundlelib
jujubundlelib/pyutils.py
string_class
def string_class(cls): """Define __unicode__ and __str__ methods on the given class in Python 2. The given class must define a __str__ method returning a unicode string, otherwise a TypeError is raised. Under Python 3, the class is returned as is. """ if not PY3: if '__str__' not in cls...
python
def string_class(cls): """Define __unicode__ and __str__ methods on the given class in Python 2. The given class must define a __str__ method returning a unicode string, otherwise a TypeError is raised. Under Python 3, the class is returned as is. """ if not PY3: if '__str__' not in cls...
[ "def", "string_class", "(", "cls", ")", ":", "if", "not", "PY3", ":", "if", "'__str__'", "not", "in", "cls", ".", "__dict__", ":", "raise", "TypeError", "(", "'the given class has no __str__ method'", ")", "cls", ".", "__unicode__", ",", "cls", ".", "__strin...
Define __unicode__ and __str__ methods on the given class in Python 2. The given class must define a __str__ method returning a unicode string, otherwise a TypeError is raised. Under Python 3, the class is returned as is.
[ "Define", "__unicode__", "and", "__str__", "methods", "on", "the", "given", "class", "in", "Python", "2", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/pyutils.py#L11-L23
ascribe/pyspool
spool/spoolverb.py
Spoolverb.from_verb
def from_verb(cls, verb): """ Constructs a :class:`Spoolverb` instance from the string representation of the given verb. Args: verb (str): representation of the verb e.g.: ``'ASCRIBESPOOL01LOAN12/150526150528'``. Can also be in binary format (...
python
def from_verb(cls, verb): """ Constructs a :class:`Spoolverb` instance from the string representation of the given verb. Args: verb (str): representation of the verb e.g.: ``'ASCRIBESPOOL01LOAN12/150526150528'``. Can also be in binary format (...
[ "def", "from_verb", "(", "cls", ",", "verb", ")", ":", "pattern", "=", "r'^(?P<meta>[A-Z]+)(?P<version>\\d+)(?P<action>[A-Z]+)(?P<arg1>\\d+)?(\\/(?P<arg2>\\d+))?$'", "try", ":", "verb", "=", "verb", ".", "decode", "(", ")", "except", "AttributeError", ":", "pass", "ma...
Constructs a :class:`Spoolverb` instance from the string representation of the given verb. Args: verb (str): representation of the verb e.g.: ``'ASCRIBESPOOL01LOAN12/150526150528'``. Can also be in binary format (:obj:`bytes`): ``b'ASCRIBESPOOL01PIECE'``. ...
[ "Constructs", "a", ":", "class", ":", "Spoolverb", "instance", "from", "the", "string", "representation", "of", "the", "given", "verb", "." ]
train
https://github.com/ascribe/pyspool/blob/f8b10df1e7d2ea7950dde433c1cb6d5225112f4f/spool/spoolverb.py#L72-L117
ascribe/pyspool
spool/spoolverb.py
Spoolverb.loan
def loan(self): """ str: representation of the ``LOAN`` spoolverb. E.g.: ``'ASCRIBESPOOL01LOAN1/150526150528'``. """ return '{}{}LOAN{}/{}{}'.format(self.meta, self.version, self.edition_number, self.loan_start, self.loan_end)
python
def loan(self): """ str: representation of the ``LOAN`` spoolverb. E.g.: ``'ASCRIBESPOOL01LOAN1/150526150528'``. """ return '{}{}LOAN{}/{}{}'.format(self.meta, self.version, self.edition_number, self.loan_start, self.loan_end)
[ "def", "loan", "(", "self", ")", ":", "return", "'{}{}LOAN{}/{}{}'", ".", "format", "(", "self", ".", "meta", ",", "self", ".", "version", ",", "self", ".", "edition_number", ",", "self", ".", "loan_start", ",", "self", ".", "loan_end", ")" ]
str: representation of the ``LOAN`` spoolverb. E.g.: ``'ASCRIBESPOOL01LOAN1/150526150528'``.
[ "str", ":", "representation", "of", "the", "LOAN", "spoolverb", ".", "E", ".", "g", ".", ":", "ASCRIBESPOOL01LOAN1", "/", "150526150528", "." ]
train
https://github.com/ascribe/pyspool/blob/f8b10df1e7d2ea7950dde433c1cb6d5225112f4f/spool/spoolverb.py#L168-L174
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_lookup_session
def get_objective_lookup_session(self): """Gets the OsidSession associated with the objective lookup service. return: (osid.learning.ObjectiveLookupSession) - an ObjectiveLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - s...
python
def get_objective_lookup_session(self): """Gets the OsidSession associated with the objective lookup service. return: (osid.learning.ObjectiveLookupSession) - an ObjectiveLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - s...
[ "def", "get_objective_lookup_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_objective_lookup", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# Ope...
Gets the OsidSession associated with the objective lookup service. return: (osid.learning.ObjectiveLookupSession) - an ObjectiveLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objective_lookup() is false complia...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L693-L715
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_lookup_session_for_objective_bank
def get_objective_lookup_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the objective lookup service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning...
python
def get_objective_lookup_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the objective lookup service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning...
[ "def", "get_objective_lookup_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_objective_lookup", "(", ")", ":", "raise", "Un...
Gets the OsidSession associated with the objective lookup service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ObjectiveLookupSession) - an ObjectiveLookupSession raise: NotFound ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "lookup", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L717-L747
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_query_session_for_objective_bank
def get_objective_query_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the objective query service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.O...
python
def get_objective_query_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the objective query service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.O...
[ "def", "get_objective_query_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_objective_query", "(", ")", ":", "raise", "Unim...
Gets the OsidSession associated with the objective query service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ObjectiveQuerySession) - an ObjectiveQuerySession raise: NotFound - o...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "query", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L773-L803
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_search_session
def get_objective_search_session(self): """Gets the OsidSession associated with the objective search service. return: (osid.learning.ObjectiveSearchSession) - an ObjectiveSearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - s...
python
def get_objective_search_session(self): """Gets the OsidSession associated with the objective search service. return: (osid.learning.ObjectiveSearchSession) - an ObjectiveSearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - s...
[ "def", "get_objective_search_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_objective_search", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "Opera...
Gets the OsidSession associated with the objective search service. return: (osid.learning.ObjectiveSearchSession) - an ObjectiveSearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objective_search() is false complia...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "search", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L805-L827
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_search_session_for_objective_bank
def get_objective_search_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the objective search service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning...
python
def get_objective_search_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the objective search service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning...
[ "def", "get_objective_search_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_objective_search", "(", ")", ":", "raise", "Un...
Gets the OsidSession associated with the objective search service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ObjectiveSearchSession) - an ObjectiveSearchSession raise: NotFound ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "search", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L829-L859
mitsei/dlkit
dlkit/handcar/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", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "Operati...
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 false co...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L861-L883
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_admin_session_for_objective_bank
def get_objective_admin_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the objective admin service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.O...
python
def get_objective_admin_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the objective admin service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.O...
[ "def", "get_objective_admin_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_objective_admin", "(", ")", ":", "raise", "Unim...
Gets the OsidSession associated with the objective admin service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ObjectiveAdminSession) - an ObjectiveAdminSession raise: NotFound - o...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "admin", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L885-L915
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_hierarchy_session_for_objective_bank
def get_objective_hierarchy_session_for_objective_bank(self, objective_bank_id=None, *args, **kwargs): """Gets the OsidSession associated with the objective hierarchy traversal service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective ba...
python
def get_objective_hierarchy_session_for_objective_bank(self, objective_bank_id=None, *args, **kwargs): """Gets the OsidSession associated with the objective hierarchy traversal service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective ba...
[ "def", "get_objective_hierarchy_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "suppo...
Gets the OsidSession associated with the objective hierarchy traversal service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ObjectiveHierarchySession) - an 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/handcar/learning/managers.py#L979-L1009
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_hierarchy_design_session
def get_objective_hierarchy_design_session(self): """Gets the session for designing objective hierarchies. return: (osid.learning.ObjectiveHierarchyDesignSession) - an ObjectiveHierarchyDesignSession raise: OperationFailed - unable to complete request raise: Unimplemen...
python
def get_objective_hierarchy_design_session(self): """Gets the session for designing objective hierarchies. return: (osid.learning.ObjectiveHierarchyDesignSession) - an ObjectiveHierarchyDesignSession raise: OperationFailed - unable to complete request raise: Unimplemen...
[ "def", "get_objective_hierarchy_design_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_objective_hierarchy_design", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":",...
Gets the session for designing objective hierarchies. return: (osid.learning.ObjectiveHierarchyDesignSession) - an ObjectiveHierarchyDesignSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objective_hierarchy_design() is ...
[ "Gets", "the", "session", "for", "designing", "objective", "hierarchies", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1011-L1033
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_hierarchy_design_session_for_objective_bank
def get_objective_hierarchy_design_session_for_objective_bank(self, objective_bank_id=None, *args, **kwargs): """Gets the OsidSession associated with the objective hierarchy design service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective ...
python
def get_objective_hierarchy_design_session_for_objective_bank(self, objective_bank_id=None, *args, **kwargs): """Gets the OsidSession associated with the objective hierarchy design service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective ...
[ "def", "get_objective_hierarchy_design_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", ...
Gets the OsidSession associated with the objective hierarchy design service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ObjectiveHierarchyDesignSession) - an ObjectiveHierarchyDesignSessi...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "hierarchy", "design", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1035-L1065
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_requisite_session
def get_objective_requisite_session(self): """Gets the session for examining objective requisites. return: (osid.learning.ObjectiveRequisiteSession) - an ObjectiveRequisiteSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objec...
python
def get_objective_requisite_session(self): """Gets the session for examining objective requisites. return: (osid.learning.ObjectiveRequisiteSession) - an ObjectiveRequisiteSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objec...
[ "def", "get_objective_requisite_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_objective_requisite", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", ...
Gets the session for examining objective requisites. return: (osid.learning.ObjectiveRequisiteSession) - an ObjectiveRequisiteSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objective_requisite() is false compliance: optional...
[ "Gets", "the", "session", "for", "examining", "objective", "requisites", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1192-L1213
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_requisite_session_for_objective_bank
def get_objective_requisite_session_for_objective_bank(self, objective_bank_id=None, *args, **kwargs): """Gets the OsidSession associated with the objective sequencing service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank ...
python
def get_objective_requisite_session_for_objective_bank(self, objective_bank_id=None, *args, **kwargs): """Gets the OsidSession associated with the objective sequencing service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank ...
[ "def", "get_objective_requisite_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "suppo...
Gets the OsidSession associated with the objective sequencing service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ObjectiveRequisiteSession) - an ObjectiveRequisiteSession raise: ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "sequencing", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1215-L1245
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_requisite_assignment_session
def get_objective_requisite_assignment_session(self, *args, **kwargs): """Gets the session for managing objective requisites. return: (osid.learning.ObjectiveRequisiteAssignmentSession) - an ObjectiveRequisiteAssignmentSession raise: OperationFailed - unable to complete request...
python
def get_objective_requisite_assignment_session(self, *args, **kwargs): """Gets the session for managing objective requisites. return: (osid.learning.ObjectiveRequisiteAssignmentSession) - an ObjectiveRequisiteAssignmentSession raise: OperationFailed - unable to complete request...
[ "def", "get_objective_requisite_assignment_session", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_objective_requisite_assignment", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", "...
Gets the session for managing objective requisites. return: (osid.learning.ObjectiveRequisiteAssignmentSession) - an ObjectiveRequisiteAssignmentSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objective_requisite_assi...
[ "Gets", "the", "session", "for", "managing", "objective", "requisites", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1247-L1269
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_activity_search_session
def get_activity_search_session(self): """Gets the OsidSession associated with the activity search service. return: (osid.learning.ActivitySearchSession) - a ActivitySearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - suppor...
python
def get_activity_search_session(self): """Gets the OsidSession associated with the activity search service. return: (osid.learning.ActivitySearchSession) - a ActivitySearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - suppor...
[ "def", "get_activity_search_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_activity_search", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "Operati...
Gets the OsidSession associated with the activity search service. return: (osid.learning.ActivitySearchSession) - a ActivitySearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_activity_search() is false compliance: ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "search", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1415-L1437
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_activity_search_session_for_objective_bank
def get_activity_search_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the activity search service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.A...
python
def get_activity_search_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the activity search service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.A...
[ "def", "get_activity_search_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_activity_search", "(", ")", ":", "raise", "Unim...
Gets the OsidSession associated with the activity search service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ActivitySearchSession) - an ActivitySearchSession raise: NotFound - o...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "search", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1439-L1469
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_activity_admin_session
def get_activity_admin_session(self): """Gets the OsidSession associated with the activity administration service. return: (osid.learning.ActivityAdminSession) - a ActivityAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - s...
python
def get_activity_admin_session(self): """Gets the OsidSession associated with the activity administration service. return: (osid.learning.ActivityAdminSession) - a ActivityAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - s...
[ "def", "get_activity_admin_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_activity_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "Operation...
Gets the OsidSession associated with the activity administration service. return: (osid.learning.ActivityAdminSession) - a ActivityAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_activity_admin() is false complia...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1471-L1493
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_activity_admin_session_for_objective_bank
def get_activity_admin_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the activity admin service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.Act...
python
def get_activity_admin_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the activity admin service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.Act...
[ "def", "get_activity_admin_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_activity_admin", "(", ")", ":", "raise", "Unimpl...
Gets the OsidSession associated with the activity admin service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the objective bank return: (osid.learning.ActivityAdminSession) - an ActivityAdminSession raise: NotFound - obje...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "admin", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1495-L1525
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_proficiency_lookup_session
def get_proficiency_lookup_session(self): """Gets the OsidSession associated with the proficiency lookup service. return: (osid.learning.ProficiencyLookupSession) - a ProficiencyLookupSession raise: OperationFailed - unable to complete request raise: Unimplemen...
python
def get_proficiency_lookup_session(self): """Gets the OsidSession associated with the proficiency lookup service. return: (osid.learning.ProficiencyLookupSession) - a ProficiencyLookupSession raise: OperationFailed - unable to complete request raise: Unimplemen...
[ "def", "get_proficiency_lookup_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_proficiency_lookup", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "O...
Gets the OsidSession associated with the proficiency lookup service. return: (osid.learning.ProficiencyLookupSession) - a ProficiencyLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_proficiency_lookup() is false ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "proficiency", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1636-L1658
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_proficiency_lookup_session_for_objective_bank
def get_proficiency_lookup_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the proficiency lookup service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the obective bank return: (osid.learn...
python
def get_proficiency_lookup_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the proficiency lookup service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the obective bank return: (osid.learn...
[ "def", "get_proficiency_lookup_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_proficiency_lookup", "(", ")", ":", "raise", ...
Gets the OsidSession associated with the proficiency lookup service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the obective bank return: (osid.learning.ProficiencyLookupSession) - a ProficiencyLookupSession raise: NotFo...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "proficiency", "lookup", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1660-L1690
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_proficiency_admin_session_for_objective_bank
def get_proficiency_admin_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the proficiency administration service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank return: (osi...
python
def get_proficiency_admin_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the proficiency administration service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank return: (osi...
[ "def", "get_proficiency_admin_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_proficiency_admin", "(", ")", ":", "raise", "...
Gets the OsidSession associated with the proficiency administration service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank return: (osid.learning.ProficiencyAdminSession) - a ProficiencyAdminSession raise: ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "proficiency", "administration", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L1828-L1858
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_learning_path_session
def get_learning_path_session(self): """Gets the OsidSession associated with the learning path service. return: (osid.learning.LearningPathSession) - a LearningPathSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_learning_path...
python
def get_learning_path_session(self): """Gets the OsidSession associated with the learning path service. return: (osid.learning.LearningPathSession) - a LearningPathSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_learning_path...
[ "def", "get_learning_path_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_learning_path", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "OperationFa...
Gets the OsidSession associated with the learning path service. return: (osid.learning.LearningPathSession) - a LearningPathSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_learning_path() is false compliance: optional - This ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "learning", "path", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2027-L2048
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_learning_path_session_for_objective_bank
def get_learning_path_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the learning path service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank return: (osid.learning.Learni...
python
def get_learning_path_session_for_objective_bank(self, objective_bank_id=None): """Gets the OsidSession associated with the learning path service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank return: (osid.learning.Learni...
[ "def", "get_learning_path_session_for_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_learning_path", "(", ")", ":", "raise", "Unimplem...
Gets the OsidSession associated with the learning path service for the given objective bank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank return: (osid.learning.LearningPathSession) - a LearningPathSession raise: NotFound - no object...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "learning", "path", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2050-L2080