repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
jason-weirather/py-seq-tools
seqtools/structure/transcript/__init__.py
JunctionOverlap.calculate_overlap
def calculate_overlap(self): """Create the array that describes how junctions overlap""" overs = [] if not self.tx_obj1.range.overlaps(self.tx_obj2.range): return [] # if they dont overlap wont find anything for i in range(0,len(self.j1)): for j in range(0,len(self.j2)): if sel...
python
def calculate_overlap(self): """Create the array that describes how junctions overlap""" overs = [] if not self.tx_obj1.range.overlaps(self.tx_obj2.range): return [] # if they dont overlap wont find anything for i in range(0,len(self.j1)): for j in range(0,len(self.j2)): if sel...
[ "def", "calculate_overlap", "(", "self", ")", ":", "overs", "=", "[", "]", "if", "not", "self", ".", "tx_obj1", ".", "range", ".", "overlaps", "(", "self", ".", "tx_obj2", ".", "range", ")", ":", "return", "[", "]", "# if they dont overlap wont find anythi...
Create the array that describes how junctions overlap
[ "Create", "the", "array", "that", "describes", "how", "junctions", "overlap" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/structure/transcript/__init__.py#L530-L538
jason-weirather/py-seq-tools
seqtools/structure/transcript/__init__.py
Junction.get_string
def get_string(self): """A string representation of the junction :return: string represnetation :rtype: string """ return self.left.chr+':'+str(self.left.end)+'-'+self.right.chr+':'+str(self.right.start)
python
def get_string(self): """A string representation of the junction :return: string represnetation :rtype: string """ return self.left.chr+':'+str(self.left.end)+'-'+self.right.chr+':'+str(self.right.start)
[ "def", "get_string", "(", "self", ")", ":", "return", "self", ".", "left", ".", "chr", "+", "':'", "+", "str", "(", "self", ".", "left", ".", "end", ")", "+", "'-'", "+", "self", ".", "right", ".", "chr", "+", "':'", "+", "str", "(", "self", ...
A string representation of the junction :return: string represnetation :rtype: string
[ "A", "string", "representation", "of", "the", "junction" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/structure/transcript/__init__.py#L567-L573
jason-weirather/py-seq-tools
seqtools/structure/transcript/__init__.py
Junction.get_range_string
def get_range_string(self): """Another string representation of the junction. these may be redundant.""" return self.left.chr+":"+str(self.left.end)+'/'+self.right.chr+":"+str(self.right.start)
python
def get_range_string(self): """Another string representation of the junction. these may be redundant.""" return self.left.chr+":"+str(self.left.end)+'/'+self.right.chr+":"+str(self.right.start)
[ "def", "get_range_string", "(", "self", ")", ":", "return", "self", ".", "left", ".", "chr", "+", "\":\"", "+", "str", "(", "self", ".", "left", ".", "end", ")", "+", "'/'", "+", "self", ".", "right", ".", "chr", "+", "\":\"", "+", "str", "(", ...
Another string representation of the junction. these may be redundant.
[ "Another", "string", "representation", "of", "the", "junction", ".", "these", "may", "be", "redundant", "." ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/structure/transcript/__init__.py#L588-L590
jason-weirather/py-seq-tools
seqtools/structure/transcript/__init__.py
Junction.equals
def equals(self,junc): """test equality with another junction""" if self.left.equals(junc.left): return False if self.right.equals(junc.right): return False return True
python
def equals(self,junc): """test equality with another junction""" if self.left.equals(junc.left): return False if self.right.equals(junc.right): return False return True
[ "def", "equals", "(", "self", ",", "junc", ")", ":", "if", "self", ".", "left", ".", "equals", "(", "junc", ".", "left", ")", ":", "return", "False", "if", "self", ".", "right", ".", "equals", "(", "junc", ".", "right", ")", ":", "return", "False...
test equality with another junction
[ "test", "equality", "with", "another", "junction" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/structure/transcript/__init__.py#L597-L601
jason-weirather/py-seq-tools
seqtools/structure/transcript/__init__.py
Junction.overlaps
def overlaps(self,junc,tolerance=0): """see if junction overlaps with tolerance""" if not self.left.overlaps(junc.left,padding=tolerance): return False if not self.right.overlaps(junc.right,padding=tolerance): return False return True
python
def overlaps(self,junc,tolerance=0): """see if junction overlaps with tolerance""" if not self.left.overlaps(junc.left,padding=tolerance): return False if not self.right.overlaps(junc.right,padding=tolerance): return False return True
[ "def", "overlaps", "(", "self", ",", "junc", ",", "tolerance", "=", "0", ")", ":", "if", "not", "self", ".", "left", ".", "overlaps", "(", "junc", ".", "left", ",", "padding", "=", "tolerance", ")", ":", "return", "False", "if", "not", "self", ".",...
see if junction overlaps with tolerance
[ "see", "if", "junction", "overlaps", "with", "tolerance" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/structure/transcript/__init__.py#L602-L606
jason-weirather/py-seq-tools
seqtools/structure/transcript/__init__.py
Junction.cmp
def cmp(self,junc,tolerance=0): """ output comparison and allow for tolerance if desired * -1 if junc comes before self * 1 if junc comes after self * 0 if overlaps * 2 if else :param junc: :param tolerance: optional search space (default=0, no tolerance) :type junc: Junction :type...
python
def cmp(self,junc,tolerance=0): """ output comparison and allow for tolerance if desired * -1 if junc comes before self * 1 if junc comes after self * 0 if overlaps * 2 if else :param junc: :param tolerance: optional search space (default=0, no tolerance) :type junc: Junction :type...
[ "def", "cmp", "(", "self", ",", "junc", ",", "tolerance", "=", "0", ")", ":", "if", "self", ".", "overlaps", "(", "junc", ",", "tolerance", ")", ":", "return", "0", "#equal", "if", "self", ".", "left", ".", "chr", "==", "junc", ".", "right", ".",...
output comparison and allow for tolerance if desired * -1 if junc comes before self * 1 if junc comes after self * 0 if overlaps * 2 if else :param junc: :param tolerance: optional search space (default=0, no tolerance) :type junc: Junction :type tolerance: int :return: value of co...
[ "output", "comparison", "and", "allow", "for", "tolerance", "if", "desired" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/structure/transcript/__init__.py#L607-L630
jason-weirather/py-seq-tools
seqtools/format/fasta/__init__.py
FASTAData.get_sequence
def get_sequence(self,chr=None,start=None,end=None,dir=None,rng=None): """get a sequence :param chr: :param start: :param end: :param dir: charcter +/- :parma rng: :type chr: string :type start: int :type end: int :type dir: char :type rng: GenomicRange :return: sequence...
python
def get_sequence(self,chr=None,start=None,end=None,dir=None,rng=None): """get a sequence :param chr: :param start: :param end: :param dir: charcter +/- :parma rng: :type chr: string :type start: int :type end: int :type dir: char :type rng: GenomicRange :return: sequence...
[ "def", "get_sequence", "(", "self", ",", "chr", "=", "None", ",", "start", "=", "None", ",", "end", "=", "None", ",", "dir", "=", "None", ",", "rng", "=", "None", ")", ":", "if", "rng", ":", "chr", "=", "rng", ".", "chr", "start", "=", "rng", ...
get a sequence :param chr: :param start: :param end: :param dir: charcter +/- :parma rng: :type chr: string :type start: int :type end: int :type dir: char :type rng: GenomicRange :return: sequence :rtype: string
[ "get", "a", "sequence" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/fasta/__init__.py#L153-L179
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipManager.get_relationship_query_session
def get_relationship_query_session(self): """Gets the ``OsidSession`` associated with the relationship query service. return: (osid.relationship.RelationshipQuerySession) - a ``RelationshipQuerySession`` raise: OperationFailed - unable to complete request raise: Unimpl...
python
def get_relationship_query_session(self): """Gets the ``OsidSession`` associated with the relationship query service. return: (osid.relationship.RelationshipQuerySession) - a ``RelationshipQuerySession`` raise: OperationFailed - unable to complete request raise: Unimpl...
[ "def", "get_relationship_query_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_relationship_query", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "RelationshipQuerySessi...
Gets the ``OsidSession`` associated with the relationship query service. return: (osid.relationship.RelationshipQuerySession) - a ``RelationshipQuerySession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_relationship_query()`` is ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "relationship", "query", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L267-L282
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipManager.get_relationship_query_session_for_family
def get_relationship_query_session_for_family(self, family_id): """Gets the ``OsidSession`` associated with the relationship query service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the family return: (osid.relationship.RelationshipQuerySession) - a ``Re...
python
def get_relationship_query_session_for_family(self, family_id): """Gets the ``OsidSession`` associated with the relationship query service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the family return: (osid.relationship.RelationshipQuerySession) - a ``Re...
[ "def", "get_relationship_query_session_for_family", "(", "self", ",", "family_id", ")", ":", "if", "not", "self", ".", "supports_relationship_query", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "##", "# Also include check to see if the catalog Id i...
Gets the ``OsidSession`` associated with the relationship query service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the family return: (osid.relationship.RelationshipQuerySession) - a ``RelationshipQuerySession`` raise: NotFound - no ``Family`` found by ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "relationship", "query", "service", "for", "the", "given", "family", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L288-L310
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipManager.get_relationship_admin_session
def get_relationship_admin_session(self): """Gets the ``OsidSession`` associated with the relationship administration service. return: (osid.relationship.RelationshipAdminSession) - a ``RelationshipAdminSession`` raise: OperationFailed - unable to complete request raise...
python
def get_relationship_admin_session(self): """Gets the ``OsidSession`` associated with the relationship administration service. return: (osid.relationship.RelationshipAdminSession) - a ``RelationshipAdminSession`` raise: OperationFailed - unable to complete request raise...
[ "def", "get_relationship_admin_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_relationship_admin", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "RelationshipAdminSessi...
Gets the ``OsidSession`` associated with the relationship administration service. return: (osid.relationship.RelationshipAdminSession) - a ``RelationshipAdminSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_relationship_admin()`` ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "relationship", "administration", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L313-L328
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipManager.get_relationship_admin_session_for_family
def get_relationship_admin_session_for_family(self, family_id): """Gets the ``OsidSession`` associated with the relationship administration service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the ``Family`` return: (osid.relationship.RelationshipAdminSession) - a ...
python
def get_relationship_admin_session_for_family(self, family_id): """Gets the ``OsidSession`` associated with the relationship administration service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the ``Family`` return: (osid.relationship.RelationshipAdminSession) - a ...
[ "def", "get_relationship_admin_session_for_family", "(", "self", ",", "family_id", ")", ":", "if", "not", "self", ".", "supports_relationship_admin", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "##", "# Also include check to see if the catalog Id i...
Gets the ``OsidSession`` associated with the relationship administration service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the ``Family`` return: (osid.relationship.RelationshipAdminSession) - a ``RelationshipAdminSession`` raise: NotFound - no family ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "relationship", "administration", "service", "for", "the", "given", "family", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L334-L356
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipProxyManager.get_relationship_lookup_session
def get_relationship_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the relationship lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.RelationshipLookupSession) - a ``RelationshipLookupSession`` raise: NullAr...
python
def get_relationship_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the relationship lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.RelationshipLookupSession) - a ``RelationshipLookupSession`` raise: NullAr...
[ "def", "get_relationship_lookup_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_relationship_lookup", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "Re...
Gets the ``OsidSession`` associated with the relationship lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.RelationshipLookupSession) - a ``RelationshipLookupSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFaile...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "relationship", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L507-L524
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipProxyManager.get_relationship_lookup_session_for_family
def get_relationship_lookup_session_for_family(self, family_id, proxy): """Gets the ``OsidSession`` associated with the relationship lookup service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the family arg: proxy (osid.proxy.Proxy): a proxy return: (osid.rela...
python
def get_relationship_lookup_session_for_family(self, family_id, proxy): """Gets the ``OsidSession`` associated with the relationship lookup service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the family arg: proxy (osid.proxy.Proxy): a proxy return: (osid.rela...
[ "def", "get_relationship_lookup_session_for_family", "(", "self", ",", "family_id", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_relationship_lookup", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "##", "# Also include check to see...
Gets the ``OsidSession`` associated with the relationship lookup service for the given family. arg: family_id (osid.id.Id): the ``Id`` of the family arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.RelationshipLookupSession) - a ``RelationshipLookupSession...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "relationship", "lookup", "service", "for", "the", "given", "family", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L527-L550
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipProxyManager.get_family_lookup_session
def get_family_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the family lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyLookupSession) - a ``FamilyLookupSession`` raise: NullArgument - ``proxy`` is ``...
python
def get_family_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the family lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyLookupSession) - a ``FamilyLookupSession`` raise: NullArgument - ``proxy`` is ``...
[ "def", "get_family_lookup_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_family_lookup", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "FamilyLookupSe...
Gets the ``OsidSession`` associated with the family lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyLookupSession) - a ``FamilyLookupSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable to comp...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "family", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L645-L662
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipProxyManager.get_family_admin_session
def get_family_admin_session(self, proxy): """Gets the ``OsidSession`` associated with the family administrative service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyAdminSession) - a ``FamilyAdminSession`` raise: NullArgument - ``proxy`` ...
python
def get_family_admin_session(self, proxy): """Gets the ``OsidSession`` associated with the family administrative service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyAdminSession) - a ``FamilyAdminSession`` raise: NullArgument - ``proxy`` ...
[ "def", "get_family_admin_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_family_admin", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "FamilyAdminSessi...
Gets the ``OsidSession`` associated with the family administrative service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyAdminSession) - a ``FamilyAdminSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable t...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "family", "administrative", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L665-L681
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipProxyManager.get_family_hierarchy_session
def get_family_hierarchy_session(self, proxy): """Gets the ``OsidSession`` associated with the family hierarchy service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyHierarchySession) - a ``FamilyHierarchySession`` for families raise: NullA...
python
def get_family_hierarchy_session(self, proxy): """Gets the ``OsidSession`` associated with the family hierarchy service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyHierarchySession) - a ``FamilyHierarchySession`` for families raise: NullA...
[ "def", "get_family_hierarchy_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_family_hierarchy", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", ".", "FamilyHi...
Gets the ``OsidSession`` associated with the family hierarchy service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyHierarchySession) - a ``FamilyHierarchySession`` for families raise: NullArgument - ``proxy`` is ``null`` raise: OperationF...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "family", "hierarchy", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L684-L701
mitsei/dlkit
dlkit/json_/relationship/managers.py
RelationshipProxyManager.get_family_hierarchy_design_session
def get_family_hierarchy_design_session(self, proxy): """Gets the ``OsidSession`` associated with the family hierarchy design service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyHierarchyDesignSession) - a ``HierarchyDesignSession`` for families ...
python
def get_family_hierarchy_design_session(self, proxy): """Gets the ``OsidSession`` associated with the family hierarchy design service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyHierarchyDesignSession) - a ``HierarchyDesignSession`` for families ...
[ "def", "get_family_hierarchy_design_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_family_hierarchy_design", "(", ")", ":", "raise", "errors", ".", "Unimplemented", "(", ")", "# pylint: disable=no-member", "return", "sessions", "....
Gets the ``OsidSession`` associated with the family hierarchy design service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.FamilyHierarchyDesignSession) - a ``HierarchyDesignSession`` for families raise: NullArgument - ``proxy`` is ``null`` raise...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "family", "hierarchy", "design", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/relationship/managers.py#L704-L721
mitsei/dlkit
dlkit/authz_adapter/osid/managers.py
OsidProfile._get_authz_session
def _get_authz_session(self): """Gets the AuthorizationSession for the default (bootstrap) typed Vault Assumes only one vault of this Type, but it can have children depending on underlying impl. """ from ..utilities import BOOTSTRAP_VAULT_TYPE try: vaults = self._ge...
python
def _get_authz_session(self): """Gets the AuthorizationSession for the default (bootstrap) typed Vault Assumes only one vault of this Type, but it can have children depending on underlying impl. """ from ..utilities import BOOTSTRAP_VAULT_TYPE try: vaults = self._ge...
[ "def", "_get_authz_session", "(", "self", ")", ":", "from", ".", ".", "utilities", "import", "BOOTSTRAP_VAULT_TYPE", "try", ":", "vaults", "=", "self", ".", "_get_vault_lookup_session", "(", ")", ".", "get_vaults_by_genus_type", "(", "BOOTSTRAP_VAULT_TYPE", ")", "...
Gets the AuthorizationSession for the default (bootstrap) typed Vault Assumes only one vault of this Type, but it can have children depending on underlying impl.
[ "Gets", "the", "AuthorizationSession", "for", "the", "default", "(", "bootstrap", ")", "typed", "Vault" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/authz_adapter/osid/managers.py#L45-L60
mitsei/dlkit
dlkit/authz_adapter/osid/managers.py
OsidProfile._get_override_lookup_session
def _get_override_lookup_session(self): """Gets the AuthorizationLookupSession for the override typed Vault Assumes only one """ from ..utilities import OVERRIDE_VAULT_TYPE try: override_vaults = self._get_vault_lookup_session().get_vaults_by_genus_type(OVERRIDE_VAU...
python
def _get_override_lookup_session(self): """Gets the AuthorizationLookupSession for the override typed Vault Assumes only one """ from ..utilities import OVERRIDE_VAULT_TYPE try: override_vaults = self._get_vault_lookup_session().get_vaults_by_genus_type(OVERRIDE_VAU...
[ "def", "_get_override_lookup_session", "(", "self", ")", ":", "from", ".", ".", "utilities", "import", "OVERRIDE_VAULT_TYPE", "try", ":", "override_vaults", "=", "self", ".", "_get_vault_lookup_session", "(", ")", ".", "get_vaults_by_genus_type", "(", "OVERRIDE_VAULT_...
Gets the AuthorizationLookupSession for the override typed Vault Assumes only one
[ "Gets", "the", "AuthorizationLookupSession", "for", "the", "override", "typed", "Vault" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/authz_adapter/osid/managers.py#L62-L79
jason-weirather/py-seq-tools
seqtools/format/sam/bam/files.py
BAMFileGeneric._fetch_headers
def _fetch_headers(self): """Needs ._fh handle to stream to be set by child""" self._header_text, self._n_ref = self._read_top_header() self._ref_lengths, self._ref_names = self._read_reference_information() self._header = SAMHeader(self._header_text)
python
def _fetch_headers(self): """Needs ._fh handle to stream to be set by child""" self._header_text, self._n_ref = self._read_top_header() self._ref_lengths, self._ref_names = self._read_reference_information() self._header = SAMHeader(self._header_text)
[ "def", "_fetch_headers", "(", "self", ")", ":", "self", ".", "_header_text", ",", "self", ".", "_n_ref", "=", "self", ".", "_read_top_header", "(", ")", "self", ".", "_ref_lengths", ",", "self", ".", "_ref_names", "=", "self", ".", "_read_reference_informati...
Needs ._fh handle to stream to be set by child
[ "Needs", ".", "_fh", "handle", "to", "stream", "to", "be", "set", "by", "child" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/sam/bam/files.py#L24-L28
jason-weirather/py-seq-tools
seqtools/format/sam/bam/files.py
BAMFileGeneric._get_block
def _get_block(self): """Just read a single block from your current location in _fh""" b = self._fh.read(4) # get block size bytes #print self._fh.tell() if not b: raise StopIteration block_size = struct.unpack('<i',b)[0] return self._fh.read(block_size)
python
def _get_block(self): """Just read a single block from your current location in _fh""" b = self._fh.read(4) # get block size bytes #print self._fh.tell() if not b: raise StopIteration block_size = struct.unpack('<i',b)[0] return self._fh.read(block_size)
[ "def", "_get_block", "(", "self", ")", ":", "b", "=", "self", ".", "_fh", ".", "read", "(", "4", ")", "# get block size bytes", "#print self._fh.tell()", "if", "not", "b", ":", "raise", "StopIteration", "block_size", "=", "struct", ".", "unpack", "(", "'<i...
Just read a single block from your current location in _fh
[ "Just", "read", "a", "single", "block", "from", "your", "current", "location", "in", "_fh" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/sam/bam/files.py#L46-L52
jason-weirather/py-seq-tools
seqtools/format/sam/bam/files.py
BAMFileGeneric._read_reference_information
def _read_reference_information(self): """Reads the reference names and lengths""" ref_lengths = {} ref_names = [] for n in range(self._n_ref): l_name = struct.unpack('<i',self._fh.read(4))[0] name = self._fh.read(l_name).rstrip('\0') l_ref = struct.unpack('<i',self._fh.read(4))[0] ...
python
def _read_reference_information(self): """Reads the reference names and lengths""" ref_lengths = {} ref_names = [] for n in range(self._n_ref): l_name = struct.unpack('<i',self._fh.read(4))[0] name = self._fh.read(l_name).rstrip('\0') l_ref = struct.unpack('<i',self._fh.read(4))[0] ...
[ "def", "_read_reference_information", "(", "self", ")", ":", "ref_lengths", "=", "{", "}", "ref_names", "=", "[", "]", "for", "n", "in", "range", "(", "self", ".", "_n_ref", ")", ":", "l_name", "=", "struct", ".", "unpack", "(", "'<i'", ",", "self", ...
Reads the reference names and lengths
[ "Reads", "the", "reference", "names", "and", "lengths" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/sam/bam/files.py#L54-L64
jason-weirather/py-seq-tools
seqtools/format/sam/bam/files.py
BAMFileGeneric._read_top_header
def _read_top_header(self): """Read the header text and number of reference seqs""" magic = self._fh.read(4) l_text = struct.unpack('<i',self._fh.read(4))[0] header_text = self._fh.read(l_text).rstrip('\0') n_ref = struct.unpack('<i',self._fh.read(4))[0] return header_text, n_ref
python
def _read_top_header(self): """Read the header text and number of reference seqs""" magic = self._fh.read(4) l_text = struct.unpack('<i',self._fh.read(4))[0] header_text = self._fh.read(l_text).rstrip('\0') n_ref = struct.unpack('<i',self._fh.read(4))[0] return header_text, n_ref
[ "def", "_read_top_header", "(", "self", ")", ":", "magic", "=", "self", ".", "_fh", ".", "read", "(", "4", ")", "l_text", "=", "struct", ".", "unpack", "(", "'<i'", ",", "self", ".", "_fh", ".", "read", "(", "4", ")", ")", "[", "0", "]", "heade...
Read the header text and number of reference seqs
[ "Read", "the", "header", "text", "and", "number", "of", "reference", "seqs" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/sam/bam/files.py#L66-L72
jason-weirather/py-seq-tools
seqtools/format/sam/bam/files.py
BAMFile.fetch_by_coord
def fetch_by_coord(self,coord): """get a single entry by the coordinate location [blockStart, innerStart] .. warning:: creates a new instance of a BAMFile object when maybe the one we had would have worked """ #print coord #print self.path #b2 = BAMFile(self.path,blockStart=coord[0],innerStart=...
python
def fetch_by_coord(self,coord): """get a single entry by the coordinate location [blockStart, innerStart] .. warning:: creates a new instance of a BAMFile object when maybe the one we had would have worked """ #print coord #print self.path #b2 = BAMFile(self.path,blockStart=coord[0],innerStart=...
[ "def", "fetch_by_coord", "(", "self", ",", "coord", ")", ":", "#print coord", "#print self.path", "#b2 = BAMFile(self.path,blockStart=coord[0],innerStart=coord[1],index_obj=self.index,reference=self._reference)", "b2", "=", "BAMFile", "(", "self", ".", "path", ",", "BAMFile", ...
get a single entry by the coordinate location [blockStart, innerStart] .. warning:: creates a new instance of a BAMFile object when maybe the one we had would have worked
[ "get", "a", "single", "entry", "by", "the", "coordinate", "location", "[", "blockStart", "innerStart", "]" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/sam/bam/files.py#L141-L155
jason-weirather/py-seq-tools
seqtools/format/sam/bam/files.py
BAMFile.fetch_starting_at_coord
def fetch_starting_at_coord(self,coord): #b2 = BAMFile(self.path,blockStart=coord[0],innerStart=coord[1],index_obj=self.index,reference=self._reference) """starting at a certain coordinate was supposed to make output .. warning:: creates a new instance of a BAMFile object when maybe the one we had would ha...
python
def fetch_starting_at_coord(self,coord): #b2 = BAMFile(self.path,blockStart=coord[0],innerStart=coord[1],index_obj=self.index,reference=self._reference) """starting at a certain coordinate was supposed to make output .. warning:: creates a new instance of a BAMFile object when maybe the one we had would ha...
[ "def", "fetch_starting_at_coord", "(", "self", ",", "coord", ")", ":", "#b2 = BAMFile(self.path,blockStart=coord[0],innerStart=coord[1],index_obj=self.index,reference=self._reference)", "b2", "=", "BAMFile", "(", "self", ".", "path", ",", "BAMFile", ".", "Options", "(", "bl...
starting at a certain coordinate was supposed to make output .. warning:: creates a new instance of a BAMFile object when maybe the one we had would have worked
[ "starting", "at", "a", "certain", "coordinate", "was", "supposed", "to", "make", "output" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/format/sam/bam/files.py#L157-L164
mitsei/dlkit
dlkit/json_/authentication/searches.py
AgentSearchResults.get_agents
def get_agents(self): """Gets the agent list resulting from the search. return: (osid.authentication.AgentList) - the agent list raise: IllegalState - list already retrieved *compliance: mandatory -- This method must be implemented.* """ if self.retrieved: ...
python
def get_agents(self): """Gets the agent list resulting from the search. return: (osid.authentication.AgentList) - the agent list raise: IllegalState - list already retrieved *compliance: mandatory -- This method must be implemented.* """ if self.retrieved: ...
[ "def", "get_agents", "(", "self", ")", ":", "if", "self", ".", "retrieved", ":", "raise", "errors", ".", "IllegalState", "(", "'List has already been retrieved.'", ")", "self", ".", "retrieved", "=", "True", "return", "objects", ".", "AgentList", "(", "self", ...
Gets the agent list resulting from the search. return: (osid.authentication.AgentList) - the agent list raise: IllegalState - list already retrieved *compliance: mandatory -- This method must be implemented.*
[ "Gets", "the", "agent", "list", "resulting", "from", "the", "search", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authentication/searches.py#L114-L125
theosysbio/means
src/means/simulation/solvers.py
parse_flag
def parse_flag(exception_message): """ Parse the flag from the solver exception. e.g. >>> parse_flag("Exception: Dopri5 failed with flag -3") -3 :param exception_message: message from the exception :type exception_message: str :return: flag id :rtype: int """ import re ...
python
def parse_flag(exception_message): """ Parse the flag from the solver exception. e.g. >>> parse_flag("Exception: Dopri5 failed with flag -3") -3 :param exception_message: message from the exception :type exception_message: str :return: flag id :rtype: int """ import re ...
[ "def", "parse_flag", "(", "exception_message", ")", ":", "import", "re", "match", "=", "re", ".", "match", "(", "'.* failed with flag (-\\d+)'", ",", "exception_message", ")", "try", ":", "return", "int", "(", "match", ".", "group", "(", "1", ")", ")", "ex...
Parse the flag from the solver exception. e.g. >>> parse_flag("Exception: Dopri5 failed with flag -3") -3 :param exception_message: message from the exception :type exception_message: str :return: flag id :rtype: int
[ "Parse", "the", "flag", "from", "the", "solver", "exception", ".", "e", ".", "g", "." ]
train
https://github.com/theosysbio/means/blob/fe164916a1d84ab2a4fa039871d38ccdf638b1db/src/means/simulation/solvers.py#L84-L102
theosysbio/means
src/means/simulation/solvers.py
SolverBase.simulate
def simulate(self, timepoints): """ Simulate initialised solver for the specified timepoints :param timepoints: timepoints that will be returned from simulation :return: a list of trajectories for each of the equations in the problem. """ solver = self._solver la...
python
def simulate(self, timepoints): """ Simulate initialised solver for the specified timepoints :param timepoints: timepoints that will be returned from simulation :return: a list of trajectories for each of the equations in the problem. """ solver = self._solver la...
[ "def", "simulate", "(", "self", ",", "timepoints", ")", ":", "solver", "=", "self", ".", "_solver", "last_timepoint", "=", "timepoints", "[", "-", "1", "]", "try", ":", "simulated_timepoints", ",", "simulated_values", "=", "solver", ".", "simulate", "(", "...
Simulate initialised solver for the specified timepoints :param timepoints: timepoints that will be returned from simulation :return: a list of trajectories for each of the equations in the problem.
[ "Simulate", "initialised", "solver", "for", "the", "specified", "timepoints" ]
train
https://github.com/theosysbio/means/blob/fe164916a1d84ab2a4fa039871d38ccdf638b1db/src/means/simulation/solvers.py#L164-L190
theosysbio/means
src/means/simulation/solvers.py
SolverBase._results_to_trajectories
def _results_to_trajectories(self, simulated_timepoints, simulated_values): """ Convert the resulting results into a list of trajectories :param simulated_timepoints: timepoints output from a solver :param simulated_values: values returned by the solver :return: """ ...
python
def _results_to_trajectories(self, simulated_timepoints, simulated_values): """ Convert the resulting results into a list of trajectories :param simulated_timepoints: timepoints output from a solver :param simulated_values: values returned by the solver :return: """ ...
[ "def", "_results_to_trajectories", "(", "self", ",", "simulated_timepoints", ",", "simulated_values", ")", ":", "descriptions", "=", "self", ".", "_problem", ".", "left_hand_side_descriptors", "return", "_wrap_results_to_trajectories", "(", "simulated_timepoints", ",", "s...
Convert the resulting results into a list of trajectories :param simulated_timepoints: timepoints output from a solver :param simulated_values: values returned by the solver :return:
[ "Convert", "the", "resulting", "results", "into", "a", "list", "of", "trajectories" ]
train
https://github.com/theosysbio/means/blob/fe164916a1d84ab2a4fa039871d38ccdf638b1db/src/means/simulation/solvers.py#L232-L243
koolsb/pyblackbird
pyblackbird/__init__.py
get_blackbird
def get_blackbird(url, use_serial=True): """ Return synchronous version of Blackbird interface :param port_url: serial port, i.e. '/dev/ttyUSB0' :return: synchronous implementation of Blackbird interface """ lock = RLock() print(serial) def synchronized(func): @wraps(func) ...
python
def get_blackbird(url, use_serial=True): """ Return synchronous version of Blackbird interface :param port_url: serial port, i.e. '/dev/ttyUSB0' :return: synchronous implementation of Blackbird interface """ lock = RLock() print(serial) def synchronized(func): @wraps(func) ...
[ "def", "get_blackbird", "(", "url", ",", "use_serial", "=", "True", ")", ":", "lock", "=", "RLock", "(", ")", "print", "(", "serial", ")", "def", "synchronized", "(", "func", ")", ":", "@", "wraps", "(", "func", ")", "def", "wrapper", "(", "*", "ar...
Return synchronous version of Blackbird interface :param port_url: serial port, i.e. '/dev/ttyUSB0' :return: synchronous implementation of Blackbird interface
[ "Return", "synchronous", "version", "of", "Blackbird", "interface", ":", "param", "port_url", ":", "serial", "port", "i", ".", "e", ".", "/", "dev", "/", "ttyUSB0", ":", "return", ":", "synchronous", "implementation", "of", "Blackbird", "interface" ]
train
https://github.com/koolsb/pyblackbird/blob/19dd8051c9399d9def9368975633b8ed761dc6b2/pyblackbird/__init__.py#L140-L263
koolsb/pyblackbird
pyblackbird/__init__.py
get_async_blackbird
def get_async_blackbird(port_url, loop): """ Return asynchronous version of Blackbird interface :param port_url: serial port, i.e. '/dev/ttyUSB0' :return: asynchronous implementation of Blackbird interface """ lock = asyncio.Lock() def locked_coro(coro): @asyncio.coroutine ...
python
def get_async_blackbird(port_url, loop): """ Return asynchronous version of Blackbird interface :param port_url: serial port, i.e. '/dev/ttyUSB0' :return: asynchronous implementation of Blackbird interface """ lock = asyncio.Lock() def locked_coro(coro): @asyncio.coroutine ...
[ "def", "get_async_blackbird", "(", "port_url", ",", "loop", ")", ":", "lock", "=", "asyncio", ".", "Lock", "(", ")", "def", "locked_coro", "(", "coro", ")", ":", "@", "asyncio", ".", "coroutine", "@", "wraps", "(", "coro", ")", "def", "wrapper", "(", ...
Return asynchronous version of Blackbird interface :param port_url: serial port, i.e. '/dev/ttyUSB0' :return: asynchronous implementation of Blackbird interface
[ "Return", "asynchronous", "version", "of", "Blackbird", "interface", ":", "param", "port_url", ":", "serial", "port", "i", ".", "e", ".", "/", "dev", "/", "ttyUSB0", ":", "return", ":", "asynchronous", "implementation", "of", "Blackbird", "interface" ]
train
https://github.com/koolsb/pyblackbird/blob/19dd8051c9399d9def9368975633b8ed761dc6b2/pyblackbird/__init__.py#L267-L366
mitsei/dlkit
dlkit/services/logging_.py
LoggingManager._set_log_view
def _set_log_view(self, session): """Sets the underlying log view to match current view""" if self._log_view == COMPARATIVE: try: session.use_comparative_log_view() except AttributeError: pass else: try: session....
python
def _set_log_view(self, session): """Sets the underlying log view to match current view""" if self._log_view == COMPARATIVE: try: session.use_comparative_log_view() except AttributeError: pass else: try: session....
[ "def", "_set_log_view", "(", "self", ",", "session", ")", ":", "if", "self", ".", "_log_view", "==", "COMPARATIVE", ":", "try", ":", "session", ".", "use_comparative_log_view", "(", ")", "except", "AttributeError", ":", "pass", "else", ":", "try", ":", "se...
Sets the underlying log view to match current view
[ "Sets", "the", "underlying", "log", "view", "to", "match", "current", "view" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L162-L173
mitsei/dlkit
dlkit/services/logging_.py
LoggingManager.use_comparative_log_view
def use_comparative_log_view(self): """Pass through to provider LogEntryLogSession.use_comparative_log_view""" self._log_view = COMPARATIVE # self._get_provider_session('log_entry_log_session') # To make sure the session is tracked for session in self._get_provider_sessions(): ...
python
def use_comparative_log_view(self): """Pass through to provider LogEntryLogSession.use_comparative_log_view""" self._log_view = COMPARATIVE # self._get_provider_session('log_entry_log_session') # To make sure the session is tracked for session in self._get_provider_sessions(): ...
[ "def", "use_comparative_log_view", "(", "self", ")", ":", "self", ".", "_log_view", "=", "COMPARATIVE", "# self._get_provider_session('log_entry_log_session') # To make sure the session is tracked", "for", "session", "in", "self", ".", "_get_provider_sessions", "(", ")", ":",...
Pass through to provider LogEntryLogSession.use_comparative_log_view
[ "Pass", "through", "to", "provider", "LogEntryLogSession", ".", "use_comparative_log_view" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L414-L422
mitsei/dlkit
dlkit/services/logging_.py
LoggingManager.use_plenary_log_view
def use_plenary_log_view(self): """Pass through to provider LogEntryLogSession.use_plenary_log_view""" self._log_view = PLENARY # self._get_provider_session('log_entry_log_session') # To make sure the session is tracked for session in self._get_provider_sessions(): try: ...
python
def use_plenary_log_view(self): """Pass through to provider LogEntryLogSession.use_plenary_log_view""" self._log_view = PLENARY # self._get_provider_session('log_entry_log_session') # To make sure the session is tracked for session in self._get_provider_sessions(): try: ...
[ "def", "use_plenary_log_view", "(", "self", ")", ":", "self", ".", "_log_view", "=", "PLENARY", "# self._get_provider_session('log_entry_log_session') # To make sure the session is tracked", "for", "session", "in", "self", ".", "_get_provider_sessions", "(", ")", ":", "try"...
Pass through to provider LogEntryLogSession.use_plenary_log_view
[ "Pass", "through", "to", "provider", "LogEntryLogSession", ".", "use_plenary_log_view" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L424-L432
mitsei/dlkit
dlkit/services/logging_.py
LoggingManager.get_logs_by_provider
def get_logs_by_provider(self, *args, **kwargs): """Pass through to provider LogLookupSession.get_logs_by_provider""" # Implemented from kitosid template for - # osid.resource.BinLookupSession.get_bins_by_provider catalogs = self._get_provider_session('log_lookup_session').get_logs_by_pr...
python
def get_logs_by_provider(self, *args, **kwargs): """Pass through to provider LogLookupSession.get_logs_by_provider""" # Implemented from kitosid template for - # osid.resource.BinLookupSession.get_bins_by_provider catalogs = self._get_provider_session('log_lookup_session').get_logs_by_pr...
[ "def", "get_logs_by_provider", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Implemented from kitosid template for -", "# osid.resource.BinLookupSession.get_bins_by_provider", "catalogs", "=", "self", ".", "_get_provider_session", "(", "'log_lookup_se...
Pass through to provider LogLookupSession.get_logs_by_provider
[ "Pass", "through", "to", "provider", "LogLookupSession", ".", "get_logs_by_provider" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L568-L576
mitsei/dlkit
dlkit/services/logging_.py
LoggingManager.get_logs
def get_logs(self): """Pass through to provider LogLookupSession.get_logs""" # Implemented from kitosid template for - # osid.resource.BinLookupSession.get_bins_template catalogs = self._get_provider_session('log_lookup_session').get_logs() cat_list = [] for cat in catalo...
python
def get_logs(self): """Pass through to provider LogLookupSession.get_logs""" # Implemented from kitosid template for - # osid.resource.BinLookupSession.get_bins_template catalogs = self._get_provider_session('log_lookup_session').get_logs() cat_list = [] for cat in catalo...
[ "def", "get_logs", "(", "self", ")", ":", "# Implemented from kitosid template for -", "# osid.resource.BinLookupSession.get_bins_template", "catalogs", "=", "self", ".", "_get_provider_session", "(", "'log_lookup_session'", ")", ".", "get_logs", "(", ")", "cat_list", "=", ...
Pass through to provider LogLookupSession.get_logs
[ "Pass", "through", "to", "provider", "LogLookupSession", ".", "get_logs" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L578-L586
mitsei/dlkit
dlkit/services/logging_.py
LoggingManager.get_log_form
def get_log_form(self, *args, **kwargs): """Pass through to provider LogAdminSession.get_log_form_for_update""" # Implemented from kitosid template for - # osid.resource.BinAdminSession.get_bin_form_for_update_template # This method might be a bit sketchy. Time will tell. if isin...
python
def get_log_form(self, *args, **kwargs): """Pass through to provider LogAdminSession.get_log_form_for_update""" # Implemented from kitosid template for - # osid.resource.BinAdminSession.get_bin_form_for_update_template # This method might be a bit sketchy. Time will tell. if isin...
[ "def", "get_log_form", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Implemented from kitosid template for -", "# osid.resource.BinAdminSession.get_bin_form_for_update_template", "# This method might be a bit sketchy. Time will tell.", "if", "isinstance", "...
Pass through to provider LogAdminSession.get_log_form_for_update
[ "Pass", "through", "to", "provider", "LogAdminSession", ".", "get_log_form_for_update" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L632-L640
mitsei/dlkit
dlkit/services/logging_.py
LoggingManager.update_log
def update_log(self, *args, **kwargs): """Pass through to provider LogAdminSession.update_log""" # Implemented from kitosid template for - # osid.resource.BinAdminSession.update_bin # OSID spec does not require returning updated catalog return Log( self._provider_mana...
python
def update_log(self, *args, **kwargs): """Pass through to provider LogAdminSession.update_log""" # Implemented from kitosid template for - # osid.resource.BinAdminSession.update_bin # OSID spec does not require returning updated catalog return Log( self._provider_mana...
[ "def", "update_log", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Implemented from kitosid template for -", "# osid.resource.BinAdminSession.update_bin", "# OSID spec does not require returning updated catalog", "return", "Log", "(", "self", ".", "_p...
Pass through to provider LogAdminSession.update_log
[ "Pass", "through", "to", "provider", "LogAdminSession", ".", "update_log" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L642-L651
mitsei/dlkit
dlkit/services/logging_.py
LoggingManager.save_log
def save_log(self, log_form, *args, **kwargs): """Pass through to provider LogAdminSession.update_log""" # Implemented from kitosid template for - # osid.resource.BinAdminSession.update_bin if log_form.is_for_update(): return self.update_log(log_form, *args, **kwargs) ...
python
def save_log(self, log_form, *args, **kwargs): """Pass through to provider LogAdminSession.update_log""" # Implemented from kitosid template for - # osid.resource.BinAdminSession.update_bin if log_form.is_for_update(): return self.update_log(log_form, *args, **kwargs) ...
[ "def", "save_log", "(", "self", ",", "log_form", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Implemented from kitosid template for -", "# osid.resource.BinAdminSession.update_bin", "if", "log_form", ".", "is_for_update", "(", ")", ":", "return", "self", ...
Pass through to provider LogAdminSession.update_log
[ "Pass", "through", "to", "provider", "LogAdminSession", ".", "update_log" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L653-L660
mitsei/dlkit
dlkit/services/logging_.py
Log._set_log_view
def _set_log_view(self, session): """Sets the underlying log view to match current view""" if self._log_view == FEDERATED: try: session.use_federated_log_view() except AttributeError: pass else: try: session.use_...
python
def _set_log_view(self, session): """Sets the underlying log view to match current view""" if self._log_view == FEDERATED: try: session.use_federated_log_view() except AttributeError: pass else: try: session.use_...
[ "def", "_set_log_view", "(", "self", ",", "session", ")", ":", "if", "self", ".", "_log_view", "==", "FEDERATED", ":", "try", ":", "session", ".", "use_federated_log_view", "(", ")", "except", "AttributeError", ":", "pass", "else", ":", "try", ":", "sessio...
Sets the underlying log view to match current view
[ "Sets", "the", "underlying", "log", "view", "to", "match", "current", "view" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L944-L955
mitsei/dlkit
dlkit/services/logging_.py
Log.use_comparative_log_entry_view
def use_comparative_log_entry_view(self): """Pass through to provider LogEntryLookupSession.use_comparative_log_entry_view""" self._object_views['log_entry'] = COMPARATIVE # self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked for session in self._...
python
def use_comparative_log_entry_view(self): """Pass through to provider LogEntryLookupSession.use_comparative_log_entry_view""" self._object_views['log_entry'] = COMPARATIVE # self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked for session in self._...
[ "def", "use_comparative_log_entry_view", "(", "self", ")", ":", "self", ".", "_object_views", "[", "'log_entry'", "]", "=", "COMPARATIVE", "# self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked", "for", "session", "in", "self", ".", "_...
Pass through to provider LogEntryLookupSession.use_comparative_log_entry_view
[ "Pass", "through", "to", "provider", "LogEntryLookupSession", ".", "use_comparative_log_entry_view" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L1080-L1088
mitsei/dlkit
dlkit/services/logging_.py
Log.use_plenary_log_entry_view
def use_plenary_log_entry_view(self): """Pass through to provider LogEntryLookupSession.use_plenary_log_entry_view""" self._object_views['log_entry'] = PLENARY # self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked for session in self._get_provider...
python
def use_plenary_log_entry_view(self): """Pass through to provider LogEntryLookupSession.use_plenary_log_entry_view""" self._object_views['log_entry'] = PLENARY # self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked for session in self._get_provider...
[ "def", "use_plenary_log_entry_view", "(", "self", ")", ":", "self", ".", "_object_views", "[", "'log_entry'", "]", "=", "PLENARY", "# self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked", "for", "session", "in", "self", ".", "_get_prov...
Pass through to provider LogEntryLookupSession.use_plenary_log_entry_view
[ "Pass", "through", "to", "provider", "LogEntryLookupSession", ".", "use_plenary_log_entry_view" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L1090-L1098
mitsei/dlkit
dlkit/services/logging_.py
Log.use_federated_log_view
def use_federated_log_view(self): """Pass through to provider LogEntryLookupSession.use_federated_log_view""" self._log_view = FEDERATED # self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked for session in self._get_provider_sessions(): ...
python
def use_federated_log_view(self): """Pass through to provider LogEntryLookupSession.use_federated_log_view""" self._log_view = FEDERATED # self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked for session in self._get_provider_sessions(): ...
[ "def", "use_federated_log_view", "(", "self", ")", ":", "self", ".", "_log_view", "=", "FEDERATED", "# self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked", "for", "session", "in", "self", ".", "_get_provider_sessions", "(", ")", ":", ...
Pass through to provider LogEntryLookupSession.use_federated_log_view
[ "Pass", "through", "to", "provider", "LogEntryLookupSession", ".", "use_federated_log_view" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L1100-L1108
mitsei/dlkit
dlkit/services/logging_.py
Log.use_isolated_log_view
def use_isolated_log_view(self): """Pass through to provider LogEntryLookupSession.use_isolated_log_view""" self._log_view = ISOLATED # self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked for session in self._get_provider_sessions(): t...
python
def use_isolated_log_view(self): """Pass through to provider LogEntryLookupSession.use_isolated_log_view""" self._log_view = ISOLATED # self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked for session in self._get_provider_sessions(): t...
[ "def", "use_isolated_log_view", "(", "self", ")", ":", "self", ".", "_log_view", "=", "ISOLATED", "# self._get_provider_session('log_entry_lookup_session') # To make sure the session is tracked", "for", "session", "in", "self", ".", "_get_provider_sessions", "(", ")", ":", ...
Pass through to provider LogEntryLookupSession.use_isolated_log_view
[ "Pass", "through", "to", "provider", "LogEntryLookupSession", ".", "use_isolated_log_view" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L1110-L1118
mitsei/dlkit
dlkit/services/logging_.py
Log.get_log_entry_form
def get_log_entry_form(self, *args, **kwargs): """Pass through to provider LogEntryAdminSession.get_log_entry_form_for_update""" # Implemented from kitosid template for - # osid.resource.ResourceAdminSession.get_resource_form_for_update # This method might be a bit sketchy. Time will tel...
python
def get_log_entry_form(self, *args, **kwargs): """Pass through to provider LogEntryAdminSession.get_log_entry_form_for_update""" # Implemented from kitosid template for - # osid.resource.ResourceAdminSession.get_resource_form_for_update # This method might be a bit sketchy. Time will tel...
[ "def", "get_log_entry_form", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Implemented from kitosid template for -", "# osid.resource.ResourceAdminSession.get_resource_form_for_update", "# This method might be a bit sketchy. Time will tell.", "if", "isinstanc...
Pass through to provider LogEntryAdminSession.get_log_entry_form_for_update
[ "Pass", "through", "to", "provider", "LogEntryAdminSession", ".", "get_log_entry_form_for_update" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L1242-L1250
mitsei/dlkit
dlkit/services/logging_.py
Log.save_log_entry
def save_log_entry(self, log_entry_form, *args, **kwargs): """Pass through to provider LogEntryAdminSession.update_log_entry""" # Implemented from kitosid template for - # osid.resource.ResourceAdminSession.update_resource if log_entry_form.is_for_update(): return self.update...
python
def save_log_entry(self, log_entry_form, *args, **kwargs): """Pass through to provider LogEntryAdminSession.update_log_entry""" # Implemented from kitosid template for - # osid.resource.ResourceAdminSession.update_resource if log_entry_form.is_for_update(): return self.update...
[ "def", "save_log_entry", "(", "self", ",", "log_entry_form", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Implemented from kitosid template for -", "# osid.resource.ResourceAdminSession.update_resource", "if", "log_entry_form", ".", "is_for_update", "(", ")", ...
Pass through to provider LogEntryAdminSession.update_log_entry
[ "Pass", "through", "to", "provider", "LogEntryAdminSession", ".", "update_log_entry" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L1264-L1271
mitsei/dlkit
dlkit/services/logging_.py
LogList.get_next_logs
def get_next_logs(self, n): """gets next n objects from list""" # Implemented from kitosid template for - # osid.resource.ResourceList.get_next_resources if n > self.available(): # !!! This is not quite as specified (see method docs) !!! raise IllegalState('not en...
python
def get_next_logs(self, n): """gets next n objects from list""" # Implemented from kitosid template for - # osid.resource.ResourceList.get_next_resources if n > self.available(): # !!! This is not quite as specified (see method docs) !!! raise IllegalState('not en...
[ "def", "get_next_logs", "(", "self", ",", "n", ")", ":", "# Implemented from kitosid template for -", "# osid.resource.ResourceList.get_next_resources", "if", "n", ">", "self", ".", "available", "(", ")", ":", "# !!! This is not quite as specified (see method docs) !!!", "rai...
gets next n objects from list
[ "gets", "next", "n", "objects", "from", "list" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/logging_.py#L1323-L1339
erkghlerngm44/malaffinity
malaffinity/malaffinity.py
MALAffinity.init
def init(self, base_user): """ Retrieve a "base user"'s list, and store it in :attr:`._base_scores`. :param str base_user: Base users' username """ self._base_user = base_user # Modify this for multiple services support when the time comes base_list = endpoints....
python
def init(self, base_user): """ Retrieve a "base user"'s list, and store it in :attr:`._base_scores`. :param str base_user: Base users' username """ self._base_user = base_user # Modify this for multiple services support when the time comes base_list = endpoints....
[ "def", "init", "(", "self", ",", "base_user", ")", ":", "self", ".", "_base_user", "=", "base_user", "# Modify this for multiple services support when the time comes", "base_list", "=", "endpoints", ".", "myanimelist", "(", "base_user", ")", "for", "anime", "in", "b...
Retrieve a "base user"'s list, and store it in :attr:`._base_scores`. :param str base_user: Base users' username
[ "Retrieve", "a", "base", "user", "s", "list", "and", "store", "it", "in", ":", "attr", ":", ".", "_base_scores", "." ]
train
https://github.com/erkghlerngm44/malaffinity/blob/d866b9198b668333f0b86567b2faebdb20587e30/malaffinity/malaffinity.py#L75-L92
erkghlerngm44/malaffinity
malaffinity/malaffinity.py
MALAffinity.comparison
def comparison(self, username): """ Get a comparison of scores between the "base user" and ``username``. A Key-Value returned will consist of the following: .. code-block:: none { ANIME_ID: [BASE_USER_SCORE, OTHER_USER_SCORE], ... ...
python
def comparison(self, username): """ Get a comparison of scores between the "base user" and ``username``. A Key-Value returned will consist of the following: .. code-block:: none { ANIME_ID: [BASE_USER_SCORE, OTHER_USER_SCORE], ... ...
[ "def", "comparison", "(", "self", ",", "username", ")", ":", "# Check if there's actually a base user to compare scores with.", "if", "not", "self", ".", "_base_user", "or", "not", "self", ".", "_base_scores", ":", "raise", "Exception", "(", "\"No base user has been spe...
Get a comparison of scores between the "base user" and ``username``. A Key-Value returned will consist of the following: .. code-block:: none { ANIME_ID: [BASE_USER_SCORE, OTHER_USER_SCORE], ... } Example: .. code-block:: none ...
[ "Get", "a", "comparison", "of", "scores", "between", "the", "base", "user", "and", "username", "." ]
train
https://github.com/erkghlerngm44/malaffinity/blob/d866b9198b668333f0b86567b2faebdb20587e30/malaffinity/malaffinity.py#L94-L149
erkghlerngm44/malaffinity
malaffinity/malaffinity.py
MALAffinity.calculate_affinity
def calculate_affinity(self, username): """ Get the affinity between the "base user" and ``username``. .. note:: The data returned will be a namedtuple, with the affinity and shared rated anime. This can easily be separated as follows (using the user ``Luna``...
python
def calculate_affinity(self, username): """ Get the affinity between the "base user" and ``username``. .. note:: The data returned will be a namedtuple, with the affinity and shared rated anime. This can easily be separated as follows (using the user ``Luna``...
[ "def", "calculate_affinity", "(", "self", ",", "username", ")", ":", "scores", "=", "self", ".", "comparison", "(", "username", ")", "# Handle cases where the shared scores are <= 10 so", "# affinity can not be accurately calculated.", "if", "len", "(", "scores", ")", "...
Get the affinity between the "base user" and ``username``. .. note:: The data returned will be a namedtuple, with the affinity and shared rated anime. This can easily be separated as follows (using the user ``Luna`` as ``username``): .. code-block:: python...
[ "Get", "the", "affinity", "between", "the", "base", "user", "and", "username", "." ]
train
https://github.com/erkghlerngm44/malaffinity/blob/d866b9198b668333f0b86567b2faebdb20587e30/malaffinity/malaffinity.py#L151-L200
python-odin/odinweb
odinweb/utils.py
to_bool
def to_bool(value): # type: (Any) -> bool """ Convert a value into a bool but handle "truthy" strings eg, yes, true, ok, y """ if isinstance(value, _compat.string_types): return value.upper() in ('Y', 'YES', 'T', 'TRUE', '1', 'OK') return bool(value)
python
def to_bool(value): # type: (Any) -> bool """ Convert a value into a bool but handle "truthy" strings eg, yes, true, ok, y """ if isinstance(value, _compat.string_types): return value.upper() in ('Y', 'YES', 'T', 'TRUE', '1', 'OK') return bool(value)
[ "def", "to_bool", "(", "value", ")", ":", "# type: (Any) -> bool", "if", "isinstance", "(", "value", ",", "_compat", ".", "string_types", ")", ":", "return", "value", ".", "upper", "(", ")", "in", "(", "'Y'", ",", "'YES'", ",", "'T'", ",", "'TRUE'", ",...
Convert a value into a bool but handle "truthy" strings eg, yes, true, ok, y
[ "Convert", "a", "value", "into", "a", "bool", "but", "handle", "truthy", "strings", "eg", "yes", "true", "ok", "y" ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/utils.py#L43-L50
python-odin/odinweb
odinweb/utils.py
dict_filter_update
def dict_filter_update(base, updates): # type: (dict, dict) -> None """ Update dict with None values filtered out. """ base.update((k, v) for k, v in updates.items() if v is not None)
python
def dict_filter_update(base, updates): # type: (dict, dict) -> None """ Update dict with None values filtered out. """ base.update((k, v) for k, v in updates.items() if v is not None)
[ "def", "dict_filter_update", "(", "base", ",", "updates", ")", ":", "# type: (dict, dict) -> None", "base", ".", "update", "(", "(", "k", ",", "v", ")", "for", "k", ",", "v", "in", "updates", ".", "items", "(", ")", "if", "v", "is", "not", "None", ")...
Update dict with None values filtered out.
[ "Update", "dict", "with", "None", "values", "filtered", "out", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/utils.py#L53-L58
python-odin/odinweb
odinweb/utils.py
dict_filter
def dict_filter(*args, **kwargs): """ Merge all values into a single dict with all None values removed. """ result = {} for arg in itertools.chain(args, (kwargs,)): dict_filter_update(result, arg) return result
python
def dict_filter(*args, **kwargs): """ Merge all values into a single dict with all None values removed. """ result = {} for arg in itertools.chain(args, (kwargs,)): dict_filter_update(result, arg) return result
[ "def", "dict_filter", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "result", "=", "{", "}", "for", "arg", "in", "itertools", ".", "chain", "(", "args", ",", "(", "kwargs", ",", ")", ")", ":", "dict_filter_update", "(", "result", ",", "arg",...
Merge all values into a single dict with all None values removed.
[ "Merge", "all", "values", "into", "a", "single", "dict", "with", "all", "None", "values", "removed", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/utils.py#L61-L68
python-odin/odinweb
odinweb/utils.py
sort_by_priority
def sort_by_priority(iterable, reverse=False, default_priority=10): """ Return a list or objects sorted by a priority value. """ return sorted(iterable, reverse=reverse, key=lambda o: getattr(o, 'priority', default_priority))
python
def sort_by_priority(iterable, reverse=False, default_priority=10): """ Return a list or objects sorted by a priority value. """ return sorted(iterable, reverse=reverse, key=lambda o: getattr(o, 'priority', default_priority))
[ "def", "sort_by_priority", "(", "iterable", ",", "reverse", "=", "False", ",", "default_priority", "=", "10", ")", ":", "return", "sorted", "(", "iterable", ",", "reverse", "=", "reverse", ",", "key", "=", "lambda", "o", ":", "getattr", "(", "o", ",", ...
Return a list or objects sorted by a priority value.
[ "Return", "a", "list", "or", "objects", "sorted", "by", "a", "priority", "value", "." ]
train
https://github.com/python-odin/odinweb/blob/198424133584acc18cb41c8d18d91f803abc810f/odinweb/utils.py#L71-L75
juju/juju-bundlelib
jujubundlelib/changeset.py
handle_services
def handle_services(changeset): """Populate the change set with addCharm and deploy changes.""" charms = {} for service_name, service in sorted(changeset.bundle['services'].items()): # Add the addCharm record if one hasn't been added yet. if service['charm'] not in charms: record...
python
def handle_services(changeset): """Populate the change set with addCharm and deploy changes.""" charms = {} for service_name, service in sorted(changeset.bundle['services'].items()): # Add the addCharm record if one hasn't been added yet. if service['charm'] not in charms: record...
[ "def", "handle_services", "(", "changeset", ")", ":", "charms", "=", "{", "}", "for", "service_name", ",", "service", "in", "sorted", "(", "changeset", ".", "bundle", "[", "'services'", "]", ".", "items", "(", ")", ")", ":", "# Add the addCharm record if one...
Populate the change set with addCharm and deploy changes.
[ "Populate", "the", "change", "set", "with", "addCharm", "and", "deploy", "changes", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/changeset.py#L54-L107
juju/juju-bundlelib
jujubundlelib/changeset.py
handle_machines
def handle_machines(changeset): """Populate the change set with addMachines changes.""" machines = sorted(changeset.bundle.get('machines', {}).items()) for machine_name, machine in machines: if machine is None: # We allow the machine value to be unset in the YAML. machine = {...
python
def handle_machines(changeset): """Populate the change set with addMachines changes.""" machines = sorted(changeset.bundle.get('machines', {}).items()) for machine_name, machine in machines: if machine is None: # We allow the machine value to be unset in the YAML. machine = {...
[ "def", "handle_machines", "(", "changeset", ")", ":", "machines", "=", "sorted", "(", "changeset", ".", "bundle", ".", "get", "(", "'machines'", ",", "{", "}", ")", ".", "items", "(", ")", ")", "for", "machine_name", ",", "machine", "in", "machines", "...
Populate the change set with addMachines changes.
[ "Populate", "the", "change", "set", "with", "addMachines", "changes", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/changeset.py#L110-L141
juju/juju-bundlelib
jujubundlelib/changeset.py
handle_relations
def handle_relations(changeset): """Populate the change set with addRelation changes.""" for relation in changeset.bundle.get('relations', []): relations = [models.Relation(*i.split(':')) if ':' in i else models.Relation(i, '') for i in relation] changeset.send({ ...
python
def handle_relations(changeset): """Populate the change set with addRelation changes.""" for relation in changeset.bundle.get('relations', []): relations = [models.Relation(*i.split(':')) if ':' in i else models.Relation(i, '') for i in relation] changeset.send({ ...
[ "def", "handle_relations", "(", "changeset", ")", ":", "for", "relation", "in", "changeset", ".", "bundle", ".", "get", "(", "'relations'", ",", "[", "]", ")", ":", "relations", "=", "[", "models", ".", "Relation", "(", "*", "i", ".", "split", "(", "...
Populate the change set with addRelation changes.
[ "Populate", "the", "change", "set", "with", "addRelation", "changes", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/changeset.py#L144-L161
juju/juju-bundlelib
jujubundlelib/changeset.py
handle_units
def handle_units(changeset): """Populate the change set with addUnit changes.""" units, records = {}, {} for service_name, service in sorted(changeset.bundle['services'].items()): for i in range(service.get('num_units', 0)): record_id = 'addUnit-{}'.format(changeset.next_action()) ...
python
def handle_units(changeset): """Populate the change set with addUnit changes.""" units, records = {}, {} for service_name, service in sorted(changeset.bundle['services'].items()): for i in range(service.get('num_units', 0)): record_id = 'addUnit-{}'.format(changeset.next_action()) ...
[ "def", "handle_units", "(", "changeset", ")", ":", "units", ",", "records", "=", "{", "}", ",", "{", "}", "for", "service_name", ",", "service", "in", "sorted", "(", "changeset", ".", "bundle", "[", "'services'", "]", ".", "items", "(", ")", ")", ":"...
Populate the change set with addUnit changes.
[ "Populate", "the", "change", "set", "with", "addUnit", "changes", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/changeset.py#L164-L185
juju/juju-bundlelib
jujubundlelib/changeset.py
_handle_units_placement
def _handle_units_placement(changeset, units, records): """Ensure that requires and placement directives are taken into account.""" for service_name, service in sorted(changeset.bundle['services'].items()): num_units = service.get('num_units') if num_units is None: # This is a subord...
python
def _handle_units_placement(changeset, units, records): """Ensure that requires and placement directives are taken into account.""" for service_name, service in sorted(changeset.bundle['services'].items()): num_units = service.get('num_units') if num_units is None: # This is a subord...
[ "def", "_handle_units_placement", "(", "changeset", ",", "units", ",", "records", ")", ":", "for", "service_name", ",", "service", "in", "sorted", "(", "changeset", ".", "bundle", "[", "'services'", "]", ".", "items", "(", ")", ")", ":", "num_units", "=", ...
Ensure that requires and placement directives are taken into account.
[ "Ensure", "that", "requires", "and", "placement", "directives", "are", "taken", "into", "account", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/changeset.py#L188-L210
juju/juju-bundlelib
jujubundlelib/changeset.py
_next_unit_in_service
def _next_unit_in_service(service, placed_in_services): """Return the unit number where to place a unit placed on a service. Receive the service name and a dict mapping service names to the current number of placed units in that service. """ current = placed_in_services.get(service) number = 0 ...
python
def _next_unit_in_service(service, placed_in_services): """Return the unit number where to place a unit placed on a service. Receive the service name and a dict mapping service names to the current number of placed units in that service. """ current = placed_in_services.get(service) number = 0 ...
[ "def", "_next_unit_in_service", "(", "service", ",", "placed_in_services", ")", ":", "current", "=", "placed_in_services", ".", "get", "(", "service", ")", "number", "=", "0", "if", "current", "is", "None", "else", "current", "+", "1", "placed_in_services", "[...
Return the unit number where to place a unit placed on a service. Receive the service name and a dict mapping service names to the current number of placed units in that service.
[ "Return", "the", "unit", "number", "where", "to", "place", "a", "unit", "placed", "on", "a", "service", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/changeset.py#L260-L269
juju/juju-bundlelib
jujubundlelib/changeset.py
parse
def parse(bundle, handler=handle_services): """Return a generator yielding changes required to deploy the given bundle. The bundle argument is a YAML decoded Python dict. """ changeset = ChangeSet(bundle) while True: handler = handler(changeset) for change in changeset.recv(): ...
python
def parse(bundle, handler=handle_services): """Return a generator yielding changes required to deploy the given bundle. The bundle argument is a YAML decoded Python dict. """ changeset = ChangeSet(bundle) while True: handler = handler(changeset) for change in changeset.recv(): ...
[ "def", "parse", "(", "bundle", ",", "handler", "=", "handle_services", ")", ":", "changeset", "=", "ChangeSet", "(", "bundle", ")", "while", "True", ":", "handler", "=", "handler", "(", "changeset", ")", "for", "change", "in", "changeset", ".", "recv", "...
Return a generator yielding changes required to deploy the given bundle. The bundle argument is a YAML decoded Python dict.
[ "Return", "a", "generator", "yielding", "changes", "required", "to", "deploy", "the", "given", "bundle", "." ]
train
https://github.com/juju/juju-bundlelib/blob/c2efa614f53675ed9526027776448bfbb0454ca6/jujubundlelib/changeset.py#L291-L302
OpenAgInitiative/openag_python
openag/couch.py
Server.get_or_create
def get_or_create(self, db_name): """ Creates the database named `db_name` if it doesn't already exist and return it """ if not db_name in self: res = self.resource.put(db_name) if not res[0] == 201: raise RuntimeError( ...
python
def get_or_create(self, db_name): """ Creates the database named `db_name` if it doesn't already exist and return it """ if not db_name in self: res = self.resource.put(db_name) if not res[0] == 201: raise RuntimeError( ...
[ "def", "get_or_create", "(", "self", ",", "db_name", ")", ":", "if", "not", "db_name", "in", "self", ":", "res", "=", "self", ".", "resource", ".", "put", "(", "db_name", ")", "if", "not", "res", "[", "0", "]", "==", "201", ":", "raise", "RuntimeEr...
Creates the database named `db_name` if it doesn't already exist and return it
[ "Creates", "the", "database", "named", "db_name", "if", "it", "doesn", "t", "already", "exist", "and", "return", "it" ]
train
https://github.com/OpenAgInitiative/openag_python/blob/f6202340292bbf7185e1a7d4290188c0dacbb8d0/openag/couch.py#L17-L28
OpenAgInitiative/openag_python
openag/couch.py
Server.replicate
def replicate(self, doc_id, source, target, continuous=False): """ Starts a replication from the `source` database to the `target` database by writing a document with the id `doc_id` to the "_relicator" database """ if doc_id in self["_replicator"]: return ...
python
def replicate(self, doc_id, source, target, continuous=False): """ Starts a replication from the `source` database to the `target` database by writing a document with the id `doc_id` to the "_relicator" database """ if doc_id in self["_replicator"]: return ...
[ "def", "replicate", "(", "self", ",", "doc_id", ",", "source", ",", "target", ",", "continuous", "=", "False", ")", ":", "if", "doc_id", "in", "self", "[", "\"_replicator\"", "]", ":", "return", "data", "=", "{", "\"_id\"", ":", "doc_id", ",", "\"sourc...
Starts a replication from the `source` database to the `target` database by writing a document with the id `doc_id` to the "_relicator" database
[ "Starts", "a", "replication", "from", "the", "source", "database", "to", "the", "target", "database", "by", "writing", "a", "document", "with", "the", "id", "doc_id", "to", "the", "_relicator", "database" ]
train
https://github.com/OpenAgInitiative/openag_python/blob/f6202340292bbf7185e1a7d4290188c0dacbb8d0/openag/couch.py#L30-L44
OpenAgInitiative/openag_python
openag/couch.py
Server.create_user
def create_user(self, username, password): """ Creates a user in the CouchDB instance with the username `username` and password `password` """ user_id = "org.couchdb.user:" + username res = self["_users"].resource.put( user_id, body=json.dumps({ ...
python
def create_user(self, username, password): """ Creates a user in the CouchDB instance with the username `username` and password `password` """ user_id = "org.couchdb.user:" + username res = self["_users"].resource.put( user_id, body=json.dumps({ ...
[ "def", "create_user", "(", "self", ",", "username", ",", "password", ")", ":", "user_id", "=", "\"org.couchdb.user:\"", "+", "username", "res", "=", "self", "[", "\"_users\"", "]", ".", "resource", ".", "put", "(", "user_id", ",", "body", "=", "json", "....
Creates a user in the CouchDB instance with the username `username` and password `password`
[ "Creates", "a", "user", "in", "the", "CouchDB", "instance", "with", "the", "username", "username", "and", "password", "password" ]
train
https://github.com/OpenAgInitiative/openag_python/blob/f6202340292bbf7185e1a7d4290188c0dacbb8d0/openag/couch.py#L54-L79
OpenAgInitiative/openag_python
openag/couch.py
Server.log_in
def log_in(self, username, password): """ Logs in to the CouchDB instance with the credentials `username` and `password` """ self.resource.credentials = (username, password) return self.resource.get_json("_session")[2]
python
def log_in(self, username, password): """ Logs in to the CouchDB instance with the credentials `username` and `password` """ self.resource.credentials = (username, password) return self.resource.get_json("_session")[2]
[ "def", "log_in", "(", "self", ",", "username", ",", "password", ")", ":", "self", ".", "resource", ".", "credentials", "=", "(", "username", ",", "password", ")", "return", "self", ".", "resource", ".", "get_json", "(", "\"_session\"", ")", "[", "2", "...
Logs in to the CouchDB instance with the credentials `username` and `password`
[ "Logs", "in", "to", "the", "CouchDB", "instance", "with", "the", "credentials", "username", "and", "password" ]
train
https://github.com/OpenAgInitiative/openag_python/blob/f6202340292bbf7185e1a7d4290188c0dacbb8d0/openag/couch.py#L81-L87
OpenAgInitiative/openag_python
openag/couch.py
Server.get_user_info
def get_user_info(self): """ Returns the document representing the currently logged in user on the server """ try: user_id = "org.couchdb.user:"+self.resource.credentials[0] except TypeError: raise RuntimeError( "Please log in befor...
python
def get_user_info(self): """ Returns the document representing the currently logged in user on the server """ try: user_id = "org.couchdb.user:"+self.resource.credentials[0] except TypeError: raise RuntimeError( "Please log in befor...
[ "def", "get_user_info", "(", "self", ")", ":", "try", ":", "user_id", "=", "\"org.couchdb.user:\"", "+", "self", ".", "resource", ".", "credentials", "[", "0", "]", "except", "TypeError", ":", "raise", "RuntimeError", "(", "\"Please log in before trying to access ...
Returns the document representing the currently logged in user on the server
[ "Returns", "the", "document", "representing", "the", "currently", "logged", "in", "user", "on", "the", "server" ]
train
https://github.com/OpenAgInitiative/openag_python/blob/f6202340292bbf7185e1a7d4290188c0dacbb8d0/openag/couch.py#L89-L105
OpenAgInitiative/openag_python
openag/couch.py
Server.push_design_documents
def push_design_documents(self, design_path): """ Push the design documents stored in `design_path` to the server """ for db_name in os.listdir(design_path): if db_name.startswith("__") or db_name.startswith("."): continue db_path = os.path.join(de...
python
def push_design_documents(self, design_path): """ Push the design documents stored in `design_path` to the server """ for db_name in os.listdir(design_path): if db_name.startswith("__") or db_name.startswith("."): continue db_path = os.path.join(de...
[ "def", "push_design_documents", "(", "self", ",", "design_path", ")", ":", "for", "db_name", "in", "os", ".", "listdir", "(", "design_path", ")", ":", "if", "db_name", ".", "startswith", "(", "\"__\"", ")", "or", "db_name", ".", "startswith", "(", "\".\"",...
Push the design documents stored in `design_path` to the server
[ "Push", "the", "design", "documents", "stored", "in", "design_path", "to", "the", "server" ]
train
https://github.com/OpenAgInitiative/openag_python/blob/f6202340292bbf7185e1a7d4290188c0dacbb8d0/openag/couch.py#L111-L128
OpenAgInitiative/openag_python
openag/couch.py
Server._folder_to_dict
def _folder_to_dict(self, path): """ Recursively reads the files from the directory given by `path` and writes their contents to a nested dictionary, which is then returned. """ res = {} for key in os.listdir(path): if key.startswith('.'): cont...
python
def _folder_to_dict(self, path): """ Recursively reads the files from the directory given by `path` and writes their contents to a nested dictionary, which is then returned. """ res = {} for key in os.listdir(path): if key.startswith('.'): cont...
[ "def", "_folder_to_dict", "(", "self", ",", "path", ")", ":", "res", "=", "{", "}", "for", "key", "in", "os", ".", "listdir", "(", "path", ")", ":", "if", "key", ".", "startswith", "(", "'.'", ")", ":", "continue", "key_path", "=", "os", ".", "pa...
Recursively reads the files from the directory given by `path` and writes their contents to a nested dictionary, which is then returned.
[ "Recursively", "reads", "the", "files", "from", "the", "directory", "given", "by", "path", "and", "writes", "their", "contents", "to", "a", "nested", "dictionary", "which", "is", "then", "returned", "." ]
train
https://github.com/OpenAgInitiative/openag_python/blob/f6202340292bbf7185e1a7d4290188c0dacbb8d0/openag/couch.py#L130-L146
gisce/flask-erppeek
flask_erppeek/openerp.py
OpenERP.init_app
def init_app(self, app): """This callback can be used to initialize an application for use with the OpenERP server. """ app.config.setdefault('OPENERP_SERVER', 'http://localhost:8069') app.config.setdefault('OPENERP_DATABASE', 'openerp') app.config.setdefault('OPENERP_DEF...
python
def init_app(self, app): """This callback can be used to initialize an application for use with the OpenERP server. """ app.config.setdefault('OPENERP_SERVER', 'http://localhost:8069') app.config.setdefault('OPENERP_DATABASE', 'openerp') app.config.setdefault('OPENERP_DEF...
[ "def", "init_app", "(", "self", ",", "app", ")", ":", "app", ".", "config", ".", "setdefault", "(", "'OPENERP_SERVER'", ",", "'http://localhost:8069'", ")", "app", ".", "config", ".", "setdefault", "(", "'OPENERP_DATABASE'", ",", "'openerp'", ")", "app", "."...
This callback can be used to initialize an application for use with the OpenERP server.
[ "This", "callback", "can", "be", "used", "to", "initialize", "an", "application", "for", "use", "with", "the", "OpenERP", "server", "." ]
train
https://github.com/gisce/flask-erppeek/blob/f81dd0920ab085305d290570962724d1618ff9fc/flask_erppeek/openerp.py#L67-L89
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_asset_search_session_for_repository
def get_asset_search_session_for_repository(self, repository_id=None): """Gets an asset search session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetSearchSession) - an AssetSearchSession raise: NotF...
python
def get_asset_search_session_for_repository(self, repository_id=None): """Gets an asset search session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetSearchSession) - an AssetSearchSession raise: NotF...
[ "def", "get_asset_search_session_for_repository", "(", "self", ",", "repository_id", "=", "None", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_asset_search", "(", ")", ":", "raise", "Unimplem...
Gets an asset search session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetSearchSession) - an AssetSearchSession raise: NotFound - repository_id not found raise: NullArgument - repository_id is nul...
[ "Gets", "an", "asset", "search", "session", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L758-L788
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_asset_admin_session
def get_asset_admin_session(self, *args, **kwargs): """Gets an asset administration session for creating, updating and deleting assets. return: (osid.repository.AssetAdminSession) - an AssetAdminSession raise: OperationFailed - unable to complete request raise: ...
python
def get_asset_admin_session(self, *args, **kwargs): """Gets an asset administration session for creating, updating and deleting assets. return: (osid.repository.AssetAdminSession) - an AssetAdminSession raise: OperationFailed - unable to complete request raise: ...
[ "def", "get_asset_admin_session", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_asset_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "excep...
Gets an asset administration session for creating, updating and deleting assets. return: (osid.repository.AssetAdminSession) - an AssetAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_admin() is false compli...
[ "Gets", "an", "asset", "administration", "session", "for", "creating", "updating", "and", "deleting", "assets", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L790-L813
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_asset_admin_session_for_repository
def get_asset_admin_session_for_repository(self, repository_id=None, *args, **kwargs): """Gets an asset administration session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetAdminSession) - an AssetAdminSessio...
python
def get_asset_admin_session_for_repository(self, repository_id=None, *args, **kwargs): """Gets an asset administration session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetAdminSession) - an AssetAdminSessio...
[ "def", "get_asset_admin_session_for_repository", "(", "self", ",", "repository_id", "=", "None", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_as...
Gets an asset administration session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetAdminSession) - an AssetAdminSession raise: NotFound - repository_id not found raise: NullArgument - repository_id ...
[ "Gets", "an", "asset", "administration", "session", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L815-L845
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_asset_temporal_session
def get_asset_temporal_session(self): """Gets the session for retrieving temporal coverage of an asset. return: (osid.repository.AssetTemporalSession) - an AssetTemporalSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_te...
python
def get_asset_temporal_session(self): """Gets the session for retrieving temporal coverage of an asset. return: (osid.repository.AssetTemporalSession) - an AssetTemporalSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_te...
[ "def", "get_asset_temporal_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_asset_temporal", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# Operati...
Gets the session for retrieving temporal coverage of an asset. return: (osid.repository.AssetTemporalSession) - an AssetTemporalSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_temporal() is false compliance: optional - ...
[ "Gets", "the", "session", "for", "retrieving", "temporal", "coverage", "of", "an", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L992-L1014
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_asset_temporal_session_for_repository
def get_asset_temporal_session_for_repository(self, repository_id=None): """Gets the session for retrieving temporal coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetTemporalSession) - an ...
python
def get_asset_temporal_session_for_repository(self, repository_id=None): """Gets the session for retrieving temporal coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetTemporalSession) - an ...
[ "def", "get_asset_temporal_session_for_repository", "(", "self", ",", "repository_id", "=", "None", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_asset_temporal", "(", ")", ":", "raise", "Unim...
Gets the session for retrieving temporal coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.AssetTemporalSession) - an AssetTemporalSession raise: NotFound - repository_id not found ...
[ "Gets", "the", "session", "for", "retrieving", "temporal", "coverage", "of", "an", "asset", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1016-L1047
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_asset_temporal_assignment_session
def get_asset_temporal_assignment_session(self): """Gets the session for assigning temporal coverage to an asset. return: (osid.repository.AssetTemporalAssignmentSession) - an AssetTemporalAssignmentSession raise: OperationFailed - unable to complete request raise: Uni...
python
def get_asset_temporal_assignment_session(self): """Gets the session for assigning temporal coverage to an asset. return: (osid.repository.AssetTemporalAssignmentSession) - an AssetTemporalAssignmentSession raise: OperationFailed - unable to complete request raise: Uni...
[ "def", "get_asset_temporal_assignment_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_asset_temporal_assignment", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", ...
Gets the session for assigning temporal coverage to an asset. return: (osid.repository.AssetTemporalAssignmentSession) - an AssetTemporalAssignmentSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_temporal_assignment() is ...
[ "Gets", "the", "session", "for", "assigning", "temporal", "coverage", "to", "an", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1049-L1072
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_asset_composition_session
def get_asset_composition_session(self): """Gets the session for retrieving asset compositions. return: (osid.repository.AssetCompositionSession) - an AssetCompositionSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_comp...
python
def get_asset_composition_session(self): """Gets the session for retrieving asset compositions. return: (osid.repository.AssetCompositionSession) - an AssetCompositionSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_comp...
[ "def", "get_asset_composition_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_asset_composition", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# O...
Gets the session for retrieving asset compositions. return: (osid.repository.AssetCompositionSession) - an AssetCompositionSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_composition() is false compliance: optional - Th...
[ "Gets", "the", "session", "for", "retrieving", "asset", "compositions", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1222-L1244
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_asset_composition_design_session
def get_asset_composition_design_session(self): """Gets the session for creating asset compositions. return: (osid.repository.AssetCompositionDesignSession) - an AssetCompositionDesignSession raise: OperationFailed - unable to complete request raise: Unimplemented - su...
python
def get_asset_composition_design_session(self): """Gets the session for creating asset compositions. return: (osid.repository.AssetCompositionDesignSession) - an AssetCompositionDesignSession raise: OperationFailed - unable to complete request raise: Unimplemented - su...
[ "def", "get_asset_composition_design_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_asset_composition_design", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "...
Gets the session for creating asset compositions. return: (osid.repository.AssetCompositionDesignSession) - an AssetCompositionDesignSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_composition_design() is false ...
[ "Gets", "the", "session", "for", "creating", "asset", "compositions", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1246-L1269
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_composition_lookup_session
def get_composition_lookup_session(self): """Gets the OsidSession associated with the composition lookup service. return: (osid.repository.CompositionLookupSession) - the new CompositionLookupSession raise: OperationFailed - unable to complete request raise: Un...
python
def get_composition_lookup_session(self): """Gets the OsidSession associated with the composition lookup service. return: (osid.repository.CompositionLookupSession) - the new CompositionLookupSession raise: OperationFailed - unable to complete request raise: Un...
[ "def", "get_composition_lookup_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_composition_lookup", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "#...
Gets the OsidSession associated with the composition lookup service. return: (osid.repository.CompositionLookupSession) - the new CompositionLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_composition_lookup() is false ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "composition", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1271-L1294
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_composition_admin_session
def get_composition_admin_session(self): """Gets a composition administration session for creating, updating and deleting compositions. return: (osid.repository.CompositionAdminSession) - a CompositionAdminSession raise: OperationFailed - unable to complete request ...
python
def get_composition_admin_session(self): """Gets a composition administration session for creating, updating and deleting compositions. return: (osid.repository.CompositionAdminSession) - a CompositionAdminSession raise: OperationFailed - unable to complete request ...
[ "def", "get_composition_admin_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_composition_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# O...
Gets a composition administration session for creating, updating and deleting compositions. return: (osid.repository.CompositionAdminSession) - a CompositionAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_composition_adm...
[ "Gets", "a", "composition", "administration", "session", "for", "creating", "updating", "and", "deleting", "compositions", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1441-L1464
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_composition_admin_session_for_repository
def get_composition_admin_session_for_repository(self, repository_id=None): """Gets a composiiton administrative session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.CompositionAdminSession) - a Compositi...
python
def get_composition_admin_session_for_repository(self, repository_id=None): """Gets a composiiton administrative session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.CompositionAdminSession) - a Compositi...
[ "def", "get_composition_admin_session_for_repository", "(", "self", ",", "repository_id", "=", "None", ")", ":", "if", "repository_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_composition_admin", "(", ")", "or", ...
Gets a composiiton administrative session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository return: (osid.repository.CompositionAdminSession) - a CompositionAdminSession raise: NotFound - repository_id not found raise: NullA...
[ "Gets", "a", "composiiton", "administrative", "session", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1466-L1497
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_repository_query_session
def get_repository_query_session(self): """Gets the repository query session. return: (osid.repository.RepositoryQuerySession) - a RepositoryQuerySession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_repository_query() is false ...
python
def get_repository_query_session(self): """Gets the repository query session. return: (osid.repository.RepositoryQuerySession) - a RepositoryQuerySession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_repository_query() is false ...
[ "def", "get_repository_query_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_repository_query", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# Ope...
Gets the repository query session. return: (osid.repository.RepositoryQuerySession) - a RepositoryQuerySession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_repository_query() is false compliance: optional - This method must be imp...
[ "Gets", "the", "repository", "query", "session", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1680-L1702
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_repository_search_session
def get_repository_search_session(self): """Gets the repository search session. return: (osid.repository.RepositorySearchSession) - a RepositorySearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_repository_search() is fals...
python
def get_repository_search_session(self): """Gets the repository search session. return: (osid.repository.RepositorySearchSession) - a RepositorySearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_repository_search() is fals...
[ "def", "get_repository_search_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_repository_search", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# O...
Gets the repository search session. return: (osid.repository.RepositorySearchSession) - a RepositorySearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_repository_search() is false compliance: optional - This method must be...
[ "Gets", "the", "repository", "search", "session", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1704-L1726
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryManager.get_repository_admin_session
def get_repository_admin_session(self): """Gets the repository administrative session for creating, updating and deleteing repositories. return: (osid.repository.RepositoryAdminSession) - a RepositoryAdminSession raise: OperationFailed - unable to complete request ...
python
def get_repository_admin_session(self): """Gets the repository administrative session for creating, updating and deleteing repositories. return: (osid.repository.RepositoryAdminSession) - a RepositoryAdminSession raise: OperationFailed - unable to complete request ...
[ "def", "get_repository_admin_session", "(", "self", ")", ":", "if", "not", "self", ".", "supports_repository_admin", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", "# Ope...
Gets the repository administrative session for creating, updating and deleteing repositories. return: (osid.repository.RepositoryAdminSession) - a RepositoryAdminSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_repository_admi...
[ "Gets", "the", "repository", "administrative", "session", "for", "creating", "updating", "and", "deleteing", "repositories", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1728-L1751
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_lookup_session
def get_asset_lookup_session(self, proxy, *args, **kwargs): """Gets the OsidSession associated with the asset lookup service. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetLookupSession) - the new AssetLookupSession raise: OperationFailed - una...
python
def get_asset_lookup_session(self, proxy, *args, **kwargs): """Gets the OsidSession associated with the asset lookup service. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetLookupSession) - the new AssetLookupSession raise: OperationFailed - una...
[ "def", "get_asset_lookup_session", "(", "self", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "supports_asset_lookup", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", ...
Gets the OsidSession associated with the asset lookup service. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetLookupSession) - the new AssetLookupSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "asset", "lookup", "service", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1926-L1949
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_lookup_session_for_repository
def get_asset_lookup_session_for_repository(self, repository_id, proxy, *args, **kwargs): """Gets the OsidSession associated with the asset lookup service for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy ...
python
def get_asset_lookup_session_for_repository(self, repository_id, proxy, *args, **kwargs): """Gets the OsidSession associated with the asset lookup service for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy ...
[ "def", "get_asset_lookup_session_for_repository", "(", "self", ",", "repository_id", ",", "proxy", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_...
Gets the OsidSession associated with the asset lookup service for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetLookupSession) - the new AssetLookupSession ...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "asset", "lookup", "service", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1951-L1982
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_query_session
def get_asset_query_session(self, proxy): """Gets an asset query session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetQuerySession) - an AssetQuerySession raise: OperationFailed - unable to complete request raise: Unimplemented - sup...
python
def get_asset_query_session(self, proxy): """Gets an asset query session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetQuerySession) - an AssetQuerySession raise: OperationFailed - unable to complete request raise: Unimplemented - sup...
[ "def", "get_asset_query_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_asset_query", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise", ...
Gets an asset query session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetQuerySession) - an AssetQuerySession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_query() is false compliance: opti...
[ "Gets", "an", "asset", "query", "session", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L1984-L2007
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_query_session_for_repository
def get_asset_query_session_for_repository(self, repository_id, proxy): """Gets an asset query session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetQuerySession) - an ...
python
def get_asset_query_session_for_repository(self, repository_id, proxy): """Gets an asset query session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetQuerySession) - an ...
[ "def", "get_asset_query_session_for_repository", "(", "self", ",", "repository_id", ",", "proxy", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_asset_query", "(", ")", ":", "raise", "Unimpleme...
Gets an asset query session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetQuerySession) - an AssetQuerySession raise: NotFound - repository_id not found ...
[ "Gets", "an", "asset", "query", "session", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2009-L2039
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_search_session
def get_asset_search_session(self, proxy): """Gets an asset search session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSearchSession) - an AssetSearchSession raise: OperationFailed - unable to complete request raise: Unimplemented -...
python
def get_asset_search_session(self, proxy): """Gets an asset search session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSearchSession) - an AssetSearchSession raise: OperationFailed - unable to complete request raise: Unimplemented -...
[ "def", "get_asset_search_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_asset_search", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "raise"...
Gets an asset search session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSearchSession) - an AssetSearchSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asset_search() is false compliance: ...
[ "Gets", "an", "asset", "search", "session", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2041-L2064
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_notification_session
def get_asset_notification_session(self, asset_receiver, proxy): """Gets the notification session for notifications pertaining to asset changes. arg: asset_receiver (osid.repository.AssetReceiver): the notification callback arg proxy (osid.proxy.Proxy): a proxy ...
python
def get_asset_notification_session(self, asset_receiver, proxy): """Gets the notification session for notifications pertaining to asset changes. arg: asset_receiver (osid.repository.AssetReceiver): the notification callback arg proxy (osid.proxy.Proxy): a proxy ...
[ "def", "get_asset_notification_session", "(", "self", ",", "asset_receiver", ",", "proxy", ")", ":", "if", "asset_receiver", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_asset_notification", "(", ")", ":", "raise", ...
Gets the notification session for notifications pertaining to asset changes. arg: asset_receiver (osid.repository.AssetReceiver): the notification callback arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetNotificationSession) - an ...
[ "Gets", "the", "notification", "session", "for", "notifications", "pertaining", "to", "asset", "changes", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2156-L2185
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_notification_session_for_repository
def get_asset_notification_session_for_repository(self, asset_receiver, repository_id, proxy): """Gets the asset notification session for the given repository. arg: asset_receiver (osid.repository.AssetReceiver): the notification callback arg: repository_id (osid.id.Id): t...
python
def get_asset_notification_session_for_repository(self, asset_receiver, repository_id, proxy): """Gets the asset notification session for the given repository. arg: asset_receiver (osid.repository.AssetReceiver): the notification callback arg: repository_id (osid.id.Id): t...
[ "def", "get_asset_notification_session_for_repository", "(", "self", ",", "asset_receiver", ",", "repository_id", ",", "proxy", ")", ":", "if", "not", "repository_id", "or", "not", "asset_receiver", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".",...
Gets the asset notification session for the given repository. arg: asset_receiver (osid.repository.AssetReceiver): the notification callback arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository...
[ "Gets", "the", "asset", "notification", "session", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2187-L2219
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_repository_session
def get_asset_repository_session(self, proxy): """Gets the session for retrieving asset to repository mappings. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetRepositorySession) - an AssetRepositorySession raise: OperationFailed - unable to comp...
python
def get_asset_repository_session(self, proxy): """Gets the session for retrieving asset to repository mappings. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetRepositorySession) - an AssetRepositorySession raise: OperationFailed - unable to comp...
[ "def", "get_asset_repository_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_asset_repository", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", ...
Gets the session for retrieving asset to repository mappings. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetRepositorySession) - an AssetRepositorySession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_asse...
[ "Gets", "the", "session", "for", "retrieving", "asset", "to", "repository", "mappings", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2221-L2244
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_repository_assignment_session
def get_asset_repository_assignment_session(self, proxy): """Gets the session for assigning asset to repository mappings. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetRepositoryAssignmentSession) - an AssetRepositoryAsignmentSession raise: Ope...
python
def get_asset_repository_assignment_session(self, proxy): """Gets the session for assigning asset to repository mappings. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetRepositoryAssignmentSession) - an AssetRepositoryAsignmentSession raise: Ope...
[ "def", "get_asset_repository_assignment_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_asset_repository_assignment", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "...
Gets the session for assigning asset to repository mappings. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetRepositoryAssignmentSession) - an AssetRepositoryAsignmentSession raise: OperationFailed - unable to complete request raise: Unimplement...
[ "Gets", "the", "session", "for", "assigning", "asset", "to", "repository", "mappings", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2246-L2270
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_smart_repository_session
def get_asset_smart_repository_session(self, repository_id, proxy): """Gets an asset smart repository session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSmartRepositorySes...
python
def get_asset_smart_repository_session(self, repository_id, proxy): """Gets an asset smart repository session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSmartRepositorySes...
[ "def", "get_asset_smart_repository_session", "(", "self", ",", "repository_id", ",", "proxy", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_asset_smart_repository", "(", ")", ":", "raise", "Un...
Gets an asset smart repository session for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSmartRepositorySession) - an AssetSmartRepositorySession raise: NotFound...
[ "Gets", "an", "asset", "smart", "repository", "session", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2272-L2300
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_temporal_assignment_session_for_repository
def get_asset_temporal_assignment_session_for_repository(self, repository_id, proxy): """Gets the session for assigning temporal coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy ...
python
def get_asset_temporal_assignment_session_for_repository(self, repository_id, proxy): """Gets the session for assigning temporal coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy ...
[ "def", "get_asset_temporal_assignment_session_for_repository", "(", "self", ",", "repository_id", ",", "proxy", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_asset_temporal_assignment", "(", ")", ...
Gets the session for assigning temporal coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetTemporalAssignmentSession) - an AssetTemporalAssign...
[ "Gets", "the", "session", "for", "assigning", "temporal", "coverage", "of", "an", "asset", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2386-L2417
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_spatial_session
def get_asset_spatial_session(self, proxy): """Gets the session for retrieving spatial coverage of an asset. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSpatialSession) - an AssetSpatialSession raise: OperationFailed - unable to complete requ...
python
def get_asset_spatial_session(self, proxy): """Gets the session for retrieving spatial coverage of an asset. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSpatialSession) - an AssetSpatialSession raise: OperationFailed - unable to complete requ...
[ "def", "get_asset_spatial_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_spatial_asset", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":", "rais...
Gets the session for retrieving spatial coverage of an asset. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSpatialSession) - an AssetSpatialSession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_spatial_as...
[ "Gets", "the", "session", "for", "retrieving", "spatial", "coverage", "of", "an", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2419-L2442
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_spatial_session_for_repository
def get_asset_spatial_session_for_repository(self, repository_id, proxy): """Gets the session for retrieving spatial coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osi...
python
def get_asset_spatial_session_for_repository(self, repository_id, proxy): """Gets the session for retrieving spatial coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osi...
[ "def", "get_asset_spatial_session_for_repository", "(", "self", ",", "repository_id", ",", "proxy", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_asset_spatial", "(", ")", "or", "not", "self",...
Gets the session for retrieving spatial coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSpatialSession) - an AssetSpatialSession ra...
[ "Gets", "the", "session", "for", "retrieving", "spatial", "coverage", "of", "an", "asset", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2444-L2475
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_spatial_assignment_session
def get_asset_spatial_assignment_session(self, proxy): """Gets the session for assigning spatial coverage to an asset. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSpatialAssignmentSession) - an AssetSpatialAssignmentSession raise: OperationFa...
python
def get_asset_spatial_assignment_session(self, proxy): """Gets the session for assigning spatial coverage to an asset. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSpatialAssignmentSession) - an AssetSpatialAssignmentSession raise: OperationFa...
[ "def", "get_asset_spatial_assignment_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_asset_spatial_assignment", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "Import...
Gets the session for assigning spatial coverage to an asset. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSpatialAssignmentSession) - an AssetSpatialAssignmentSession raise: OperationFailed - unable to complete request raise: Unimplemented - ...
[ "Gets", "the", "session", "for", "assigning", "spatial", "coverage", "to", "an", "asset", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2477-L2501
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_asset_spatial_assignment_session_for_repository
def get_asset_spatial_assignment_session_for_repository(self, repository_id, proxy): """Gets the session for assigning spatial coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy re...
python
def get_asset_spatial_assignment_session_for_repository(self, repository_id, proxy): """Gets the session for assigning spatial coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy re...
[ "def", "get_asset_spatial_assignment_session_for_repository", "(", "self", ",", "repository_id", ",", "proxy", ")", ":", "if", "not", "repository_id", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_asset_spatial_assignment", "(", ")", "o...
Gets the session for assigning spatial coverage of an asset for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.AssetSpatialAssignmentSession) - an AssetSpatialAssignmen...
[ "Gets", "the", "session", "for", "assigning", "spatial", "coverage", "of", "an", "asset", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2503-L2534
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_composition_lookup_session_for_repository
def get_composition_lookup_session_for_repository(self, repository_id, proxy): """Gets the OsidSession associated with the composition lookup service for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy ...
python
def get_composition_lookup_session_for_repository(self, repository_id, proxy): """Gets the OsidSession associated with the composition lookup service for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy ...
[ "def", "get_composition_lookup_session_for_repository", "(", "self", ",", "repository_id", ",", "proxy", ")", ":", "if", "repository_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "self", ".", "supports_composition_lookup", "(", ")", ":", ...
Gets the OsidSession associated with the composition lookup service for the given repository. arg: repository_id (osid.id.Id): the Id of the repository arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.CompositionLookupSession) - the new CompositionLo...
[ "Gets", "the", "OsidSession", "associated", "with", "the", "composition", "lookup", "service", "for", "the", "given", "repository", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2613-L2644
mitsei/dlkit
dlkit/handcar/repository/managers.py
RepositoryProxyManager.get_composition_query_session
def get_composition_query_session(self, proxy): """Gets a composition query session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.CompositionQuerySession) - a CompositionQuerySession raise: OperationFailed - unable to complete request raise...
python
def get_composition_query_session(self, proxy): """Gets a composition query session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.CompositionQuerySession) - a CompositionQuerySession raise: OperationFailed - unable to complete request raise...
[ "def", "get_composition_query_session", "(", "self", ",", "proxy", ")", ":", "if", "not", "self", ".", "supports_composition_query", "(", ")", ":", "raise", "Unimplemented", "(", ")", "try", ":", "from", ".", "import", "sessions", "except", "ImportError", ":",...
Gets a composition query session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.CompositionQuerySession) - a CompositionQuerySession raise: OperationFailed - unable to complete request raise: Unimplemented - supports_composition_query() is false ...
[ "Gets", "a", "composition", "query", "session", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/repository/managers.py#L2646-L2669