Sets the stimulus model for the calibration curve test

        :param model: Stimulus model that has a tone curve configured
        :type model: :class:`StimulusModel <sparkle.stim.stimulus_model.StimulusModel>`
18661
def setCurveModel(self, model):
        
        self.stimModel = model
        self.ui.curveWidget.setModel(model)
208404
def setModel(self, model):
        """"""
        # disconnect old signals
        try:
            self.ui.parametizer.randomizeCkbx.toggled.disconnect()
            self.ui.parametizer.randomizeCkbx.disconnect()
        except TypeError:
            # disconnecting without any current connections throws error
            pass

        self.ui.trackview.setModel(model)
        self.ui.nrepsSpnbx.setValue(model.repCount())

        self.ui.parametizer.randomizeCkbx.toggled.connect(model.randomToggle)
        self.ui.parametizer.randomizeCkbx.setChecked(bool(model.reorder()))

        # extract the QAutoParameterModel from the QStimulusModel and 
        # set in the AutoParameterView
        autoParamModel = model.autoParams()
        self.ui.parametizer.setModel(autoParamModel)
        # whether the auto parameters are emtpy 
        # affects the enable-ness of the StimlusView
        autoParamModel.emptied.connect(self.ui.trackview.emptySelection)
        autoParamModel.countChanged.connect(self.updateTraceCount)
        self.updateTraceCount()
691555
public void set_chip_model(chip_model model) {
		if (model == chip_model.MOS6581) {
			wave__ST = Wave.wave6581__ST;
			wave_P_T = Wave.wave6581_P_T;
			wave_PS_ = Wave.wave6581_PS_;
			wave_PST = Wave.wave6581_PST;
		} else {
			wave__ST = Wave.wave8580__ST;
			wave_P_T = Wave.wave8580_P_T;
			wave_PS_ = Wave.wave8580_PS_;
			wave_PST = Wave.wave8580_PST;
		}
	}
378179
def _init_model(self):
        
        model = Sequential()
        model.add(Conv3D(input_shape=[self.time_delay] + list(self.image_size) + [self.channels], filters=self.filters,
                         kernel_size=self.kernel_size, activation='relu', data_format='channels_last'))
        model.add(
            Conv3D(filters=self.filters, kernel_size=self.kernel_size, activation='relu', data_format='channels_last'))
        model.add(MaxPooling3D(pool_size=(1, 2, 2), data_format='channels_last'))
        model.add(
            Conv3D(filters=self.filters, kernel_size=self.kernel_size, activation='relu', data_format='channels_last'))
        model.add(
            Conv3D(filters=self.filters, kernel_size=self.kernel_size, activation='relu', data_format='channels_last'))
        model.add(MaxPooling3D(pool_size=(1, 2, 2), data_format='channels_last'))

        model.add(Flatten())
        model.add(Dense(units=len(self.emotion_map.keys()), activation="relu"))
        if self.verbose:
            model.summary()
        self.model = model
1097371
protected void validateModelClass(Object model) {
        final Set<ConstraintViolation<Object>> violations = validator.validate(model);

        // in case of an invalid model, we throw a ConstraintViolationException, containing the violations:
        if (!violations.isEmpty()) {
            throw new ConstraintViolationException(
                    new HashSet<>(violations));
        }
    }
1148811
public void setModel(@Nonnull final MindMap model, final boolean notifyModelChangeListeners) {
    this.lock();
    try {
      if (this.elementUnderEdit != null) {
        Utils.safeSwingBlockingCall(new Runnable() {
          @Override
          public void run() {
            endEdit(false);
          }
        });
      }

      final List<int[]> selectedPaths = new ArrayList<int[]>();
      for (final Topic t : this.selectedTopics) {
        selectedPaths.add(t.getPositionPath());
      }

      this.selectedTopics.clear();

      final MindMap oldModel = this.model;
      this.model = assertNotNull("Model must not be null", model);

      for (final PanelAwarePlugin p : MindMapPluginRegistry.getInstance().findFor(PanelAwarePlugin.class)) {
        p.onPanelModelChange(this, oldModel, this.model);
      }

      doLayout();
      revalidate();

      boolean selectionChanged = false;
      for (final int[] posPath : selectedPaths) {
        final Topic topic = this.model.findForPositionPath(posPath);
        if (topic == null) {
          selectionChanged = true;
        } else if (!MindMapUtils.isHidden(topic)) {
          this.selectedTopics.add(topic);
        }
      }
      if (selectionChanged) {
        fireNotificationSelectionChanged();
      }
      repaint();
    } finally {
      this.unlock();
      if (notifyModelChangeListeners) {
        fireNotificationMindMapChanged(true);
      }
    }
  }
188347
def set_parameters(self):
        
        for key in dir(self):
            if key.startswith('REQUIRES_'):
                setattr(self, key, getattr(self.gmpe, key))
            if key.startswith('DEFINED_'):
                if not key.endswith('FOR_INTENSITY_MEASURE_TYPES'):
                    setattr(self, key, getattr(self.gmpe, key))
893918
public void setLeftTableModel(TableModel model)
   {
      TableModel old = m_leftTable.getModel();
      m_leftTable.setModel(model);
      firePropertyChange("leftTableModel", old, model);
   }
1336330
def load_calibration_template(self, template):
        
        self.tone_calibrator.stimulus.clearComponents()
        self.tone_calibrator.stimulus.loadFromTemplate(template['tone_doc'], self.tone_calibrator.stimulus)
        comp_doc = template['noise_doc']
        for state, calstim in zip(comp_doc, self.bs_calibrator.get_stims()):
            calstim.loadState(state)
738660
def _init_model(self):
        
        base_model = self._get_base_model()

        top_layer_model = base_model.output
        top_layer_model = GlobalAveragePooling2D()(top_layer_model)
        top_layer_model = Dense(1024, activation='relu')(top_layer_model)
        prediction_layer = Dense(output_dim=len(self.emotion_map.keys()), activation='softmax')(top_layer_model)

        model = Model(input=base_model.input, output=prediction_layer)
        print(model.summary())
        for layer in base_model.layers:
            layer.trainable = False
        model.compile(optimizer='rmsprop', loss='categorical_crossentropy', metrics=['accuracy'])

        self.model = model
46723
protected void prepareCasResponseAttributesForViewModel(final Map<String, Object> model) {
        val service = authenticationRequestServiceSelectionStrategies.resolveService(getServiceFrom(model));
        val registeredService = this.servicesManager.findServiceBy(service);

        val principalAttributes = getCasPrincipalAttributes(model, registeredService);
        val attributes = new HashMap<String, Object>(principalAttributes);

        LOGGER.trace("Processed principal attributes from the output model to be [{}]", principalAttributes.keySet());
        val protocolAttributes = getCasProtocolAuthenticationAttributes(model, registeredService);
        attributes.putAll(protocolAttributes);

        LOGGER.debug("Final collection of attributes for the response are [{}].", attributes.keySet());
        putCasResponseAttributesIntoModel(model, attributes, registeredService, this.attributesRenderer);
    }
634603
def set_model(self, name, model):
        
        # Careful to not use `hasattr`
        # https://hynek.me/articles/hasattr/
        try:
            self.__getattribute__('models')
        except AttributeError:
            object.__setattr__(self, 'models',odict())
        self.models[name] = model
324642
def init_model(self, model, value):
        
        if value is None and self.default is not None:
            value = self.default() if callable(self.default) else self.default

        self.set_value(model, value)
150543
def ModelOption(model):
    
    yngkpmatch = re.compile('^YNGKP_M[{0}]$'.format(''.join([m[1 : ] for m in yngkp_modelvariants])))
    if yngkpmatch.search(model):
        return model
    elif len(model) > 6 and model[ : 6] == 'ExpCM_':
        fname = model[6 : ]
        if os.path.isfile(fname):
            return ('ExpCM', fname)
        else:
            raise ValueError("ExpCM_ must be followed by the name of an existing file. You specified the following, which is not an existing file: %s" % fname)
    else:
        raise ValueError("Invalid model")
1032963
public void setModel (DataModel<T> model, int page)
    {
        _model = model;
        displayPage(page, true);
    }
13510
public void setRightTableModel(TableModel model)
   {
      TableModel old = m_rightTable.getModel();
      m_rightTable.setModel(model);
      firePropertyChange("rightTableModel", old, model);
   }
508740
public synchronized void replaceModel (MaxentModel model) {
	replacementThread = Thread.currentThread();
	while (!replacementCanProceed) Thread.yield();
	setter.setModel(model);
	replacementThread = null;
    }