repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_bank_lookup_session
def get_objective_bank_lookup_session(self, *args, **kwargs): """Gets the OsidSession associated with the objective bank lookup service. return: (osid.learning.ObjectiveBankLookupSession) - an ObjectiveBankLookupSession raise: OperationFailed - unable to complete reques...
python
def get_objective_bank_lookup_session(self, *args, **kwargs): """Gets the OsidSession associated with the objective bank lookup service. return: (osid.learning.ObjectiveBankLookupSession) - an ObjectiveBankLookupSession raise: OperationFailed - unable to complete reques...
[ "def", "get_objective_bank_lookup_session", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_objective_bank_lookup", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", ...
Gets the OsidSession associated with the objective bank lookup service. return: (osid.learning.ObjectiveBankLookupSession) - an ObjectiveBankLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objective_bank_lookup() is ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "bank", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2082-L2105
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningManager.get_objective_bank_hierarchy_design_session
def get_objective_bank_hierarchy_design_session(self): """Gets the session designing objective bank hierarchies. return: (osid.learning.ObjectiveBankHierarchyDesignSession) - an ObjectiveBankHierarchyDesignSession raise: OperationFailed - unable to complete request rais...
python
def get_objective_bank_hierarchy_design_session(self): """Gets the session designing objective bank hierarchies. return: (osid.learning.ObjectiveBankHierarchyDesignSession) - an ObjectiveBankHierarchyDesignSession raise: OperationFailed - unable to complete request rais...
[ "def", "get_objective_bank_hierarchy_design_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_objective_bank_hierarchy_design", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportErro...
Gets the session designing objective bank hierarchies. return: (osid.learning.ObjectiveBankHierarchyDesignSession) - an ObjectiveBankHierarchyDesignSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_objective_bank_hierar...
[ "Gets", "the", "session", "designing", "objective", "bank", "hierarchies", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2223-L2245
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_lookup_session
def get_objective_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the objective lookup service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveLookupSession`` :rtype: ``osid.learning.ObjectiveLookupSession`` :raise...
python
def get_objective_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the objective lookup service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveLookupSession`` :rtype: ``osid.learning.ObjectiveLookupSession`` :raise...
[ "def", "get_objective_lookup_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_lookup", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", ...
Gets the ``OsidSession`` associated with the objective lookup service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveLookupSession`` :rtype: ``osid.learning.ObjectiveLookupSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :raise...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2343-L2368
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_lookup_session_for_objective_bank
def get_objective_lookup_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the objective lookup service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid...
python
def get_objective_lookup_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the objective lookup service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid...
[ "def", "get_objective_lookup_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "support...
Gets the ``OsidSession`` associated with the objective lookup service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: ``an _objective...
[ "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#L2370-L2400
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_query_session
def get_objective_query_session(self, proxy): """Gets the ``OsidSession`` associated with the objective query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveQuerySession`` :rtype: ``osid.learning.ObjectiveQuerySession`` :raise: ``...
python
def get_objective_query_session(self, proxy): """Gets the ``OsidSession`` associated with the objective query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveQuerySession`` :rtype: ``osid.learning.ObjectiveQuerySession`` :raise: ``...
[ "def", "get_objective_query_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_query", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "...
Gets the ``OsidSession`` associated with the objective query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveQuerySession`` :rtype: ``osid.learning.ObjectiveQuerySession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :raise: `...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "query", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2402-L2427
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_admin_session
def get_objective_admin_session(self, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the objective administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveAdminSession`` :rtype: ``osid.learning.ObjectiveAdminSe...
python
def get_objective_admin_session(self, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the objective administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveAdminSession`` :rtype: ``osid.learning.ObjectiveAdminSe...
[ "def", "get_objective_admin_session", "(", "self", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_objective_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "impor...
Gets the ``OsidSession`` associated with the objective administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveAdminSession`` :rtype: ``osid.learning.ObjectiveAdminSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2520-L2545
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_admin_session_for_objective_bank
def get_objective_admin_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the objective admin service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.i...
python
def get_objective_admin_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the objective admin service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.i...
[ "def", "get_objective_admin_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports...
Gets the ``OsidSession`` associated with the objective admin service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: ``an _objective_...
[ "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#L2547-L2577
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_hierarchy_session
def get_objective_hierarchy_session(self, proxy): """Gets the session for traversing objective hierarchies. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveHierarchySession`` :rtype: ``osid.learning.ObjectiveHierarchySession`` :raise: ``Nul...
python
def get_objective_hierarchy_session(self, proxy): """Gets the session for traversing objective hierarchies. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveHierarchySession`` :rtype: ``osid.learning.ObjectiveHierarchySession`` :raise: ``Nul...
[ "def", "get_objective_hierarchy_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_hierarchy", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ...
Gets the session for traversing objective hierarchies. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveHierarchySession`` :rtype: ``osid.learning.ObjectiveHierarchySession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :raise: ``Operat...
[ "Gets", "the", "session", "for", "traversing", "objective", "hierarchies", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2618-L2643
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_sequencing_session
def get_objective_sequencing_session(self, proxy): """Gets the session for sequencing objectives. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveSequencingSession`` :rtype: ``osid.learning.ObjectiveSequencingSession`` :raise: ``NullArgumen...
python
def get_objective_sequencing_session(self, proxy): """Gets the session for sequencing objectives. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveSequencingSession`` :rtype: ``osid.learning.ObjectiveSequencingSession`` :raise: ``NullArgumen...
[ "def", "get_objective_sequencing_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_sequencing", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ...
Gets the session for sequencing objectives. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveSequencingSession`` :rtype: ``osid.learning.ObjectiveSequencingSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :raise: ``OperationFailed...
[ "Gets", "the", "session", "for", "sequencing", "objectives", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2736-L2761
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_sequencing_session_for_objective_bank
def get_objective_sequencing_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` ...
python
def get_objective_sequencing_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` ...
[ "def", "get_objective_sequencing_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_objective_sequencing", "(", ")", ":", "rais...
Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``Object...
[ "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#L2763-L2793
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_objective_bank_session
def get_objective_objective_bank_session(self, proxy): """Gets the session for retrieving objective to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveObjectiveBankSession`` :rtype: ``osid.learning.ObjectiveObjectiveBankSes...
python
def get_objective_objective_bank_session(self, proxy): """Gets the session for retrieving objective to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveObjectiveBankSession`` :rtype: ``osid.learning.ObjectiveObjectiveBankSes...
[ "def", "get_objective_objective_bank_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_objective_bank", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "Import...
Gets the session for retrieving objective to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveObjectiveBankSession`` :rtype: ``osid.learning.ObjectiveObjectiveBankSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` ...
[ "Gets", "the", "session", "for", "retrieving", "objective", "to", "objective", "bank", "mappings", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2795-L2820
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_objective_bank_assignment_session
def get_objective_objective_bank_assignment_session(self, proxy): """Gets the session for assigning objective to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveObjectiveBankAssignmentSession`` :rtype: ``osid.learning.Objec...
python
def get_objective_objective_bank_assignment_session(self, proxy): """Gets the session for assigning objective to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveObjectiveBankAssignmentSession`` :rtype: ``osid.learning.Objec...
[ "def", "get_objective_objective_bank_assignment_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_objective_bank_assignment", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions",...
Gets the session for assigning objective to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveObjectiveBankAssignmentSession`` :rtype: ``osid.learning.ObjectiveObjectiveBankAssignmentSession`` :raise: ``NullArgument`` -- ``pr...
[ "Gets", "the", "session", "for", "assigning", "objective", "to", "objective", "bank", "mappings", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2822-L2847
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_requisite_assignment_session_for_objective_bank
def get_objective_requisite_assignment_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objecti...
python
def get_objective_requisite_assignment_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objecti...
[ "def", "get_objective_requisite_assignment_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", "...
Gets the ``OsidSession`` associated with the objective sequencing service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``Object...
[ "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#L2954-L2984
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_activity_lookup_session
def get_activity_lookup_session(self, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the activity lookup service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityLookupSession`` :rtype: ``osid.learning.ActivityLookupSession`` ...
python
def get_activity_lookup_session(self, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the activity lookup service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityLookupSession`` :rtype: ``osid.learning.ActivityLookupSession`` ...
[ "def", "get_activity_lookup_session", "(", "self", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_activity_lookup", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "impor...
Gets the ``OsidSession`` associated with the activity lookup service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityLookupSession`` :rtype: ``osid.learning.ActivityLookupSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :raise: `...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L2986-L3011
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_activity_lookup_session_for_objective_bank
def get_activity_lookup_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the activity lookup service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.i...
python
def get_activity_lookup_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the activity lookup service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.i...
[ "def", "get_activity_lookup_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports...
Gets the ``OsidSession`` associated with the activity lookup service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityLoo...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "lookup", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3013-L3043
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_activity_query_session
def get_activity_query_session(self, proxy): """Gets the ``OsidSession`` associated with the activity query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityQuerySession`` :rtype: ``osid.learning.ActivityQuerySession`` :raise: ``Null...
python
def get_activity_query_session(self, proxy): """Gets the ``OsidSession`` associated with the activity query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityQuerySession`` :rtype: ``osid.learning.ActivityQuerySession`` :raise: ``Null...
[ "def", "get_activity_query_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_activity_query", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "ra...
Gets the ``OsidSession`` associated with the activity query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityQuerySession`` :rtype: ``osid.learning.ActivityQuerySession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :raise: ``Op...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "query", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3045-L3070
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_activity_query_session_for_objective_bank
def get_activity_query_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the activity query service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :par...
python
def get_activity_query_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the activity query service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :par...
[ "def", "get_activity_query_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_activity_query", "(", ")", ":", "raise", "Unimp...
Gets the ``OsidSession`` associated with the activity query service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityQuer...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "query", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3072-L3102
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_activity_admin_session
def get_activity_admin_session(self, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the activity administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityAdminSession`` :rtype: ``osid.learning.ActivityAdminSessio...
python
def get_activity_admin_session(self, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the activity administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityAdminSession`` :rtype: ``osid.learning.ActivityAdminSessio...
[ "def", "get_activity_admin_session", "(", "self", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_activity_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import"...
Gets the ``OsidSession`` associated with the activity administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityAdminSession`` :rtype: ``osid.learning.ActivityAdminSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :ra...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "activity", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3163-L3188
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_activity_admin_session_for_objective_bank
def get_activity_admin_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the activity admin service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id....
python
def get_activity_admin_session_for_objective_bank(self, objective_bank_id, proxy, *args, **kwargs): """Gets the ``OsidSession`` associated with the activity admin service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id....
[ "def", "get_activity_admin_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_...
Gets the ``OsidSession`` associated with the activity admin service for the given objective bank. :param objective_bank_id: the ``Id`` of the objective bank :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ActivityAdmin...
[ "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#L3190-L3220
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_activity_objective_bank_session
def get_activity_objective_bank_session(self, proxy): """Gets the session for retrieving activity to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityObjectiveBankSession`` :rtype: ``osid.learning.ActivityObjectiveBankSession...
python
def get_activity_objective_bank_session(self, proxy): """Gets the session for retrieving activity to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityObjectiveBankSession`` :rtype: ``osid.learning.ActivityObjectiveBankSession...
[ "def", "get_activity_objective_bank_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_activity_objective_bank", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportEr...
Gets the session for retrieving activity to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityObjectiveBankSession`` :rtype: ``osid.learning.ActivityObjectiveBankSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` ...
[ "Gets", "the", "session", "for", "retrieving", "activity", "to", "objective", "bank", "mappings", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3261-L3286
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_activity_objective_bank_assignment_session
def get_activity_objective_bank_assignment_session(self, proxy): """Gets the session for assigning activity to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityObjectiveBankAssignmentSession`` :rtype: ``osid.learning.Activity...
python
def get_activity_objective_bank_assignment_session(self, proxy): """Gets the session for assigning activity to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityObjectiveBankAssignmentSession`` :rtype: ``osid.learning.Activity...
[ "def", "get_activity_objective_bank_assignment_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_activity_objective_bank_assignment", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", ...
Gets the session for assigning activity to objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ActivityObjectiveBankAssignmentSession`` :rtype: ``osid.learning.ActivityObjectiveBankAssignmentSession`` :raise: ``NullArgument`` -- ``proxy...
[ "Gets", "the", "session", "for", "assigning", "activity", "to", "objective", "bank", "mappings", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3288-L3313
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_proficiency_query_session
def get_proficiency_query_session(self, proxy): """Gets the ``OsidSession`` associated with the proficiency query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyQuerySession`` :rtype: ``osid.learning.ProficiencyQuerySession`` :ra...
python
def get_proficiency_query_session(self, proxy): """Gets the ``OsidSession`` associated with the proficiency query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyQuerySession`` :rtype: ``osid.learning.ProficiencyQuerySession`` :ra...
[ "def", "get_proficiency_query_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_proficiency_query", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":",...
Gets the ``OsidSession`` associated with the proficiency query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyQuerySession`` :rtype: ``osid.learning.ProficiencyQuerySession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :rai...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "proficiency", "query", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3393-L3418
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_proficiency_query_session_for_objective_bank
def get_proficiency_query_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the proficiency query service for the given objective bank. :param objective_bank_id: the ``Id`` of the obective bank :type objective_bank_id: ``osid.id.Id`` ...
python
def get_proficiency_query_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the proficiency query service for the given objective bank. :param objective_bank_id: the ``Id`` of the obective bank :type objective_bank_id: ``osid.id.Id`` ...
[ "def", "get_proficiency_query_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_proficiency_query", "(", ")", ":", "raise", ...
Gets the ``OsidSession`` associated with the proficiency query service for the given objective bank. :param objective_bank_id: the ``Id`` of the obective bank :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``Proficiency...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "proficiency", "query", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3420-L3450
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_proficiency_search_session
def get_proficiency_search_session(self, proxy): """Gets the ``OsidSession`` associated with the proficiency search service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencySearchSession`` :rtype: ``osid.learning.ProficiencySearchSession`` ...
python
def get_proficiency_search_session(self, proxy): """Gets the ``OsidSession`` associated with the proficiency search service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencySearchSession`` :rtype: ``osid.learning.ProficiencySearchSession`` ...
[ "def", "get_proficiency_search_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_proficiency_search", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":...
Gets the ``OsidSession`` associated with the proficiency search service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencySearchSession`` :rtype: ``osid.learning.ProficiencySearchSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "proficiency", "search", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3452-L3477
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_proficiency_search_session_for_objective_bank
def get_proficiency_search_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the proficiency search service for the given objective bank. :param objective_bank_id: the ``Id`` of the ``ObjectiveBank`` :type objective_bank_id: ``osid.id.Id`` ...
python
def get_proficiency_search_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the proficiency search service for the given objective bank. :param objective_bank_id: the ``Id`` of the ``ObjectiveBank`` :type objective_bank_id: ``osid.id.Id`` ...
[ "def", "get_proficiency_search_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_proficiency_search", "(", ")", ":", "raise", ...
Gets the ``OsidSession`` associated with the proficiency search service for the given objective bank. :param objective_bank_id: the ``Id`` of the ``ObjectiveBank`` :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``Profic...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "proficiency", "search", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3479-L3509
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_proficiency_admin_session
def get_proficiency_admin_session(self, proxy): """Gets the ``OsidSession`` associated with the proficiency administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyAdminSession`` :rtype: ``osid.learning.ProficiencyAdminSession`` ...
python
def get_proficiency_admin_session(self, proxy): """Gets the ``OsidSession`` associated with the proficiency administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyAdminSession`` :rtype: ``osid.learning.ProficiencyAdminSession`` ...
[ "def", "get_proficiency_admin_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_proficiency_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":",...
Gets the ``OsidSession`` associated with the proficiency administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyAdminSession`` :rtype: ``osid.learning.ProficiencyAdminSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "proficiency", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3511-L3536
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_proficiency_objective_bank_session
def get_proficiency_objective_bank_session(self, proxy): """Gets the ``OsidSession`` to lookup proficiency/objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyObjectiveBankSession`` :rtype: ``osid.learning.ProficiencyObjective...
python
def get_proficiency_objective_bank_session(self, proxy): """Gets the ``OsidSession`` to lookup proficiency/objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyObjectiveBankSession`` :rtype: ``osid.learning.ProficiencyObjective...
[ "def", "get_proficiency_objective_bank_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_proficiency_objective_bank", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "Im...
Gets the ``OsidSession`` to lookup proficiency/objective bank mappings. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyObjectiveBankSession`` :rtype: ``osid.learning.ProficiencyObjectiveBankSession`` :raise: ``NullArgument`` -- ``proxy`` is ``nul...
[ "Gets", "the", "OsidSession", "to", "lookup", "proficiency", "/", "objective", "bank", "mappings", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3609-L3634
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_proficiency_objective_bank_assignment_session
def get_proficiency_objective_bank_assignment_session(self, proxy): """Gets the ``OsidSession`` associated with assigning proficiencies to objective banks. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyObjectiveBankAssignmentSession`` :rtype: ``...
python
def get_proficiency_objective_bank_assignment_session(self, proxy): """Gets the ``OsidSession`` associated with assigning proficiencies to objective banks. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyObjectiveBankAssignmentSession`` :rtype: ``...
[ "def", "get_proficiency_objective_bank_assignment_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_proficiency_objective_bank_assignment", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessio...
Gets the ``OsidSession`` associated with assigning proficiencies to objective banks. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``ProficiencyObjectiveBankAssignmentSession`` :rtype: ``osid.learning.ProficiencyObjectiveBankAssignmentSession`` :raise: ``Nul...
[ "Gets", "the", "OsidSession", "associated", "with", "assigning", "proficiencies", "to", "objective", "banks", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3636-L3661
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_my_learning_path_session
def get_my_learning_path_session(self, proxy): """Gets the ``OsidSession`` associated with the my learning path service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``MyLearningPathSession`` :rtype: ``osid.learning.MyLearningPathSession`` :raise: `...
python
def get_my_learning_path_session(self, proxy): """Gets the ``OsidSession`` associated with the my learning path service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``MyLearningPathSession`` :rtype: ``osid.learning.MyLearningPathSession`` :raise: `...
[ "def", "get_my_learning_path_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_my_learning_path", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", ...
Gets the ``OsidSession`` associated with the my learning path service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``MyLearningPathSession`` :rtype: ``osid.learning.MyLearningPathSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :raise: `...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "my", "learning", "path", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3682-L3707
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_my_learning_path_session_for_objective_bank
def get_my_learning_path_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the my learning path service for the given objective bank. :param objective_bank_id: the ``Id`` of the ``ObjectiveBank`` :type objective_bank_id: ``osid.id.Id`` ...
python
def get_my_learning_path_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the my learning path service for the given objective bank. :param objective_bank_id: the ``Id`` of the ``ObjectiveBank`` :type objective_bank_id: ``osid.id.Id`` ...
[ "def", "get_my_learning_path_session_for_objective_bank", "(", "self", ",", "objective_bank_id", ",", "proxy", ")", ":", "if", "not", "objective_bank_id", ":", "raise", "NullArgument", "if", "not", "self", ".", "supports_my_learning_path", "(", ")", ":", "raise", "U...
Gets the ``OsidSession`` associated with the my learning path service for the given objective bank. :param objective_bank_id: the ``Id`` of the ``ObjectiveBank`` :type objective_bank_id: ``osid.id.Id`` :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: a ``MyLearni...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "my", "learning", "path", "service", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3709-L3739
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_bank_query_session
def get_objective_bank_query_session(self, proxy): """Gets the OsidSession associated with the objective bank query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankQuerySession`` :rtype: ``osid.learning.ObjectiveBankQuerySession`` ...
python
def get_objective_bank_query_session(self, proxy): """Gets the OsidSession associated with the objective bank query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankQuerySession`` :rtype: ``osid.learning.ObjectiveBankQuerySession`` ...
[ "def", "get_objective_bank_query_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_bank_query", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ...
Gets the OsidSession associated with the objective bank query service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankQuerySession`` :rtype: ``osid.learning.ObjectiveBankQuerySession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "bank", "query", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3827-L3852
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_bank_search_session
def get_objective_bank_search_session(self, proxy): """Gets the OsidSession associated with the objective bank search service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankSearchSession`` :rtype: ``osid.learning.ObjectiveBankSearchSession`` ...
python
def get_objective_bank_search_session(self, proxy): """Gets the OsidSession associated with the objective bank search service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankSearchSession`` :rtype: ``osid.learning.ObjectiveBankSearchSession`` ...
[ "def", "get_objective_bank_search_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_bank_search", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError"...
Gets the OsidSession associated with the objective bank search service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankSearchSession`` :rtype: ``osid.learning.ObjectiveBankSearchSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "bank", "search", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3854-L3879
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_bank_admin_session
def get_objective_bank_admin_session(self, proxy, *args, **kwargs): """Gets the OsidSession associated with the objective bank administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankAdminSession`` :rtype: ``osid.learning.Object...
python
def get_objective_bank_admin_session(self, proxy, *args, **kwargs): """Gets the OsidSession associated with the objective bank administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankAdminSession`` :rtype: ``osid.learning.Object...
[ "def", "get_objective_bank_admin_session", "(", "self", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_objective_bank_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", "."...
Gets the OsidSession associated with the objective bank administration service. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankAdminSession`` :rtype: ``osid.learning.ObjectiveBankAdminSession`` :raise: ``NullArgument`` -- ``proxy`` is ``null``...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "objective", "bank", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3881-L3906
mitsei/dlkit
dlkit/handcar/learning/managers.py
LearningProxyManager.get_objective_bank_hierarchy_session
def get_objective_bank_hierarchy_session(self, proxy): """Gets the session traversing objective bank hierarchies. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankHierarchySession`` :rtype: ``osid.learning.ObjectiveBankHierarchySession`` ...
python
def get_objective_bank_hierarchy_session(self, proxy): """Gets the session traversing objective bank hierarchies. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankHierarchySession`` :rtype: ``osid.learning.ObjectiveBankHierarchySession`` ...
[ "def", "get_objective_bank_hierarchy_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_objective_bank_hierarchy", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "Import...
Gets the session traversing objective bank hierarchies. :param proxy: a proxy :type proxy: ``osid.proxy.Proxy`` :return: an ``ObjectiveBankHierarchySession`` :rtype: ``osid.learning.ObjectiveBankHierarchySession`` :raise: ``NullArgument`` -- ``proxy`` is ``null`` :raise:...
[ "Gets", "the", "session", "traversing", "objective", "bank", "hierarchies", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/managers.py#L3926-L3951
ascribe/pyspool
spool/spool.py
Spool.register_piece
def register_piece(self, from_address, to_address, hash, password, min_confirmations=6, sync=False, ownership=True): """ Register a piece Args: from_address (Tuple[str]): Federation address. All register transactions originate from the the Federation wallet ...
python
def register_piece(self, from_address, to_address, hash, password, min_confirmations=6, sync=False, ownership=True): """ Register a piece Args: from_address (Tuple[str]): Federation address. All register transactions originate from the the Federation wallet ...
[ "def", "register_piece", "(", "self", ",", "from_address", ",", "to_address", ",", "hash", ",", "password", ",", "min_confirmations", "=", "6", ",", "sync", "=", "False", ",", "ownership", "=", "True", ")", ":", "file_hash", ",", "file_hash_metadata", "=", ...
Register a piece Args: from_address (Tuple[str]): Federation address. All register transactions originate from the the Federation wallet to_address (str): Address registering the edition hash (Tuple[str]): Hash of the piece. (file_hash, file_hash_metadata) ...
[ "Register", "a", "piece" ]
train
https://github.com/ascribe/pyspool/blob/f8b10df1e7d2ea7950dde433c1cb6d5225112f4f/spool/spool.py#L99-L133
ascribe/pyspool
spool/spool.py
Spool.refill_main_wallet
def refill_main_wallet(self, from_address, to_address, nfees, ntokens, password, min_confirmations=6, sync=False): """ Refill the Federation wallet with tokens and fees. This keeps the federation wallet clean. Dealing with exact values simplifies the transactions. No need to calculate change. Ea...
python
def refill_main_wallet(self, from_address, to_address, nfees, ntokens, password, min_confirmations=6, sync=False): """ Refill the Federation wallet with tokens and fees. This keeps the federation wallet clean. Dealing with exact values simplifies the transactions. No need to calculate change. Ea...
[ "def", "refill_main_wallet", "(", "self", ",", "from_address", ",", "to_address", ",", "nfees", ",", "ntokens", ",", "password", ",", "min_confirmations", "=", "6", ",", "sync", "=", "False", ")", ":", "path", ",", "from_address", "=", "from_address", "unsig...
Refill the Federation wallet with tokens and fees. This keeps the federation wallet clean. Dealing with exact values simplifies the transactions. No need to calculate change. Easier to keep track of the unspents and prevent double spends that would result in transactions being rejected by the bitcoin ne...
[ "Refill", "the", "Federation", "wallet", "with", "tokens", "and", "fees", ".", "This", "keeps", "the", "federation", "wallet", "clean", ".", "Dealing", "with", "exact", "values", "simplifies", "the", "transactions", ".", "No", "need", "to", "calculate", "chang...
train
https://github.com/ascribe/pyspool/blob/f8b10df1e7d2ea7950dde433c1cb6d5225112f4f/spool/spool.py#L390-L417
ascribe/pyspool
spool/spool.py
Spool.refill
def refill(self, from_address, to_address, nfees, ntokens, password, min_confirmations=6, sync=False): """ Refill wallets with the necessary fuel to perform spool transactions Args: from_address (Tuple[str]): Federation wallet address. Fuels the wallets with tokens and fees. All tra...
python
def refill(self, from_address, to_address, nfees, ntokens, password, min_confirmations=6, sync=False): """ Refill wallets with the necessary fuel to perform spool transactions Args: from_address (Tuple[str]): Federation wallet address. Fuels the wallets with tokens and fees. All tra...
[ "def", "refill", "(", "self", ",", "from_address", ",", "to_address", ",", "nfees", ",", "ntokens", ",", "password", ",", "min_confirmations", "=", "6", ",", "sync", "=", "False", ")", ":", "path", ",", "from_address", "=", "from_address", "verb", "=", "...
Refill wallets with the necessary fuel to perform spool transactions Args: from_address (Tuple[str]): Federation wallet address. Fuels the wallets with tokens and fees. All transactions to wallets holding a particular piece should come from the Federation wallet to_addre...
[ "Refill", "wallets", "with", "the", "necessary", "fuel", "to", "perform", "spool", "transactions" ]
train
https://github.com/ascribe/pyspool/blob/f8b10df1e7d2ea7950dde433c1cb6d5225112f4f/spool/spool.py#L420-L449
ascribe/pyspool
spool/spool.py
Spool.simple_spool_transaction
def simple_spool_transaction(self, from_address, to, op_return, min_confirmations=6): """ Utililty function to create the spool transactions. Selects the inputs, encodes the op_return and constructs the transaction. Args: from_address (str): Address originating the transacti...
python
def simple_spool_transaction(self, from_address, to, op_return, min_confirmations=6): """ Utililty function to create the spool transactions. Selects the inputs, encodes the op_return and constructs the transaction. Args: from_address (str): Address originating the transacti...
[ "def", "simple_spool_transaction", "(", "self", ",", "from_address", ",", "to", ",", "op_return", ",", "min_confirmations", "=", "6", ")", ":", "# list of addresses to send", "ntokens", "=", "len", "(", "to", ")", "nfees", "=", "old_div", "(", "self", ".", "...
Utililty function to create the spool transactions. Selects the inputs, encodes the op_return and constructs the transaction. Args: from_address (str): Address originating the transaction to (str): list of addresses to receive tokens (file_hash, file_hash_metadata, ...) ...
[ "Utililty", "function", "to", "create", "the", "spool", "transactions", ".", "Selects", "the", "inputs", "encodes", "the", "op_return", "and", "constructs", "the", "transaction", "." ]
train
https://github.com/ascribe/pyspool/blob/f8b10df1e7d2ea7950dde433c1cb6d5225112f4f/spool/spool.py#L451-L475
ascribe/pyspool
spool/spool.py
Spool.select_inputs
def select_inputs(self, address, nfees, ntokens, min_confirmations=6): """ Selects the inputs for the spool transaction. Args: address (str): bitcoin address to select inputs for nfees (int): number of fees ntokens (int): number of tokens min_conf...
python
def select_inputs(self, address, nfees, ntokens, min_confirmations=6): """ Selects the inputs for the spool transaction. Args: address (str): bitcoin address to select inputs for nfees (int): number of fees ntokens (int): number of tokens min_conf...
[ "def", "select_inputs", "(", "self", ",", "address", ",", "nfees", ",", "ntokens", ",", "min_confirmations", "=", "6", ")", ":", "unspents", "=", "self", ".", "_t", ".", "get", "(", "address", ",", "min_confirmations", "=", "min_confirmations", ")", "[", ...
Selects the inputs for the spool transaction. Args: address (str): bitcoin address to select inputs for nfees (int): number of fees ntokens (int): number of tokens min_confirmations (Optional[int]): minimum number of required confirmations; defaul...
[ "Selects", "the", "inputs", "for", "the", "spool", "transaction", "." ]
train
https://github.com/ascribe/pyspool/blob/f8b10df1e7d2ea7950dde433c1cb6d5225112f4f/spool/spool.py#L477-L502
mitsei/dlkit
dlkit/records/assessment/edx/item_records.py
edXItemRecord.get_edxml
def get_edxml(self): """stub""" if self.has_raw_edxml(): has_python = False my_files = self.my_osid_object.object_map['fileIds'] raw_text = self.get_text('edxml').text soup = BeautifulSoup(raw_text, 'xml') # replace all file listings with an ap...
python
def get_edxml(self): """stub""" if self.has_raw_edxml(): has_python = False my_files = self.my_osid_object.object_map['fileIds'] raw_text = self.get_text('edxml').text soup = BeautifulSoup(raw_text, 'xml') # replace all file listings with an ap...
[ "def", "get_edxml", "(", "self", ")", ":", "if", "self", ".", "has_raw_edxml", "(", ")", ":", "has_python", "=", "False", "my_files", "=", "self", ".", "my_osid_object", ".", "object_map", "[", "'fileIds'", "]", "raw_text", "=", "self", ".", "get_text", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/edx/item_records.py#L76-L171
mitsei/dlkit
dlkit/records/assessment/edx/item_records.py
edXItemRecord.get_edxml_with_aws_urls
def get_edxml_with_aws_urls(self): """stub""" edxml = self.get_edxml() soup = BeautifulSoup(edxml, 'xml') attrs = { 'draggable': 'icon', 'drag_and_drop_input': 'img', 'files': 'included_files', 'img': 'src' } # replace all ...
python
def get_edxml_with_aws_urls(self): """stub""" edxml = self.get_edxml() soup = BeautifulSoup(edxml, 'xml') attrs = { 'draggable': 'icon', 'drag_and_drop_input': 'img', 'files': 'included_files', 'img': 'src' } # replace all ...
[ "def", "get_edxml_with_aws_urls", "(", "self", ")", ":", "edxml", "=", "self", ".", "get_edxml", "(", ")", "soup", "=", "BeautifulSoup", "(", "edxml", ",", "'xml'", ")", "attrs", "=", "{", "'draggable'", ":", "'icon'", ",", "'drag_and_drop_input'", ":", "'...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/edx/item_records.py#L173-L194
mitsei/dlkit
dlkit/records/assessment/edx/item_records.py
edXItemRecord.get_xproblem
def get_xproblem(self, parameters=None): """stub""" if not self.get_text('python_script'): return self.get_text('edxml').text if not parameters: parameters = self.get_parameters() return self._get_parameterized_text(parameters)
python
def get_xproblem(self, parameters=None): """stub""" if not self.get_text('python_script'): return self.get_text('edxml').text if not parameters: parameters = self.get_parameters() return self._get_parameterized_text(parameters)
[ "def", "get_xproblem", "(", "self", ",", "parameters", "=", "None", ")", ":", "if", "not", "self", ".", "get_text", "(", "'python_script'", ")", ":", "return", "self", ".", "get_text", "(", "'edxml'", ")", ".", "text", "if", "not", "parameters", ":", "...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/edx/item_records.py#L299-L305
mitsei/dlkit
dlkit/records/assessment/edx/item_records.py
edXItemRecord.get_solution
def get_solution(self, parameters=None): """stub""" if not self.has_solution(): raise IllegalState() try: if not self.get_text('python_script'): return self.get_text('solution').text if not parameters: parameters = self.get_para...
python
def get_solution(self, parameters=None): """stub""" if not self.has_solution(): raise IllegalState() try: if not self.get_text('python_script'): return self.get_text('solution').text if not parameters: parameters = self.get_para...
[ "def", "get_solution", "(", "self", ",", "parameters", "=", "None", ")", ":", "if", "not", "self", ".", "has_solution", "(", ")", ":", "raise", "IllegalState", "(", ")", "try", ":", "if", "not", "self", ".", "get_text", "(", "'python_script'", ")", ":"...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/edx/item_records.py#L313-L324
mitsei/dlkit
dlkit/records/assessment/edx/item_records.py
edXItemRecord.get_parameters
def get_parameters(self): """stub""" if not self.is_parameterized(): raise IllegalState() if not self.get_text('python_script'): return dict() import imp from types import ModuleType, FunctionType script_module = imp.new_module('script_module') ...
python
def get_parameters(self): """stub""" if not self.is_parameterized(): raise IllegalState() if not self.get_text('python_script'): return dict() import imp from types import ModuleType, FunctionType script_module = imp.new_module('script_module') ...
[ "def", "get_parameters", "(", "self", ")", ":", "if", "not", "self", ".", "is_parameterized", "(", ")", ":", "raise", "IllegalState", "(", ")", "if", "not", "self", ".", "get_text", "(", "'python_script'", ")", ":", "return", "dict", "(", ")", "import", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/edx/item_records.py#L332-L348
mitsei/dlkit
dlkit/records/assessment/edx/item_records.py
edXItemRecord._get_parameterized_text
def _get_parameterized_text(self, parameters): """stub""" text = self.get_text('edxml').text done = False while not done: result = re.search(r'\$\w+', text) if result: replacement = str(parameters[result.group()[1:]]) text = text.re...
python
def _get_parameterized_text(self, parameters): """stub""" text = self.get_text('edxml').text done = False while not done: result = re.search(r'\$\w+', text) if result: replacement = str(parameters[result.group()[1:]]) text = text.re...
[ "def", "_get_parameterized_text", "(", "self", ",", "parameters", ")", ":", "text", "=", "self", ".", "get_text", "(", "'edxml'", ")", ".", "text", "done", "=", "False", "while", "not", "done", ":", "result", "=", "re", ".", "search", "(", "r'\\$\\w+'", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/edx/item_records.py#L350-L361
mitsei/dlkit
dlkit/records/assessment/edx/item_records.py
edXItemFormRecord._init_map
def _init_map(self): """Have to call these all separately because they are "end" classes, with no super() in them. Non-cooperative.""" ItemTextsFormRecord._init_map(self) ItemFilesFormRecord._init_map(self) edXBaseFormRecord._init_map(self) IRTItemFormRecord._init_map(sel...
python
def _init_map(self): """Have to call these all separately because they are "end" classes, with no super() in them. Non-cooperative.""" ItemTextsFormRecord._init_map(self) ItemFilesFormRecord._init_map(self) edXBaseFormRecord._init_map(self) IRTItemFormRecord._init_map(sel...
[ "def", "_init_map", "(", "self", ")", ":", "ItemTextsFormRecord", ".", "_init_map", "(", "self", ")", "ItemFilesFormRecord", ".", "_init_map", "(", "self", ")", "edXBaseFormRecord", ".", "_init_map", "(", "self", ")", "IRTItemFormRecord", ".", "_init_map", "(", ...
Have to call these all separately because they are "end" classes, with no super() in them. Non-cooperative.
[ "Have", "to", "call", "these", "all", "separately", "because", "they", "are", "end", "classes", "with", "no", "super", "()", "in", "them", ".", "Non", "-", "cooperative", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/edx/item_records.py#L404-L413
mitsei/dlkit
dlkit/records/assessment/edx/item_records.py
edXItemFormRecord._init_metadata
def _init_metadata(self): """Have to call these all separately because they are "end" classes, with no super() in them. Non-cooperative.""" ItemTextsFormRecord._init_metadata(self) ItemFilesFormRecord._init_metadata(self) edXBaseFormRecord._init_metadata(self) IRTItemForm...
python
def _init_metadata(self): """Have to call these all separately because they are "end" classes, with no super() in them. Non-cooperative.""" ItemTextsFormRecord._init_metadata(self) ItemFilesFormRecord._init_metadata(self) edXBaseFormRecord._init_metadata(self) IRTItemForm...
[ "def", "_init_metadata", "(", "self", ")", ":", "ItemTextsFormRecord", ".", "_init_metadata", "(", "self", ")", "ItemFilesFormRecord", ".", "_init_metadata", "(", "self", ")", "edXBaseFormRecord", ".", "_init_metadata", "(", "self", ")", "IRTItemFormRecord", ".", ...
Have to call these all separately because they are "end" classes, with no super() in them. Non-cooperative.
[ "Have", "to", "call", "these", "all", "separately", "because", "they", "are", "end", "classes", "with", "no", "super", "()", "in", "them", ".", "Non", "-", "cooperative", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/edx/item_records.py#L415-L424
ayust/kitnirc
kitnirc/contrib/admintools.py
is_admin
def is_admin(controller, client, actor): """Used to determine whether someone issuing a command is an admin. By default, checks to see if there's a line of the type nick=host that matches the command's actor in the [admins] section of the config file, or a key that matches the entire mask (e.g. "foo@ba...
python
def is_admin(controller, client, actor): """Used to determine whether someone issuing a command is an admin. By default, checks to see if there's a line of the type nick=host that matches the command's actor in the [admins] section of the config file, or a key that matches the entire mask (e.g. "foo@ba...
[ "def", "is_admin", "(", "controller", ",", "client", ",", "actor", ")", ":", "config", "=", "controller", ".", "config", "if", "not", "config", ".", "has_section", "(", "\"admins\"", ")", ":", "logging", ".", "debug", "(", "\"Ignoring is_admin check - no [admi...
Used to determine whether someone issuing a command is an admin. By default, checks to see if there's a line of the type nick=host that matches the command's actor in the [admins] section of the config file, or a key that matches the entire mask (e.g. "foo@bar" or "foo@bar=1").
[ "Used", "to", "determine", "whether", "someone", "issuing", "a", "command", "is", "an", "admin", "." ]
train
https://github.com/ayust/kitnirc/blob/cf19fe39219da75f053e1a3976bf21331b6fefea/kitnirc/contrib/admintools.py#L11-L30
mitsei/dlkit
dlkit/json_/assessment/searches.py
ItemSearchResults.get_items
def get_items(self): """Gets the item list resulting from the search. return: (osid.assessment.ItemList) - the item list raise: IllegalState - the item list has already been retrieved *compliance: mandatory -- This method must be implemented.* """ if self.retrieved: ...
python
def get_items(self): """Gets the item list resulting from the search. return: (osid.assessment.ItemList) - the item list raise: IllegalState - the item list has already been retrieved *compliance: mandatory -- This method must be implemented.* """ if self.retrieved: ...
[ "def", "get_items", "(", "self", ")", ":", "if", "self", ".", "retrieved", ":", "raise", "errors", ".", "IllegalState", "(", "'List has already been retrieved.'", ")", "self", ".", "retrieved", "=", "True", "return", "objects", ".", "ItemList", "(", "self", ...
Gets the item list resulting from the search. return: (osid.assessment.ItemList) - the item list raise: IllegalState - the item list has already been retrieved *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "item", "list", "resulting", "from", "the", "search", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/searches.py#L95-L106
mitsei/dlkit
dlkit/json_/assessment/searches.py
AssessmentSearchResults.get_assessments
def get_assessments(self): """Gets the assessment list resulting from the search. return: (osid.assessment.AssessmentList) - the assessment list raise: IllegalState - the assessment list has already been retrieved *compliance: mandatory -- This method must be implemente...
python
def get_assessments(self): """Gets the assessment list resulting from the search. return: (osid.assessment.AssessmentList) - the assessment list raise: IllegalState - the assessment list has already been retrieved *compliance: mandatory -- This method must be implemente...
[ "def", "get_assessments", "(", "self", ")", ":", "if", "self", ".", "retrieved", ":", "raise", "errors", ".", "IllegalState", "(", "'List has already been retrieved.'", ")", "self", ".", "retrieved", "=", "True", "return", "objects", ".", "AssessmentList", "(", ...
Gets the assessment list resulting from the search. return: (osid.assessment.AssessmentList) - the assessment list raise: IllegalState - the assessment list has already been retrieved *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "assessment", "list", "resulting", "from", "the", "search", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/searches.py#L218-L230
mitsei/dlkit
dlkit/json_/assessment/searches.py
AssessmentOfferedSearchResults.get_assessments_offered
def get_assessments_offered(self): """Gets the assessment offered list resulting from the search. return: (osid.assessment.AssessmentOfferedList) - the assessment offered list raise: IllegalState - the assessment offered list has already been retrieved *...
python
def get_assessments_offered(self): """Gets the assessment offered list resulting from the search. return: (osid.assessment.AssessmentOfferedList) - the assessment offered list raise: IllegalState - the assessment offered list has already been retrieved *...
[ "def", "get_assessments_offered", "(", "self", ")", ":", "if", "self", ".", "retrieved", ":", "raise", "errors", ".", "IllegalState", "(", "'List has already been retrieved.'", ")", "self", ".", "retrieved", "=", "True", "return", "objects", ".", "AssessmentOffere...
Gets the assessment offered list resulting from the search. return: (osid.assessment.AssessmentOfferedList) - the assessment offered list raise: IllegalState - the assessment offered list has already been retrieved *compliance: mandatory -- This method must be i...
[ "Gets", "the", "assessment", "offered", "list", "resulting", "from", "the", "search", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/searches.py#L345-L358
mitsei/dlkit
dlkit/json_/assessment/searches.py
AssessmentTakenSearchResults.get_assessments_taken
def get_assessments_taken(self): """Gets the assessment taken list resulting from the search. return: (osid.assessment.AssessmentTakenList) - the assessment taken list raise: IllegalState - the assessment taken list has already been retrieved *compliance...
python
def get_assessments_taken(self): """Gets the assessment taken list resulting from the search. return: (osid.assessment.AssessmentTakenList) - the assessment taken list raise: IllegalState - the assessment taken list has already been retrieved *compliance...
[ "def", "get_assessments_taken", "(", "self", ")", ":", "if", "self", ".", "retrieved", ":", "raise", "errors", ".", "IllegalState", "(", "'List has already been retrieved.'", ")", "self", ".", "retrieved", "=", "True", "return", "objects", ".", "AssessmentTakenLis...
Gets the assessment taken list resulting from the search. return: (osid.assessment.AssessmentTakenList) - the assessment taken list raise: IllegalState - the assessment taken list has already been retrieved *compliance: mandatory -- This method must be implement...
[ "Gets", "the", "assessment", "taken", "list", "resulting", "from", "the", "search", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/searches.py#L474-L487
mitsei/dlkit
dlkit/json_/assessment/searches.py
BankSearchResults.get_banks
def get_banks(self): """Gets the bank list resulting from a search. return: (osid.assessment.BankList) - the bank list raise: IllegalState - the bank list has already been retrieved *compliance: mandatory -- This method must be implemented.* """ if self.retrieved: ...
python
def get_banks(self): """Gets the bank list resulting from a search. return: (osid.assessment.BankList) - the bank list raise: IllegalState - the bank list has already been retrieved *compliance: mandatory -- This method must be implemented.* """ if self.retrieved: ...
[ "def", "get_banks", "(", "self", ")", ":", "if", "self", ".", "retrieved", ":", "raise", "errors", ".", "IllegalState", "(", "'List has already been retrieved.'", ")", "self", ".", "retrieved", "=", "True", "return", "objects", ".", "BankList", "(", "self", ...
Gets the bank list resulting from a search. return: (osid.assessment.BankList) - the bank list raise: IllegalState - the bank list has already been retrieved *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "bank", "list", "resulting", "from", "a", "search", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/searches.py#L599-L610
jason-weirather/py-seq-tools
seqtools/graph/__init__.py
Graph.roots
def roots(self): """get the nodes with no children""" return [x for x in self._nodes.values() if x.id not in self._c2p]
python
def roots(self): """get the nodes with no children""" return [x for x in self._nodes.values() if x.id not in self._c2p]
[ "def", "roots", "(", "self", ")", ":", "return", "[", "x", "for", "x", "in", "self", ".", "_nodes", ".", "values", "(", ")", "if", "x", ".", "id", "not", "in", "self", ".", "_c2p", "]" ]
get the nodes with no children
[ "get", "the", "nodes", "with", "no", "children" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/graph/__init__.py#L53-L55
jason-weirather/py-seq-tools
seqtools/graph/__init__.py
Graph.get_root_graph
def get_root_graph(self,root): """Return back a graph containing just the root and children""" children = self.get_children(root) g = Graph() nodes = [root]+children for node in nodes: g.add_node(node) node_ids = [x.id for x in nodes] edges = [x for x in self._edges.values() if...
python
def get_root_graph(self,root): """Return back a graph containing just the root and children""" children = self.get_children(root) g = Graph() nodes = [root]+children for node in nodes: g.add_node(node) node_ids = [x.id for x in nodes] edges = [x for x in self._edges.values() if...
[ "def", "get_root_graph", "(", "self", ",", "root", ")", ":", "children", "=", "self", ".", "get_children", "(", "root", ")", "g", "=", "Graph", "(", ")", "nodes", "=", "[", "root", "]", "+", "children", "for", "node", "in", "nodes", ":", "g", ".", ...
Return back a graph containing just the root and children
[ "Return", "back", "a", "graph", "containing", "just", "the", "root", "and", "children" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/graph/__init__.py#L57-L66
jason-weirather/py-seq-tools
seqtools/graph/__init__.py
Graph.merge_cycles
def merge_cycles(self): """Work on this graph and remove cycles, with nodes containing concatonated lists of payloads""" while True: ### remove any self edges own_edges = self.get_self_edges() if len(own_edges) > 0: for e in own_edges: self.remove_edge(e) c = ...
python
def merge_cycles(self): """Work on this graph and remove cycles, with nodes containing concatonated lists of payloads""" while True: ### remove any self edges own_edges = self.get_self_edges() if len(own_edges) > 0: for e in own_edges: self.remove_edge(e) c = ...
[ "def", "merge_cycles", "(", "self", ")", ":", "while", "True", ":", "### remove any self edges", "own_edges", "=", "self", ".", "get_self_edges", "(", ")", "if", "len", "(", "own_edges", ")", ">", "0", ":", "for", "e", "in", "own_edges", ":", "self", "."...
Work on this graph and remove cycles, with nodes containing concatonated lists of payloads
[ "Work", "on", "this", "graph", "and", "remove", "cycles", "with", "nodes", "containing", "concatonated", "lists", "of", "payloads" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/graph/__init__.py#L98-L111
jason-weirather/py-seq-tools
seqtools/graph/__init__.py
Graph.remove_node
def remove_node(self,node): """remove the node""" if node.id not in self._nodes: return """find edges to remove""" edges = set() for e in self._edges.values(): if e.node1.id == node.id: edges.add(e.id) if e.node2.id == node.id: edges.add(e.id) edges = [self._e...
python
def remove_node(self,node): """remove the node""" if node.id not in self._nodes: return """find edges to remove""" edges = set() for e in self._edges.values(): if e.node1.id == node.id: edges.add(e.id) if e.node2.id == node.id: edges.add(e.id) edges = [self._e...
[ "def", "remove_node", "(", "self", ",", "node", ")", ":", "if", "node", ".", "id", "not", "in", "self", ".", "_nodes", ":", "return", "\"\"\"find edges to remove\"\"\"", "edges", "=", "set", "(", ")", "for", "e", "in", "self", ".", "_edges", ".", "valu...
remove the node
[ "remove", "the", "node" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/graph/__init__.py#L119-L129
jason-weirather/py-seq-tools
seqtools/graph/__init__.py
Graph.remove_edge
def remove_edge(self,edge): """Remove the edge""" if edge.id not in self._edges: return # its not in the graph del self._p2c[edge.node1.id][edge.node2.id][edge.id] if len(self._p2c[edge.node1.id][edge.node2.id].keys()) == 0: del self._p2c[edge.node1.id][edge.node2.id] if len(self....
python
def remove_edge(self,edge): """Remove the edge""" if edge.id not in self._edges: return # its not in the graph del self._p2c[edge.node1.id][edge.node2.id][edge.id] if len(self._p2c[edge.node1.id][edge.node2.id].keys()) == 0: del self._p2c[edge.node1.id][edge.node2.id] if len(self....
[ "def", "remove_edge", "(", "self", ",", "edge", ")", ":", "if", "edge", ".", "id", "not", "in", "self", ".", "_edges", ":", "return", "# its not in the graph", "del", "self", ".", "_p2c", "[", "edge", ".", "node1", ".", "id", "]", "[", "edge", ".", ...
Remove the edge
[ "Remove", "the", "edge" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/graph/__init__.py#L131-L146
jason-weirather/py-seq-tools
seqtools/graph/__init__.py
Graph.move_edges
def move_edges(self,n1,n2): """Move edges from node 1 to node 2 Not self edges though Overwrites edges """ #Traverse edges to find incoming with n1 incoming = [] for e in self._edges.values(): if e.node2.id == n1.id: incoming.append(e) #Traverse edges to...
python
def move_edges(self,n1,n2): """Move edges from node 1 to node 2 Not self edges though Overwrites edges """ #Traverse edges to find incoming with n1 incoming = [] for e in self._edges.values(): if e.node2.id == n1.id: incoming.append(e) #Traverse edges to...
[ "def", "move_edges", "(", "self", ",", "n1", ",", "n2", ")", ":", "#Traverse edges to find incoming with n1", "incoming", "=", "[", "]", "for", "e", "in", "self", ".", "_edges", ".", "values", "(", ")", ":", "if", "e", ".", "node2", ".", "id", "==", ...
Move edges from node 1 to node 2 Not self edges though Overwrites edges
[ "Move", "edges", "from", "node", "1", "to", "node", "2", "Not", "self", "edges", "though" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/graph/__init__.py#L148-L174
jason-weirather/py-seq-tools
seqtools/graph/__init__.py
Graph.find_cycle
def find_cycle(self): """greedy search for a cycle""" for node in self.nodes: cyc = self._follow_children(node) if len(cyc) > 0: return [self._nodes[x] for x in cyc] return None
python
def find_cycle(self): """greedy search for a cycle""" for node in self.nodes: cyc = self._follow_children(node) if len(cyc) > 0: return [self._nodes[x] for x in cyc] return None
[ "def", "find_cycle", "(", "self", ")", ":", "for", "node", "in", "self", ".", "nodes", ":", "cyc", "=", "self", ".", "_follow_children", "(", "node", ")", "if", "len", "(", "cyc", ")", ">", "0", ":", "return", "[", "self", ".", "_nodes", "[", "x"...
greedy search for a cycle
[ "greedy", "search", "for", "a", "cycle" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/graph/__init__.py#L176-L182
mitsei/dlkit
dlkit/authz_adapter/authorization/sessions.py
AuthorizationSearchSession.get_authorizations_by_search
def get_authorizations_by_search(self, authorization_query, authorization_search): """Pass through to provider AuthorizationSearchSession.get_authorizations_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not...
python
def get_authorizations_by_search(self, authorization_query, authorization_search): """Pass through to provider AuthorizationSearchSession.get_authorizations_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not...
[ "def", "get_authorizations_by_search", "(", "self", ",", "authorization_query", ",", "authorization_search", ")", ":", "# Implemented from azosid template for -", "# osid.resource.ResourceSearchSession.get_resources_by_search_template", "if", "not", "self", ".", "_can", "(", "'se...
Pass through to provider AuthorizationSearchSession.get_authorizations_by_search
[ "Pass", "through", "to", "provider", "AuthorizationSearchSession", ".", "get_authorizations_by_search" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/authz_adapter/authorization/sessions.py#L444-L450
mitsei/dlkit
dlkit/authz_adapter/authorization/sessions.py
FunctionSearchSession.get_functions_by_search
def get_functions_by_search(self, function_query, function_search): """Pass through to provider FunctionSearchSession.get_functions_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not self._can('search'): ...
python
def get_functions_by_search(self, function_query, function_search): """Pass through to provider FunctionSearchSession.get_functions_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not self._can('search'): ...
[ "def", "get_functions_by_search", "(", "self", ",", "function_query", ",", "function_search", ")", ":", "# Implemented from azosid template for -", "# osid.resource.ResourceSearchSession.get_resources_by_search_template", "if", "not", "self", ".", "_can", "(", "'search'", ")", ...
Pass through to provider FunctionSearchSession.get_functions_by_search
[ "Pass", "through", "to", "provider", "FunctionSearchSession", ".", "get_functions_by_search" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/authz_adapter/authorization/sessions.py#L1253-L1259
mitsei/dlkit
dlkit/authz_adapter/authorization/sessions.py
QualifierSearchSession.get_qualifiers_by_search
def get_qualifiers_by_search(self, qualifier_query, qualifier_search): """Pass through to provider QualifierSearchSession.get_qualifiers_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not self._can('search')...
python
def get_qualifiers_by_search(self, qualifier_query, qualifier_search): """Pass through to provider QualifierSearchSession.get_qualifiers_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not self._can('search')...
[ "def", "get_qualifiers_by_search", "(", "self", ",", "qualifier_query", ",", "qualifier_search", ")", ":", "# Implemented from azosid template for -", "# osid.resource.ResourceSearchSession.get_resources_by_search_template", "if", "not", "self", ".", "_can", "(", "'search'", ")...
Pass through to provider QualifierSearchSession.get_qualifiers_by_search
[ "Pass", "through", "to", "provider", "QualifierSearchSession", ".", "get_qualifiers_by_search" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/authz_adapter/authorization/sessions.py#L1990-L1996
ilgarm/pyzimbra
pyzimbra/base.py
ZimbraClientException.print_trace
def print_trace(self): """ Prints stack trace for current exceptions chain. """ traceback.print_exc() for tb in self.tracebacks: print tb, print ''
python
def print_trace(self): """ Prints stack trace for current exceptions chain. """ traceback.print_exc() for tb in self.tracebacks: print tb, print ''
[ "def", "print_trace", "(", "self", ")", ":", "traceback", ".", "print_exc", "(", ")", "for", "tb", "in", "self", ".", "tracebacks", ":", "print", "tb", ",", "print", "''" ]
Prints stack trace for current exceptions chain.
[ "Prints", "stack", "trace", "for", "current", "exceptions", "chain", "." ]
train
https://github.com/ilgarm/pyzimbra/blob/c397bc7497554d260ec6fd1a80405aed872a70cc/pyzimbra/base.py#L82-L89
peopledoc/django-agnocomplete
docs/doc_checker.py
grep
def grep(rootdir, searched): "grep -l <searched>" to_inspect = [] for root, dirs, files in os.walk(rootdir): for _file in files: if _file.endswith('.rst'): to_inspect.append(join(root, _file)) to_check = ((_file, open(_file, 'r').read()) for _file in to_inspect) ...
python
def grep(rootdir, searched): "grep -l <searched>" to_inspect = [] for root, dirs, files in os.walk(rootdir): for _file in files: if _file.endswith('.rst'): to_inspect.append(join(root, _file)) to_check = ((_file, open(_file, 'r').read()) for _file in to_inspect) ...
[ "def", "grep", "(", "rootdir", ",", "searched", ")", ":", "to_inspect", "=", "[", "]", "for", "root", ",", "dirs", ",", "files", "in", "os", ".", "walk", "(", "rootdir", ")", ":", "for", "_file", "in", "files", ":", "if", "_file", ".", "endswith", ...
grep -l <searched>
[ "grep", "-", "l", "<searched", ">" ]
train
https://github.com/peopledoc/django-agnocomplete/blob/9bf21db2f2036ba5059b843acd32902a09192053/docs/doc_checker.py#L9-L20
manicmaniac/inline
inline.py
c
def c(source, libraries=[]): r""" >>> c('int add(int a, int b) {return a + b;}').add(40, 2) 42 >>> sqrt = c(''' ... #include <math.h> ... double _sqrt(double x) {return sqrt(x);} ... ''', ['m'])._sqrt >>> sqrt.restype = ctypes.c_double >>> sqrt(ctypes.c_double(400.0)) 20.0 ""...
python
def c(source, libraries=[]): r""" >>> c('int add(int a, int b) {return a + b;}').add(40, 2) 42 >>> sqrt = c(''' ... #include <math.h> ... double _sqrt(double x) {return sqrt(x);} ... ''', ['m'])._sqrt >>> sqrt.restype = ctypes.c_double >>> sqrt(ctypes.c_double(400.0)) 20.0 ""...
[ "def", "c", "(", "source", ",", "libraries", "=", "[", "]", ")", ":", "path", "=", "_cc_build_shared_lib", "(", "source", ",", "'.c'", ",", "libraries", ")", "return", "ctypes", ".", "cdll", ".", "LoadLibrary", "(", "path", ")" ]
r""" >>> c('int add(int a, int b) {return a + b;}').add(40, 2) 42 >>> sqrt = c(''' ... #include <math.h> ... double _sqrt(double x) {return sqrt(x);} ... ''', ['m'])._sqrt >>> sqrt.restype = ctypes.c_double >>> sqrt(ctypes.c_double(400.0)) 20.0
[ "r", ">>>", "c", "(", "int", "add", "(", "int", "a", "int", "b", ")", "{", "return", "a", "+", "b", ";", "}", ")", ".", "add", "(", "40", "2", ")", "42", ">>>", "sqrt", "=", "c", "(", "...", "#include", "<math", ".", "h", ">", "...", "dou...
train
https://github.com/manicmaniac/inline/blob/6e4dbdce20acc3c265ebbaf04109f98898a7f8f0/inline.py#L17-L30
manicmaniac/inline
inline.py
cxx
def cxx(source, libraries=[]): r""" >>> cxx('extern "C" { int add(int a, int b) {return a + b;} }').add(40, 2) 42 """ path = _cc_build_shared_lib(source, '.cc', libraries) return ctypes.cdll.LoadLibrary(path)
python
def cxx(source, libraries=[]): r""" >>> cxx('extern "C" { int add(int a, int b) {return a + b;} }').add(40, 2) 42 """ path = _cc_build_shared_lib(source, '.cc', libraries) return ctypes.cdll.LoadLibrary(path)
[ "def", "cxx", "(", "source", ",", "libraries", "=", "[", "]", ")", ":", "path", "=", "_cc_build_shared_lib", "(", "source", ",", "'.cc'", ",", "libraries", ")", "return", "ctypes", ".", "cdll", ".", "LoadLibrary", "(", "path", ")" ]
r""" >>> cxx('extern "C" { int add(int a, int b) {return a + b;} }').add(40, 2) 42
[ "r", ">>>", "cxx", "(", "extern", "C", "{", "int", "add", "(", "int", "a", "int", "b", ")", "{", "return", "a", "+", "b", ";", "}", "}", ")", ".", "add", "(", "40", "2", ")", "42" ]
train
https://github.com/manicmaniac/inline/blob/6e4dbdce20acc3c265ebbaf04109f98898a7f8f0/inline.py#L33-L39
manicmaniac/inline
inline.py
python
def python(source): r""" >>> python('def add(a, b): return a + b').add(40, 2) 42 """ obj = type('', (object,), {})() _exec(source, obj.__dict__, obj.__dict__) return obj
python
def python(source): r""" >>> python('def add(a, b): return a + b').add(40, 2) 42 """ obj = type('', (object,), {})() _exec(source, obj.__dict__, obj.__dict__) return obj
[ "def", "python", "(", "source", ")", ":", "obj", "=", "type", "(", "''", ",", "(", "object", ",", ")", ",", "{", "}", ")", "(", ")", "_exec", "(", "source", ",", "obj", ".", "__dict__", ",", "obj", ".", "__dict__", ")", "return", "obj" ]
r""" >>> python('def add(a, b): return a + b').add(40, 2) 42
[ "r", ">>>", "python", "(", "def", "add", "(", "a", "b", ")", ":", "return", "a", "+", "b", ")", ".", "add", "(", "40", "2", ")", "42" ]
train
https://github.com/manicmaniac/inline/blob/6e4dbdce20acc3c265ebbaf04109f98898a7f8f0/inline.py#L44-L51
manicmaniac/inline
inline.py
_exec
def _exec(object, globals, locals): r""" >>> d = {} >>> exec('a = 0', d, d) >>> d['a'] 0 """ if sys.version_info < (3,): exec('exec object in globals, locals') else: exec(object, globals, locals)
python
def _exec(object, globals, locals): r""" >>> d = {} >>> exec('a = 0', d, d) >>> d['a'] 0 """ if sys.version_info < (3,): exec('exec object in globals, locals') else: exec(object, globals, locals)
[ "def", "_exec", "(", "object", ",", "globals", ",", "locals", ")", ":", "if", "sys", ".", "version_info", "<", "(", "3", ",", ")", ":", "exec", "(", "'exec object in globals, locals'", ")", "else", ":", "exec", "(", "object", ",", "globals", ",", "loca...
r""" >>> d = {} >>> exec('a = 0', d, d) >>> d['a'] 0
[ "r", ">>>", "d", "=", "{}", ">>>", "exec", "(", "a", "=", "0", "d", "d", ")", ">>>", "d", "[", "a", "]", "0" ]
train
https://github.com/manicmaniac/inline/blob/6e4dbdce20acc3c265ebbaf04109f98898a7f8f0/inline.py#L72-L82
mitsei/dlkit
dlkit/handcar/type/managers.py
TypeManager.get_type_lookup_session
def get_type_lookup_session(self): """Gets the OsidSession associated with the type lookup service. return: (osid.type.TypeLookupSession) - a TypeLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_type_lookup() is false compliance...
python
def get_type_lookup_session(self): """Gets the OsidSession associated with the type lookup service. return: (osid.type.TypeLookupSession) - a TypeLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_type_lookup() is false compliance...
[ "def", "get_type_lookup_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_type_lookup", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# OperationFail...
Gets the OsidSession associated with the type lookup service. return: (osid.type.TypeLookupSession) - a TypeLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_type_lookup() is false compliance: optional - This method must be implemented i...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "type", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/type/managers.py#L48-L68
mitsei/dlkit
dlkit/handcar/type/managers.py
TypeManager.get_type_admin_session
def get_type_admin_session(self): """Gets the OsidSession associated with the type admin service. return: (osid.type.TypeAdminSession) - a TypeAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_type_admin() is false compliance: opt...
python
def get_type_admin_session(self): """Gets the OsidSession associated with the type admin service. return: (osid.type.TypeAdminSession) - a TypeAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_type_admin() is false compliance: opt...
[ "def", "get_type_admin_session", "(", "self", ")", ":", "pass", "if", "not", "self", ".", "supports_type_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# Opera...
Gets the OsidSession associated with the type admin service. return: (osid.type.TypeAdminSession) - a TypeAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_type_admin() is false compliance: optional - This method must be implemented if ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "type", "admin", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/type/managers.py#L72-L93
jason-weirather/py-seq-tools
seqtools/format/bed.py
Bed12._line_to_entry
def _line_to_entry(self,line): """parse the line into entries and keys""" f = line.rstrip().split("\t") """ 'chrom' 'chromStart' 'chromEnd' 'name' 'score' 'strand' 'thickStart' 'thickEnd' 'itemRgb' 'blockCount' 'blockSizes' 'blockStarts' """ return Bed...
python
def _line_to_entry(self,line): """parse the line into entries and keys""" f = line.rstrip().split("\t") """ 'chrom' 'chromStart' 'chromEnd' 'name' 'score' 'strand' 'thickStart' 'thickEnd' 'itemRgb' 'blockCount' 'blockSizes' 'blockStarts' """ return Bed...
[ "def", "_line_to_entry", "(", "self", ",", "line", ")", ":", "f", "=", "line", ".", "rstrip", "(", ")", ".", "split", "(", "\"\\t\"", ")", "\"\"\"\n 'chrom'\n 'chromStart'\n 'chromEnd'\n 'name'\n 'score'\n 'strand'\n 'thickStart'\n 'thickEnd'\n 'ite...
parse the line into entries and keys
[ "parse", "the", "line", "into", "entries", "and", "keys" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/bed.py#L79-L108
python-odin/odinweb
odinweb/data_structures.py
_to_swagger
def _to_swagger(base=None, description=None, resource=None, options=None): # type: (Dict[str, str], str, Resource, Dict[str, str]) -> Dict[str, str] """ Common to swagger definition. :param base: The base dict. :param description: An optional description. :param resource: An optional resource. ...
python
def _to_swagger(base=None, description=None, resource=None, options=None): # type: (Dict[str, str], str, Resource, Dict[str, str]) -> Dict[str, str] """ Common to swagger definition. :param base: The base dict. :param description: An optional description. :param resource: An optional resource. ...
[ "def", "_to_swagger", "(", "base", "=", "None", ",", "description", "=", "None", ",", "resource", "=", "None", ",", "options", "=", "None", ")", ":", "# type: (Dict[str, str], str, Resource, Dict[str, str]) -> Dict[str, str]", "definition", "=", "dict_filter", "(", ...
Common to swagger definition. :param base: The base dict. :param description: An optional description. :param resource: An optional resource. :param options: Any additional options
[ "Common", "to", "swagger", "definition", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L211-L234
python-odin/odinweb
odinweb/data_structures.py
UrlPath.from_object
def from_object(cls, obj): # type: (Any) -> UrlPath """ Attempt to convert any object into a UrlPath. Raise a value error if this is not possible. """ if isinstance(obj, UrlPath): return obj if isinstance(obj, _compat.string_types): return...
python
def from_object(cls, obj): # type: (Any) -> UrlPath """ Attempt to convert any object into a UrlPath. Raise a value error if this is not possible. """ if isinstance(obj, UrlPath): return obj if isinstance(obj, _compat.string_types): return...
[ "def", "from_object", "(", "cls", ",", "obj", ")", ":", "# type: (Any) -> UrlPath", "if", "isinstance", "(", "obj", ",", "UrlPath", ")", ":", "return", "obj", "if", "isinstance", "(", "obj", ",", "_compat", ".", "string_types", ")", ":", "return", "UrlPath...
Attempt to convert any object into a UrlPath. Raise a value error if this is not possible.
[ "Attempt", "to", "convert", "any", "object", "into", "a", "UrlPath", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L248-L263
python-odin/odinweb
odinweb/data_structures.py
UrlPath.parse
def parse(cls, url_path): # type: (str) -> UrlPath """ Parse a string into a URL path (simple eg does not support typing of URL parameters) """ if not url_path: return cls() nodes = [] for node in url_path.rstrip('/').split('/'): # Identif...
python
def parse(cls, url_path): # type: (str) -> UrlPath """ Parse a string into a URL path (simple eg does not support typing of URL parameters) """ if not url_path: return cls() nodes = [] for node in url_path.rstrip('/').split('/'): # Identif...
[ "def", "parse", "(", "cls", ",", "url_path", ")", ":", "# type: (str) -> UrlPath", "if", "not", "url_path", ":", "return", "cls", "(", ")", "nodes", "=", "[", "]", "for", "node", "in", "url_path", ".", "rstrip", "(", "'/'", ")", ".", "split", "(", "'...
Parse a string into a URL path (simple eg does not support typing of URL parameters)
[ "Parse", "a", "string", "into", "a", "URL", "path", "(", "simple", "eg", "does", "not", "support", "typing", "of", "URL", "parameters", ")" ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L266-L295
python-odin/odinweb
odinweb/data_structures.py
UrlPath.startswith
def startswith(self, other): # type: (UrlPath) -> bool """ Return True if this path starts with the other path. """ try: other = UrlPath.from_object(other) except ValueError: raise TypeError('startswith first arg must be UrlPath, str, PathParam, no...
python
def startswith(self, other): # type: (UrlPath) -> bool """ Return True if this path starts with the other path. """ try: other = UrlPath.from_object(other) except ValueError: raise TypeError('startswith first arg must be UrlPath, str, PathParam, no...
[ "def", "startswith", "(", "self", ",", "other", ")", ":", "# type: (UrlPath) -> bool", "try", ":", "other", "=", "UrlPath", ".", "from_object", "(", "other", ")", "except", "ValueError", ":", "raise", "TypeError", "(", "'startswith first arg must be UrlPath, str, Pa...
Return True if this path starts with the other path.
[ "Return", "True", "if", "this", "path", "starts", "with", "the", "other", "path", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L344-L354
python-odin/odinweb
odinweb/data_structures.py
UrlPath.apply_args
def apply_args(self, **kwargs): # type: (**str) -> UrlPath """ Apply formatting to each path node. This is used to apply a name to nodes (used to apply key names) eg: >>> a = UrlPath("foo", PathParam('{key_field}'), "bar") >>> b = a.apply_args(id="item_id") >>> ...
python
def apply_args(self, **kwargs): # type: (**str) -> UrlPath """ Apply formatting to each path node. This is used to apply a name to nodes (used to apply key names) eg: >>> a = UrlPath("foo", PathParam('{key_field}'), "bar") >>> b = a.apply_args(id="item_id") >>> ...
[ "def", "apply_args", "(", "self", ",", "*", "*", "kwargs", ")", ":", "# type: (**str) -> UrlPath", "def", "apply_format", "(", "node", ")", ":", "if", "isinstance", "(", "node", ",", "PathParam", ")", ":", "return", "PathParam", "(", "node", ".", "name", ...
Apply formatting to each path node. This is used to apply a name to nodes (used to apply key names) eg: >>> a = UrlPath("foo", PathParam('{key_field}'), "bar") >>> b = a.apply_args(id="item_id") >>> b.format() 'foo/{item_id}/bar'
[ "Apply", "formatting", "to", "each", "path", "node", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L356-L374
python-odin/odinweb
odinweb/data_structures.py
UrlPath.odinweb_node_formatter
def odinweb_node_formatter(path_node): # type: (PathParam) -> str """ Format a node to be consumable by the `UrlPath.parse`. """ args = [path_node.name] if path_node.type: args.append(path_node.type.name) if path_node.type_args: args.append...
python
def odinweb_node_formatter(path_node): # type: (PathParam) -> str """ Format a node to be consumable by the `UrlPath.parse`. """ args = [path_node.name] if path_node.type: args.append(path_node.type.name) if path_node.type_args: args.append...
[ "def", "odinweb_node_formatter", "(", "path_node", ")", ":", "# type: (PathParam) -> str", "args", "=", "[", "path_node", ".", "name", "]", "if", "path_node", ".", "type", ":", "args", ".", "append", "(", "path_node", ".", "type", ".", "name", ")", "if", "...
Format a node to be consumable by the `UrlPath.parse`.
[ "Format", "a", "node", "to", "be", "consumable", "by", "the", "UrlPath", ".", "parse", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L392-L402
python-odin/odinweb
odinweb/data_structures.py
UrlPath.format
def format(self, node_formatter=None, separator='/'): # type: (Optional[Callable[[PathParam], str]]) -> str """ Format a URL path. An optional `node_parser(PathNode)` can be supplied for converting a `PathNode` into a string to support the current web framework. ...
python
def format(self, node_formatter=None, separator='/'): # type: (Optional[Callable[[PathParam], str]]) -> str """ Format a URL path. An optional `node_parser(PathNode)` can be supplied for converting a `PathNode` into a string to support the current web framework. ...
[ "def", "format", "(", "self", ",", "node_formatter", "=", "None", ",", "separator", "=", "'/'", ")", ":", "# type: (Optional[Callable[[PathParam], str]]) -> str", "if", "self", ".", "_nodes", "==", "(", "''", ",", ")", ":", "return", "separator", "else", ":", ...
Format a URL path. An optional `node_parser(PathNode)` can be supplied for converting a `PathNode` into a string to support the current web framework.
[ "Format", "a", "URL", "path", ".", "An", "optional", "node_parser", "(", "PathNode", ")", "can", "be", "supplied", "for", "converting", "a", "PathNode", "into", "a", "string", "to", "support", "the", "current", "web", "framework", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L404-L417
python-odin/odinweb
odinweb/data_structures.py
Param.path
def path(cls, name, type_=Type.String, description=None, default=None, minimum=None, maximum=None, enum=None, **options): """ Define a path parameter """ if minimum is not None and maximum is not None and minimum > maximum: raise ValueError("Minimum must be less ...
python
def path(cls, name, type_=Type.String, description=None, default=None, minimum=None, maximum=None, enum=None, **options): """ Define a path parameter """ if minimum is not None and maximum is not None and minimum > maximum: raise ValueError("Minimum must be less ...
[ "def", "path", "(", "cls", ",", "name", ",", "type_", "=", "Type", ".", "String", ",", "description", "=", "None", ",", "default", "=", "None", ",", "minimum", "=", "None", ",", "maximum", "=", "None", ",", "enum", "=", "None", ",", "*", "*", "op...
Define a path parameter
[ "Define", "a", "path", "parameter" ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L430-L439
python-odin/odinweb
odinweb/data_structures.py
Param.query
def query(cls, name, type_=Type.String, description=None, required=None, default=None, minimum=None, maximum=None, enum=None, **options): """ Define a query parameter """ if minimum is not None and maximum is not None and minimum > maximum: raise ValueError("Min...
python
def query(cls, name, type_=Type.String, description=None, required=None, default=None, minimum=None, maximum=None, enum=None, **options): """ Define a query parameter """ if minimum is not None and maximum is not None and minimum > maximum: raise ValueError("Min...
[ "def", "query", "(", "cls", ",", "name", ",", "type_", "=", "Type", ".", "String", ",", "description", "=", "None", ",", "required", "=", "None", ",", "default", "=", "None", ",", "minimum", "=", "None", ",", "maximum", "=", "None", ",", "enum", "=...
Define a query parameter
[ "Define", "a", "query", "parameter" ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L442-L452
python-odin/odinweb
odinweb/data_structures.py
Param.header
def header(cls, name, type_=Type.String, description=None, default=None, required=None, **options): """ Define a header parameter. """ return cls(name, In.Header, type_, None, description, required=required, default=default, **options)
python
def header(cls, name, type_=Type.String, description=None, default=None, required=None, **options): """ Define a header parameter. """ return cls(name, In.Header, type_, None, description, required=required, default=default, **options)
[ "def", "header", "(", "cls", ",", "name", ",", "type_", "=", "Type", ".", "String", ",", "description", "=", "None", ",", "default", "=", "None", ",", "required", "=", "None", ",", "*", "*", "options", ")", ":", "return", "cls", "(", "name", ",", ...
Define a header parameter.
[ "Define", "a", "header", "parameter", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L455-L461
python-odin/odinweb
odinweb/data_structures.py
Param.body
def body(cls, description=None, default=None, resource=DefaultResource, **options): """ Define body parameter. """ return cls('body', In.Body, None, resource, description, required=True, default=default, **options)
python
def body(cls, description=None, default=None, resource=DefaultResource, **options): """ Define body parameter. """ return cls('body', In.Body, None, resource, description, required=True, default=default, **options)
[ "def", "body", "(", "cls", ",", "description", "=", "None", ",", "default", "=", "None", ",", "resource", "=", "DefaultResource", ",", "*", "*", "options", ")", ":", "return", "cls", "(", "'body'", ",", "In", ".", "Body", ",", "None", ",", "resource"...
Define body parameter.
[ "Define", "body", "parameter", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L464-L469
python-odin/odinweb
odinweb/data_structures.py
Param.form
def form(cls, name, type_=Type.String, description=None, required=None, default=None, minimum=None, maximum=None, enum=None, **options): """ Define form parameter. """ if minimum is not None and maximum is not None and minimum > maximum: raise ValueError("Minimum...
python
def form(cls, name, type_=Type.String, description=None, required=None, default=None, minimum=None, maximum=None, enum=None, **options): """ Define form parameter. """ if minimum is not None and maximum is not None and minimum > maximum: raise ValueError("Minimum...
[ "def", "form", "(", "cls", ",", "name", ",", "type_", "=", "Type", ".", "String", ",", "description", "=", "None", ",", "required", "=", "None", ",", "default", "=", "None", ",", "minimum", "=", "None", ",", "maximum", "=", "None", ",", "enum", "="...
Define form parameter.
[ "Define", "form", "parameter", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L472-L482
python-odin/odinweb
odinweb/data_structures.py
Param.to_swagger
def to_swagger(self, bound_resource=None): """ Generate a swagger representation. """ return _to_swagger( { 'name': self.name, 'in': self.in_.value, 'type': str(self.type) if self.type else None, }, descr...
python
def to_swagger(self, bound_resource=None): """ Generate a swagger representation. """ return _to_swagger( { 'name': self.name, 'in': self.in_.value, 'type': str(self.type) if self.type else None, }, descr...
[ "def", "to_swagger", "(", "self", ",", "bound_resource", "=", "None", ")", ":", "return", "_to_swagger", "(", "{", "'name'", ":", "self", ".", "name", ",", "'in'", ":", "self", ".", "in_", ".", "value", ",", "'type'", ":", "str", "(", "self", ".", ...
Generate a swagger representation.
[ "Generate", "a", "swagger", "representation", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L507-L520
python-odin/odinweb
odinweb/data_structures.py
Response.to_swagger
def to_swagger(self, bound_resource=None): """ Generate a swagger representation. """ response_def = _to_swagger( description=self.description, resource=bound_resource if self.resource is DefaultResource else self.resource, ) status = self.status i...
python
def to_swagger(self, bound_resource=None): """ Generate a swagger representation. """ response_def = _to_swagger( description=self.description, resource=bound_resource if self.resource is DefaultResource else self.resource, ) status = self.status i...
[ "def", "to_swagger", "(", "self", ",", "bound_resource", "=", "None", ")", ":", "response_def", "=", "_to_swagger", "(", "description", "=", "self", ".", "description", ",", "resource", "=", "bound_resource", "if", "self", ".", "resource", "is", "DefaultResour...
Generate a swagger representation.
[ "Generate", "a", "swagger", "representation", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L553-L562
python-odin/odinweb
odinweb/data_structures.py
MiddlewareList.pre_request
def pre_request(self): """ List of pre-request methods from registered middleware. """ middleware = sort_by_priority(self) return tuple(m.pre_request for m in middleware if hasattr(m, 'pre_request'))
python
def pre_request(self): """ List of pre-request methods from registered middleware. """ middleware = sort_by_priority(self) return tuple(m.pre_request for m in middleware if hasattr(m, 'pre_request'))
[ "def", "pre_request", "(", "self", ")", ":", "middleware", "=", "sort_by_priority", "(", "self", ")", "return", "tuple", "(", "m", ".", "pre_request", "for", "m", "in", "middleware", "if", "hasattr", "(", "m", ",", "'pre_request'", ")", ")" ]
List of pre-request methods from registered middleware.
[ "List", "of", "pre", "-", "request", "methods", "from", "registered", "middleware", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L579-L584
python-odin/odinweb
odinweb/data_structures.py
MiddlewareList.pre_dispatch
def pre_dispatch(self): """ List of pre-dispatch methods from registered middleware. """ middleware = sort_by_priority(self) return tuple(m.pre_dispatch for m in middleware if hasattr(m, 'pre_dispatch'))
python
def pre_dispatch(self): """ List of pre-dispatch methods from registered middleware. """ middleware = sort_by_priority(self) return tuple(m.pre_dispatch for m in middleware if hasattr(m, 'pre_dispatch'))
[ "def", "pre_dispatch", "(", "self", ")", ":", "middleware", "=", "sort_by_priority", "(", "self", ")", "return", "tuple", "(", "m", ".", "pre_dispatch", "for", "m", "in", "middleware", "if", "hasattr", "(", "m", ",", "'pre_dispatch'", ")", ")" ]
List of pre-dispatch methods from registered middleware.
[ "List", "of", "pre", "-", "dispatch", "methods", "from", "registered", "middleware", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L587-L592
python-odin/odinweb
odinweb/data_structures.py
MiddlewareList.post_dispatch
def post_dispatch(self): """ List of post-dispatch methods from registered middleware. """ middleware = sort_by_priority(self, reverse=True) return tuple(m.post_dispatch for m in middleware if hasattr(m, 'post_dispatch'))
python
def post_dispatch(self): """ List of post-dispatch methods from registered middleware. """ middleware = sort_by_priority(self, reverse=True) return tuple(m.post_dispatch for m in middleware if hasattr(m, 'post_dispatch'))
[ "def", "post_dispatch", "(", "self", ")", ":", "middleware", "=", "sort_by_priority", "(", "self", ",", "reverse", "=", "True", ")", "return", "tuple", "(", "m", ".", "post_dispatch", "for", "m", "in", "middleware", "if", "hasattr", "(", "m", ",", "'post...
List of post-dispatch methods from registered middleware.
[ "List", "of", "post", "-", "dispatch", "methods", "from", "registered", "middleware", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L595-L600
python-odin/odinweb
odinweb/data_structures.py
MiddlewareList.post_swagger
def post_swagger(self): """ List of post-swagger methods from registered middleware. This is used to modify documentation (eg add/remove any extra information, provided by the middleware) """ middleware = sort_by_priority(self) return tuple(m.post_swagger for m in middl...
python
def post_swagger(self): """ List of post-swagger methods from registered middleware. This is used to modify documentation (eg add/remove any extra information, provided by the middleware) """ middleware = sort_by_priority(self) return tuple(m.post_swagger for m in middl...
[ "def", "post_swagger", "(", "self", ")", ":", "middleware", "=", "sort_by_priority", "(", "self", ")", "return", "tuple", "(", "m", ".", "post_swagger", "for", "m", "in", "middleware", "if", "hasattr", "(", "m", ",", "'post_swagger'", ")", ")" ]
List of post-swagger methods from registered middleware. This is used to modify documentation (eg add/remove any extra information, provided by the middleware)
[ "List", "of", "post", "-", "swagger", "methods", "from", "registered", "middleware", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L619-L627
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.add
def add(self, key, value): # type: (Hashable, Any) -> None """ Adds a new value for the key. :param key: the key for the value. :param value: the value to add. """ dict.setdefault(self, key, []).append(value)
python
def add(self, key, value): # type: (Hashable, Any) -> None """ Adds a new value for the key. :param key: the key for the value. :param value: the value to add. """ dict.setdefault(self, key, []).append(value)
[ "def", "add", "(", "self", ",", "key", ",", "value", ")", ":", "# type: (Hashable, Any) -> None", "dict", ".", "setdefault", "(", "self", ",", "key", ",", "[", "]", ")", ".", "append", "(", "value", ")" ]
Adds a new value for the key. :param key: the key for the value. :param value: the value to add.
[ "Adds", "a", "new", "value", "for", "the", "key", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L733-L742
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.get
def get(self, key, default=None, type_=None): """ Return the last data value for the passed key. If key doesn't exist or value is an empty list, return `default`. """ try: rv = self[key] except KeyError: return default if type_ is not None:...
python
def get(self, key, default=None, type_=None): """ Return the last data value for the passed key. If key doesn't exist or value is an empty list, return `default`. """ try: rv = self[key] except KeyError: return default if type_ is not None:...
[ "def", "get", "(", "self", ",", "key", ",", "default", "=", "None", ",", "type_", "=", "None", ")", ":", "try", ":", "rv", "=", "self", "[", "key", "]", "except", "KeyError", ":", "return", "default", "if", "type_", "is", "not", "None", ":", "try...
Return the last data value for the passed key. If key doesn't exist or value is an empty list, return `default`.
[ "Return", "the", "last", "data", "value", "for", "the", "passed", "key", ".", "If", "key", "doesn", "t", "exist", "or", "value", "is", "an", "empty", "list", "return", "default", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L744-L758
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.getlist
def getlist(self, key, type_=None): # type: (Hashable, Callable) -> List[Any] """ Return the list of items for a given key. If that key is not in the `MultiDict`, the return value will be an empty list. Just as `get` `getlist` accepts a `type` parameter. All items will be conve...
python
def getlist(self, key, type_=None): # type: (Hashable, Callable) -> List[Any] """ Return the list of items for a given key. If that key is not in the `MultiDict`, the return value will be an empty list. Just as `get` `getlist` accepts a `type` parameter. All items will be conve...
[ "def", "getlist", "(", "self", ",", "key", ",", "type_", "=", "None", ")", ":", "# type: (Hashable, Callable) -> List[Any]", "try", ":", "rv", "=", "dict", ".", "__getitem__", "(", "self", ",", "key", ")", "except", "KeyError", ":", "return", "[", "]", "...
Return the list of items for a given key. If that key is not in the `MultiDict`, the return value will be an empty list. Just as `get` `getlist` accepts a `type` parameter. All items will be converted with the callable defined there. :param key: The key to be looked up. :param...
[ "Return", "the", "list", "of", "items", "for", "a", "given", "key", ".", "If", "that", "key", "is", "not", "in", "the", "MultiDict", "the", "return", "value", "will", "be", "an", "empty", "list", ".", "Just", "as", "get", "getlist", "accepts", "a", "...
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L760-L787
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.setlist
def setlist(self, key, new_list): # type: (Hashable, List[Any]) -> None """ Remove the old values for a key and add new ones. Note that the list you pass the values in will be shallow-copied before it is inserted in the dictionary. >>> d = MultiValueDict() >>> d....
python
def setlist(self, key, new_list): # type: (Hashable, List[Any]) -> None """ Remove the old values for a key and add new ones. Note that the list you pass the values in will be shallow-copied before it is inserted in the dictionary. >>> d = MultiValueDict() >>> d....
[ "def", "setlist", "(", "self", ",", "key", ",", "new_list", ")", ":", "# type: (Hashable, List[Any]) -> None", "dict", ".", "__setitem__", "(", "self", ",", "key", ",", "list", "(", "new_list", ")", ")" ]
Remove the old values for a key and add new ones. Note that the list you pass the values in will be shallow-copied before it is inserted in the dictionary. >>> d = MultiValueDict() >>> d.setlist('foo', ['1', '2']) >>> d['foo'] '1' >>> d.getlist('foo') ['1...
[ "Remove", "the", "old", "values", "for", "a", "key", "and", "add", "new", "ones", ".", "Note", "that", "the", "list", "you", "pass", "the", "values", "in", "will", "be", "shallow", "-", "copied", "before", "it", "is", "inserted", "in", "the", "dictiona...
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L789-L805
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.setlistdefault
def setlistdefault(self, key, default_list=None): # type: (Hashable, List[Any]) -> List[Any] """ Like `setdefault` but sets multiple values. The list returned is not a copy, but the list that is actually used internally. This means that you can put new values into the dict by a...
python
def setlistdefault(self, key, default_list=None): # type: (Hashable, List[Any]) -> List[Any] """ Like `setdefault` but sets multiple values. The list returned is not a copy, but the list that is actually used internally. This means that you can put new values into the dict by a...
[ "def", "setlistdefault", "(", "self", ",", "key", ",", "default_list", "=", "None", ")", ":", "# type: (Hashable, List[Any]) -> List[Any]", "if", "key", "not", "in", "self", ":", "default_list", "=", "list", "(", "default_list", "or", "(", ")", ")", "dict", ...
Like `setdefault` but sets multiple values. The list returned is not a copy, but the list that is actually used internally. This means that you can put new values into the dict by appending items to the list: >>> d = MultiValueDict({"foo": 1}) >>> d.setlistdefault("foo").extend...
[ "Like", "setdefault", "but", "sets", "multiple", "values", ".", "The", "list", "returned", "is", "not", "a", "copy", "but", "the", "list", "that", "is", "actually", "used", "internally", ".", "This", "means", "that", "you", "can", "put", "new", "values", ...
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L824-L848
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.items
def items(self, multi=False): # type: (bool) -> Iterator[Tuple[Hashable, Any]] """ Return an iterator of ``(key, value)`` pairs. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it will only ...
python
def items(self, multi=False): # type: (bool) -> Iterator[Tuple[Hashable, Any]] """ Return an iterator of ``(key, value)`` pairs. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it will only ...
[ "def", "items", "(", "self", ",", "multi", "=", "False", ")", ":", "# type: (bool) -> Iterator[Tuple[Hashable, Any]]", "for", "key", ",", "values", "in", "iteritems", "(", "self", ")", ":", "if", "multi", ":", "for", "value", "in", "values", ":", "yield", ...
Return an iterator of ``(key, value)`` pairs. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it will only contain pairs for the lasted added of each key.
[ "Return", "an", "iterator", "of", "(", "key", "value", ")", "pairs", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L850-L864
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.sorteditems
def sorteditems(self, multi=False): # type: (bool) -> Iterator[Tuple[Hashable, Any]] """ Return an iterator of ``(key, value)`` pairs, sorted by key. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it wil...
python
def sorteditems(self, multi=False): # type: (bool) -> Iterator[Tuple[Hashable, Any]] """ Return an iterator of ``(key, value)`` pairs, sorted by key. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it wil...
[ "def", "sorteditems", "(", "self", ",", "multi", "=", "False", ")", ":", "# type: (bool) -> Iterator[Tuple[Hashable, Any]]", "for", "key", "in", "sorted", "(", "dict", ".", "keys", "(", "self", ")", ")", ":", "if", "multi", ":", "for", "value", "in", "self...
Return an iterator of ``(key, value)`` pairs, sorted by key. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it will only contain pairs for the lasted added of each key.
[ "Return", "an", "iterator", "of", "(", "key", "value", ")", "pairs", "sorted", "by", "key", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L868-L883
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.values
def values(self, multi=False): # type: (bool) -> Iterator[Any] """ Yield the last value on every key list. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it will only contain pairs ...
python
def values(self, multi=False): # type: (bool) -> Iterator[Any] """ Yield the last value on every key list. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it will only contain pairs ...
[ "def", "values", "(", "self", ",", "multi", "=", "False", ")", ":", "# type: (bool) -> Iterator[Any]", "for", "values", "in", "itervalues", "(", "self", ")", ":", "if", "multi", ":", "for", "value", "in", "values", ":", "yield", "value", "else", ":", "yi...
Yield the last value on every key list. :param multi: If set to `True` the iterator returned will have a pair for each value of each key. Otherwise it will only contain pairs for the lasted added of each key.
[ "Yield", "the", "last", "value", "on", "every", "key", "list", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L894-L909
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.to_dict
def to_dict(self, flat=True): """ Return the contents as regular dict. If `flat` is `True` the returned dict will only have the first item present, if `flat` is `False` all values will be returned as lists. :param flat: If set to `False` the dict returned will have lists ...
python
def to_dict(self, flat=True): """ Return the contents as regular dict. If `flat` is `True` the returned dict will only have the first item present, if `flat` is `False` all values will be returned as lists. :param flat: If set to `False` the dict returned will have lists ...
[ "def", "to_dict", "(", "self", ",", "flat", "=", "True", ")", ":", "if", "flat", ":", "return", "dict", "(", "self", ".", "items", "(", ")", ")", "return", "dict", "(", "self", ".", "lists", "(", ")", ")" ]
Return the contents as regular dict. If `flat` is `True` the returned dict will only have the first item present, if `flat` is `False` all values will be returned as lists. :param flat: If set to `False` the dict returned will have lists with all the values in it. Otherwi...
[ "Return", "the", "contents", "as", "regular", "dict", ".", "If", "flat", "is", "True", "the", "returned", "dict", "will", "only", "have", "the", "first", "item", "present", "if", "flat", "is", "False", "all", "values", "will", "be", "returned", "as", "li...
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L930-L944
python-odin/odinweb
odinweb/data_structures.py
MultiValueDict.pop
def pop(self, key, default=NotDefined): # type: (Hashable, Any) -> Any """ Pop the last item for a list on the dict. Afterwards the key is removed from the dict, so additional values are discarded: >>> d = MultiValueDict({"foo": [1, 2, 3]}) >>> d.pop("foo") 1 ...
python
def pop(self, key, default=NotDefined): # type: (Hashable, Any) -> Any """ Pop the last item for a list on the dict. Afterwards the key is removed from the dict, so additional values are discarded: >>> d = MultiValueDict({"foo": [1, 2, 3]}) >>> d.pop("foo") 1 ...
[ "def", "pop", "(", "self", ",", "key", ",", "default", "=", "NotDefined", ")", ":", "# type: (Hashable, Any) -> Any", "try", ":", "return", "dict", ".", "pop", "(", "self", ",", "key", ")", "[", "-", "1", "]", "except", "LookupError", ":", "if", "defau...
Pop the last item for a list on the dict. Afterwards the key is removed from the dict, so additional values are discarded: >>> d = MultiValueDict({"foo": [1, 2, 3]}) >>> d.pop("foo") 1 >>> "foo" in d False :param key: the key to pop. :param default: if p...
[ "Pop", "the", "last", "item", "for", "a", "list", "on", "the", "dict", ".", "Afterwards", "the", "key", "is", "removed", "from", "the", "dict", "so", "additional", "values", "are", "discarded", ":", ">>>", "d", "=", "MultiValueDict", "(", "{", "foo", "...
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/data_structures.py#L946-L966