Update step for A
434682
def _updateA(X, A, R, P, Z, lmbdaA, orthogonalize):
    """"""
    n, rank = A.shape
    F = zeros((n, rank), dtype=A.dtype)
    E = zeros((rank, rank), dtype=A.dtype)

    AtA = dot(A.T, A)

    for i in range(len(X)):
        F += X[i].dot(dot(A, R[i].T)) + X[i].T.dot(dot(A, R[i]))
        E += dot(R[i], dot(AtA, R[i].T)) + dot(R[i].T, dot(AtA, R[i]))

    # regularization
    I = lmbdaA * eye(rank, dtype=A.dtype)

    # attributes
    for i in range(len(Z)):
        F += P[i].dot(Z[i].T)
        E += dot(Z[i], Z[i].T)

    # finally compute update for A
    A = solve(I + E.T, F.T).T
    return orth(A) if orthogonalize else A
472395
def update(self):
        """"""
        node = self._fritz.get_device_element(self.ain)
        self._update_from_node(node)
821231
public function updateDb()
    {
        $this->createUpdateTableIfNotExists();
        $this->getProcessedFiles();
        
        $path = leedch_resourceMysqlUpdateFolder;
        $files = $this->findNewFiles($path);
        
        $this->processNewFiles($files);
    }
553852
protected function _update()
    {
        $this->oxnews__oxdate->setValue(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxnews__oxdate->value, true));

        parent::_update();
    }
884674
def update():
    # type: () -> None
    
    branch = git.current_branch(refresh=True)
    base_branch = common.get_base_branch()

    common.assert_branch_type('task')
    common.git_checkout(base_branch)
    common.git_pull(base_branch)
    common.git_checkout(branch.name)
    common.git_merge(branch.name, base_branch)
135407
def upgrade():
    """"""
    op.drop_constraint(u'fk_access_actionsusers_user_id_accounts_user',
                       'access_actionsusers', type_='foreignkey')
    op.drop_index(op.f('ix_access_actionsusers_user_id'),
                  table_name='access_actionsusers')

    op.alter_column('access_actionsusers', 'user_id', nullable=False,
                    existing_type=sa.Integer())

    op.create_index(op.f('ix_access_actionsusers_user_id'),
                    'access_actionsusers', ['user_id'], unique=False)
    op.create_foreign_key(op.f('fk_access_actionsusers_user_id_accounts_user'),
                          'access_actionsusers', 'accounts_user', ['user_id'],
                          ['id'], ondelete='CASCADE')
700346
def update(self, automation):
        """"""
        self._automation.update(
            {k: automation[k] for k in automation if self._automation.get(k)})
1151707
def do_update(pool,request,models):
  ""
  return {k:fkapply(models,pool,process_update,missing_update,k,v) for k,v in request.items()}
226509
function (is_update) {
            this.no_diapason = false;
            this.coords.p_step = this.convertToPercent(this.options.step, true);

            this.target = "base";

            this.toggleInput();
            this.append();
            this.setMinMax();

            if (is_update) {
                this.force_redraw = true;
                this.calc(true);

                // callbacks called
                this.callOnUpdate();
            } else {
                this.force_redraw = true;
                this.calc(true);

                // callbacks called
                this.callOnStart();
            }

            this.updateScene();
        }
33855
def update(self):
        """"""
        if not os.path.isdir(os.path.join(self.path)):
            os.makedirs(self.path)
        if not os.path.isdir(os.path.join(self.path, 'refs')):
            subprocess.check_output([
                'git', 'clone', '--bare', self.repo_git, self.path
            ])
        self.run(['gc', '--auto', '--prune=all'])
        self.run(['fetch', '-p', 'origin', '+refs/heads/*:refs/heads/*'])
        # github support
        self.run(['fetch', 'origin', '+refs/pull/*/head:refs/pull/*'])
        # gitlab support
        self.run([
            'fetch', 'origin', '+refs/merge-requests/*/head:refs/pull/*'])
147179
protected function update($step)
    {
        $contentService = $this->repository->getContentService();
        $contentTypeService = $this->repository->getContentTypeService();

        $contentCollection = $this->matchContents('update', $step);

        if (count($contentCollection) > 1 && isset($step->dsl['references'])) {
            throw new \Exception("Can not execute Content update because multiple contents match, and a references section is specified in the dsl. References can be set when only 1 content matches");
        }

        if (count($contentCollection) > 1 && isset($step->dsl['main_location'])) {
            throw new \Exception("Can not execute Content update because multiple contents match, and a main_location section is specified in the dsl. References can be set when only 1 content matches");
        }

        $contentType = array();

        foreach ($contentCollection as $key => $content) {
            $contentInfo = $content->contentInfo;

            if (!isset($contentType[$contentInfo->contentTypeId])) {
                $contentType[$contentInfo->contentTypeId] = $contentTypeService->loadContentType($contentInfo->contentTypeId);
            }

            if (isset($step->dsl['attributes']) || isset($step->dsl['version_creator'])) {
                $contentUpdateStruct = $contentService->newContentUpdateStruct();

                if (isset($step->dsl['attributes'])) {
                    $this->setFields($contentUpdateStruct, $step->dsl['attributes'], $contentType[$contentInfo->contentTypeId], $step);
                }

                $versionCreator = null;
                if (isset($step->dsl['version_creator'])) {
                    $versionCreator = $this->getUser($step->dsl['version_creator']);
                }

                $draft = $contentService->createContentDraft($contentInfo, null, $versionCreator);
                $contentService->updateContent($draft->versionInfo, $contentUpdateStruct);
                $content = $contentService->publishVersion($draft->versionInfo);
            }

            if (isset($step->dsl['always_available']) ||
                isset($step->dsl['new_remote_id']) ||
                isset($step->dsl['owner']) ||
                isset($step->dsl['modification_date']) ||
                isset($step->dsl['publication_date'])) {

                $contentMetaDataUpdateStruct = $contentService->newContentMetadataUpdateStruct();

                if (isset($step->dsl['always_available'])) {
                    $contentMetaDataUpdateStruct->alwaysAvailable = $step->dsl['always_available'];
                }

                if (isset($step->dsl['new_remote_id'])) {
                    $contentMetaDataUpdateStruct->remoteId = $step->dsl['new_remote_id'];
                }

                if (isset($step->dsl['owner'])) {
                    $owner = $this->getUser($step->dsl['owner']);
                    $contentMetaDataUpdateStruct->ownerId = $owner->id;
                }

                if (isset($step->dsl['modification_date'])) {
                    $contentMetaDataUpdateStruct->modificationDate = $this->toDateTime($step->dsl['modification_date']);
                }

                if (isset($step->dsl['publication_date'])) {
                    $contentMetaDataUpdateStruct->publishedDate = $this->toDateTime($step->dsl['publication_date']);
                }

                $content = $contentService->updateContentMetadata($content->contentInfo, $contentMetaDataUpdateStruct);
            }

            if (isset($step->dsl['section'])) {
                $this->setSection($content, $step->dsl['section']);
            }

            if (isset($step->dsl['object_states'])) {
                $this->setObjectStates($content, $step->dsl['object_states']);
            }

            if (isset($step->dsl['main_location'])) {
                $this->setMainLocation($content, $step->dsl['main_location']);

            }
            $contentCollection[$key] = $content;
        }

        $this->setReferences($contentCollection, $step);

        return $contentCollection;
    }
102394
private function update()
    {
        $Eresus = Eresus_CMS::getLegacyKernel();

        $item = $Eresus->db->selectItem($this->table['name'], "`id`='" . arg('update') . "'");
        $old_file = $item['image'];
        $item['caption'] = arg('caption', 'dbsafe');
        $item['active'] = arg('active', 'int');
        if (arg('section'))
        {
            $item['section'] = '|' . implode('|', arg('section')) . '|';
        }
        $item['block'] = arg('block', 'dbsafe');
        $item['priority'] = arg('priority', 'int');
        $item['showFrom'] = arg('showFrom', 'dbsafe');
        $item['showTill'] = arg('showTill', 'dbsafe');
        $item['showCount'] = arg('showCount', 'int');
        $item['html'] = arg('html', 'dbsafe');
        $item['image'] = arg('image');
        $item['width'] = arg('width', 'int');
        $item['height'] = arg('height', 'int');
        $item['url'] = arg('url', 'dbsafe');
        $item['target'] = arg('target', 'dbsafe');

        if ($item['showTill'] == '')
        {
            unset($item['showTill']);
        }
        if (arg('flushShowCount'))
        {
            $item['shows'] = 0;
        }
        if (is_uploaded_file($_FILES['image']['tmp_name']))
        {
            $path = $Eresus->fdata . $this->name . '/';
            if (is_file($path . $old_file))
            {
                unlink($path . $old_file);
            }
            $filename = 'banner' . $item['id'] .
                substr($_FILES['image']['name'], strrpos($_FILES['image']['name'], '.'));
            upload('image', $path . $filename);
            $item['image'] = $filename;
        }

        $Eresus->db->updateItem($this->table['name'], $item, "`id`='" . $item['id'] . "'");

        if ($item['showTill'] == '')
        {
            $Eresus->db->query(
                "UPDATE " . $Eresus->db->prefix . $this->table['name'] .
                " SET `showTill` = NULL WHERE `id`='" . $item['id'] . "'");
        }

        HTTP::redirect(arg('submitURL'));
    }
913948
def update(self):
        '''
        
        '''
        self.updateIncomeProcess()
        self.updateAssetsGrid()
        self.updatepLvlNextFunc()
        self.updatepLvlGrid()
        self.updateMedShockProcess()
        self.updateSolutionTerminal()
1234279
def update_one(self, update):
        
        self.__bulk.add_update(self.__selector,
                               update, multi=False, upsert=True,
                               collation=self.__collation)
596014
def _update(collection_name, upsert, multi, spec, doc, check_keys, opts):
    """"""
    flags = 0
    if upsert:
        flags += 1
    if multi:
        flags += 2
    encode = _dict_to_bson  # Make local. Uses extensions.
    encoded_update = encode(doc, check_keys, opts)
    return b"".join([
        _ZERO_32,
        _make_c_string(collection_name),
        _pack_int(flags),
        encode(spec, False, opts),
        encoded_update]), len(encoded_update)
622302
function updateStepProgressIO() {
    io.stepProgress = stepEl.map((el, i) => {
      const marginTop = stepOffsetHeight[i] - offsetMargin;
      const marginBottom = -viewH + offsetMargin;
      const rootMargin = `${marginTop}px 0px ${marginBottom}px 0px`;
      const threshold = createThreshold(stepOffsetHeight[i]);
      const options = { rootMargin, threshold };
      // console.log(options);
      const obs = new IntersectionObserver(intersectStepProgress, options);
      obs.observe(el);
      return obs;
    });
  }
186053
def update(self, *args, **kwargs):
        """"""
        self._extend(args, kwargs, 'update', self._update_items)