saturation commands
335179
def sat_increment(increment = 1)
      params = { sat: {} }
      params[:sat][:increment] = increment
      @requester.put(url: "#{@api_url}/state", params: params)
    end
171452
def _filter(self, commands, parser):
        
        resized = set()
        commands2 = []
        for command in reversed(commands):
            if command[0] == 'SHADERS':
                convert = parser.convert_shaders()
                if convert:
                    shaders = self._convert_shaders(convert, command[2:])
                    command = command[:2] + shaders
            elif command[1] in resized:
                if command[0] in ('SIZE', 'DATA'):
                    continue  # remove this command
            elif command[0] == 'SIZE':
                resized.add(command[1])
            commands2.append(command)
        return list(reversed(commands2))
957841
public void saturate(IAtomContainer atomContainer) throws CDKException {
        logger.info("Saturating atomContainer by adjusting lone pair electrons...");
        boolean allSaturated = allSaturated(atomContainer);
        if (!allSaturated) {
            for (int i = 0; i < atomContainer.getAtomCount(); i++) {
                saturate(atomContainer.getAtom(i), atomContainer);
            }
        }
    }
328635
def saturating_sigmoid(x):
  """"""
  with tf.name_scope("saturating_sigmoid", values=[x]):
    y = tf.sigmoid(x)
    return tf.minimum(1.0, tf.maximum(0.0, 1.2 * y - 0.1))
960186
public static <K, V> Flux<K> scan(RedisKeyReactiveCommands<K, V> commands) {
        return scan(commands, Optional.empty());
    }
399115
def saturation_mask(self, band, value=255):
        
        dn = self._get_band('b{}'.format(band))
        mask = self.mask()
        mask = where((dn == value) & (mask > 0), True, False)

        return mask
601584
public void onMapSelected(float x, float y) {

        if (x > 255) {
            x = 255;
        }
        if (x < 0) {
            x = 0;
        }
        if (y > 255) {
            y = 255;
        }
        if (y < 0) {
            y = 0;
        }
        switch (m_colorMode) {
            case CmsSliderBar.HUE:
                m_saturation = percentOf(x, 100);
                m_brightness = 100 - percentOf(y, 100);
                m_tbSaturation.setText(Integer.toString(m_saturation));
                m_tbBrightness.setText(Integer.toString(m_brightness));
                onChange(m_tbHue);
                break;
            case CmsSliderBar.SATURATIN:
                m_hue = percentOf(x, 360);
                m_brightness = 100 - percentOf(y, 100);
                m_tbHue.setText(Integer.toString(m_hue));
                m_tbBrightness.setText(Integer.toString(m_brightness));
                onChange(m_tbSaturation);
                break;
            case CmsSliderBar.BRIGHTNESS:
                m_hue = percentOf(x, 360);
                m_saturation = 100 - percentOf(y, 100);
                m_tbHue.setText(Integer.toString(m_hue));
                m_tbSaturation.setText(Integer.toString(m_saturation));
                onChange(m_tbBrightness);
                break;
            case CmsSliderBar.RED:
                m_blue = (int)x;
                m_green = 255 - (int)y;
                m_tbBlue.setText(Integer.toString(m_blue));
                m_tbGreen.setText(Integer.toString(m_green));
                onChange(m_tbRed);
                break;
            case CmsSliderBar.GREEN:
                m_blue = (int)x;
                m_red = 255 - (int)y;
                m_tbBlue.setText(Integer.toString(m_blue));
                m_tbRed.setText(Integer.toString(m_red));
                onChange(m_tbGreen);
                break;
            case CmsSliderBar.BLUE:
                m_red = (int)x;
                m_green = 255 - (int)y;
                m_tbRed.setText(Integer.toString(m_red));
                m_tbGreen.setText(Integer.toString(m_green));
                onChange(m_tbBlue);
                break;
            default:
                break;
        }
    }
1035440
def _run_cmd(self, command):
        
        if self.throttle:
            tables = self.engine.describe_all(False)
            limiter = self.throttle.get_limiter(tables)
        else:
            limiter = None
        self.engine.rate_limit = limiter
        results = self.engine.execute(command)
        if results is None:
            pass
        elif isinstance(results, basestring):
            print(results)
        else:
            with self.display() as ostream:
                formatter = FORMATTERS[self.conf["format"]](
                    results,
                    ostream,
                    pagesize=self.conf["pagesize"],
                    width=self.conf["width"],
                )
                formatter.display()
        print_count = 0
        total = None
        for (cmd_fragment, capacity) in self.engine.consumed_capacities:
            total += capacity
            print(cmd_fragment)
            print(indent(str(capacity)))
            print_count += 1
        if print_count > 1:
            print("TOTAL")
            print(indent(str(total)))
660778
def cmd_tuneopt(self, args):
        ''''''
        usage = "usage: tuneopt <set|show|reset|list>"
        if self.mpstate.vehicle_type != 'copter':
            print("This command is only available for copter")
            return
        if len(args) < 1:
            print(usage)
            return
        if args[0].lower() == 'reset':
            self.param_set('TUNE', '0')
        elif args[0].lower() == 'set':
            if len(args) < 4:
                print('Usage: tuneopt set OPTION LOW HIGH')
                return
            option = self.tune_option_validate(args[1])
            if not option:
                print('Invalid Tune option: ' + args[1])
                return
            low = args[2]
            high = args[3]
            self.param_set('TUNE', tune_options[option])
            self.param_set('TUNE_LOW', float(low) * 1000)
            self.param_set('TUNE_HIGH', float(high) * 1000)
        elif args[0].lower() == 'show':
            self.tune_show()
        elif args[0].lower() == 'list':
            print("Options available:")
            for s in sorted(tune_options.keys()):
                print('  ' + s)
        else:
            print(usage)
257075
def command(name, nargs=0, complete=None, range=None, count=None, bang=False,
            register=False, sync=False, allow_nested=False, eval=None):
    """"""
    def dec(f):
        f._nvim_rpc_method_name = 'command:{}'.format(name)
        f._nvim_rpc_sync = sync
        f._nvim_bind = True
        f._nvim_prefix_plugin_path = True

        opts = {}

        if range is not None:
            opts['range'] = '' if range is True else str(range)
        elif count is not None:
            opts['count'] = count

        if bang:
            opts['bang'] = ''

        if register:
            opts['register'] = ''

        if nargs:
            opts['nargs'] = nargs

        if complete:
            opts['complete'] = complete

        if eval:
            opts['eval'] = eval

        if not sync and allow_nested:
            rpc_sync = "urgent"
        else:
            rpc_sync = sync

        f._nvim_rpc_spec = {
            'type': 'command',
            'name': name,
            'sync': rpc_sync,
            'opts': opts
        }
        return f
    return dec
1342422
def set_fm_ext(self, freq, amplitude, peak_freq_dev=None,
                   output_state=True):
        """"""

        if peak_freq_dev is None:
            peak_freq_dev = freq
        commands = ['FUNC SIN',  # set to output sine functions
                    'FM:STAT ON',
                    'FREQ {0}'.format(freq),
                    'FM:SOUR EXT',
                    # 'FM:FREQ {0}'.format(freq),
                    'FM:DEV {0}'.format(peak_freq_dev),
                    'VOLT {0}'.format(amplitude),
                    'VOLT:OFFS 0']   # set to frequency modulation
        if output_state is True:
            commands.append('OUTP ON')
        else:
            commands.append('OUTP OFF')
        command_string = '\n'.join(commands)
        print_string = '\n\t' + command_string.replace('\n', '\n\t')
        logging.info(print_string)
        self.instr.write(command_string)
936825
function getFullyMatchedCommandOrNull(command) {
          if (keys.length < command.keys.length) {
            // Matches part of a multi-key command. Buffer and wait for next
            // stroke.
            inputState.keyBuffer.push(key);
            return null;
          } else {
            if (command.keys[keys.length - 1] == 'character') {
              inputState.selectedCharacter = selectedCharacter;
            }
            // Clear the buffer since a full match was found.
            inputState.keyBuffer = [];
            return command;
          }
        }
949296
@Override
    public void saturate(IAtomContainer atomContainer) throws CDKException {
        logger.info("Saturating atomContainer by adjusting bond orders...");
        boolean allSaturated = allSaturated(atomContainer);
        if (!allSaturated) {
            logger.info("Saturating bond orders is needed...");
            IBond[] bonds = new IBond[atomContainer.getBondCount()];
            for (int i = 0; i < bonds.length; i++)
                bonds[i] = atomContainer.getBond(i);
            boolean succeeded = saturate(bonds, atomContainer);
            if (!succeeded) {
                throw new CDKException("Could not saturate this atomContainer!");
            }
        }
    }
1313835
def set_continuous(self, freq, amplitude, offset, output_state=True):
        """"""
        commands = ['MODL 0',       #disable any modulation
                    'FREQ {0}'.format(freq)
                    ]

        if freq > 4.05e9:
            commands.append('AMPH {0}'.format(amplitude)) #set rear RF doubler amplitude
            if offset > 0.0:
                print('HIGH FREQUENCY OUTPUT IS AC ONLY')
            if output_state is True:
                commands.append('ENBH 1') #enable output
            else:
                commands.append('ENBH 0')
        elif freq < 62.5e6:
            commands.extend(['AMPL {0}'.format(amplitude), 'OFSL {0}'.format(offset)]) #set front BNC amplitude
            if output_state is True:
                commands.append('ENBL 1') #enable output
            else:
                commands.append('ENBL 0')

        command_string = '\n'.join(commands)
        print_string = '\n\t' + command_string.replace('\n', '\n\t')
        logging.info(print_string)
        self.instr.write(command_string)
916436
def streaming_command(self, command, raw=False, timeout_ms=None):
    """"""
    if raw:
      command = self._to_raw_command(command)
    return self.adb_connection.streaming_command('shell', command, timeout_ms)
497627
def congiguration(self):
        
        options = [
            "-g",
            "--config"
        ]
        command = [
            "print",
            "edit",
            "reset"
        ]
        conf = Config()
        if (len(self.args) == 2 and self.args[0] in options and
                self.args[1] == command[1]):
            conf.edit()
        elif (len(self.args) == 2 and self.args[0] in options and
                self.args[1] == (command[0])):
            conf.view()
        elif (len(self.args) == 2 and self.args[0] in options and
                self.args[1] == (command[2])):
            conf.reset()
        else:
            usage("")
927778
def __printCommandSyntax(self, command):
        
        commandHelp = self.completion[command]
        if commandHelp != None and len(commandHelp) > 2:
            commandValues = commandHelp[2]
            #commandDefault = commandHelp[3]
            displayHelp = [self._color(self.COLOR_WHITE, command)]
            if commandValues != None:
                valuesIsEnum = len(commandHelp) >= 6
                if '+' in command or command.upper() in ['ATS0']:
                    displayHelp.append(self._color(self.COLOR_WHITE, '='))
                displayHelp.append(('|' if valuesIsEnum else ',').join([value[0] for value in commandValues]))
            sys.stdout.write('\r Syntax: {0}\n'.format(self._color(self.COLOR_WHITE, ''.join(displayHelp))))
            sys.stdout.flush()
            self._refreshInputPrompt(len(self.inputBuffer))