cuts lo=val hi=val ch=chname

        If neither `lo` nor `hi` is provided, returns the current cut levels.
        Otherwise sets the corresponding cut level for the given channel.
        If `ch` is omitted, assumes the current channel.
7498
def cmd_cuts(self, lo=None, hi=None, ch=None):
        
        viewer = self.get_viewer(ch)
        if viewer is None:
            self.log("No current viewer/channel.")
            return

        loval, hival = viewer.get_cut_levels()

        if (lo is None) and (hi is None):
            self.log("lo=%f hi=%f" % (loval, hival))

        else:
            if lo is not None:
                loval = lo
            if hi is not None:
                hival = hi
            viewer.cut_levels(loval, hival)

            self.log("lo=%f hi=%f" % (loval, hival))
1021800
def slice(self, start=None, stop=None, step=None):
        
        check_type(start, int)
        check_type(stop, int)
        check_type(step, int)

        if step is not None and step < 0:
            raise ValueError('Only positive steps are currently supported')

        return _series_str_result(self, weld_str_slice, start=start, stop=stop, step=step)
650612
def set(self, key, value):
        
        if not self.subsystem.is_cut:
            super().set(key, value)
184009
private boolean backrefMatchAtNestedLevel(boolean ignoreCase, int caseFoldFlag,
                                              int nest, int memNum, int memp) {
        int pend = -1;
        int level = 0;
        int k = stk - 1;

        while (k >= 0) {
            StackEntry e = stack[k];

            if (e.type == CALL_FRAME) {
                level--;
            } else if (e.type == RETURN) {
                level++;
            } else if (level == nest) {
                if (e.type == MEM_START) {
                    if (memIsInMemp(e.getMemNum(), memNum, memp)) {
                        int pstart = e.getMemPStr();
                        if (pend != -1) {
                            if (pend - pstart > end - s) return false; /* or goto next_mem; */
                            int p = pstart;

                            value = s;
                            if (ignoreCase) {
                                if (!stringCmpIC(caseFoldFlag, pstart, this, pend - pstart, end)) {
                                    return false; /* or goto next_mem; */
                                }
                            } else {
                                while (p < pend) {
                                    if (bytes[p++] != bytes[value++]) return false; /* or goto next_mem; */
                                }
                            }
                            s = value;

                            return true;
                        }
                    }
                } else if (e.type == MEM_END) {
                    if (memIsInMemp(e.getMemNum(), memNum, memp)) {
                        pend = e.getMemPStr();
                    }
                }
            }
            k--;
        }
        return false;
    }
878209
def cmd_ac(self, ch=None):
        
        viewer = self.get_viewer(ch)
        if viewer is None:
            self.log("No current viewer/channel.")
            return

        viewer.auto_levels()
        self.cmd_cuts(ch=ch)
114159
def get_true_slice(dims, data_len):
    '''
    
    '''
    rangeLen = non_str_len_no_throw(dims)

    # Get the range qualifier for length
    if isinstance(dims, slice):
        start = get_restricted_index(int(dims.start), data_len) if dims.start != None else dims.start
        stop = get_restricted_index(int(dims.stop), data_len) if dims.stop != None else dims.stop
        step = get_restricted_index(int(dims.step), data_len) if dims.step != None else dims.step
    elif rangeLen > 3:
        raise AttributeError(str(dims)+' length is > 3')
    elif rangeLen == 3:
        start = get_restricted_index(int(dims[0]), data_len) if dims[0] != None else dims[0]
        stop = get_restricted_index(int(dims[1]), data_len) if dims[1] != None else dims[1]
        step = get_restricted_index(int(dims[2]), data_len) if dims[2] != None else dims[2]
    elif rangeLen == 2:
        start = get_restricted_index(int(dims[0]), data_len) if dims[0] != None else dims[0]
        stop = get_restricted_index(int(dims[1]), data_len) if dims[1] != None else dims[1]
        step = None
    elif rangeLen == 1:
        start = get_restricted_index(int(dims[0]), data_len) if dims[0] != None else dims[0]
        stop = get_restricted_index(int(dims[0]), data_len)+1 if dims[0] != None else dims[0]
        step = None
    elif dims != None:
        start = get_restricted_index(int(dims), data_len) if dims != None else dims
        stop = get_restricted_index(int(dims), data_len)+1 if dims != None else dims
        step = None
    else:
        start = None
        stop = None
        step = None

    return slice(start, stop, step)
1334302
def set_reference_channel(self, chname):
        
        # change the GUI control to match
        idx = self.chnames.index(str(chname))
        self.w.ref_channel.set_index(idx)
        return self._set_reference_channel(chname)
622897
def get_over_current(self, channel):
        '''
        '''
        try:
            bit = self._ch_map[channel]['GPIOOC']['bit']
        except KeyError:
            raise ValueError('get_over_current() not supported for channel %s' % channel)
        return not self._get_power_gpio_value(bit)
1274220
def _generate_splice(self, slice_ind):
        '''
        
        '''
        step_size = slice_ind.step if slice_ind.step else 1
        # Check for each of the four possible scenarios
        if slice_ind.start != None:
            if slice_ind.stop != None:
                newListLen = ((get_non_negative_index(slice_ind.stop, self._length) -
                               get_non_negative_index(slice_ind.start, self._length)) // step_size)
            else:
                newListLen = ((self._length -
                               get_non_negative_index(slice_ind.start, self._length)) // step_size)
        else:
            if slice_ind.stop != None:
                newListLen = ((get_non_negative_index(slice_ind.stop, self._length)) // step_size)
            else:
                newListLen = (self._length // step_size)

        return ZeroList(newListLen)
1123489
function (level, lang) {
    'use strict';
    var self = this;
    if (level > 6 || level < 0) {
      level = 0;
    }
    return {
      value: level,
      name: self.info.level[level].name[lang],
      implication: self.info.level[level].implication[lang],
      statement: self.info.level[level].statement[lang]
    };
  }
1044832
def set_default(self, channels=None):
        '''
        '''
        if not channels:
            channels = self._ch_cal.keys()
        for channel in channels:
            self.set_voltage(channel, self._ch_cal[channel]['default'], unit='V')
1146682
def set_level(self, val):
        """"""
        if val == 0:
            self.off()
        elif val == 255:
            self.on()
        else:
            setlevel = 255
            if val < 1:
                setlevel = val * 255
            elif val <= 0xff:
                setlevel = val
            change = setlevel - self._value
            increment = 255 / self._steps
            steps = round(abs(change) / increment)
            print('Steps: ', steps)
            if change > 0:
                method = self.brighten
                self._value += round(steps * increment)
                self._value = min(255, self._value)
            else:
                method = self.dim
                self._value -= round(steps * increment)
                self._value = max(0, self._value)
            # pylint: disable=unused-variable
            for step in range(0, steps):
                method(True)
            self._update_subscribers(self._value)
239165
function (ch) {
  if (ch.hasInterval('M3')) {
    return ch.hasInterval('m7') ? 'x' : 'M';
  }

  if (ch.hasInterval('m3')) {
    if (ch.hasInterval('dim5')) {
      return ch.hasInterval('m7') ? 'ø' : 'o';
    }

    return 'm';
  }

  if (ch.hasInterval('P4')) {
    return 's';
  }

  return null;
}
1315329
def level(self, lvl=None):
        ''''''
        if not lvl:
            return self._lvl
        self._lvl = self._parse_level(lvl)
        self.stream.setLevel(self._lvl)
        logging.root.setLevel(self._lvl)
1070405
def _onShortcutCutLine(self):
        
        lines = self.lines[self._selectedLinesSlice()]

        self._onShortcutCopyLine()
        self._onShortcutDeleteLine()
1208043
def setLevel(self, level):
		
		if isinstance(level, int):
			self.logger.setLevel(level)
			return

		# level en tant que string
		level = level.lower()
		if level == "debug":
			self.logger.setLevel(logging.DEBUG)

		elif level == "info":
			self.logger.setLevel(logging.INFO)

		elif level == "warning" or level == "warning":
			self.logger.setLevel(logging.WARN)

		elif level == "error":
			self.logger.setLevel(logging.ERROR)

		else:
			# par défaut
			self.logger.setLevel(logging.INFO)
1319499
private double[][] _step(double[][] state, char ch1) {
    double cost;
    _shift(state);
    state[1][0] = state[0][0] + deletionDistance;
    for (int i = 0; i < base.length(); i++) {
      cost = (base.charAt(i) == ch1) ? 0 : replaceDistance;
      state[1][i + 1] = Math.min(state[1][i] + insertionDistance,
          state[0][i] + cost);
      state[1][i + 1] = Math.min(state[1][i + 1],
          state[0][i + 1] + deletionDistance);
    }
    return state;
  }