Get the data from a *hole instance.
1775
async def main():
    """"""
    async with aiohttp.ClientSession() as session:
        data = Hole('192.168.0.215', loop, session)
        await data.get_data()

        # Get the raw data
        print(json.dumps(data.data, indent=4, sort_keys=True))

        print("Status:", data.status)
        print("Domains being blocked:", data.domains_being_blocked)
40148
def data(self, key=None, **kwargs):
        """"""
        self.content_data.update(kwargs)
        if key:
            return self.content_data[key]
        if not kwargs:
            return self.content_data
        return self
148244
def get_data (self):
        """"""
        data = u"".join(self.buf)
        self.buf = []
        return data
536925
def make_instance(self, data):
        """"""
        if not self.opts.model:
            return data

        if self.instance is not None:
            for key, value in data.items():
                setattr(self.instance, key, value)
            return self.instance

        return self.opts.model(**data)
1250733
def data(self):
        """"""
        if self._data is None:
            with open(self.path, 'rb') as f:
                self.read_data(f)
        return self._data
298946
def get_data (self, datakind, integnum):
        """"""

        if integnum < 0 or integnum >= self.n_integrations:
            raise ValueError ('illegal integration number %d' % integnum)

        size = self.sizeinfo.get (datakind)
        if size is None:
            raise ValueError ('unrecognized data kind "%s"' % datakind)

        dtype = _datatypes[datakind]
        offset = self.headsize + integnum * self.intsize
        dslice = self.mmdata[offset:offset+size]
        data = np.fromstring (dslice, dtype=dtype)

        if datakind == 'crossData.bin':
            data = data.reshape ((self.n_baselines, self.n_channels, len (self.crosspols)))
        elif datakind == 'autoData.bin':
            data = data.reshape ((self.n_antennas, self.n_channels, 2))
        elif datakind == 'flags.bin':
            data = data.reshape ((self.n_baselines + self.n_antennas, self.n_channels,
                                  len (self.crosspols)))

        return data
293617
def data(self):
        """"""
        if self.kind == 'data':
            return self._data.data
        else:
            with self.open() as f:
                return f.read()
964504
async def get_data(self, path, headers=None, timeout=None):
        """"""
        url = self.base_url + path
        _LOGGER.debug('GET URL: %s', url)
        resp = None
        try:
            resp = await self._session.get(
                url, headers=headers,
                timeout=DEFAULT_TIMEOUT if timeout is None else timeout)
            if resp.content_length is not None:
                resp_data = await resp.read()
            else:
                resp_data = None
            return resp_data, resp.status
        except Exception as ex:
            if resp is not None:
                resp.close()
            raise ex
        finally:
            if resp is not None:
                await resp.release()
1187356
def __extract_bbox(arr, bb_old):
    ""
    hole = ndimage.binary_fill_holes(arr)- arr
    bb_list = ndimage.find_objects(ndimage.binary_dilation(hole, iterations = 1))
    if 0 == len(bb_list): return bb_old
    else: bb = bb_list[0]
    
    if not bb_old: return list(bb)
    
    for i in range(len(bb_old)):
        bb_old[i] = slice(min(bb_old[i].start, bb[i].start),
                          max(bb_old[i].stop, bb[i].stop))
    return bb_old
895191
def GetHashCode(self):
        """"""
        slice_length = 4 if len(self.Data) >= 4 else len(self.Data)
        return int.from_bytes(self.Data[:slice_length], 'little')
600675
def from_data(cls, data):
        
        obj = cls()
        with contextlib.closing(BytesIO(data)) as file_handle:
            obj.load_file(file_handle)
        return obj
716551
def _get_data(self, read_size):
        """"""
        if NIX:
            return super(Mouse, self)._get_data(read_size)
        return self._pipe.recv_bytes()
521984
def get_string_from_data(self, offset, data):
        """"""
        
        # OC Patch
        b = None
        
        try:
            b = data[offset]
        except IndexError:
            return ''
        
        s = ''
        while ord(b):
            s += b
            offset += 1
            try:
                b = data[offset]
            except IndexError:
                break
        
        return s
1301218
def get_data(self):
        """"""
        return self.x, self.y, self.w, self.h
1282521
def get_data(self):
        
        if self.handle is None:
            raise Exception("Cannot get data before construct Dataset")
        if self.data is not None and self.used_indices is not None and self.need_slice:
            if isinstance(self.data, np.ndarray) or scipy.sparse.issparse(self.data):
                self.data = self.data[self.used_indices, :]
            elif isinstance(self.data, DataFrame):
                self.data = self.data.iloc[self.used_indices].copy()
            elif isinstance(self.data, DataTable):
                self.data = self.data[self.used_indices, :]
            else:
                warnings.warn("Cannot subset {} type of raw data.\n"
                              "Returning original raw data".format(type(self.data).__name__))
            self.need_slice = False
        return self.data
1042413
def get_data(model, instance_id, kind=''):
    
    instance = get_instance(model, instance_id)

    if not instance:
        return

    return ins2dict(instance, kind)
1098750
def read_sample(fobj, sample):
    """"""
    cursor = fobj.tell()
    data = fobj.read(sample)
    fobj.seek(cursor)
    return data