Determine if Activity is at the root level of a project.

        :return: Return True if it is a root level activity, otherwise return False
        :rtype: bool
335423
def is_rootlevel(self):
        
        container_id = self._json_data.get('container')
        if container_id:
            return container_id == self._json_data.get('root_container')
        else:
            return False
718544
def search_app_root():
        
        while True:

            current = os.getcwd()

            if pathlib.Path("apps.py").is_file():
                return current
            elif pathlib.Path.cwd() == "/":
                raise FileNotFoundError
            else:
                os.chdir("../")
389616
def _is_request_in_include_path(self, request):
        
        if self._include_paths:
            for path in self._include_paths:
                if request.path.startswith(path):
                    return True
            return False
        else:
            return True
538726
private function isAlreadyInstalled() : bool
    {
        $public = new SplFileInfo(self::PROJECT_ROOT  . '/public');
        $src = new SplFileInfo(self::PROJECT_ROOT  . '/src');

        return $public->isDir() && $src->isDir();
    }
297903
def is_root(self):
        """"""
        sub_prefix = self.reddit_session.config.by_object[Submission]
        return self.parent_id.startswith(sub_prefix)
1363120
def is_descendant_of(self, node):
        
        return self.path.startswith(node.path) and self.depth > node.depth
925883
def is_root_state_of_library(self):
        
        from rafcon.core.states.library_state import LibraryState
        return isinstance(self.parent, LibraryState)
1036405
def is_path_python_module(thepath):
    
    thepath = path.normpath(thepath)

    if path.isfile(thepath):
        base, ext = path.splitext(thepath)
        if ext in _py_suffixes:
            return True
        return False

    if path.isdir(thepath):
        for suffix in _py_suffixes:
            if path.isfile(path.join(thepath, '__init__%s' % suffix)):
                return True
    return False
222801
def examine_rootdir(self,
                        on_new_doc,
                        on_doc_modified,
                        on_doc_deleted,
                        on_doc_unchanged,
                        progress_cb=dummy_progress_cb):
        

        count = self.docsearch.index.start_examine_rootdir()

        progress = 0
        while True:
            (status, doc) = self.docsearch.index.continue_examine_rootdir()
            if status == 'end':
                break
            elif status == 'modified':
                on_doc_modified(doc)
            elif status == 'unchanged':
                on_doc_unchanged(doc)
            elif status == 'new':
                on_new_doc(doc)
            progress_cb(progress, count,
                        DocSearch.INDEX_STEP_CHECKING, doc)
            progress += 1

        while True:
            (status, doc) = self.docsearch.index.continue_examine_rootdir2()
            if status == 'end':
                break
            on_doc_deleted(doc)

        progress_cb(1, 1, DocSearch.INDEX_STEP_CHECKING)
        self.docsearch.index.end_examine_rootdir()
1257899
def get_main_activity(self):
        
        activities = self.get_main_activities()
        if len(activities) > 0:
            return self._format_value(activities.pop())
        return None
388302
def is_java_project(self):
        
        if self._is_java_project is None:
            self._is_java_project = isinstance(self.arch, ArchSoot)
        return self._is_java_project
1269424
def activities(self):
        
        if self._activities is None:
            self._activities = self._fetch_activities()
        return self._activities
850292
def isproject(path):
    

    try:
        if os.path.basename(path)[0] in (".", "_"):
            return False
        if not os.path.isdir(path):
            return False
        if not any(fname in os.listdir(path)
                   for fname in ("templates.yaml",
                                 "inventory.yaml")):
            return False
    except:
        return False

    return True
678360
boolean isRootRequest(HttpServletRequest request) {
        String path = request.getPathInfo();
        if (StringUtils.isBlank(path)) {
            return true;
        } else if (StringUtils.equals("/", path)) {
            return true;
        }
        return false;
    }
444167
public boolean isSiteUnderSite(String siteRootPath) {

        for (String siteRoot : getSiteRoots()) {
            if ((siteRootPath.length() > siteRoot.length())
                & siteRootPath.startsWith(CmsFileUtil.addTrailingSeparator(siteRoot))) {
                return true;
            }
        }
        return false;
    }
208031
def is_parent_of(self, parent, child):
        
        if parent == 'trunk':
            return True
        if child == 'trunk':
            return False
        if child not in self._branches:
            raise ValueError(
                "The branch {} seems not to have ever been created".format(
                    child
                )
            )
        if self._branches[child][0] == parent:
            return True
        return self.is_parent_of(parent, self._branches[child][0])
441115
private boolean isNormal() {
    if (getNameCount() == 0 || (getNameCount() == 1 && !isAbsolute())) {
      return true;
    }

    boolean foundNonParentName = isAbsolute(); // if there's a root, the path doesn't start with ..
    boolean normal = true;
    for (Name name : names) {
      if (name.equals(Name.PARENT)) {
        if (foundNonParentName) {
          normal = false;
          break;
        }
      } else {
        if (name.equals(Name.SELF)) {
          normal = false;
          break;
        }

        foundNonParentName = true;
      }
    }
    return normal;
  }