Create and return a tree model that represents a list of projects

        :returns: the creeated model
        :rtype: :class:`jukeboxcore.gui.treemodel.TreeModel`
        :raises: None
502875
def create_prj_model(self, ):
        
        prjs = djadapter.projects.all()
        rootdata = treemodel.ListItemData(['Name', 'Short', 'Rootpath'])
        prjroot = treemodel.TreeItem(rootdata)
        for prj in prjs:
            prjdata = djitemdata.ProjectItemData(prj)
            treemodel.TreeItem(prjdata, prjroot)
        prjmodel = treemodel.TreeModel(prjroot)
        return prjmodel
784235
def projects(self, task, params={}, **options): 
        
        path = "/tasks/%s/projects" % (task)
        return self.client.get_collection(path, params, **options)
716026
def get_trees(self, data, showerrors = False): # -> list:
        
        if showerrors:
            raise NotImplementedError("This parser doesn't implement errors")
        self.data = data
        self.index = 0
        try:
            return [self.__aux_parser(self._productionset.initialsymbol)]
        except (IndexError, ParseError):
            return []
1194935
def build_tree(requester)
      root_node = build_root_node(requester)
      # Search out the implementations directory structure for endpoints
      if defined?(self.implementation_root)
        # For each endpoints directory, recurse down it to load the modules
        endpoints_directories.each do |endpoints_directories|
          Dir["#{endpoints_directories}/**/*.rb"].each { |f| require(f) }
        end
        build_node_children(self.endpoints_module, root_node, requester)
      end
      root_node
    end
1186870
def init():
        

        project = Project(os.path.abspath(os.getcwd()))
        paths_to_create = [
            project.data_dir,
            project.notebooks_dir,
            project.aux_dir,
            project.features_dir,
            project.preprocessed_data_dir,
            project.submissions_dir,
            project.trained_model_dir,
            project.temp_dir,
        ]

        for path in paths_to_create:
            os.makedirs(path, exist_ok=True)
1150152
def project_components(self, project):
        
        r_json = self._get_json('project/' + project + '/components')
        components = [Component(
            self._options, self._session, raw_comp_json) for raw_comp_json in r_json]
        return components
636109
public ApplicationReportIndexModel getApplicationReportIndexForProjectModel(ProjectModel projectModel)
    {
        GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(projectModel.getElement());
        pipeline.in(ApplicationReportIndexModel.APPLICATION_REPORT_INDEX_TO_PROJECT_MODEL);

        ApplicationReportIndexModel applicationReportIndex = null;
        if (pipeline.hasNext())
        {
            applicationReportIndex = frame(pipeline.next());
        }
        return applicationReportIndex;
    }
89156
def prj_create_dep(self, *args, **kwargs):
        
        if not self.cur_prj:
            return
        dep = self.create_dep(projects=[self.cur_prj])
        if dep:
            depdata = djitemdata.DepartmentItemData(dep)
            treemodel.TreeItem(depdata, self.prj_dep_model.root)
992187
def create_asset_model(self, ):
        
        rootdata = treemodel.ListItemData(['Name'])
        rootitem = treemodel.TreeItem(rootdata)
        prjs = djadapter.projects.all()
        for prj in prjs:
            prjdata = djitemdata.ProjectItemData(prj)
            prjitem = treemodel.TreeItem(prjdata, rootitem)
            for atype in prj.atype_set.all():
                atypedata = djitemdata.AtypeItemData(atype)
                atypeitem = treemodel.TreeItem(atypedata, prjitem)
                for asset in atype.asset_set.filter(project=prj):
                    assetdata = djitemdata.AssetItemData(asset)
                    assetitem = treemodel.TreeItem(assetdata, atypeitem)
                    for typ in self.refobjinter.get_available_types_for_scene(asset):
                        typdata = treemodel.ListItemData([typ])
                        treemodel.TreeItem(typdata, assetitem)

        return treemodel.TreeModel(rootitem)
281902
def get_tree_collection_strings(self, scale=1, guide_tree=None):
        
        records = [self.collection[i] for i in self.indices]
        return TreeCollectionTaskInterface().scrape_args(records)
443348
def generate(ast_tree: ast.Tree, model_name: str):
    
    component_ref = ast.ComponentRef.from_string(model_name)
    ast_tree_new = copy.deepcopy(ast_tree)
    ast_walker = TreeWalker()
    flat_tree = flatten(ast_tree_new, component_ref)
    gen = XmlGenerator()
    ast_walker.walk(gen, flat_tree)
    return etree.tostring(gen.xml[flat_tree], pretty_print=True).decode('utf-8')
9669
def create_project(self, name, **kwargs):
        
        data = self._wrap_dict("project", kwargs)
        data["customer"]["name"] = name
        return self.post("/projects.json", data=data)
1154924
def make_forest(data, n_neighbors, n_trees, rng_state, angular=False):
    
    result = []
    leaf_size = max(10, n_neighbors)
    try:
        result = [
            flatten_tree(make_tree(data, rng_state, leaf_size, angular), leaf_size)
            for i in range(n_trees)
        ]
    except (RuntimeError, RecursionError, SystemError):
        warn(
            "Random Projection forest initialisation failed due to recursion"
            "limit being reached. Something is a little strange with your "
            "data, and this may take longer than normal to compute."
        )

    return result
192538
def all(self):
        
        project_list = self.fetch('projects.json').get("projects")
        obj_list = []
        for proj in project_list:
            proj['_connection'] = self._connection
            proj = Project(proj)
            obj_list.append(proj)
        return obj_list
1282069
def get_next(self):
        """"""

        next_iter = self.model.iter_next(self.iter)
        if next_iter:
            return TreeModelRow(self.model, next_iter)
874132
private DefaultTreeModel getTreeModel() {
        if (treeModel == null) {
            treeModel = new DefaultTreeModel(getRootNode());
            treeModel.setRoot(getRootNode());
        }
        
        return treeModel;
    }
540247
def applet_list_projects(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/listProjects' % object_id, input_params, always_retry=always_retry, **kwargs)