List of all available inventory slots in the preferred search order.
        Does not include the additional slots from the open window.

        1. active slot
        2. remainder of the hotbar
        3. remainder of the persistent inventory
767392
def inv_slots_preferred(self):
        
        slots = [self.active_slot]
        slots.extend(slot for slot in self.window.hotbar_slots
                     if slot != self.active_slot)
        slots.extend(self.window.inventory_slots)
        return slots
851224
def inventory(self, all=False, ssid=None):
        
        if all or self.api_key is None:
            if ssid is not None:
                return self._ssid_inventory(self.full_inventory, ssid)
            else:
                return self.full_inventory
        else:
            if ssid is not None:
                return self._ssid_inventory(self.self_inventory, ssid)
            else:
                return self.self_inventory
134121
def availableDurations(self):
        '''
        
        '''
        potential_slots = InstructorAvailabilitySlot.objects.filter(
            instructor=self.instructor,
            location=self.location,
            room=self.room,
            pricingTier=self.pricingTier,
            startTime__gte=self.startTime,
            startTime__lte=self.startTime + timedelta(minutes=getConstant('privateLessons__maximumLessonLength')),
        ).exclude(id=self.id).order_by('startTime')

        duration_list = [self.duration,]
        last_start = self.startTime
        last_duration = self.duration
        max_duration = self.duration

        for slot in potential_slots:
            if max_duration + slot.duration > getConstant('privateLessons__maximumLessonLength'):
                break
            if (
                slot.startTime == last_start + timedelta(minutes=last_duration) and
                slot.isAvailable
            ):
                duration_list.append(max_duration + slot.duration)
                last_start = slot.startTime
                last_duration = slot.duration
                max_duration += slot.duration

        return duration_list
733011
public static inventory_status[] get(nitro_service client) throws Exception
	{
		inventory_status resource = new inventory_status();
		resource.validate("get");
		return (inventory_status[]) resource.get_resources(client);
	}
95463
def inventory(host, port, time, report_every_n_tags, antennas, tx_power,
              tari, session, mode_identifier,
              tag_population, reconnect, tag_filter_mask,
              impinj_extended_configuration,
              impinj_search_mode, impinj_reports, impinj_fixed_freq):
    """"""
    # XXX band-aid hack to provide many args to _inventory.main
    Args = namedtuple('Args', ['host', 'port', 'time', 'every_n', 'antennas',
                               'tx_power', 'tari', 'session',
                               'population', 'mode_identifier',
                               'reconnect', 'tag_filter_mask',
                               'impinj_extended_configuration',
                               'impinj_search_mode',
                               'impinj_reports',
                               'impinj_fixed_freq'])
    args = Args(host=host, port=port, time=time, every_n=report_every_n_tags,
                antennas=antennas, tx_power=tx_power,
                tari=tari, session=session, population=tag_population,
                mode_identifier=mode_identifier,
                reconnect=reconnect, tag_filter_mask=tag_filter_mask,
                impinj_extended_configuration=impinj_extended_configuration,
                impinj_search_mode=impinj_search_mode,
                impinj_reports=impinj_reports,
                impinj_fixed_freq=impinj_fixed_freq)
    logger.debug('inventory args: %s', args)
    _inventory.main(args)
1190380
def inventory(self, choices=None):
        
        status = (True, None)
        if not choices:
            return (False, 'No choices made')
        try:
            # choices: repos, tools, images, built, running, enabled
            items = {'repos': [], 'tools': {}, 'images': {},
                     'built': {}, 'running': {}, 'enabled': {}}

            tools = Template(self.manifest).list_tools()
            for choice in choices:
                for tool in tools:
                    try:
                        if choice == 'repos':
                            if 'repo' in tool:
                                if (tool['repo'] and
                                        tool['repo'] not in items[choice]):
                                    items[choice].append(tool['repo'])
                        elif choice == 'tools':
                            items[choice][tool['section']] = tool['name']
                        elif choice == 'images':
                            # TODO also check against docker
                            items[choice][tool['section']] = tool['image_name']
                        elif choice == 'built':
                            items[choice][tool['section']] = tool['built']
                        elif choice == 'running':
                            containers = Containers()
                            status = 'not running'
                            for container in containers:
                                image_name = tool['image_name'] \
                                    .rsplit(':' +
                                            tool['version'], 1)[0]
                                image_name = image_name.replace(':', '-')
                                image_name = image_name.replace('/', '-')
                                self.logger.info('image_name: ' + image_name)
                                if container[0] == image_name:
                                    status = container[1]
                                elif container[0] == image_name + \
                                        '-' + tool['version']:
                                    status = container[1]
                            items[choice][tool['section']] = status
                        elif choice == 'enabled':
                            items[choice][tool['section']] = tool['enabled']
                        else:
                            # unknown choice
                            pass
                    except Exception as e:  # pragma: no cover
                        self.logger.error('Unable to grab info about tool: ' +
                                          str(tool) + ' because: ' + str(e))
            status = (True, items)
        except Exception as e:  # pragma: no cover
            self.logger.error(
                'Inventory failed with error: {0}'.format(str(e)))
            status = (False, str(e))
        return status
724965
def inventory(self):
        

        for chassis in self.chassis_list.values():
            chassis.inventory(modules_inventory=True)
497903
def list(self, search_opts=None, limit=None,
             marker=None, sort_by=None, reverse=None):
        """"""
        query = base.get_query_string(search_opts, limit=limit, marker=marker,
                                      sort_by=sort_by, reverse=reverse)
        url = "/jobs%s" % query
        return self._page(url, 'jobs', limit)
46433
def selected_items
      ((m = marked_items).any? ? m : Array(current_item)).reject {|i| %w(. ..).include? i.name}
    end
298870
def Inventory(cls):
        
        l = ServerSet()
        rs = cls.find()
        for server in rs:
            l.append(server)
        return l
39701
def search(self, query, locations: list=None):
        '''
        '''
        cas_number = re.search(r"\b[1-9]{1}[0-9]{1,5}-\d{2}-\d\b", str(query))
        if cas_number:
            query = cas_number[0]
            search_type = 'cas'   
        else:
            try:
                query = int(query)
                search_type = 'barcode'
            except ValueError:
                query = f"%{query}%"
                search_type = 'name'
        if not locations:
            locations = self.get_locations(filter_to_my_group=True)
            locations = [loc.inventory_id for loc in locations]
        data = {
            'groupid': self.groupid,
            'searchtype': search_type,
            'searchterm':  query,
            'limitlocations': locations.append(1)
        }
        r = self._post('search-search', referer_path='search', data=data)
        
        #return a list of container objects
        if r['searchresults']['containers']:
            containers = []
            for container in r['searchresults']['containers']:
                loc = Location(name=container.get('location'))
                ct = Container(
                    inventory_id = container.get('id'), 
                    compound_id = container.get('sid'),
                    name=container.get('containername'),
                    location=loc,
                    size=container.get('size'),
                    smiles=container.get('smiles'),
                    cas=container.get('cas'),
                    comments=container.get('comments'),
                    barcode=container.get('barcode'),
                    supplier=container.get('supplier'),
                    date_acquired=container.get('dateacquired'),
                    owner=container.get('owner'))
                containers.append(ct)
            return containers
        else:
            return []
974949
def list_available_beacons(self):
        '''
        
        '''
        _beacons = ['{0}'.format(_beacon.replace('.beacon', ''))
                    for _beacon in self.beacons if '.beacon' in _beacon]

        # Fire the complete event back along with the list of beacons
        evt = salt.utils.event.get_event('minion', opts=self.opts)
        evt.fire_event({'complete': True, 'beacons': _beacons},
                       tag='/salt/minion/minion_beacons_list_available_complete')

        return True
448222
def all_slots_for(self, cls: ClassDefinition) -> List[SlotDefinitionName]:
        
        if not cls.is_a:
            return cls.slots
        else:
            return [sn for sn in self.all_slots_for(self.schema.classes[cls.is_a]) if sn not in cls.slot_usage] \
                   + cls.slots
823460
def get_groups(self):
        ''''''
        resp = self._post('general-retrievelocations', 'locations')
        final_resp = []
        if resp['groupinfo']:
            for group in resp['groupinfo']:
                final_resp.append(Group(
                    name=group.get('name'),
                    inventory_id=group.get('id')
                ))
        return final_resp
772695
def list(self, limit=None, marker=None, end_marker=None, prefix=None):
        
        return self._manager.list(limit=limit, marker=marker,
                end_marker=end_marker, prefix=prefix)
1129934
@Override
	public List<CommerceOrderItem> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
619680
def InventoryReceived(self, inventory):
        
        if inventory.Hash.ToBytes() in self._MissedBlocks:
            self._MissedBlocks.remove(inventory.Hash.ToBytes())

        if inventory is MinerTransaction:
            return False

        if type(inventory) is Block:
            if BC.Default() is None:
                return False

            if BC.Default().ContainsBlock(inventory.Index):
                return False

            if not BC.Default().AddBlock(inventory):
                return False

        else:
            if not inventory.Verify(self.MemPool.values()):
                return False