Set an abode system setting to a given value.
197764
def set_setting(self, setting, value, area='1', validate_value=True):
        """"""
        setting = setting.lower()

        if setting not in CONST.ALL_SETTINGS:
            raise AbodeException(ERROR.INVALID_SETTING, CONST.ALL_SETTINGS)

        if setting in CONST.PANEL_SETTINGS:
            url = CONST.SETTINGS_URL
            data = self._panel_settings(setting, value, validate_value)
        elif setting in CONST.AREA_SETTINGS:
            url = CONST.AREAS_URL
            data = self._area_settings(area, setting, value, validate_value)
        elif setting in CONST.SOUND_SETTINGS:
            url = CONST.SOUNDS_URL
            data = self._sound_settings(area, setting, value, validate_value)
        elif setting in CONST.SIREN_SETTINGS:
            url = CONST.SIREN_URL
            data = self._siren_settings(setting, value, validate_value)

        return self.send_request(method="put", url=url, data=data)
520557
def _set_properties(self, flags):
        """"""
        flagByte = self._normalize(flags)

        if flagByte is not None:
            self._messageType = (flagByte[0] & 0xe0) >> 5
            self._extended = (flagByte[0] & MESSAGE_FLAG_EXTENDED_0X10) >> 4
            self._hopsLeft = (flagByte[0] & 0x0c) >> 2
            self._hopsMax = flagByte[0] & 0x03
        else:
            self._messageType = None
            self._extended = None
            self._hopsLeft = None
            self._hopsMax = None
1019520
def setValue(self, prop, value, unit=None):
        """"""

        if isinstance(value, int) or isinstance(value, float):
            if prop in self.props:
                for i, j in [(0, 1), (1, 0)]:
                    if self.props[prop][i] is None:
                        self.props[prop] = (self.props[prop][j], self.props[prop][j])
                for v in self.props[prop]:
                    v.value, v.unit = value, unit
            else:
                f = Feature(prop, "=", value, unit=unit)
                self.props[prop] = (f, f)
        elif prop in self.props:
            self.props[prop].value, self.props[prop].unit = value, unit
        else:
            self.props[prop] = Feature(prop, "=", value, unit=unit)
504693
def set(self, path, value):
        """"""
        _log.debug(
            "ZK: Setting {path} to {value}".format(path=path, value=value)
        )
        return self.zk.set(path, value)
603495
def setsebool(boolean, value, persist=False):
    '''
    
    '''
    if persist:
        cmd = 'setsebool -P {0} {1}'.format(boolean, value)
    else:
        cmd = 'setsebool {0} {1}'.format(boolean, value)
    return not __salt__['cmd.retcode'](cmd, python_shell=False)
64683
def set_level(self, val):
        """"""
        speed = self._value_to_fan_speed(val)
        if val == 0:
            self.off()
        else:
            set_command = ExtendedSend(self._address,
                                       COMMAND_LIGHT_ON_0X11_NONE,
                                       self._udata, cmd2=speed)
            set_command.set_checksum()
            self._send_method(set_command, self._on_message_received)
1321356
def set(self, key, value=None, dir=False, refresh=False, ttl=None,
            prev_value=None, prev_index=None, prev_exist=None, timeout=None):
        """"""
        url = self.make_key_url(key)
        data = self.build_args({
            'value': (six.text_type, value),
            'dir': (bool, dir or None),
            'refresh': (bool, refresh or None),
            'ttl': (int, ttl),
            'prevValue': (six.text_type, prev_value),
            'prevIndex': (int, prev_index),
            'prevExist': (bool, prev_exist),
        })
        try:
            res = self.session.put(url, data=data, timeout=timeout)
        except:
            self.erred()
        return self.wrap_response(res)
951057
def set_value(self, name, value):
        """"""
        value = to_text_string(value)
        code = u"get_ipython().kernel.set_value('%s', %s, %s)" % (name, value,
                                                                  PY2)

        if self._reading:
            self.kernel_client.input(u'!' + code)
        else:
            self.silent_execute(code)
206776
def set_value(self, value):
        """"""
        cache, cache_key = self._get_cache_plus_key()
        cache.set(cache_key, value)
636335
def set_status(self, status):
        """"""
        if self._json_state['control_url']:
            url = CONST.BASE_URL + self._json_state['control_url']

            status_data = {
                'status': str(status)
            }

            response = self._abode.send_request(
                method="put", url=url, data=status_data)
            response_object = json.loads(response.text)

            _LOGGER.debug("Set Status Response: %s", response.text)

            if response_object['id'] != self.device_id:
                raise AbodeException((ERROR.SET_STATUS_DEV_ID))

            if response_object['status'] != str(status):
                raise AbodeException((ERROR.SET_STATUS_STATE))

            # Note: Status result is of int type, not of new status of device.
            # Seriously, why would you do that?
            # So, can't set status here must be done at device level.

            _LOGGER.info("Set device %s status to: %s", self.device_id, status)

            return True

        return False
1089153
def set_active(self, active):
        """"""
        url = CONST.AUTOMATION_EDIT_URL
        url = url.replace(
            '$AUTOMATIONID$', self.automation_id)

        self._automation['is_active'] = str(int(active))

        response = self._abode.send_request(
            method="put", url=url, data=self._automation)

        response_object = json.loads(response.text)

        if isinstance(response_object, (tuple, list)):
            response_object = response_object[0]

        if (str(response_object['id']) != str(self._automation['id']) or
                response_object['is_active'] != self._automation['is_active']):
            raise AbodeException((ERROR.INVALID_AUTOMATION_EDIT_RESPONSE))

        self.update(response_object)

        return True
398152
def setSystemProperty(cls, key, value):
        
        SparkContext._ensure_initialized()
        SparkContext._jvm.java.lang.System.setProperty(key, value)
497616
def setnx(self, key, value):
        """"""
        return self.set(key, value, nx=True)
474343
def set(self, value = True):
        """"""
        value = value in (True,1) or ( (isinstance(value, str) or (sys.version < '3' and isinstance(value, unicode))) and (value.lower() in ("1","yes","true","enabled"))) #pylint: disable=undefined-variable
        return super(BooleanParameter,self).set(value)
561831
def _setVal(self, name, val, defVal = None):
        """"""
        if val == defVal:
            return
        if not hasattr(self, "vals"):
            self.vals = {}
        self.vals[name] = val
657477
def set_strict(self, value):
        
        assert isinstance(value, bool)
        self.__settings.set_strict(value)
653439
def set(self, key, value):
        """"""
        cmd = [
            "heroku",
            "config:set",
            "{}={}".format(key, quote(str(value))),
            "--app",
            self.name,
        ]
        if self._is_sensitive_key(key):
            self._run_quiet(cmd)
        else:
            self._run(cmd)