Update data sent by background process to global allData
504081
def update_data():
    
    global allData
    while not q.empty():
        allData = q.get()
    for key, value in tags.items():
        if key in allData:
            allData[key]['name'] = value
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
1102193
function dataWatchFn(newData, oldData) {
                        if (newData !== oldData){
                            if (!scope._config.disabled) {
                                scope._config.refreshDataOnly ? scope.api.update() : scope.api.refresh(); // if wanted to refresh data only, use update method, otherwise use full refresh.
                            }
                        }
                    }
633150
def data_received(self, data):
        
        _LOGGER.debug("Starting: data_received")
        _LOGGER.debug('Received %d bytes from PLM: %s',
                      len(data), binascii.hexlify(data))
        self._buffer.put_nowait(data)
        asyncio.ensure_future(self._peel_messages_from_buffer(),
                              loop=self._loop)

        _LOGGER.debug("Finishing: data_received")
796658
def sendData(self, data):
        """"""
        # Not set up yet
        if self.client_log is None:
            self.client_log_buffer.append(data)
        else:
            self.client_log.write(data)
        self.transport.write(data)
639417
def Update(self, data):
        
        m = len(data)
        self.params[:m] += data
1044308
def update(data)
      process_name(data) if data['name']
      process_version(data) if data['version']
      process_source(data) if data['source']
      process_data_provider(data) if data['data_provider']
      merge_dependencies(data) if data['dependencies']

      @data.merge!(data)
      return self
    end
602726
def update_event_data(self, num, data):
        """"""
        if num < 0 or num >= self.params["events_num"]:
            raise IndexError("Index out of range [0:%s]" %
                             (self.params["events_num"]))

        if isinstance(data, np.ndarray):
            raise TypeError("data should be np.ndarray")

        if data.dtype != np.short:
            raise TypeError("data array dtype should be dtype('int16')")

        ch_num = self.params['channel_number']
        ev_size = self.params['b_size']

        if data.shape != (ch_num * ev_size,):
            raise Exception("data should contain same number of elements "
                            "(%s)" % (ch_num * ev_size))

        self.file.seek(7168 + num * (96 + 2 * ch_num * ev_size) + 96)
        self.file.write(data.tostring())
        self.file.flush()
577500
def update(data)
      headers = @client.make_request(:post, @client.concat_user_path("#{CALL_PATH}/#{id}"), data)[1]
      if headers[:location]
         Client.get_id_from_location_header(headers[:location])
      end
    end
1124610
def _flush_data(self):
        
        if self._data and self._data.modified:
            hookenv.relation_set(self.relation_id, dict(self.to_publish.data))
1257806
def _collect_data(self):
        
        all_data = []
        for line in self.engine.run_engine():
            logging.debug("Adding {} to all_data".format(line))
            all_data.append(line.copy())
            logging.debug("all_data is now {}".format(all_data))

        return all_data
316971
def send(command, data):
    
    global _lock
    try:
        _lock.acquire()
        data = data.encode('utf8')
        assert len(data) < 1000000, 'Command too long'
        msg = b'%b%06d%b' % (command.value, len(data), data)
        logging.getLogger(__name__).debug('Sending command, data: [%s]' % msg)
        _out_file.write(msg)
        _out_file.flush()
    finally:
        _lock.release()
772510
def update_data(self, data_np, metadata=None, astype=None):
        
        self.set_data(data_np.copy(), metadata=metadata,
                      astype=astype)
876067
def update(self, data):
        
        if not data:
            return
        _rk, _dumps = self.get_key, self._dumps
        data = self._client.mset({
            _rk(key): _dumps(value)
            for key, value in data.items()})
445384
function backgroundRefresh() {
    var keys = Object.keys(refreshKeys);
    keys.forEach(function(key) {
      var data = refreshKeys[key];
      if(data.expiration - Date.now() < this.backgroundRefreshMinTtl){
        data.refresh(key, handleRefreshResponse.bind(this, key, data));
      }
    }, self);
  }
731794
function(data, showStatus, callback) {
    if (showStatus===undefined) showStatus=true;

    /* Queue our data to write. If there was previous data and no callback to
    invoke on this data or the previous then just append data. This would happen
    if typing in the terminal for example. */
    if (!callback && writeData.length && !writeData[writeData.length-1].callback) {
      writeData[writeData.length-1].data += data;
    } else {
      writeData.push({data:data,callback:callback,showStatus:showStatus});
      /* if this is our first data, start sending now. Otherwise we're already
      busy sending and will pull data off writeData when ready */
      if (writeData.length==1)
        writeSerialWorker(true);
    }
  }
147299
def _writeToTransport(self, data):
        ''''''
        self.transport.writeData(data)
        self.heartbeater.schedule()