List all entities in workspace.
488719
def entities(self):
        """"""
        r = fapi.get_entities_with_type(self.namespace,
                                        self.name, self.api_url)
        fapi._check_response_code(r, 200)
        edicts = r.json()
        return [Entity(e['entityType'], e['name'], e['attributes'])
                for e in edicts]
488804
def list(context, resource, **kwargs):
    """"""
    data = utils.sanitize_kwargs(**kwargs)
    id = data.pop('id', None)
    subresource = data.pop('subresource', None)

    if subresource:
        uri = '%s/%s/%s/%s' % (context.dci_cs_api, resource, id, subresource)
    else:
        uri = '%s/%s' % (context.dci_cs_api, resource)

    return context.session.get(uri, timeout=HTTP_TIMEOUT, params=data)
581070
def entities(self):
    """"""
    start = 0
    end = 0
    prev_tag = u'O'
    chunks = []
    for i, (w, tag) in enumerate(self.ne_chunker.annotate(self.words)):
      if tag != prev_tag:
        if prev_tag == u'O':
          start = i
        else:
          chunks.append(Chunk(self.words[start: i], start, i, tag=prev_tag,
                              parent=self))
        prev_tag = tag
    if tag != u'O':
      chunks.append(Chunk(self.words[start: i+1], start, i+1, tag=tag,
                          parent=self))
    return chunks
974005
def list_annotations(self) -> List[Namespace]:
        """"""
        return self.session.query(Namespace).filter(Namespace.is_annotation).all()
954764
def list_all(dev: Device):
    """"""
    for name, service in dev.services.items():
        click.echo(click.style("\nService %s" % name, bold=True))
        for method in service.methods:
            click.echo("  %s" % method.name)
1231591
def _entity_list_as_bel(entities: Iterable[BaseEntity]) -> str:
    """"""
    return ', '.join(
        e.as_bel()
        for e in entities
    )
1292784
def find_all(self, cls):
        """"""
        final_results = []
        table = self.get_class_table(cls)
        for db_result in table.scan():
            obj = cls.from_data(db_result['value'])
            final_results.append(obj)

        return final_results
147505
def workspaces(self):
        
        if self._workspaces is None:
            self._workspaces = WorkspaceList(self)
        return self._workspaces
168807
def find_by_id(self, workspace, params={}, **options): 
        
        path = "/workspaces/%s" % (workspace)
        return self.client.get(path, params, **options)
968695
def list_ext(self, collection, path, retrieve_all, **_params):
        """"""
        return self.list(collection, path, retrieve_all, **_params)
1133627
def all_display_panels(self) -> typing.List[DisplayPanel]:
        
        return [DisplayPanel(display_panel) for display_panel in self.__document_controller.workspace_controller.display_panels]
1058442
def _list_items(action, key, profile=None, subdomain=None, api_key=None):
    '''
    
    '''
    items = _query(
        profile=profile,
        subdomain=subdomain,
        api_key=api_key,
        action=action
    )
    ret = {}
    for item in items[action]:
        ret[item[key]] = item
    return ret
873186
def get_workspaces(self):
        
        data = self.message(MessageType.GET_WORKSPACES, '')
        return json.loads(data, object_hook=WorkspaceReply)
1035137
public function bindWorkspaceToOrganization()
    {
        $limit = 250;
        $offset = 0;
        $organizationManager = $this->container->get('claroline.manager.organization.organization_manager');
        $this->log('Add organizations to workspaces...');
        $this->om->startFlushSuite();
        $countWorkspaces = $this->om->count('ClarolineCoreBundle:Workspace\Workspace');

        while ($offset < $countWorkspaces) {
            //if there is too many workspaces, we retrieve them by small amounts
            $workspaces = $this->workspaceRepo->findBy([], null, $limit, $offset);
            $default = $organizationManager->getDefault();
            $this->om->merge($default);

            foreach ($workspaces as $workspace) {
                if (0 === count($workspace->getOrganizations())) {
                    $this->log('Add default organization for workspace '.$workspace->getCode());
                    $workspace->addOrganization($default);
                    $this->om->persist($workspace);
                } else {
                    $this->log('Organization already exists for workspace '.$workspace->getCode());
                }
            }

            $this->log("Flushing... [UOW = {$this->om->getUnitOfWork()->size()}]");
            $this->om->forceFlush();
            $this->om->clear();

            $offset += $limit;
        }

        $this->om->endFlushSuite();
    }
715822
def get_all_items(self):
        """"""
        for item in os.walk(self.test_case_dir):
            if "workitem.xml" not in item[2]:
                continue
            case_id = os.path.split(item[0])[-1]
            if not (case_id and "*" not in case_id):
                continue
            item_cache = self[case_id]
            if not item_cache:
                continue
            if not item_cache.get("title"):
                continue
            yield item_cache
1364621
def agent_entities(self):
        """"""
        endpoint = self._entity_uri()
        entities = self._get(endpoint)  # should be list of dicts
        if isinstance(entities, dict):  # error: entities = {status: {error}}
            raise Exception(entities["status"])

        return [Entity(entity_json=i) for i in entities if isinstance(i, dict)]
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))