Perform a few readings.
336944
def read_some(self, fpath_list, outbuf=None, verbose=False):
        ""
        outpath_list = []
        for fpath in fpath_list:
            output, outbuf = self.read_one(fpath, outbuf, verbose)
            if output is not None:
                outpath_list.append(output)
        return outpath_list, outbuf
414082
def fetch_more(self, rows=False, columns=False):
        """"""
        if  self.axis == 1 and self.total_rows > self.rows_loaded:
            reminder = self.total_rows - self.rows_loaded
            items_to_fetch = min(reminder, ROWS_TO_LOAD)
            self.beginInsertRows(QModelIndex(), self.rows_loaded,
                                 self.rows_loaded + items_to_fetch - 1)
            self.rows_loaded += items_to_fetch
            self.endInsertRows()
        if self.axis == 0 and self.total_cols > self.cols_loaded:
            reminder = self.total_cols - self.cols_loaded
            items_to_fetch = min(reminder, COLS_TO_LOAD)
            self.beginInsertColumns(QModelIndex(), self.cols_loaded,
                                    self.cols_loaded + items_to_fetch - 1)
            self.cols_loaded += items_to_fetch
            self.endInsertColumns()
784370
private void scanFraction(int pos) {
        skipIllegalUnderscores();
        if ('0' <= reader.ch && reader.ch <= '9') {
            scanDigits(pos, 10);
        }
        int sp1 = reader.sp;
        if (reader.ch == 'e' || reader.ch == 'E') {
            reader.putChar(true);
            skipIllegalUnderscores();
            if (reader.ch == '+' || reader.ch == '-') {
                reader.putChar(true);
            }
            skipIllegalUnderscores();
            if ('0' <= reader.ch && reader.ch <= '9') {
                scanDigits(pos, 10);
                return;
            }
            lexError(pos, "malformed.fp.lit");
            reader.sp = sp1;
        }
    }
663061
private void reads() {
    int index = random.nextInt();
    for (;;) {
      Integer key = ints[index++ & MASK];
      cache.get(key);
      calls.increment();
    }
  }
181146
private Set<Object> scan() {
        Set<Object> mocks = newMockSafeHashSet();
        for (Field field : clazz.getDeclaredFields()) {
            // mock or spies only
            FieldReader fieldReader = new FieldReader(instance, field);

            Object mockInstance = preparedMock(fieldReader.read(), field);
            if (mockInstance != null) {
                mocks.add(mockInstance);
            }
        }
        return mocks;
    }
202505
def run(self, message):
        """"""
        for value in message:
            self.update(value)
        return [self.low, self.high]
592853
def update(self, first_reading=False):
        """"""
        try:
            if first_reading or not self._ok:
                self._bus.write_byte_data(self._i2c_add, 0xF2,
                                          self.ctrl_hum_reg)
                self._bus.write_byte_data(self._i2c_add, 0xF5, self.config_reg)
                self._bus.write_byte_data(self._i2c_add, 0xF4,
                                          self.ctrl_meas_reg)
                self._populate_calibration_data()

            if self.mode == 2:  # MODE_FORCED
                self._take_forced_measurement()

            data = []
            for i in range(0xF7, 0xF7 + 8):
                data.append(self._bus.read_byte_data(self._i2c_add, i))
        except OSError as exc:
            self.log_error("Bad update: %s", exc)
            self._ok = False
            return

        pres_raw = (data[0] << 12) | (data[1] << 4) | (data[2] >> 4)
        temp_raw = (data[3] << 12) | (data[4] << 4) | (data[5] >> 4)
        hum_raw = (data[6] << 8) | data[7]
        self._ok = False

        temperature = self._compensate_temperature(temp_raw)
        if (temperature >= -20) and (temperature < 80):
            self._temperature = temperature
            self._ok = True
        if self._with_humidity:
            humidity = self._compensate_humidity(hum_raw)
            if (humidity >= 0) and (humidity <= 100):
                self._humidity = humidity
            else:
                self._ok = False
        if self._with_pressure:
            pressure = self._compensate_pressure(pres_raw)
            if pressure > 100:
                self._pressure = pressure
            else:
                self._ok = False
167218
def run(self):
        """"""

        t_last_click = -1

        while True:
            d = self.device.read(13)
            if d is not None and self._enabled:

                if d[0] == 1:  ## readings from 6-DoF sensor
                    self.y = convert(d[1], d[2])
                    self.x = convert(d[3], d[4])
                    self.z = convert(d[5], d[6]) * -1.0

                    self.roll = convert(d[7], d[8])
                    self.pitch = convert(d[9], d[10])
                    self.yaw = convert(d[11], d[12])

                    self._control = [
                        self.x,
                        self.y,
                        self.z,
                        self.roll,
                        self.pitch,
                        self.yaw,
                    ]

                elif d[0] == 3:  ## readings from the side buttons

                    # press left button
                    if d[1] == 1:
                        t_click = time.time()
                        elapsed_time = t_click - t_last_click
                        t_last_click = t_click
                        self.single_click_and_hold = True

                    # release left button
                    if d[1] == 0:
                        self.single_click_and_hold = False

                    # right button is for reset
                    if d[1] == 2:
                        self._reset_state = 1
                        self._enabled = False
                        self._reset_internal_state()
687631
def readlines(self, *args, **kwargs):
        """"""
        return list(iter(partial(self.readline, *args, **kwargs), u''))
222485
def read (self):
        """"""
        self._reset()
        kwargs = dict(
            headers = {
                'User-Agent': configuration.UserAgent,
                'Accept-Encoding': ACCEPT_ENCODING,
            }
        )
        if self.auth:
            kwargs["auth"] = self.auth
        if self.proxies:
            kwargs["proxies"] = self.proxies
        try:
            response = self.session.get(self.url, **kwargs)
            response.raise_for_status()
            content_type = response.headers.get('content-type')
            if content_type and content_type.lower().startswith('text/plain'):
                self.parse(response.iter_lines())
            else:
                log.debug(LOG_CHECK, "%r allow all (no text content)", self.url)
                self.allow_all = True
        except requests.HTTPError as x:
            if x.response.status_code in (401, 403):
                self.disallow_all = True
                log.debug(LOG_CHECK, "%r disallow all (code %d)", self.url, x.response.status_code)
            else:
                self.allow_all = True
                log.debug(LOG_CHECK, "%r allow all (HTTP error)", self.url)
        except requests.exceptions.Timeout:
            raise
        except requests.exceptions.RequestException:
            # no network or other failure
            self.allow_all = True
            log.debug(LOG_CHECK, "%r allow all (request error)", self.url)
863096
def _reads_in_peaks(bam_file, peaks_file, sample):
    """"""
    if not peaks_file:
        return {}
    rip = number_of_mapped_reads(sample, bam_file, bed_file = peaks_file)
    return {"metrics": {"RiP": rip}}
1169449
def run(self):
        
        while not self.stopEvent.isSet():
            try:
                # no need to monitor if no observers
                if 0 < self.observable.countObservers():
                    currentReaders = self.readerProc()
                    addedReaders = []
                    removedReaders = []

                    if currentReaders != self.readers:
                        for reader in currentReaders:
                            if reader not in self.readers:
                                addedReaders.append(reader)
                        for reader in self.readers:
                            if reader not in currentReaders:
                                removedReaders.append(reader)

                        if addedReaders or removedReaders:
                            # Notify observers
                            self.readers = []
                            for r in currentReaders:
                                self.readers.append(r)
                            self.observable.setChanged()
                            self.observable.notifyObservers((addedReaders,
                                                            removedReaders))

                # wait every second on stopEvent
                self.stopEvent.wait(self.period)

            except Exception:
                # FIXME Tighten the exceptions caught by this block
                traceback.print_exc()
                # Most likely raised during interpreter shutdown due
                # to unclean exit which failed to remove all observers.
                # To solve this, we set the stop event and pass the
                # exception to let the thread finish gracefully.
                self.stopEvent.set()
1264479
void readAll() {
        try {
            try {
                int b = input.read();
                while (b >= 0) {
                    readObject(b);
                    b = input.read();
                }
            } finally {
                input.close();
            }
        } catch (IOException ex) {
            throw new IllegalStateException(ex);
        }
    }
1365149
def read(self):
        """"""

        for line in self.io.read():
            with self.parse_line(line) as j:
                yield j
1217147
def gather(self, analysis, node):
        "'"
        assert issubclass(analysis, Analysis)
        a = analysis()
        a.attach(self)
        return a.run(node)
36369
def sample(self, wavelength):
        """"""
        wave = self.waveunits.Convert(wavelength, 'angstrom')
        return self(wave)
486936
def run(self, input_func=_stdin_):
        """"""
        # reset question count
        self.qcount = 1
        for section_name in self.survey:
            self.run_section(section_name, input_func)