Updates the products for the given targets, adding to existing entries.

    :API: public
550733
def add_for_targets(self, targets, products):
    
    # TODO: This is a temporary helper for use until the classpath has been split.
    for target in targets:
      self.add_for_target(target, products)
1306149
def update(self):
        

        subtotal = float(0)
        total = float(0)
        for product in self.items:
            subtotal += float(product["price"])
        if subtotal > 0:
            total = subtotal + self.extra_amount
        self.subtotal = subtotal
        self.total = total
98828
def update(self, *args):
        
        for d in args:
            for (key, value) in d.items():
                self.__setitem__(key, value)
1109807
def update
      if (results = what_changed?)[:ary]
        update_ptr
        update_ary_cache
        true
      elsif results[:ptr]
        update_ary
        update_ptr_cache
        true
      else
        false
      end
    end
1070545
def update(self, **kwargs):
        
        query = self._build_query()
        connection = get_es_connection(self.es_url, self.es_kwargs)
        results = connection.search(query, indices=self.index, doc_types=self.type,
                                             model=self.model, scan=True)
        for item in results:
            item.update(kwargs)
            item.save(bulk=True)
        connection.flush_bulk(True)
        # Clear the result cache, in case this QuerySet gets reused.
        self._result_cache = None
1008581
protected function updateTargetIndexMapping()
    {
        $sourceModel = $this->getModel();
        $sourceIndexConfigurator = $sourceModel->getIndexConfigurator();

        $targetIndex = $this->argument('target-index');
        $targetType = $sourceModel->searchableAs();

        $mapping = array_merge_recursive(
            $sourceIndexConfigurator->getDefaultMapping(),
            $sourceModel->getMapping()
        );

        if (empty($mapping)) {
            $this->warn(sprintf(
                'The %s mapping is empty.',
                get_class($sourceModel)
            ));

            return;
        }

        $payload = (new RawPayload())
            ->set('index', $targetIndex)
            ->set('type', $targetType)
            ->set('body.'.$targetType, $mapping)
            ->get();

        ElasticClient::indices()
            ->putMapping($payload);

        $this->info(sprintf(
            'The %s mapping was updated.',
            $targetIndex
        ));
    }
866597
def _bin_update_items(self, items, replace_at_most_one,
                          replacements, leftovers):
        
        for key, value in items:
            # If there are existing items with key <key> that have yet to be
            # marked for replacement, mark that item's value to be replaced by
            # <value> by appending it to <replacements>.
            if key in self and key not in replacements:
                replacements[key] = [value]
            elif (key in self and not replace_at_most_one and
                  len(replacements[key]) < len(self.values(key))):
                replacements[key].append(value)
            else:
                if replace_at_most_one:
                    replacements[key] = [value]
                else:
                    leftovers.append((key, value))
1096545
def update(self, item):
        
        if item.matrix not in self.data:
            self.data[item.matrix] = []

        result = Select(self.data[item.matrix]).where(
            lambda entry: entry.stage == item.stage).build()

        if len(result) > 0:
            stage = result[0]
            stage.status = item.status
            stage.add(item.timestamp, item.information)
        else:
            stage = CollectorStage(stage=item.stage, status=item.status)
            stage.add(item.timestamp, item.information)
            self.data[item.matrix].append(stage)
1264551
def update(self, *args, **kwargs):
        
        if args:
            self.database.hmset(self.key, *args)
        else:
            self.database.hmset(self.key, kwargs)
969331
def update_fields(fields)
      attributes[:id]      = fields['id'] || attributes[:id]
      attributes[:state]   = fields['state'] || attributes[:state]
      attributes[:item_id] = fields['idCheckItem'] || attributes[:item_id]
      self
    end
607706
def update(self, new_keys: Index):
        
        if not self._map.index.intersection(new_keys).empty:
            raise KeyError("Non-unique keys in index.")

        mapping_update = self.hash_(new_keys)
        if self._map.empty:
            self._map = mapping_update.drop_duplicates()
        else:
            self._map = self._map.append(mapping_update).drop_duplicates()

        collisions = mapping_update.index.difference(self._map.index)
        salt = 1
        while not collisions.empty:
            mapping_update = self.hash_(collisions, salt)
            self._map = self._map.append(mapping_update).drop_duplicates()
            collisions = mapping_update.index.difference(self._map.index)
            salt += 1
899740
def update(self, entries = {}, *args, **kwargs):
        
        if isinstance(entries, dict):
            entries = self._reject_reserved_keys(entries)

        for key, value in dict(entries, *args, **kwargs).items():
            if isinstance(value, dict):
                self.__dict__[key] = AttributeDict(value)
            else:
                self.__dict__[key] = value

        self._refresh()
743820
def update(opts)
      opts = opts.merge(:product_id => self.product_id)
      Twocheckout::API.request(:post, 'products/update_product', opts)
      response = Twocheckout::API.request(:get, 'products/detail_product', opts)
      Product.new(response['product'])
    end
811738
def hard_target_update(self):
    
    if self.steps % self.target_update == 0:
      self.target.load_state_dict(self.local.state_dict())
926105
def add(self, target, *args, **kwargs):
        
        t = Thread.run(target.__name__, target, *args, **kwargs)
        self.threads.append(t)
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
438598
def _update_targets(self):
        '''
        
        '''

        hostname = self.opts.get('tgt', '')
        if '@' in hostname:
            user, hostname = hostname.split('@', 1)
        else:
            user = self.opts.get('ssh_user')
        if hostname == '*':
            hostname = ''

        if salt.utils.network.is_reachable_host(hostname):
            hostname = salt.utils.network.ip_to_host(hostname)
            self.opts['tgt'] = hostname
            self.targets[hostname] = {
                'passwd': self.opts.get('ssh_passwd', ''),
                'host': hostname,
                'user': user,
            }
            if self.opts.get('ssh_update_roster'):
                self._update_roster()