get project
        Unsuccessful opertaion will cause an LogException.

        :type project_name: string
        :param project_name: the Project name 

        :return: GetProjectResponse 

        :raise: LogException
8648
def get_project(self, project_name):
        
        headers = {}
        params = {}
        resource = "/"

        (resp, header) = self._send("GET", project_name, None, resource, params, headers)
        return GetProjectResponse(resp, header)
12938
public static Class<?> loadProjectClass(Project project, String className) {
        URLClassLoader classLoader = getProjectClassLoader(project);
        if (classLoader != null ){
            try {
                return classLoader.loadClass(className);
            } catch (ClassNotFoundException e) {
                // ignore
            } finally {
                try {
                    classLoader.close();
                } catch (IOException e) {
                    // ignore
                }
            }
        }
        return null;
    }
523434
def get_project() -> Optional[str]:
    
    project = SETTINGS.project
    if not project:
        require_test_mode_enabled()
        raise RunError('Missing project name; for test mode, please set PULUMI_NODEJS_PROJECT')
    return project
165105
def get_new_project_name(self, project_name):
        
        timestamp_str = datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M')
        return "{} {}".format(project_name, timestamp_str)
590687
def load_project_flag_list_file(self, project_exceptions, project):
        
        if self.loaded:
            return
        exception_file = None
        for item in project_exceptions:
            if project in item:
                exception_file = item.get(project)
        if exception_file is not None:
            try:
                with open(exception_file, 'r') as f:
                    ex = yaml.safe_load(f)
            except IOError:
                logger.error('File not found: %s', exception_file)
                sys.exit(0)
            for key in ex:
                if key in fl:
                    fl[key][project] = _merge(fl[key][project], ex.get(key, None)) \
                        if project in fl[key] else ex.get(key, None)
            self.loaded = True
        else:
            logger.info('%s not found in %s', project, ignore_list)
            logger.info('No project specific exceptions will be applied')
1086628
def get_project(self, project):
        
        project = format_string(project)

        return self.get(
            '/projects/{project}'.format(project=project))
576736
def get_projects(self, **kwargs):
        

        _login = kwargs.get('login', self._login)
        search_url = SEARCH_URL.format(login=_login)
        return self._request_api(url=search_url).json()
52803
public GitlabProject getProject(String namespace, String projectName) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeGroupId(namespace) + "%2F" + sanitizeProjectId(projectName);
        return retrieve().to(tailUrl, GitlabProject.class);
    }
42786
def get_project(self, project_id):
        ''''''
        project_response = self.get_request('projects/%s' % project_id)
        return Project(self, project_response['project'])
787336
def on_task_failed(self, task):
        ''''''

        if 'schedule' not in task:
            old_task = self.taskdb.get_task(task['project'], task['taskid'], fields=['schedule'])
            if old_task is None:
                logging.error('unknown status pack: %s' % task)
                return
            task['schedule'] = old_task.get('schedule', {})

        retries = task['schedule'].get('retries', self.default_schedule['retries'])
        retried = task['schedule'].get('retried', 0)

        project_info = self.projects[task['project']]
        retry_delay = project_info.retry_delay or self.DEFAULT_RETRY_DELAY
        next_exetime = retry_delay.get(retried, retry_delay.get('', self.DEFAULT_RETRY_DELAY['']))

        if task['schedule'].get('auto_recrawl') and 'age' in task['schedule']:
            next_exetime = min(next_exetime, task['schedule'].get('age'))
        else:
            if retried >= retries:
                next_exetime = -1
            elif 'age' in task['schedule'] and next_exetime > task['schedule'].get('age'):
                next_exetime = task['schedule'].get('age')

        if next_exetime < 0:
            task['status'] = self.taskdb.FAILED
            task['lastcrawltime'] = time.time()
            self.update_task(task)

            project = task['project']
            self._cnt['5m'].event((project, 'failed'), +1)
            self._cnt['1h'].event((project, 'failed'), +1)
            self._cnt['1d'].event((project, 'failed'), +1)
            self._cnt['all'].event((project, 'failed'), +1).event((project, 'pending'), -1)
            logger.info('task failed %(project)s:%(taskid)s %(url)s' % task)
            return task
        else:
            task['schedule']['retried'] = retried + 1
            task['schedule']['exetime'] = time.time() + next_exetime
            task['lastcrawltime'] = time.time()
            self.update_task(task)
            self.put_task(task)

            project = task['project']
            self._cnt['5m'].event((project, 'retry'), +1)
            self._cnt['1h'].event((project, 'retry'), +1)
            self._cnt['1d'].event((project, 'retry'), +1)
            # self._cnt['all'].event((project, 'retry'), +1)
            logger.info('task retry %d/%d %%(project)s:%%(taskid)s %%(url)s' % (
                retried, retries), task)
            return task
860493
def get_logs(self, project, release_id, **kwargs):
        
        route_values = {}
        if project is not None:
            route_values['project'] = self._serialize.url('project', project, 'str')
        if release_id is not None:
            route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int')
        response = self._send(http_method='GET',
                              location_id='c37fbab5-214b-48e4-a55b-cb6b4f6e4038',
                              version='5.0-preview.2',
                              route_values=route_values,
                              accept_media_type='application/zip')
        if "callback" in kwargs:
            callback = kwargs["callback"]
        else:
            callback = None
        return self._client.stream_download(response, callback=callback)
709723
def get_project(username, project, machine_name=None):
    

    try:
        account = Account.objects.get(
            username=username,
            date_deleted__isnull=True)
    except Account.DoesNotExist:
        return "Account '%s' not found" % username

    if project is None:
        project = account.default_project
    else:
        try:
            project = Project.objects.get(pid=project)
        except Project.DoesNotExist:
            project = account.default_project

    if project is None:
        return "None"

    if account.person not in project.group.members.all():
        project = account.default_project

    if project is None:
        return "None"

    if account.person not in project.group.members.all():
        return "None"

    return project.pid
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
1180947
public static void checkProjectName(String name) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(name)) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_PROJECTNAME_VALIDATION_0));
        }
    }
797897
def get_free_project_name(self, base_name):
        
        names = [p.name for p in self._projects.values()]
        if base_name not in names:
            return base_name
        i = 1

        projects_path = self.projects_directory()

        while True:
            new_name = "{}-{}".format(base_name, i)
            if new_name not in names and not os.path.exists(os.path.join(projects_path, new_name)):
                break
            i += 1
            if i > 1000000:
                raise aiohttp.web.HTTPConflict(text="A project name could not be allocated (node limit reached?)")
        return new_name
858395
def handle_exception(self, e, task_path):
        # type: (Exception, str) -> dict
        

        self._app.logger.error(str(e) + "\n" + traceback.format_exc())
        return {'task_name': task_path, 'data': None, 'error': str(e)}
1373979
public Request request(String name, Project project) {
        return request(name, project, null);
    }