Get information about a space through space key
        :param space_key: The unique space key name
        :param expand: OPTIONAL: additional info from description, homepage
        :return: Returns the space along with its ID
188525
def get_space(self, space_key, expand='description.plain,homepage'):
        
        url = 'rest/api/space/{space_key}?expand={expand}'.format(space_key=space_key,
                                                                  expand=expand)
        return self.get(url)
383126
def delete_space(self, name=None, guid=None):
        

        if not guid:
            if name:
                spaces = self._get_spaces()
                for space in spaces['resources']:
                    if space['entity']['name'] == name:
                        guid = space['metadata']['guid']
                        break
                if not guid:
                    raise ValueError("Space with name %s not found." % (name))
            else:
                guid = self.guid

        logging.warning("Deleting space (%s) and all services." % (guid))

        return self.api.delete("/v2/spaces/%s" % (guid), params={'recursive':
        'true'})
805832
def get(self, key, namespace=None):
        """"""
        if not self.path:
            return NO_VALUE

        logger.debug('Searching %r for key: %s, namepsace: %s', self, key, namespace)
        full_key = generate_uppercase_key(key, namespace)
        return get_key_from_envs(self.cfg, full_key)
948281
def get_namespace_reveal( self, namespace_id, include_history=True ):
        
        cur = self.db.cursor()
        namespace_reveal = namedb_get_namespace_reveal( cur, namespace_id, self.lastblock, include_history=include_history )
        return namespace_reveal
989383
def get_shrink_data_info(in_data, api_key=None):
    
    if api_key:
        return _shrink_info(in_data, api_key)

    api_keys = find_keys()
    for key in api_keys:
        try:
            return _shrink_info(in_data, key)
        except ValueError:
            pass

    raise ValueError('No valid api key found')
682945
def keys(self, namespace, prefix=None, limit=None, offset=None):
        """"""
        params = [namespace]
        query = 'SELECT key FROM gauged_keys WHERE namespace = %s'
        if prefix is not None:
            query += ' AND key LIKE %s'
            params.append(prefix + '%')
        if limit is not None:
            query += ' LIMIT %s'
            params.append(limit)
        if offset is not None:
            query += ' OFFSET %s'
            params.append(offset)
        cursor = self.cursor
        cursor.execute(query, params)
        return [key for key, in cursor]
896323
def _key_for_namespace(namespace, app):
  
  if namespace:
    return db.Key.from_path(metadata.Namespace.KIND_NAME,
                            namespace,
                            _app=app)
  else:
    return db.Key.from_path(metadata.Namespace.KIND_NAME,
                            metadata.Namespace.EMPTY_NAMESPACE_ID,
                            _app=app)
586552
def _expand_space(self):
        

        ## --- Expand the config space
        self._expand_config_space()

        ## --- Expand the space
        self.space_expanded = []
        for variable in self.space:
            self.space_expanded += variable.expand()
594801
protected Term buildIdTerm(String spaceId, String key) {
        return new Term(FIELD_ID, spaceId.trim() + ":" + key.trim());
    }
927078
def get(self, key, key_length=0):
        
        if key_length < 1:
            key_length = len(key)
        return self.get_method(self, key, key_length)
1063085
def get_section_key_line(self, data, key, opt_extension=''):
        
        start = 0
        init = 0
        while start != -1:
            start = self.get_next_section_start_line(data[init:])
            init += start
            if start != -1:
                if data[init].strip().lower() == self.opt[key] + opt_extension:
                    break
                init += 1
        if start != -1:
            start = init
        return start
459447
def _get_full_key(self, key):
        """"""

        length = len(key)

        if length == 3:
            return key

        elif length == 2:
            row, col = key
            tab = self.grid.current_table
            return row, col, tab

        else:
            msg = _("Key length {length}  not in (2, 3)").format(length=length)
            raise ValueError(msg)
1276946
def key_exists(self, namespace, key):
        

        return namespace in self.__data and key in self.__data[namespace]
6816
def get_name(self, key):
        '''
        '''
        try:
            return self.nameDict[key]
        except IndexError as e:
            print 'IndexError {0}: {1}'.format(e.errno, e.strerror)
1136355
def cget(self, key):
        
        if key == 'scalewidth':
            return self._scale.cget('length')
        elif key == 'from':
            return self._scale.cget('from')
        elif key == 'to':
            return self._scale.cget('to')
        elif key == 'entrywidth':
            return self._entry.cget('width')
        elif key == 'entryscalepad':
            return self.__entryscalepad
        elif key == 'compound':
            return self.__compound
        elif key == 'orient':
            return str(self._scale.cget('orient'))
        else:
            return ttk.Frame.cget(self, key)
655715
def add_key(self, key, first=False):
        
        if first:
            self.keys = [key] + self.keys
        else:
            self.keys.append(key)
        if isinstance(key, VSpaceKey):
            self.space = key
60071
def key_expand(key, Nk=4):
    """"""
    assert Nk in {4, 6, 8}
    Nr = Nk + 6

    key = key.reshape(Nk, 32)
    rkey = exprzeros(4*(Nr+1), 32)

    for i in range(Nk):
        rkey[i] = key[i]

    for i in range(Nk, 4*(Nr+1)):
        if i % Nk == 0:
            rkey[i] = rkey[i-Nk] ^ subword(rotword(rkey[i-1])) ^ RCON[i//Nk].zext(32-8)
        elif Nk > 6 and i % Nk == 4:
            rkey[i] = rkey[i-Nk] ^ subword(rkey[i-1])
        else:
            rkey[i] = rkey[i-Nk] ^ rkey[i-1]

    return rkey