Return a generator with the details of each zone.
7802
def temperatures(self):
        """"""
        self.location.status()

        if self.hotwater:
            yield {
                'thermostat': 'DOMESTIC_HOT_WATER',
                'id': self.hotwater.dhwId,
                'name': '',
                'temp': self.hotwater.temperatureStatus['temperature'],          # pylint: disable=no-member
                'setpoint': ''
            }

        for zone in self._zones:
            zone_info = {
                'thermostat': 'EMEA_ZONE',
                'id': zone.zoneId,
                'name': zone.name,
                'temp': None,
                'setpoint': zone.setpointStatus['targetHeatTemperature']
            }

            if zone.temperatureStatus['isAvailable']:
                zone_info['temp'] = zone.temperatureStatus['temperature']
            yield zone_info
698591
def tiles(self):
        
        images = self.parent.images
        for x, y, gid in [i for i in self.iter_data() if i[2]]:
            yield x, y, images[gid]
1353280
def generate(self):
        """"""

        ts=self.generate_tobs()
        noise=self.generate_noise(ts)
        
        rvs=[]
        for t,n in zip(ts, noise):
            rvs.append(n + np.sum(rv.rv_model(t, self.params), axis=0))

        return ts,rvs
442051
def to_dict(self):
        """"""
        result = {}
        for meta in self.intervals.values():
            result[meta.display] = meta.value
        return result
1242189
def get_zone_names(self):
        
        zone_names = []
        for zone in self.get_zones():
            zone_names.append(zone['name'])

        return zone_names
775158
def generator(self, t):
        """"""
        self.check_fit()

        return (1.0 / self.theta) * (np.power(t, -self.theta) - 1)
66688
def _get_variables(self):
        """"""
        if self._specs_in[_VARIABLES_STR] == 'all':
            return _get_all_objs_of_type(
                Var, getattr(self._obj_lib, 'variables', self._obj_lib)
            )
        else:
            return set(self._specs_in[_VARIABLES_STR])
691652
def initialize_zones(self):
        """"""
        zone_list = self.location_info.get('zone_list', {'main': True})

        for zone_id in zone_list:
            if zone_list[zone_id]:  # Location setup is valid
                self.zones[zone_id] = Zone(self, zone_id=zone_id)
            else:                   # Location setup is not valid
                _LOGGER.debug("Ignoring zone: %s", zone_id)
919838
def generate_sections(self):
        """"""
        sources = Dataset.objects.values(
            'source', 'source_slug'
        ).annotate(source_count=Count('source_slug'))

        return sorted([
            {
                'slug': source['source_slug'],
                'name': source['source'],
                'count': source['source_count']
            }
            for source in sources
        ], key=lambda k: k['count'], reverse=True)
409066
def _generator_other(self):
        """"""
        for path in self.paths:
            for root, dnames, fnames in self._walker(path):
                yield from self._generator_rebase(dnames, root)
                yield from self._generator_rebase(fnames, root)
405176
def npz_generator(npz_path):
    """"""
    npz_data = np.load(npz_path)
    X = npz_data['X']
    # Y is a binary maxtrix with shape=(n, k), each y will have shape=(k,)
    y = npz_data['Y']

    n = X.shape[0]

    while True:
        i = np.random.randint(0, n)
        yield {'X': X[i], 'Y': y[i]}
1177309
def get_fields(self):
        
        for c in self.classes.values():
            for f in c.get_fields():
                yield f
952118
async def get_zones(self) -> List[Zone]:
        """"""
        res = await self.services["avContent"]["getCurrentExternalTerminalsStatus"]()
        zones = [Zone.make(services=self.services, **x) for x in res if 'meta:zone:output' in x['meta']]
        if not zones:
            raise SongpalException("Device has no zones")
        return zones
124162
def get_all(self):
        ''''''
        for name, values in self._map.items():
            for value in values:
                yield (name, value)
292321
def list(cls, zone_id, options=None):
        """"""
        options = options if options else {}
        return cls.call('domain.zone.record.list', zone_id, 0, options)
1081230
def fetch_objects(self, geoids):
        '''
        
        '''
        zones = []
        no_match = []
        for geoid in geoids:
            zone = GeoZone.objects.resolve(geoid)
            if zone:
                zones.append(zone)
            else:
                no_match.append(geoid)

        if no_match:
            msg = _('Unknown geoid(s): {identifiers}').format(
                identifiers=', '.join(str(id) for id in no_match))
            raise validators.ValidationError(msg)

        return zones
261182
def zones(self):
        
        import ns1.rest.zones
        return ns1.rest.zones.Zones(self.config)