Find sfx/rsfx recursively.
358153
def _find_links(k_vec, sfx, rsfx, k):
    """"""
    k_vec.sort()
    if 0 in k_vec:
        return k_vec
    else:
        if sfx[k] not in k_vec:
            k_vec.append(sfx[k])
        for i in range(len(rsfx[k])):
            if rsfx[k][i] not in k_vec:
                k_vec.append(rsfx[k][i])
        for i in range(len(k_vec)):
            k_vec = _find_links(k_vec, sfx, rsfx, k_vec[i])
            if 0 in k_vec:
                break
        return k_vec
477179
def find_cycles(self):
        """"""

        # Apply the Tarjan's algorithm successively until all functions are visited
        stack = []
        data = {}
        order = 0
        for function in compat_itervalues(self.functions):
            order = self._tarjan(function, order, stack, data)
        cycles = []
        for function in compat_itervalues(self.functions):
            if function.cycle is not None and function.cycle not in cycles:
                cycles.append(function.cycle)
        self.cycles = cycles
        if 0:
            for cycle in cycles:
                sys.stderr.write("Cycle:\n")
                for member in cycle.functions:
                    sys.stderr.write("\tFunction %s\n" % member.name)
524463
def find_recursive_dependency(self):
    """"""
    nodes_on_path = []

    def helper(nodes):
      for node in nodes:
        cycle = node in nodes_on_path
        nodes_on_path.append(node)
        if cycle or helper(self.deps.get(node, [])):
          return True
        nodes_on_path.pop()
      return False

    helper(self.unordered)
    return nodes_on_path
182872
def find_base_images(self):
        """"""

        for mountpoint, _ in self.mountpoints.items():
            if re.match(self.orig_re_pattern, mountpoint):
                yield mountpoint
859207
def findall(self, name, recursive=False):
        """"""
        if self.children is not None:
            for child in self.children:
                if child.name == name:
                    yield child
                if recursive:
                    for atom in child.findall(name, True):
                        yield atom
1345435
def dir(cls, label, children):
        """"""
        return FSEntry(label=label, children=children, type=u"Directory", use=None)
1202069
def find_implementations(interface, recurse, abstract, result):
    """"""
    for item in MetaComponent.implementations:
        if (item['interface'] == interface and (abstract or not item['abstract'])):
            extend_unique(result, [item['class']])

    if recurse:
        subinterfaces = interface.__subclasses__()
        if subinterfaces:
            for i in subinterfaces:
                find_implementations(i, recurse, abstract, result)
519934
def find_all_files(self):
		
		files = self.find_files()
		subrepo_files = (
			posixpath.join(subrepo.location, filename)
			for subrepo in self.subrepos()
			for filename in subrepo.find_files()
		)
		return itertools.chain(files, subrepo_files)
889371
void findNodes(List<RBBINode> dest, int kind) {
        if (fType == kind) {
            dest.add(this);
        }
        if (fLeftChild != null) {
            fLeftChild.findNodes(dest, kind);
        }
        if (fRightChild != null) {
            fRightChild.findNodes(dest, kind);
        }
    }
1335505
async def FindTools(self, arch, major, minor, number, series):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Client',
                   request='FindTools',
                   version=1,
                   params=_params)
        _params['arch'] = arch
        _params['major'] = major
        _params['minor'] = minor
        _params['number'] = number
        _params['series'] = series
        reply = await self.rpc(msg)
        return reply
253718
def get_branches(aliases):
    """"""

    ignore = ['pow', 'log10', 'sqrt', 'max']
    branches = []
    for k, v in aliases.items():

        tokens = re.sub('[\(\)\+\*\/\,\=\<\>\&\!\-\|]', ' ', v).split()

        for t in tokens:

            if bool(re.search(r'^\d', t)) or len(t) <= 3:
                continue

            if bool(re.search(r'[a-zA-Z]', t)) and t not in ignore:
                branches += [t]

    return list(set(branches))
1031011
def com_adobe_fonts_check_cff2_call_depth(ttFont):
    """"""
    any_failures = False
    cff = ttFont['CFF2'].cff

    for top_dict in cff.topDictIndex:
        for fd_index, font_dict in enumerate(top_dict.FDArray):
            if hasattr(font_dict, 'Private'):
                private_dict = font_dict.Private
            else:
                private_dict = None
            failed = yield from \
                _check_call_depth(top_dict, private_dict, fd_index)
            any_failures = any_failures or failed

    if not any_failures:
        yield PASS, 'Maximum call depth not exceeded.'
700687
function findAllCompressionFiles(fs, folderPath) {
        // check if folder exists
        if (!fs.existsSync(folderPath))  return; 
        
        var files = fs.readdirSync(folderPath);
        //iterate all files in the current folder
        for (var i = 0; i < files.length; i++) {
            var filePath = folderPath + "/" + files[i];
            var stats = fs.statSync(filePath);
            if (stats.isDirectory()) {
                //recursively search folders and append the matching files
                findAllCompressionFiles(fs, filePath);
            } else {
                addAllMatchingCompressionsToFile(files[i], filePath);
            }
        }
    }
797040
function findAllAfter(parent, index, test) {
  var results = []
  var children
  var child
  var length

  if (!parent || !parent.type || !parent.children) {
    throw new Error('Expected parent node')
  }

  children = parent.children
  length = children.length

  if (index && index.type) {
    index = children.indexOf(index)
  }

  if (isNaN(index) || index < 0 || index === Infinity) {
    throw new Error('Expected positive finite index or child node')
  }

  while (++index < length) {
    child = children[index]

    if (is(test, child, index, parent)) {
      results.push(child)
    }
  }

  return results
}
1124636
def find_children(self):
        """"""
        for i in range(len(self.vertices)):
            self.vertices[i].children = []
        for i in range(len(self.vertices)):
            for parent in self.vertices[i].parents:
                if i not in self.vertices[parent].children:
                    self.vertices[parent].children.append(i)
863661
function(cbfsgetchildren) {
        var nodes = [];
        Async.readdir(this.path)
             .stat()
             .filter(function(file) {
                return file.indexOf(jsDAV_FSExt_File.PROPS_DIR) !== 0;
             })
             .each(function(file, cbnextdirch) {
                 nodes.push(file.stat.isDirectory()
                     ? jsDAV_FSExt_Directory.new(file.path)
                     : jsDAV_FSExt_File.new(file.path)
                 );
                 cbnextdirch();
             })
             .end(function() {
                 cbfsgetchildren(null, nodes);
             });
    }
623643
def _find_modules(src):
    """"""
    directors = 0
    mnames = []
    try:
        matches = _reModule.findall(open(src).read())
    except IOError:
        # If the file's not yet generated, guess the module name from the file stem
        matches = []
        mnames.append(os.path.splitext(os.path.basename(src))[0])

    for m in matches:
        mnames.append(m[2])
        directors = directors or m[0].find('directors') >= 0
    return mnames, directors