Get uppy instance IDs for which state is stored.
190448
function findUppyInstances () {
  const instances = []
  for (let i = 0; i < localStorage.length; i++) {
    const key = localStorage.key(i)
    if (/^uppyState:/.test(key)) {
      instances.push(key.slice('uppyState:'.length))
    }
  }
  return instances
}
669838
def __get_stored_instances(self, factory_name):
        # type: (str) -> List[StoredInstance]
        
        with self.__instances_lock:
            return [
                stored_instance
                for stored_instance in self.__instances.values()
                if stored_instance.factory_name == factory_name
            ]
608864
def upi(self):
        """"""
        parameter = 'UPI'
        if parameter not in self._by:
            self._populate(by=parameter)
        return self._by[parameter]
1305878
def get_refresh_ids(self):
        
        ids = []
        for bucket in self.router.lonely_buckets():
            rid = random.randint(*bucket.range).to_bytes(20, byteorder='big')
            ids.append(rid)
        return ids
562879
def _collect_state_names(self, variable):
        ""
        states = sorted(list(self.data.ix[:, variable].dropna().unique()))
        return states
65355
def get_state_all(self):
        """"""
        state_dict = {}
        for device in self.get_device_names().keys():
            state_dict[device] = self.get_state(device)
        return state_dict
402200
def get_multi_instances_by_id(self, instance_ids):
        
        result = []

        for reservation in self.all_reservations():
            for instance in reservation.instances:
                if instance.id in instance_ids:
                    result.append(instance)

        # TODO: Trim error message down to specific invalid id.
        if instance_ids and len(instance_ids) > len(result):
            raise InvalidInstanceIdError(instance_ids)

        return result
420080
def ipopo_instances(self):
        
        try:
            with use_ipopo(self.__context) as ipopo:
                return {
                    instance[0]: ipopo.get_instance_details(instance[0])
                    for instance in ipopo.get_instances()
                }
        except BundleException:
            # iPOPO is not available:
            return None
348408
def list_():
    '''
    

    '''
    ret = []
    states_path = _states_path()
    if not os.path.isdir(states_path):
        return ret

    for state in os.listdir(states_path):
        if state.endswith(('-pkgs.yml', '-reps.yml')):
            # Remove the suffix, as both share the same size
            ret.append(state[:-9])
    return sorted(set(ret))
114550
def __IpsToServerIds(self):
    
    master_instance = self.__GetMasterInstance()
    assert(master_instance)
    retval, response = self.__RunMaprCli('node list -columns id')
    ip_to_id = {}
    for line_num, line in enumerate(response.split('\n')):
      tokens = line.split()
      if len(tokens) == 3 and tokens[0] != 'id':        
        instance_id = tokens[0]
        ip = tokens[2]
        ip_to_id[ip] = instance_id
    return ip_to_id
791480
def _get_ids_from_hostname(self, hostname):
        """"""
        results = self.list_instances(hostname=hostname, mask="id")
        return [result['id'] for result in results]
1322018
def node_state(id_):
    '''
    
    '''
    states_int = {
        0: 'RUNNING',
        1: 'REBOOTING',
        2: 'TERMINATED',
        3: 'PENDING',
        4: 'UNKNOWN',
        5: 'STOPPED',
        6: 'SUSPENDED',
        7: 'ERROR',
        8: 'PAUSED'}
    states_str = {
        'running': 'RUNNING',
        'rebooting': 'REBOOTING',
        'starting': 'STARTING',
        'terminated': 'TERMINATED',
        'pending': 'PENDING',
        'unknown': 'UNKNOWN',
        'stopping': 'STOPPING',
        'stopped': 'STOPPED',
        'suspended': 'SUSPENDED',
        'error': 'ERROR',
        'paused': 'PAUSED',
        'reconfiguring': 'RECONFIGURING'
    }
    return states_str[id_] if isinstance(id_, six.string_types) else states_int[id_]
1340620
def _get_instance_state(self):
        
        instance = self._get_instance()
        state = None

        try:
            state = instance.state['Name']
        except Exception:
            raise EC2CloudException(
                'Instance with id: {instance_id}, '
                'cannot be found.'.format(
                    instance_id=self.running_instance_id
                )
            )

        return state
1216715
def get_full_id(self, state):
        
        desc = state.medium.get_descriptor()
        return desc.doc_id + u"/" + unicode(desc.instance_id)
250515
def owned_ec_states(self):
        ''''''
        with self._mutex:
            if not self._owned_ec_states:
                if self.owned_ecs:
                    states = []
                    for ec in self.owned_ecs:
                        states.append(self._get_ec_state(ec))
                    self._owned_ec_states = states
                else:
                    self._owned_ec_states = []
        return self._owned_ec_states
738487
def _get_all_scanner_ids(zap_helper):
    """"""
    scanners = zap_helper.zap.ascan.scanners()
    return [s['id'] for s in scanners]
1151853
def get(self, instance_ids=None, filters=None):
        """"""
        params = {}
        if filters:
            params["filters"] = make_filters(filters)
        if instance_ids:
            params['InstanceIds'] = instance_ids
        reservations = self.call("DescribeInstances",
                                 response_data_key="Reservations",
                                 **params)
        if reservations:
            return list(chain(*(r["Instances"] for r in reservations)))
        return []