Set mode on the channel.

        Arguments:

            mode -- The mode (a single-character string).

            value -- Value
548009
def set_mode(self, mode, value=None):
        
        if mode in self.user_modes:
            self.mode_users[mode][value] = 1
        else:
            self.modes[mode] = value
307861
def set_current_limit(self, value, channel=1):
        
        cmd = "I%d %f" % (channel, value)
        self.write(cmd)
160935
def mode(self, target, mode_string=None, tags=None):
        """"""
        params = [target]
        if mode_string:
            params += mode_string
        self.send('MODE', params=params, source=self.nick, tags=tags)
280075
function setBlendMode(mode, context) {
         context = context || this.getContext();
         this.currentBlendMode = mode;

         switch (mode) {
           case "multiply":
             context.globalCompositeOperation = "multiply";
             break;

           default:
             // normal
             context.globalCompositeOperation = "source-over";
             this.currentBlendMode = "normal";
             break;
         }
       }
515266
def setCurrentMode(self, mode):
        
        if type(mode) == int:
            mode = self.LoggingMap.get(mode, ('standard', ''))[0]
            
        if mode == self._currentMode:
            return
            
        self._currentMode = mode
        color = self.color(mode)
        if not color.isValid():
            return
            
        format = QtGui.QTextCharFormat()
        format.setForeground(color)
        self.setCurrentCharFormat(format)
776257
def set(self, mode):
        
        new_mode = None
        if mode == ThermostatMode.OFF:
            new_mode = COMMAND_THERMOSTAT_CONTROL_OFF_ALL_0X6B_0X09
        elif mode == ThermostatMode.HEAT:
            new_mode = COMMAND_THERMOSTAT_CONTROL_ON_HEAT_0X6B_0X04
        elif mode == ThermostatMode.COOL:
            new_mode = COMMAND_THERMOSTAT_CONTROL_ON_COOL_0X6B_0X05
        elif mode == ThermostatMode.AUTO:
            new_mode = COMMAND_THERMOSTAT_CONTROL_ON_AUTO_0X6B_0X06
        if new_mode:
            msg = ExtendedSend(address=self._address,
                               commandtuple=new_mode,
                               userdata=Userdata())
            msg.set_checksum()
            self._send_method(msg, self._mode_change_ack)
509374
def set(self, mode):
        
        if mode == ThermostatMode.FAN_AUTO:
            new_mode = COMMAND_THERMOSTAT_CONTROL_OFF_FAN_0X6B_0X08
        elif mode == ThermostatMode.FAN_ALWAYS_ON:
            new_mode = COMMAND_THERMOSTAT_CONTROL_ON_FAN_0X6B_0X07
        if new_mode:
            msg = ExtendedSend(address=self._address,
                               commandtuple=new_mode,
                               userdata=Userdata())
            msg.set_checksum()
            self._send_method(msg, self._mode_change_ack)
1310521
function mode() {
      var value = (attr.mdMode || "").trim();
      if (value) {
        switch (value) {
          case MODE_DETERMINATE:
          case MODE_INDETERMINATE:
          case MODE_BUFFER:
          case MODE_QUERY:
            break;
          default:
            value = MODE_INDETERMINATE;
            break;
        }
      }
      return value;
    }
384225
public void setTerminalMode(int mode, int value) throws SshException {
		try {

			encodedModes.write(mode);

			if (version == 1 && mode <= 127) {
				encodedModes.write(value);
			} else {
				encodedModes.writeInt(value);
			}

		} catch (IOException ex) {
			throw new SshException(SshException.INTERNAL_ERROR, ex);
		}
	}
757832
def set_enable(self, channel, value):
        '''
        '''
        try:
            bit = self._ch_map[channel]['GPIOEN']['bit']
        except KeyError:
            raise ValueError('set_enable() not supported for channel %s' % channel)
        self._set_power_gpio_value(bit=bit, value=value)
226932
public void setMode(long mode) throws IOException {
        setAttributes(
                new NfsSetAttributes(Long.valueOf(mode), null, null, NfsTime.DO_NOT_CHANGE, NfsTime.DO_NOT_CHANGE));
    }
1304244
def mode(self, mode):
        
        modes = self.available_modes
        if (not modes) or (mode not in modes):
            return
        self.publish(
            action='set',
            resource='modes' if mode != 'schedule' else 'schedule',
            mode=mode,
            publish_response=True)
        self.update()
921965
def set(self, option, value):
        
        if self.config is None:
            self.config = {}
        self.config[option] = value
478409
def set_mode(self, anchor_id, mode):
        
        data = struct.pack('<BB', LoPoAnchor.LPP_TYPE_MODE, mode)
        self.crazyflie.loc.send_short_lpp_packet(anchor_id, data)
1364583
def do_setmode(self, arg):
        '''  '''
        op_modes = config.get_op_modes()
        if arg in op_modes:
            op_mode = op_modes[arg]
            op_mode.cmdloop()
        else:
            print("Error: unknown operational mode, please use 'help setmode'.")
1011713
def set(self, value):
        

        if not isinstance(value, str_cls):
            raise TypeError(unwrap(
                '''
                %s value must be a unicode string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        if value.startswith('.'):
            encoded_value = b'.' + value[1:].encode(self._encoding)
        else:
            encoded_value = value.encode(self._encoding)

        self._unicode = value
        self.contents = encoded_value
        self._header = None
        if self._trailer != b'':
            self._trailer = b''
816978
def do_mode(self, args):
        ''''''
        if args.mode:
            mode = { 'idle': self.task_master.IDLE,
                     'run': self.task_master.RUN,
                     'terminate': self.task_master.TERMINATE }[args.mode]
            self.task_master.set_mode(mode)
            self.stdout.write('set mode to {0!r}\n'.format(args.mode))
        else:
            mode = self.task_master.get_mode()
            self.stdout.write('{0!s}\n'.format(mode))