Returns all projects in the domain
518721
def get_all_projects(self, scope):
        
        url = "{0}/{1}/{2}".format(self.keystone_server_url, DEFAULT_KEYSTONE_API_VERSION, "projects")
        headers = {'X-Auth-Token': scope.auth_token}
        try:
            r = self._make_request_with_auth_fallback(url, headers)
            return r['projects']

        except Exception as e:
            self.warning('Unable to get projects: {0}'.format(str(e)))
            raise e

        return None
967623
public List<Project> getAllProjects() {
        try {
            sessionService.startSession();

            List<Project> projects = projectDao.getAll();

            log.debug("Retrieved All Projects number: " + projects.size());
            return projects;
        } finally {
            sessionService.closeSession();
        }
    }
1082255
private static Set<ProjectModel> getAllApplications(GraphContext graphContext)
    {
        Set<ProjectModel> apps = new HashSet<>();
        Iterable<ProjectModel> appProjects = graphContext.findAll(ProjectModel.class);
        for (ProjectModel appProject : appProjects)
            apps.add(appProject);
        return apps;
    }
866093
public List<Project> findAllProjects() {
        List<Project> list = new ArrayList<>();
        List<String> projectNames;
        try {
            projectNames = readLines(projectsFile);
        } catch (IOException e) {
            throw new FileBasedRuntimeException(e);
        }
        for (String projectName : projectNames) {
            if (StringUtils.isNotBlank(projectName)) {
                list.add(new Project(projectName));
            }
        }
        
        return list;
    }
485002
def get_project(self, project_id):
        
        try:
            result = self._request('/getproject/',
                                   {'projectid': project_id})
            return TildaProject(**result)
        except NetworkError:
            return []
317320
def file_list_projects(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/listProjects' % object_id, input_params, always_retry=always_retry, **kwargs)
657319
public function getInactiveProjects()
    {
        $result = $this->getProjects();
        if ( $result->isSuccess() ) {
            $projects = array();
            foreach ($result->data as $project) {
                if ($project->active == "false") {
                    $projects[$project->id] = $project;
                }
            }
            $result->data = $projects;
        }

        return $result;
    }
236007
def list_projects(self):
        
        url = self._build_url(constants.LIST_PROJECTS_ENDPOINT)
        json = self.client.get(url, timeout=self.timeout)
        return json['projects']
167996
def get_projects(self):
        
        url = urljoin(self.keystone_endpoint, "{}/{}".format(DEFAULT_KEYSTONE_API_VERSION, "projects"))
        try:
            r = self._make_request(url, self.headers)
            return r.get('projects', [])

        except Exception as e:
            self.logger.warning('Unable to get projects: {}'.format(e))
            raise e
636709
def user_projects(request):
    
    projects_owned = (
        request.db.query(Project.id)
        .join(Role.project)
        .filter(Role.role_name == "Owner", Role.user == request.user)
        .subquery()
    )

    with_sole_owner = (
        request.db.query(Role.project_id)
        .join(projects_owned)
        .filter(Role.role_name == "Owner")
        .group_by(Role.project_id)
        .having(func.count(Role.project_id) == 1)
        .subquery()
    )

    return {
        "projects_owned": (
            request.db.query(Project)
            .join(projects_owned, Project.id == projects_owned.c.id)
            .order_by(Project.name)
            .all()
        ),
        "projects_sole_owned": (
            request.db.query(Project).join(with_sole_owner).order_by(Project.name).all()
        ),
    }
383137
def list_projects_search(self, searchstring):
        """"""
        log.debug('List all projects with: %s' % searchstring)
        return self.collection('projects/search/%s.json' %
                               quote_plus(searchstring))
586734
public List<GitlabProject> getAllProjects() {
        String tailUrl = GitlabProject.URL;
        return retrieve().getAll(tailUrl, GitlabProject[].class);
    }
1022257
def list_projects(root, backend=os.listdir):
    
    projects = list()
    for project in sorted(backend(root)):
        abspath = os.path.join(root, project)
        if not isproject(abspath):
            continue
        projects.append(project)
    return projects
382978
def projects(self):
        
        result = set()
        for todo in self._todos:
            projects = todo.projects()
            result = result.union(projects)

        return result
124679
def get_project(name)
      params = {
        'command' => 'listProjects',
	'listall' => true
      }

      json = send_request(params)
      projects = json['project']
      return nil unless projects

      projects.each { |n|
        if name.is_uuid? then
          return n if n['id'] == name
        else
          return n if n['name'] == name
        end
      }
      nil
    end
416399
function getUserSharedProjects(user) {
		return userProject.findOne({'username': user}, 'sharedProjects')
		.then(function(doc) {
			if (!doc) {
				return undefined;
			}
			var projects = doc.sharedProjects;
			projects = projects.map(function(project) {
				var name = path.win32.basename(project);
				return {'Name': name, 'Location': project};
			});
			return projects;
		});
	}
1033413
def project(project_id, opts = {})
      data, _status_code, _headers = project_with_http_info(project_id, opts)
      return data
    end