Returns an array of rows in the region (defined by the raster), each
        row containing all matches in that row for the target pattern.
330026
def findAllByRow(self, target):
        
        row_matches = []
        for row_index in range(self._raster[0]):
            row = self.getRow(row_index)
            row_matches[row_index] = row.findAll(target)
        return row_matches
1098679
def _get_variant_regions(items):
    
    return list(filter(lambda x: x is not None,
                       [tz.get_in(("config", "algorithm", "variant_regions"), data)
                        for data in items
                        if tz.get_in(["config", "algorithm", "coverage_interval"], data) != "genome"]))
995205
def array_scanlines(self, pixels):
        

        # Values per row
        vpr = self.width * self.planes
        stop = 0
        for y in range(self.height):
            start = stop
            stop = start + vpr
            yield pixels[start:stop]
944735
function(dir) {
      var results = [];

      var list = fs.readdirSync(dir);

      list.forEach(function(file) {
        // Check for every given pattern, regardless of whether it is an array or a string
        var matchesSomeExclude = [].concat(options.exclude).some(function(regexp) {
          return file.match(regexp) != null;
        });

        if(!matchesSomeExclude) {
          var matchesSomePattern = [].concat(options.match).some(function(regexp) {
            return file.match(regexp) != null;
          });

          file = path.resolve(dir, file);
          var stat = fs.statSync(file);

          if (stat && stat.isDirectory()) {
            if(matchesSomePattern) {
              results = results.concat(file);
            }
            results = results.concat(walk(file));
          }
        }
      });

      return results;
    }
210902
def list(self, relpattern):
        ""
        
        parent_path = os.path.dirname(relpattern)
        file_pattern = os.path.basename(relpattern)
        parent = self._resolve_path(parent_path)
        
        if parent is None:
            return []
        else:
            return [os.path.join(parent_path, name) 
                    for (name, mode, sha) in parent.iteritems() 
                    if fnmatch(name, file_pattern)]
467840
protected function prepare_per_region_arrays() {
        $result = array();
        foreach ($this->regions as $region => $notused) {
            $result[$region] = array();
        }
        return $result;
    }
325144
def get_columns_rows(filenames):
    """"""
    tiles = []
    for filename in filenames:
        row, column = os.path.splitext(filename)[0][-5:].split('_')
        tiles.append((int(row), int(column)))
    rows = [pos[0] for pos in tiles]; columns = [pos[1] for pos in tiles]
    num_rows = max(rows); num_columns = max(columns)
    return (num_columns, num_rows)
170898
async def _parse_lines(lines, regex):
    
    results = []
    if inspect.iscoroutinefunction(lines):
        lines = await lines
    for line in lines:
        if line:
            match = regex.search(line)
            if not match:
                _LOGGER.debug("Could not parse row: %s", line)
                continue
            results.append(match.groupdict())
    return results
736005
def rows(self):
        """"""


        for s_name, s in self.sections.items():

            # Yield the section header
            if s.name != 'Root':
                yield ['']  # Unecessary, but makes for nice formatting. Should actually be done just before write
                yield ['Section', s.value] + s.property_names

            # Yield all of the rows for terms in the section
            for row in s.rows:
                term, value = row

                term = term.replace('root.', '').title()

                try:
                    yield [term] + value
                except:
                    yield [term] + [value]
944820
def getRow(self, row, numberRows=None):
        
        row = int(row)
        if self._raster[0] == 0 or self._raster[1] == 0:
            return self
        if numberRows is None or numberRows < 1 or numberRows > 9:
            numberRows = self._raster[0]
        rowHeight = self.h / numberRows
        if row < 0:
            # If row is negative, count backwards from the end
            row = numberRows - row
            if row < 0:
                # Bad row index, return last row
                return Region(self.x, self.y+self.h-rowHeight, self.w, rowHeight)
        elif row > numberRows:
            # Bad row index, return first row
            return Region(self.x, self.y, self.w, rowHeight)
        return Region(self.x, self.y + (row * rowHeight), self.w, rowHeight)
157770
public static File[] listFiles(final File target, final List<Pattern> patterns, final boolean include) {
        if (patterns == null || patterns.isEmpty())
            return target.listFiles();

        return target.listFiles(new FilenameFilter() {

            @Override
            public boolean accept(File dir, String name) {
                for (Pattern pattern : patterns) {
                    Matcher matcher = pattern.matcher(name);
                    if (matcher.matches())
                        return include;
                }
                return !include;
            }

        });

    }
317041
def select_rows(self, rows):
        
        if not isinstance(rows, (list, tuple)): rows = [rows]
        return self.__class__([p for p in self if p.element.row in rows])
130289
def match_all(self, pattern):
        
        pattern = self.pattern_open(pattern)
        search_img = pattern.image
        screen = self.region_screenshot()
        screen = imutils.from_pillow(screen)
        points = ac.find_all_template(screen, search_img, maxcnt=10)
        return points
625603
def regions_coverage(bed_file, target_name, data):
    
    ready_bed = tz.get_in(["depth", target_name, "regions"], data)
    if ready_bed:
        return ready_bed
    else:
        return run_mosdepth(data, target_name, bed_file).regions
983494
def get_parallel_regions(batch):
    
    samples = [utils.to_single_data(d) for d in batch]
    regions = _get_parallel_regions(samples[0])
    return [{"region": "%s:%s-%s" % (c, s, e)} for c, s, e in regions]
1019087
private List<ExpandedPair> checkRows(List<ExpandedRow> collectedRows, int currentRow) throws NotFoundException {
    for (int i = currentRow; i < rows.size(); i++) {
      ExpandedRow row = rows.get(i);
      this.pairs.clear();
      for (ExpandedRow collectedRow : collectedRows) {
        this.pairs.addAll(collectedRow.getPairs());
      }
      this.pairs.addAll(row.getPairs());

      if (!isValidSequence(this.pairs)) {
        continue;
      }

      if (checkChecksum()) {
        return this.pairs;
      }

      List<ExpandedRow> rs = new ArrayList<>(collectedRows);
      rs.add(row);
      try {
        // Recursion: try to add more rows
        return checkRows(rs, i + 1);
      } catch (NotFoundException e) {
        // We failed, try the next candidate
      }
    }

    throw NotFoundException.getNotFoundInstance();
  }
675657
protected ArrayDBIDs rowsBitsetToIDs(long[] rows) {
    ArrayModifiableDBIDs rowIDs = DBIDUtil.newArray(BitsUtil.cardinality(rows));
    DBIDArrayIter iter = this.rowIDs.iter();
    outer: for(int rlpos = 0; rlpos < rows.length; ++rlpos) {
      long rlong = rows[rlpos];
      // Fast skip blocks of 64 masked values.
      if(rlong == 0L) {
        iter.advance(Long.SIZE);
        continue;
      }
      for(int i = 0; i < Long.SIZE; ++i, rlong >>>= 1, iter.advance()) {
        if(!iter.valid()) {
          break outer;
        }
        if((rlong & 1L) == 1L) {
          rowIDs.add(iter);
        }
      }
    }
    return rowIDs;
  }