Discard any records that are shorter than min_length after removing gaps.
356881
def min_ungap_length_discard(records, min_length):
    
    for record in records:
        if len(ungap_all(record)) >= min_length:
            yield record
825476
private void minimize() {

        // Algorithm: compare each entry n to all subsequent entries in
        // the list: if any subsequent entry matches or widens entry n,
        // remove entry n. If any subsequent entries narrow entry n, remove
        // the subsequent entries.
        for (int i = 0; i < size(); i++) {
            GeneralNameInterface current = getGeneralNameInterface(i);
            boolean remove1 = false;

            /* compare current to subsequent elements */
            for (int j = i + 1; j < size(); j++) {
                GeneralNameInterface subsequent = getGeneralNameInterface(j);
                switch (current.constrains(subsequent)) {
                    case GeneralNameInterface.NAME_DIFF_TYPE:
                        /* not comparable; different name types; keep checking */
                        continue;
                    case GeneralNameInterface.NAME_MATCH:
                        /* delete one of the duplicates */
                        remove1 = true;
                        break;
                    case GeneralNameInterface.NAME_NARROWS:
                        /* subsequent narrows current */
                        /* remove narrower name (subsequent) */
                        remove(j);
                        j--; /* continue check with new subsequent */
                        continue;
                    case GeneralNameInterface.NAME_WIDENS:
                        /* subsequent widens current */
                        /* remove narrower name current */
                        remove1 = true;
                        break;
                    case GeneralNameInterface.NAME_SAME_TYPE:
                        /* keep both for now; keep checking */
                        continue;
                }
                break;
            } /* end of this pass of subsequent elements */

            if (remove1) {
                remove(i);
                i--; /* check the new i value */
            }

        }
    }
641553
def filter_record(self, record):
        
        if len(record) >= self.max_length:
            return record[:self.max_length]
        else:
            return record
721114
public void skip(int length) {
        int newcount = count + length;
        if (newcount > buf.length) {
            buf = Arrays.copyOf(buf, oversize(newcount));
        }
        count = newcount;
    }
1161378
def _filter_records(self, records, rtype=None, name=None, content=None, identifier=None):  # pylint: disable=too-many-arguments,no-self-use
        
        if not records:
            return []
        if identifier is not None:
            LOGGER.debug('Filtering %d records by id: %s', len(records), identifier)
            records = [record for record in records if record['id'] == identifier]
        if rtype is not None:
            LOGGER.debug('Filtering %d records by type: %s', len(records), rtype)
            records = [record for record in records if record['type'] == rtype]
        if name is not None:
            LOGGER.debug('Filtering %d records by name: %s', len(records), name)
            if name.endswith('.'):
                name = name[:-1]
            records = [record for record in records if name == record['name']]
        if content is not None:
            LOGGER.debug('Filtering %d records by content: %s', len(records), content.lower())
            records = [record for record in records if
                       record['content'].lower() == content.lower()]
        return records
659133
def skip_all(self):
        """"""

        storage, streaming = self.engine.count()

        if self.selector.output:
            self.offset = streaming
        else:
            self.offset = storage

        self._count = 0
323237
def discard(self, s):
        

        lines = s.splitlines(True)
        for line in lines:
            if line[-1] not in '\r\n':
                if not self.warn:
                    logger.warning(
                        'partial line discard UNSUPPORTED; source map '
                        'generated will not match at the column level'
                    )
                    self.warn = True
            else:
                # simply increment row
                self.row += 1
218907
def filter(self, record):
        

        def modify(value):
            """
            Modify logged record, truncating it to max length and logging remaining length
            :param value: Record to modify
            :return:
            """
            if isinstance(value, six.string_types):
                if len(value) < ContextFilter.MAXIMUM_LENGTH:
                    return value

                try:
                    return "{}...[{} more bytes]".format(
                        value[:ContextFilter.REVEAL_LENGTH],
                        len(value) - ContextFilter.REVEAL_LENGTH)
                except UnicodeError:
                    return "{}...[{} more bytes]".format(
                        repr(value[:ContextFilter.REVEAL_LENGTH]),
                        len(value) - ContextFilter.REVEAL_LENGTH)
            elif isinstance(value, six.binary_type):
                return "{}...[{} more bytes]".format(
                    repr(value[:ContextFilter.REVEAL_LENGTH]),
                    len(value) - ContextFilter.REVEAL_LENGTH)

            else:
                return value

        record.msg = traverse_json_obj(record.msg, callback=modify)
        return True
910259
def _clear_minimum_terms(self, match_key):
        """"""
        try:  # clear match = True case
            del self._query_terms[match_key]['$gte']
        except KeyError:
            pass
        try:  # clear match = False case
            del self._query_terms[match_key]['$lt']
        except KeyError:
            pass
        try:
            if self._query_terms[match_key] == {}:
                del self._query_terms[match_key]
        except KeyError:
            pass
78500
static function cleanAll()
    {
        $db = eZDB::instance();
        $definition = eZISBNRegistrantRange::definition();
        $table = $definition['name'];
        $sql = "TRUNCATE TABLE " . $table;
        $db->query( $sql );
    }
1271033
def discardi(self, begin, end, data=None):
        
        return self.discard(Interval(begin, end, data))
1290716
def filter_records(root, head, update, filters=()):
    """"""
    root, head, update = freeze(root), freeze(head), freeze(update)
    for filter_ in filters:
        root, head, update = filter_(root, head, update)

    return thaw(root), thaw(head), thaw(update)
1285202
def compact(self):
        """"""

        saved_length = 0
        to_remove = []
        for i, entry in enumerate(self.entries):
            if not entry.valid:
                to_remove.append(i)
                saved_length += entry.data_space()

        for i in reversed(to_remove):
            del self.entries[i]

        self.data_index -= saved_length
1109855
def prunebyscore(self, score, retainequalscore=False):
        """"""
        if retainequalscore:
            if self.minimize:
                f = lambda x: x[0] <= score
            else:
                f = lambda x: x[0] >= score
        else:
            if self.minimize:
                f = lambda x: x[0] < score
            else:
                f = lambda x: x[0] > score
        self.data = filter(f, self.data)
1186067
def skip(self, chars=spaceCharactersBytes):
        """"""
        p = self.position               # use property for the error-checking
        while p < len(self):
            c = self[p:p + 1]
            if c not in chars:
                self._position = p
                return c
            p += 1
        self._position = p
        return None
1287457
private synchronized void trim() {
        while (mCurrentSize > mSizeLimit) {
            byte[] buf = mBuffersByLastUse.remove(0);
            mBuffersBySize.remove(buf);
            mCurrentSize -= buf.length;
        }
    }
310319
private void deleteHoleRecords() {
    listener.onMessage("\nDelete temporary records...");

    final ORecordId rid = new ORecordId();
    final ODocument doc = new ODocument(rid);
    for (String recId : recordToDelete) {
      doc.reset();
      rid.fromString(recId);
      doc.delete();
    }
    listener.onMessage("OK (" + recordToDelete.size() + " records)");
  }