Gets the actual models to be used.
545373
def _set_seo_models(self, value):
        
        seo_models = []
        for model_name in value:
            if "." in model_name:
                app_label, model_name = model_name.split(".", 1)
                model = models.get_model(app_label, model_name)
                if model:
                    seo_models.append(model)
            else:
                app = models.get_app(model_name)
                if app:
                    seo_models.extend(models.get_models(app))
    
        self.seo_models = seo_models
386988
function(){
      var result = [];

      ko.utils.arrayForEach(this.models(), function(model){
        result.push(model.toJSON());
      });

      return result;
    }
909508
def get_model(app, model):
    """"""
    if 'get_model' not in _LAZY_LOADS:
        _lazy_load_get_model()

    _get_model = _LAZY_LOADS['get_model']
    return _get_model(app, model)
929234
def get_model_classes(self):
        
        self._import_plugins()
        return [plugin.model for plugin in self.plugins.values()]
892387
def rtype_to_model(rtype):
    

    models = goldman.config.MODELS
    for model in models:
        if rtype.lower() == model.RTYPE.lower():
            return model
    raise ValueError('%s resource type not registered' % rtype)
1217287
public Model[] getModels() {
    Collection<Key<Model>> modelKeys = _models.values();
    Model[] models = new Model[modelKeys.size()];
    int i = 0;
    for (Key<Model> mKey : modelKeys) {
      models[i] = mKey != null ? mKey.get() : null;
      i++;
    }
    return models;
  }
1129865
def get_model(self):
        

        if self.lingeling and self.status == True:
            model = pysolvers.lingeling_model(self.lingeling)
            return model if model != None else []
93077
function getModels(done) {
  if (models) {
    return done(models);
  }

  return orm.initialize(ormConfig, function(err, m) {
    if (err) {
      throw err;
    }

    // make the models available as soon as possible for other functions
    models = m;

    // ignore error if groups already created
    let catcher = (createErr) => { if (createErr && createErr.code !== "E_VALIDATION") { throw createErr; } };

    // create the administrators group
    createGroup("admin", catcher);

    // create the public group
    createGroup("public", catcher);

    return done(models);
  });
}
285137
def default_model():
    """"""
    project_root = get_project_root()
    models_dir = os.path.join(project_root, "models")
    curr_dir = os.getcwd()
    if os.path.commonprefix([models_dir, curr_dir]) == models_dir and \
       curr_dir != models_dir:
        latest_model = curr_dir
    else:
        latest_model = get_latest_folder(models_dir)
    return latest_model
224615
def bundle_models(models):
    
    custom_models = _get_custom_models(models)
    if custom_models is None:
        return None

    key = calc_cache_key(custom_models)
    bundle = _bundle_cache.get(key, None)
    if bundle is None:
        try:
            _bundle_cache[key] = bundle = _bundle_models(custom_models)
        except CompilationError as error:
            print("Compilation failed:", file=sys.stderr)
            print(str(error), file=sys.stderr)
            sys.exit(1)
    return bundle
1012051
def _models(self, appname):
        
        try:
            app = self._get_app(appname)
        except Exception as e:
            self.err("Can not get app " + appname, e)
            return
        if appname not in self.appnames:
            self.err("App " + appname + " not found in settings")
            return
        models = self._get_models(app)
        return models
524141
def _check_model_types(self, models):
        
        if not hasattr(models, "__iter__"):
            models = {models}
        if not all([isinstance(model, (AbstractStateModel, StateElementModel)) for model in models]):
            raise TypeError("The selection supports only models with base class AbstractStateModel or "
                            "StateElementModel, see handed elements {0}".format(models))
        return models if isinstance(models, set) else set(models)
554715
def get_model_paths(model_dir):
    """"""
    all_models = gfile.Glob(os.path.join(model_dir, '*.meta'))
    model_filenames = [os.path.basename(m) for m in all_models]
    model_numbers_names = [
        (shipname.detect_model_num(m), shipname.detect_model_name(m))
        for m in model_filenames]
    model_names = sorted(model_numbers_names)
    return [os.path.join(model_dir, name[1]) for name in model_names]
1092261
private List<AdvancedModelWrapper> convertOpenEngSBModelList(List<OpenEngSBModel> models) {
        List<AdvancedModelWrapper> wrappers = new ArrayList<AdvancedModelWrapper>();
        for (OpenEngSBModel model : models) {
            wrappers.add(AdvancedModelWrapper.wrap(model));
        }
        return wrappers;
    }
123494
def resolve_model(self, model):
        '''
        
        '''
        if not model:
            raise ValueError('Unsupported model specifications')
        if isinstance(model, basestring):
            classname = model
        elif isinstance(model, dict) and 'class' in model:
            classname = model['class']
        else:
            raise ValueError('Unsupported model specifications')

        try:
            return get_document(classname)
        except self.NotRegistered:
            message = 'Model "{0}" does not exist'.format(classname)
            raise ValueError(message)
249076
protected static function getModelTypes()
    {
        $class = get_called_class();

        if($class::$useType === false) {
            return array();
        }

        $class_name = $class::getClassName(false);
        $parent = get_parent_class($class);
        if ($parent) {
            $names_parent = $parent::getModelTypes();
            $names = array_merge($names_parent, array($class_name));
        } else {
            $names = array();
        }

        return $names;

    }
392091
def load_models(module):
    """"""
    modules = _import_submodules(module)
    return {m for module in modules for m in filter(
        _check_model, (getattr(module, name) for name in dir(module))
    )}