Lists the Knowledge bases belonging to a project.

    Args:
        project_id: The GCP project linked with the agent.
500281
def list_knowledge_bases(project_id):
    """"""
    import dialogflow_v2beta1 as dialogflow
    client = dialogflow.KnowledgeBasesClient()
    project_path = client.project_path(project_id)

    print('Knowledge Bases for: {}'.format(project_id))
    for knowledge_base in client.list_knowledge_bases(project_path):
        print(' - Display Name: {}'.format(knowledge_base.display_name))
        print(' - Knowledge ID: {}\n'.format(knowledge_base.name))
814883
@RequestMapping(value = "project-sync/{projectId}", method = RequestMethod.GET)
    public GitSynchronisationInfo getProjectGitSyncInfo(@PathVariable ID projectId) {
        Project project = structureService.getProject(projectId);
        return gitService.getProjectGitSyncInfo(project);
    }
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
506245
def list(self, request, project):
        
        job_ids = request.query_params.getlist('job_id')
        if not job_ids:
            raise ParseError(
                detail="The job_id parameter is mandatory for this endpoint")
        try:
            job_ids = [int(job_id) for job_id in job_ids]
        except ValueError:
            raise ParseError(detail="The job_id parameter(s) must be integers")

        logs = JobLog.objects.filter(job__repository__name=project,
                                     job_id__in=job_ids)

        return Response([self._log_as_dict(log) for log in logs])
370854
def get_knowledge_base(project_id, knowledge_base_id):
    """"""
    import dialogflow_v2beta1 as dialogflow
    client = dialogflow.KnowledgeBasesClient()
    knowledge_base_path = client.knowledge_base_path(
        project_id, knowledge_base_id)

    response = client.get_knowledge_base(knowledge_base_path)

    print('Got Knowledge Base:')
    print(' - Display Name: {}'.format(response.display_name))
    print(' - Knowledge ID: {}'.format(response.name))
316678
private void processProjectID()
   {
      if (m_projectID == null)
      {
         List<Row> rows = getRows("project", null, null);
         if (!rows.isEmpty())
         {
            Row row = rows.get(0);
            m_projectID = row.getInteger("proj_id");
         }
      }
   }
299299
def find_by_id(self, project_membership, params={}, **options): 
        
        path = "/project_memberships/%s" % (project_membership)
        return self.client.get(path, params, **options)
675227
function (project_hash_id, cb) {

            _util.buildQuery('projects/' + project_hash_id, {}, function (error, data) {

                return cb(error, data);

            });

        }
1144766
def update_project(self, project_id, name=None, description=None,
                       reference_language=None):
        
        kwargs = {}
        if name is not None:
            kwargs['name'] = name
        if description is not None:
            kwargs['description'] = description
        if reference_language is not None:
            kwargs['reference_language'] = reference_language

        data = self._run(
            url_path="projects/update",
            id=project_id,
            **kwargs
        )
        return data['result']['project']['id']
903884
def _gcs_list_buckets(project, pattern):
  
  data = [{'Bucket': 'gs://' + bucket.name, 'Created': bucket.metadata.created_on}
          for bucket in google.datalab.storage.Buckets(_make_context(project))
          if fnmatch.fnmatch(bucket.name, pattern)]
  return google.datalab.utils.commands.render_dictionary(data, ['Bucket', 'Created'])
933668
def get_project_by_id(self, project_id):
        
        return self._create_item_response(
            self.data_service.get_project_by_id(project_id),
            Project)
451823
def set_project_id(self, project_id):
    
    self._project_id = project_id
    if self == Context._global_context:
      du.save_project_id(self._project_id)
242105
def _list_resource_descriptors(args, _):
  """"""
  project_id = args['project']
  pattern = args['type'] or '*'
  descriptors = gcm.ResourceDescriptors(project_id=project_id)
  dataframe = descriptors.as_dataframe(pattern=pattern)
  return _render_dataframe(dataframe)
689011
def list_projects(self, entity=None):
        
        query = gql('''
        query Models($entity: String!) {
            models(first: 10, entityName: $entity) {
                edges {
                    node {
                        id
                        name
                        description
                    }
                }
            }
        }
        ''')
        return self._flatten_edges(self.gql(query, variable_values={
            'entity': entity or self.settings('entity')})['models'])
534782
@RequestMapping(value = "{projectId}/commit-info/{commit}", method = RequestMethod.GET)
    public Resource<OntrackGitCommitInfo> commitProjectInfo(@PathVariable ID projectId, @PathVariable String commit) {
        return Resource.of(
                gitService.getCommitProjectInfo(projectId, commit),
                uri(on(getClass()).commitProjectInfo(projectId, commit))
        ).withView(Build.class);
    }
505430
def delete_knowledge_base(project_id, knowledge_base_id):
    """"""
    import dialogflow_v2beta1 as dialogflow
    client = dialogflow.KnowledgeBasesClient()
    knowledge_base_path = client.knowledge_base_path(
        project_id, knowledge_base_id)

    response = client.delete_knowledge_base(knowledge_base_path)

    print('Knowledge Base deleted.'.format(response))
281548
def add_project(self, project_id=None, name=None, **kwargs):
        
        if project_id not in self._projects:

            for project in self._projects.values():
                if name and project.name == name:
                    raise aiohttp.web.HTTPConflict(text='Project name "{}" already exists'.format(name))
            project = Project(project_id=project_id, controller=self, name=name, **kwargs)
            self._projects[project.id] = project
            return self._projects[project.id]
        return self._projects[project_id]