Set the max frequency for the variant

            If max_freq use this, otherwise go through all frequencies and
            set the highest as self['max_freq']

            Args:
                max_freq (float): The max frequency
176555
def set_max_freq(self, max_freq=None):
        
        if max_freq:
            self['max_freq'] = max_freq
        else:
            for frequency in self['frequencies']:
                if self['max_freq']:
                    if frequency['value'] > self['max_freq']:
                        self['max_freq'] = frequency['value']
                else:
                    self['max_freq'] = frequency['value']
        return
855396
public void setMax(int max)
    {
        this.max = max;
        if (this.max < Alterable.MIN)
        {
            this.max = Alterable.MIN;
        }
        set(cur);
    }
1040918
def _add_gmaf(self, variant_obj, info_dict):
        
        ##TODO search for max freq in info dict
        for transcript in variant_obj.transcripts:
            gmaf_raw = transcript.GMAF
            if gmaf_raw:
                gmaf = float(gmaf_raw.split(':')[-1])
                variant_obj.add_frequency('GMAF', gmaf)
                
                if not variant_obj.thousand_g:
                    variant_obj.thousand_g = gmaf
77747
public void setThreadMax(int max)
  {
    if (max == _threadMax) {
      // avoid update() overhead if unchanged
      return;
    }
    
    if (max <= 0) {
      max = DEFAULT_THREAD_MAX;
    }
    
    if (max < _idleMin)
      throw new ConfigException(L.l("IdleMin ({0}) must be less than ThreadMax ({1})", _idleMin, max));
    
    if (max < 1)
      throw new ConfigException(L.l("ThreadMax ({0}) must be greater than zero", 
                                    max));

    _threadMax = max;

    update();
  }
1105930
public function setChangefreq($changefreq = null)
    {
        $frequencies = [
            self::CHANGEFREQ_ALWAYS,
            self::CHANGEFREQ_HOURLY,
            self::CHANGEFREQ_DAILY,
            self::CHANGEFREQ_WEEKLY,
            self::CHANGEFREQ_MONTHLY,
            self::CHANGEFREQ_YEARLY,
            self::CHANGEFREQ_NEVER,
            null,
        ];
        if (!in_array($changefreq, $frequencies)) {
            throw new \RuntimeException(
                sprintf(
                    'The value "%s" is not supported by the option changefreq. See http://www.sitemaps.org/protocol.html#xmlTagDefinitions',
                    $changefreq
                )
            );
        }

        $this->changefreq = $changefreq;

        return $this;
    }
261673
def set_freqsweep_ext(self, amplitude, sweep_low_end, sweep_high_end, offset=0.0, output_state=True):
        """"""

        sweep_deviation = round(abs(sweep_low_end - sweep_high_end)/2.0,6)
        freq = sweep_low_end + sweep_deviation
        commands = ['TYPE 3', #set to sweep
                    'SFNC 5',  #external modulation
                    'FREQ {0}'.format(freq),
                    'SDEV {0}'.format(sweep_deviation),
                    'MODL 1'   #enable modulation
                    ]
        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)
566757
def max_duration(self,value):
		
		if not value is None:
			if not type(value) in [float, int]:
				raise TypeError("max_duration needs to be specified as a number")
			if value<1.0:
				raise ValueError("max_duration needs to be greater than 1.0")
			value = float(value)
		self.__max_duration = value
835042
def highpass(self, frequency, q=0.707):
        
        self.command.append('highpass')
        self.command.append(frequency)
        self.command.append(str(q) + 'q')
        return self
758621
public void setMaximumInstances(int maximumInstances) {
        int newValue = maximumInstances < 0 ? 0 : maximumInstances;

        if (this.maximumInstances != newValue) {
            this.maximumInstances = newValue;

            getConfig().setProperty(PARAM_MAXIMUM_INSTANCES, this.maximumInstances);
        }
    }
233157
def asfreq(self, freq):
        
        frame = self.frame
        if freq == 'B':
            resampled = frame.groupby(frame.index.date).apply(lambda f: f.sum())
            resampled.index = pd.DatetimeIndex([i for i in resampled.index])
            return ProfitAndLossDetails(resampled)
        else:
            resampled = frame.resample(freq, how='sum')
            return ProfitAndLossDetails(resampled)
672897
def _freq_parser(self, freq):
        
        freq = freq.lower().strip()
        try:
            if "day" in freq:
                freq = freq.replace("day", "")
                return timedelta(days=int(freq))
            elif "hour" in freq:
                freq = freq.replace("hour", "")
                return timedelta(hours=int(freq))
            elif "min" in freq:
                freq = freq.replace("min", "")
                return timedelta(minutes=int(freq))
            elif "sec" in freq:
                freq = freq.replace("sec", "")
                return timedelta(seconds=int(freq))
            else:
                raise Exception("%s is invalid format. use day, hour, min, sec." % freq)
        except:
            raise Exception("%s is invalid format. use day, hour, min, sec." % freq)
665174
@GuardedBy("evictionLock")
  void setMaximumSize(long maximum) {
    requireArgument(maximum >= 0);
    if (maximum == maximum()) {
      return;
    }

    long max = Math.min(maximum, MAXIMUM_CAPACITY);
    long window = max - (long) (PERCENT_MAIN * max);
    long mainProtected = (long) (PERCENT_MAIN_PROTECTED * (max - window));

    setMaximum(max);
    setWindowMaximum(window);
    setMainProtectedMaximum(mainProtected);

    setHitsInSample(0);
    setMissesInSample(0);
    setStepSize(-HILL_CLIMBER_STEP_PERCENT * max);

    if ((frequencySketch() != null) && !isWeighted() && (weightedSize() >= (max >>> 1))) {
      // Lazily initialize when close to the maximum size
      frequencySketch().ensureCapacity(max);
    }
  }
585237
def setSamplefrequency(self, edfsignal, samplefrequency):
        
        if edfsignal < 0 or edfsignal > self.n_channels:
            raise ChannelDoesNotExist(edfsignal)
        self.channels[edfsignal]['sample_rate'] = samplefrequency
        self.update_header()
1097044
def _keep(
    word_freq: int,
    min_freq: int,
    min_len: int,
    max_len: int,
    dict_filter: Callable[[str], bool],
):
    
    if not word_freq or word_freq[1] < min_freq:
        return False

    word = word_freq[0]
    if not word or len(word) < min_len or len(word) > max_len or word[0] == ".":
        return False

    return dict_filter(word)
1229535
public int getMaximalFrequency()
    {
        int maxfreq = 0;
        for (Map.Entry<T, Integer> entry : styles.entrySet())
        {
            if (entry.getValue() > maxfreq)
                maxfreq = entry.getValue();
        }
        return maxfreq;
    }
649590
public void setMax (float max) {
		if (min > max) throw new IllegalArgumentException("min can't be > max");

		this.max = max;

		if (current > max) {
			current = max;
			spinner.notifyValueChanged(spinner.isProgrammaticChangeEvents());
		}
	}
1088391
def generate_with_delta_f_and_max_freq(self, t_num, max_freq, delta_f,
                                           low_frequency_cutoff=None,
                                           cached_mem=None):
        """"""
        approximant = self.approximant(t_num)
        # Don't want to use INTERP waveforms in here
        if approximant.endswith('_INTERP'):
            approximant = approximant.replace('_INTERP', '')
        # Using SPAtmplt here is bad as the stored cbrt and logv get
        # recalculated as we change delta_f values. Fall back to TaylorF2
        # in lalsimulation.
        if approximant == 'SPAtmplt':
            approximant = 'TaylorF2'
        if cached_mem is None:
            wav_len = int(max_freq / delta_f) + 1
            cached_mem = zeros(wav_len, dtype=np.complex64)
        if self.has_compressed_waveforms and self.enable_compressed_waveforms:
            htilde = self.get_decompressed_waveform(cached_mem, t_num,
                                                    f_lower=low_frequency_cutoff,
                                                    approximant=approximant,
                                                    df=delta_f)
        else :
            htilde = pycbc.waveform.get_waveform_filter(
                cached_mem, self.table[t_num], approximant=approximant,
                f_lower=low_frequency_cutoff, f_final=max_freq, delta_f=delta_f,
                distance=1./DYN_RANGE_FAC, delta_t=1./(2.*max_freq))
        return htilde