Appends weather data.

        Args:
            data (WeatherData): weather data object
776367
def add_weatherdata(self, data):
        
        if not isinstance(data, WeatherData):
            raise ValueError('Weather data need to be of type WeatherData')
        self._data["WEATHER DATA"].append(data)
219372
def data(self, data: numpy.ndarray) -> None:
        
        self.__data_item.set_data(numpy.copy(data))
606964
def setData(self, data):
        
        try:
            bytestream = pickle.dumps(data)
            super(MimeData, self).setData(self._mimeType, bytestream)
        except TypeError:
            raise TypeError(self.tr("can not pickle added data"))
        except:
            raise
212690
function prepareWeather(weatherData) {
      return {
        temperature: weatherData.main.temp,
        icon: (angular.isDefined(weatherIcons[weatherData.weather[0].icon])) ? weatherData.weather[0].icon : weatherData.weather[0].id,
        description: weatherData.weather[0].description
      }
    }
838184
public void setData(byte[] data, boolean append) {
	lastModified = System.currentTimeMillis();

	// set data
	if (append) {
	    if (this.data != null && data != null) {
		byte[] newData = new byte[this.data.length + data.length];
		int i = 0;
		for (; i < this.data.length; i++) {
		    newData[i] = this.data[i];
		}
		for (; i < this.data.length + data.length; i++) {
		    newData[i] = data[i - this.data.length];
		}
		this.data = newData;
	    }
	    else if (data != null) {
		this.data = data;
	    }
	}
	else {
	    this.data = data;
	}

	// set type
	if (this.data != null) this.type = TYPE_FILE;

    }
924231
def add_data(self, rawdata):
        """"""

        for data in rawdata:
            try:
                item = data[0]
                if item[0] == 2:
                    # Flush messages but we got nothing to flush
                    continue
                if item[0] != 0:
                    warnings.warn(f"Unknown message type '{item[0]}'", Warning)
                    continue
                item = item[1]
                # convert target to string because error codes are ints
                target = str(item[0])
                try:
                    data = item[1]
                except IndexError:
                    data = dict()
                try:
                    method = getattr(self, self.__head + target)
                    method(data)
                except AttributeError:
                    self._handle_unhandled(target, data)
            except IndexError:
                LOGGER.warning("Wrongly constructed message received: %r", data)

        self.conn.process_queues()
1059414
def add(self, data):
        
        for host in data:
            for key in data[host]:
                if not data[host][key] == []:
                    self.add_item(host, key, data[host][key])
1343354
function appendData(data, builder) {
  if(Array.isArray(data) || Buffer.isBuffer(data)) {
    data = Buffer.from(data);
  } else {
    data = Buffer.from(data, 'ascii');
  }

  builder.appendBuffer(data);
}
735649
public void addData(final Data DATA) {
        sum += DATA.getValue();
        window.add(DATA);
        if (window.size() > numberPeriod) {
            sum -= window.remove().getValue();
        }
    }
261808
def add_data(self, data):
        

        if self.data_size - self.data_index < len(data):
            return Error.DESTINATION_BUFFER_TOO_SMALL

        if self.in_progress is not None:
            self.in_progress.data += data

        return Error.NO_ERROR
1145268
def create_weather(self, **kwargs):
        
        weather = predix.admin.weather.WeatherForecast(**kwargs)
        weather.create()

        client_id = self.get_client_id()
        if client_id:
            weather.grant_client(client_id)

        weather.grant_client(client_id)
        weather.add_to_manifest(self)
        return weather
499979
protected static HashMap getWthData(HashMap data) {
        if (data.containsKey("weather")) {
            return getObjectOr(data, "weather", new HashMap());
        } else {
            return data;
        }
    }
1364304
def add_data(self, path, time_info, data, exprs):
        
        # Dont add if empty
        if not nonempty(data):
            for d in self.data[path]:
                if nonempty(d['values']):
                    return

        # Add data to path
        for expr in exprs:
            self.paths[expr].add(path)
        self.data[path].append({
            'time_info': time_info,
            'values': data
        })
288298
def load_data(self, data):
        

        dates = fill_date_range(self.start_date, self.end_date)
        for row, date in zip(data, dates):
            data = {'date': date}
            if self.add:
                # If self.add is set, results will contain additional
                # attributes (e.g. flags). In that case, create one row per
                # result, with attributes "date", "elem", "value", and one for
                # each item in self.add.
                for elem, vals in zip(self.parameter, row):
                    data['elem'] = elem
                    for add, val in zip(['value'] + self.add, vals):
                        data[add] = val
                    yield data
            else:
                # Otherwise, return one row per date, with "date" and each
                # element's value as attributes.
                for elem, val in zip(self.parameter, row):
                    # namedtuple doesn't like numeric field names
                    if elem.isdigit():
                        elem = "e%s" % elem
                    data[elem] = val
                yield data
57202
def _postprocess_data(self, data):
        
        new_data = {}
        for k, values in data.items():
            values = decode_bytes(values) # Bytes need decoding to strings

            # Certain datetime types need to be converted
            if len(values) and isinstance(values[0], cftime_types):
                if any(v.calendar not in _STANDARD_CALENDARS for v in values):
                    self.param.warning(
                        'Converting cftime.datetime from a non-standard '
                        'calendar (%s) to a standard calendar for plotting. '
                        'This may lead to subtle errors in formatting '
                        'dates, for accurate tick formatting switch to '
                        'the matplotlib backend.' % values[0].calendar)
                values = cftime_to_timestamp(values, 'ms')
            new_data[k] = values
        return new_data
1297397
def Update(self, data):
        
        for hypo in self.Values():
            like = self.Likelihood(data, hypo)
            self.Mult(hypo, like)
        self.Normalize()
529448
def add_perfdata(self, *args, **kwargs):
        
        self._perfdata.append(Perfdata(*args, **kwargs))