Updates the loop value, can be 'off', 'on', or 'shuffle
421578
async def set_loop(self, loop_value):
        """'"""
        if loop_value not in ['on', 'off', 'shuffle']:
            self.statuslog.error("Loop value must be `off`, `on`, or `shuffle`")
            return

        self.loop_type = loop_value
        if self.loop_type == 'on':
            self.statuslog.info("Looping on")
        elif self.loop_type == 'off':
            self.statuslog.info("Looping off")
        elif self.loop_type == 'shuffle':
            self.statuslog.info("Looping on and shuffling")
763023
function(){
      if (this.locked)
      {
        this.locked--;

        if (!this.locked)
        {
          var lockedValue = this.lockedValue_;

          this.lockedValue_ = null;

          if (this.value !== lockedValue)
            this.emit_change(lockedValue);
        }
      }
    }
580490
def updateCurrentValue(self, value):
        
        xsnap = None
        ysnap = None
        
        if value != self.endValue():
            xsnap = self.targetObject().isXSnappedToGrid()
            ysnap = self.targetObject().isYSnappedToGrid()
            
            self.targetObject().setXSnapToGrid(False)
            self.targetObject().setYSnapToGrid(False)
        
        super(XNodeAnimation, self).updateCurrentValue(value)
        
        if value != self.endValue():
            self.targetObject().setXSnapToGrid(xsnap)
            self.targetObject().setYSnapToGrid(ysnap)
584500
function shuffle(sample, randomSource) {
        // slice the original array so that it is not modified
        sample = sample.slice();

        // and then shuffle that shallow-copied array, in place
        return shuffle_in_place(sample.slice(), randomSource);
    }
1141289
private void updateValue() {
        if (list != null) {
            int oldCount = this.count;
            this.count = list.getSelectedIndices().length;
            maybeNotifyListeners(oldCount, count);
        }
    }
1316363
def update_selected(self, other, selected):
        

        self.update({k: other[k] for k in selected})
162391
public int updatePosition(int p, boolean keyOff)
	{
		p++;
		if (loop && p>=position[loopEndPoint]) p=position[loopStartPoint];
		if (sustain && p>=position[sustainEndPoint] && !keyOff) p=position[sustainStartPoint];
		return p;
	}
189299
function updateValues(id, withoutStep) {
                if (!withoutStep) {
                    margin = (areaLength - totalLength - itemLength) / 2;
                    if (margin < posMin) {
                        margin = (areaLength - itemLength) / 2;
                        totalLength = 0;
                        step++;
                    }
                }
                steps[id] = step;
                margins[step] = $$.isLegendInset ? 10 : margin;
                offsets[id] = totalLength;
                totalLength += itemLength;
            }
1353318
def _update(self, data):
        """"""
        for k, v in six.iteritems(data):
            new_value = v
            if isinstance(v, dict):
                new_value = type(self)(v)
            elif isinstance(v, list):
                new_value = [(type(self)(e) if isinstance(e, dict) else e)
                             for e in v]
            setattr(self, k, new_value)
898479
private void update(int seqNo, long guessedIndex) {
		long delta = guessedIndex - (((long) this.roc) << 16 | this.seqNum);

		/* update the replay bit mask */
		if (delta > 0) {
			replayWindow = replayWindow << delta;
			replayWindow |= 1;
		} else {
			replayWindow |= (1 << delta);
		}

		if (seqNo > seqNum) {
			seqNum = seqNo & 0xffff;
		}
		if (this.guessedROC > this.roc) {
			roc = guessedROC;
			seqNum = seqNo & 0xffff;
		}
	}
525910
def update_value(self, offset, value):
        

        if offset + len(value) > self.total_size:
            return Error.INPUT_BUFFER_TOO_LONG

        if len(self.current_value) < offset:
            self.current_value += bytearray(offset - len(self.current_value))
        if len(self.current_value) > offset:
            self.current_value = self.current_value[:offset]

        self.current_value += bytearray(value)
        return 0
1155096
private static void shuffle(ArrayModifiableDBIDs ids, int ssize, int end, Random random) {
    ssize = ssize < end ? ssize : end; // Guard for choosing from tiny sets
    for(int i = 1; i < ssize; i++) {
      ids.swap(i - 1, i + random.nextInt(end - i));
    }
  }
500074
synchronized void reset(double value, int updated) {
        ewma = value;
        ewmaStddev = value * SINGLE_VALUE_STDDEV;
        ewmaVariance = ewmaStddev * ewmaStddev;
        consecutiveOutliers = 0;
        lastUpdate = updated;
    }
906478
@Override
    public void reset(boolean shuffle) {
        this.position.set(0);
        if (shuffle) {
            logger.debug("Calling shuffle() on entries...");
            // https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm
            for (int i = order.length - 1; i > 0; i--) {
                int j = rng.nextInt(i + 1);
                int temp = order[j];
                order[j] = order[i];
                order[i] = temp;
            }
        }
    }
26851
def shuffle(enable):
    """"""
    message = command(protobuf.CommandInfo_pb2.ChangeShuffleMode)
    send_command = message.inner()
    send_command.options.shuffleMode = 3 if enable else 1
    return message
514123
def update_value(self, key, value):
        """"""

        if key == "Status":
            self._inhibited = value != "Enabled"
        elif key == "Color temperature":
            self._temperature = int(value.rstrip("K"), 10)
        elif key == "Period":
            self._period = value
        elif key == "Brightness":
            self._brightness = value
        elif key == "Location":
            location = []
            for x in value.split(", "):
                v, d = x.split(" ")
                location.append(float(v) * (1 if d in "NE" else -1))
            self._location = (location)
447785
def update(self, *iterables):
        """"""
        _set = self._set
        values = set(chain(*iterables))
        if (4 * len(values)) > len(_set):
            _list = self._list
            _set.update(values)
            _list.clear()
            _list.update(_set)
        else:
            _add = self.add
            for value in values:
                _add(value)
        return self