Remove an unlocked model.  Fails if model is in-use.
191163
@SuppressWarnings("unused") // called through reflection by RequestServer
  public ModelsV3 delete(int version, ModelsV3 s) {
    Model model = getFromDKV("key", s.model_id.key());
    model.delete();             // lock & remove
    return s;
  }
406685
public boolean remove(P model) {
        if (null == model) return false;
        boolean removed = false;
        if (presentationModels.containsValue(model)) {
            removePresentationModelByType(model);
            presentationModels.remove(model.getId());
            for (A attribute : model.getAttributes()) {
                removeAttributeById(attribute);
                removeAttributeByQualifier(attribute);
                attribute.removePropertyChangeListener(Attribute.QUALIFIER_NAME, ATTRIBUTE_WORKER);
            }
            fireModelStoreChangedEvent(model, ModelStoreEvent.Type.REMOVED);
            removed = true;
        }
        return removed;
    }
1048027
def release(self):
        ""
        if self.acquired_until is None:
            raise ValueError("Cannot release an unlocked lock")
        existing = float(self.redis.get(self.name) or 1)
        # if the lock time is in the future, delete the lock
        if existing >= self.acquired_until:
            self.redis.delete(self.name)
        self.acquired_until = None
67535
def delete(
        collection_name, spec, safe, last_error_args, opts, flags=0, ctx=None):
    
    if ctx:
        return _delete_compressed(collection_name, spec, opts, flags, ctx)
    return _delete_uncompressed(
        collection_name, spec, safe, last_error_args, opts, flags)
1103638
protected function activationRemove()
    {
        try {
            if ( ! $activation = Activation::completed($this->model)) {
                throw new ActivateException($this->model, '', 'not_completed');
            }

            if ( ! Activation::remove($this->model)) {
                throw new ActivateException($this->model, $activation->code, 'not_remove');
            }

            if ($this->callerActivationMethod(debug_backtrace())) {
                $this->model->is_active = false;
                $this->model->save();
            }

            event(new $this->events['activationRemove']($this->model));
            return true;
        } catch (ActivateException $e) {
            event(new $this->events['activationFail']($e->getId(),$e->getActivationCode(), $e->getType()));
            return false;
        }
    }
954077
def unregister(self, device, callback):
        
        if not device:
            logger.error("Received an invalid device: %r", device)
            return

        logger.debug("Removing subscription for {}".format(device.name))
        self._callbacks[device].remove(callback)
        self._devices[device.vera_device_id].remove(device)
283172
def model(self, value):
        
        if value == self._defaults['ai.device.model'] and 'ai.device.model' in self._values:
            del self._values['ai.device.model']
        else:
            self._values['ai.device.model'] = value
380544
public function unlinkDisownedObjects()
    {
        $object = $this->getObjectInStage(Versioned::DRAFT);
        if ($object) {
            $object->unlinkDisownedObjects($object, Versioned::LIVE);
        }
    }
110996
def removeFeatureSet(self, featureSet):
        
        q = models.Featureset.delete().where(
            models.Featureset.id == featureSet.getId())
        q.execute()
720251
def delete_model(self, model_or_type, id_=None):
    
    if not id_:
      constraints = get_model_id_constraints(model_or_type)
    else:
      constraints = get_id_constraints(model_or_type.primary_key_name, id_)
    self.delete(model_or_type.table_name, constraints)

    return model_or_type
1264400
def model_deleted(sender, instance,
                          using,
                          **kwargs):
    
    opts = get_opts(instance)
    model = '.'.join([opts.app_label, opts.object_name])
    distill_model_event(instance, model, 'deleted')
88440
def delete(method, hmc, uri, uri_parms, logon_required):
        """"""
        try:
            resource = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        resource.manager.remove(resource.oid)
147679
def remove_population(self,pop):
        
        iremove=None
        for i in range(len(self.poplist)):
            if self.modelnames[i]==self.poplist[i].model:
                iremove=i
        if iremove is not None:
            self.modelnames.pop(i)
            self.shortmodelnames.pop(i)
            self.poplist.pop(i)
1257981
protected boolean deleteModel(MODEL_ID id, boolean permanent) throws Exception {
        if (permanent) {
            server.deletePermanent(modelType, id);
        } else {
            server.delete(modelType, id);
        }
        return permanent;
    }
85872
def delete_model(self):
        

        if self.name is None:
            raise ValueError('The SageMaker model must be created before attempting to delete.')

        self.sagemaker_session.delete_model(self.name)
574691
def delete_model(self, name):
        
        try:
            ret = self.es.delete(index=self.index_name,
                                 doc_type=self.DOC_TYPE, id=name)
        except NotFoundError:
            return False
        # Make sure that the data is saved
        self.es.indices.flush(self.index_name)
        return ret['found']
871820
public void free()
    {
        try {
            this.updateIfNewRow(-1);    // Update any locked record.
        } catch (DBException ex)    {
            ex.printStackTrace();
        }
        if (m_modelListeners != null)
        {
            for (ThinTableModelListener thinTableModelListener : m_modelListeners)
            {
                thinTableModelListener.m_table.getSelectionModel().removeListSelectionListener(thinTableModelListener);
            }
            m_modelListeners = null;
        }
        super.free();
    }