Seek sites by path.
322783
def gen_sites(path):
    "  "

    for root, _, _ in walklevel(path, 2):
        try:
            yield Site(root)
        except AssertionError:
            continue
265515
private static Collection<String> findPaths(Path path)
    {
        List<String> paths = findPaths(path, false);
        Collections.sort(paths);
        return paths;
    }
65704
def _get_next_path(headers):
    """"""
    links = headers.get('Link', '')
    matches = re.match('<([^>]+)>; rel="next"', links)
    if matches:
        parsed = urlparse(matches.group(1))
        return "?".join([parsed.path, parsed.query])
292503
def _find_common_roots(paths):
    """"""
    paths = [x.split(os.path.sep) for x in paths]
    root = {}
    for chunks in sorted(paths, key=len, reverse=True):
        node = root
        for chunk in chunks:
            node = node.setdefault(chunk, {})
        node.clear()

    rv = set()

    def _walk(node, path):
        for prefix, child in iteritems(node):
            _walk(child, path + (prefix,))
        if not node:
            rv.add("/".join(path))

    _walk(root, ())
    return rv
31787
def find(self, path, all=False):
        '''
        
        '''
        found = os.path.join(settings.STATIC_ROOT, path)
        if all:
            return [found]
        else:
            return found
679991
def _search_path(self, directory_name, filename):
        """"""
        full_path = path.join(directory_name, filename)
        if path.exists(full_path):
            return full_path

        # Could not find the requested file in any of the directories
        return None
674761
def RDirs(self, pathlist):
        """"""
        cwd = self.cwd or self.fs._cwd
        return cwd.Rfindalldirs(pathlist)
321750
def build(self, **variables):
        """"""
        return Locator(self.by, self.locator.format(**variables), self.description)
367101
function seekSingle(data, pathStr, result, key) {
    if(pathStr.indexOf('$') < 0){
      result[key] = pathStr;
    }else{
      var seek = jsonPath.eval(data, pathStr) || [];

      result[key] = seek.length ? seek[0] : undefined;
    }
  }
1363705
def find_loops(self, _path=None):
        """"""

        if _path is None:
            _path = []

        if self in _path:
            return _path + [self]
        elif self._children == []:
            return None
        else:
            for child in self._children:
                return child.find_loops(_path + [self])
1133592
def find_on_path(importer, path_item, only=False):
    """"""
    path_item = _normalize_cached(path_item)

    if _is_unpacked_egg(path_item):
        yield Distribution.from_filename(
            path_item, metadata=PathMetadata(
                path_item, os.path.join(path_item, 'EGG-INFO')
            )
        )
        return

    entries = safe_listdir(path_item)

    # for performance, before sorting by version,
    # screen entries for only those that will yield
    # distributions
    filtered = (
        entry
        for entry in entries
        if dist_factory(path_item, entry, only)
    )

    # scan for .egg and .egg-info in directory
    path_item_entries = _by_version_descending(filtered)
    for entry in path_item_entries:
        fullpath = os.path.join(path_item, entry)
        factory = dist_factory(path_item, entry, only)
        for dist in factory(fullpath):
            yield dist
78421
def has_in_url_path(url, subs):
    """"""
    scheme, netloc, path, query, fragment = urlparse.urlsplit(url)
    return any([sub in path for sub in subs])
100364
def _filtered_walk(path, file_filter):
		
		for root, dirs, files in os.walk(path):
			log.debug('looking in %s', root)
			log.debug('files is %s', files)
			file_filter.set_root(root)
			files = filter(file_filter, files)
			log.debug('filtered files is %s', files)
			yield (root, dirs, files)
1113011
function findPath(path, directories) {
  var cwd = directories[0];

  if (!cwd) {
    return null;
  }

  return findup(path, {cwd: cwd}) || findPath(path, slice.call(directories, 1));
}
781630
def walk_up_dirs(path):
    """"""
    prev_path = None
    current_path = os.path.abspath(path)
    while current_path != prev_path:
        yield current_path
        prev_path = current_path
        current_path = os.path.dirname(prev_path)
319025
function find(pathname, patterns) {
  for (const entry of patterns)
    if (minimatch(pathname, entry.pattern))
      return entry.handler
  return null
}
550802
def find_all(root, path):
  """"""
  path = parse_path(path)

  if len(path) == 1:
    yield from get_children(root, path[0])
  else:
    for child in get_children(root, path[0]):
      yield from find_all(child, path[1:])