Set bluetooth settings.
481331
async def set_bluetooth_settings(self, target: str, value: str) -> None:
        """"""
        params = {"settings": [{"target": target, "value": value}]}
        return await self.services["avContent"]["setBluetoothSettings"](params)
315548
protected function setListenerOptions()
	{
		$this->listener->setEnvironment($this->flyphp->environment());

		$this->listener->setSleep($this->option('sleep'));

		$this->listener->setMaxTries($this->option('tries'));
	}
484662
private BluetoothSocket setupSocket(BluetoothDevice device)
            throws BluetoothException {
        if (device == null) {
            Log.w(TAG, "Can't setup socket -- device is null");
            throw new BluetoothException();
        }

        Log.d(TAG, "Scanning services on " + device);
        BluetoothSocket socket;
        try {
            socket = device.createRfcommSocketToServiceRecord(RFCOMM_UUID);
        } catch (IOException e) {
            String error = "Unable to open a socket to device " + device;
            Log.w(TAG, error);
            throw new BluetoothException(error, e);
        }

        return socket;
    }
1155447
def _setup_listener(self):
        '''
        
        '''
        listener_class = get_listener(self._listener_type)
        self.address = self.listener_opts.pop('address', self.address)
        self.port = self.listener_opts.pop('port', self.port)
        self.listener = listener_class(self.address,
                                       self.port,
                                       **self.listener_opts)
1192576
def set(self, channel, state):
        """"""
        checked_val = self._check_dac_val(channel, state)
        self._dac_enabled = 0x40
        self.i2c.write8(self._dac_enabled, checked_val * 255)
502841
def connect(self, mac: str):
        """"""
        from bluepy.btle import Peripheral
        match_result = re.search(r'hci([\d]+)', self.adapter)
        if match_result is None:
            raise BluetoothBackendException(
                'Invalid pattern "{}" for BLuetooth adpater. '
                'Expetected something like "hci0".'.format(self.adapter))
        iface = int(match_result.group(1))
        self._peripheral = Peripheral(mac, iface=iface, addrType=self.address_type)
1067418
async def set_config(self, on=None, long=None, lat=None,
                         sunriseoffset=None, sunsetoffset=None):
        """"""
        data = {
            key: value for key, value in {
                'on': on,
                'long': long,
                'lat': lat,
                'sunriseoffset': sunriseoffset,
                'sunsetoffset': sunsetoffset,
            }.items() if value is not None
        }

        await self._request('put', 'sensors/{}/config'.format(self.id),
                            json=data)
865692
def write_handle(self, handle: int, value: bytes):
        """"""
        if not self.is_connected():
            raise BluetoothBackendException('Not connected to device!')
        self._device.char_write_handle(handle, value, True)
        return True
315508
private void setupAudio() {
		audio.setAutoplay(cbAutoPlay.isSelected());
		audio.setLoop(!cbLoop.isDisabled() && cbLoop.isSelected());
		audio.setControls(cbControls.isSelected() ? WAudio.Controls.PLAY_PAUSE : WAudio.Controls.NATIVE);
		audio.setDisabled(cbControls.isSelected() && cbDisable.isSelected());
	}
316252
def set(self, **kwargs):
        
        self.explorer.set(**kwargs)
        self.protocoler.set(**kwargs)
        self.tone_calibrator.set(**kwargs)
        self.charter.set(**kwargs)
        self.bs_calibrator.set(**kwargs)
        self.mphone_calibrator.set(**kwargs)
701578
def setup(self):
        """"""
        super().setup()
        self._start_time = self.clock.time
        self.initialize_simulants()
901480
async def set_googlecast_settings(self, target: str, value: str):
        """"""
        params = {"settings": [{"target": target, "value": value}]}
        return await self.services["system"]["setWuTangInfo"](params)
764027
def setting(self, opt, val):
        """"""
        opt = opt.encode()
        if isinstance(val, basestring):
            fluid_settings_setstr(self.settings, opt, val)
        elif isinstance(val, int):
            fluid_settings_setint(self.settings, opt, val)
        elif isinstance(val, float):
            fluid_settings_setnum(self.settings, opt, val)
77998
def set_led(self, red=0, green=0, blue=0):
        """"""
        self._led = (red, green, blue)
        self._control()
1143638
async def settings(dev: Device):
    """"""
    settings_tree = await dev.get_settings()

    for module in settings_tree:
        await traverse_settings(dev, module.usage, module.settings)
277298
async def set_config(self, on=None, tholddark=None, tholdoffset=None):
        """"""
        data = {
            key: value for key, value in {
                'on': on,
                'tholddark': tholddark,
                'tholdoffset': tholdoffset,
            }.items() if value is not None
        }

        await self._request('put', 'sensors/{}/config'.format(self.id),
                            json=data)
200118
def setbb(self, x, y):
        """"""
        self.__xmin = min(self.__xmin, max(x, self.__clip_box[0]))
        self.__xmax = max(self.__xmax, min(x, self.__clip_box[2]))
        self.__ymin = min(self.__ymin, max(y, self.__clip_box[1]))
        self.__ymax = max(self.__ymax, min(y, self.__clip_box[3]))