Sense for a Type F Target is supported for 212 and 424 kbps.
509966
def sense_ttf(self, target):
        
        log.debug("polling for NFC-F technology")

        if target.brty not in ("212F", "424F"):
            message = "unsupported bitrate {0}".format(target.brty)
            raise nfc.clf.UnsupportedTargetError(message)

        self.chipset.in_set_rf(target.brty)
        self.chipset.in_set_protocol(self.chipset.in_set_protocol_defaults)
        self.chipset.in_set_protocol(initial_guard_time=24)

        sensf_req = (target.sensf_req if target.sensf_req else
                     bytearray.fromhex("00FFFF0100"))

        log.debug("send SENSF_REQ " + hexlify(sensf_req))
        try:
            frame = chr(len(sensf_req)+1) + sensf_req
            frame = self.chipset.in_comm_rf(frame, 10)
        except CommunicationError as error:
            if error != "RECEIVE_TIMEOUT_ERROR":
                log.debug(error)
            return None

        if len(frame) >= 18 and frame[0] == len(frame) and frame[1] == 1:
            log.debug("rcvd SENSF_RES " + hexlify(frame[1:]))
            return nfc.clf.RemoteTarget(target.brty, sensf_res=frame[1:])
996490
def lmx_h4k_f16k():
  """"""
  hparams = lmx_base()
  hparams.hidden_size = 4096
  hparams.filter_size = 16384
  hparams.batch_size = 1024
  hparams.weight_dtype = "bfloat16"
  return hparams
648951
def hkm_fc(fdata, Nmax, m, s):
    

    f = fdata[:, m]
    L1 = f.size
    MM = int(L1 / 2)
    Q = s.size

    ff = np.zeros(Q, dtype=np.complex128)
    for n in xrange(MM, L1):
        ff[n] = f[n - MM]

    for n in xrange(0, MM):
        ff[n] = f[n + MM]

    # For larger problems, this speeds things up pretty good.
    F = np.fft.fft(ff)
    S = np.fft.fft(s)
    out = 4 * np.pi * np.fft.ifft(F * S)

    return out[0:Nmax + 1]
396801
def to_f
      p = FFI::MemoryPointer.new(:double)
      if CF.CFNumberGetValue(self, :kCFNumberDoubleType, p) != 0
        p.read_double
      else
        raise "CF.CFNumberGetValue failed to convert #{self.inspect} to kCFNumberDoubleType"
      end
    end
1136572
function FourierTransform(bufferSize, sampleRate) {
  this.bufferSize = bufferSize;
  this.sampleRate = sampleRate;
  this.bandwidth  = 2 / bufferSize * sampleRate / 2;

  this.spectrum   = new Float32Array(bufferSize/2);
  this.real       = new Float32Array(bufferSize);
  this.imag       = new Float32Array(bufferSize);

  this.peakBand   = 0;
  this.peak       = 0;

  /**
   * Calculates the *middle* frequency of an FFT band.
   *
   * @param {Number} index The index of the FFT band.
   *
   * @returns The middle frequency in Hz.
   */
  this.getBandFrequency = function(index) {
    return this.bandwidth * index + this.bandwidth / 2;
  };

  this.calculateSpectrum = function() {
    var spectrum  = this.spectrum,
        real      = this.real,
        imag      = this.imag,
        bSi       = 2 / this.bufferSize,
        sqrt      = Math.sqrt,
        rval, 
        ival,
        mag;

    for (var i = 0, N = bufferSize/2; i < N; i++) {
      rval = real[i];
      ival = imag[i];
      mag = bSi * sqrt(rval * rval + ival * ival);

      if (mag > this.peak) {
        this.peakBand = i;
        this.peak = mag;
      }

      spectrum[i] = mag;
    }
  };
}
957513
def sense_ttb(self, target):
        """"""
        info = "{device} does not support sense for Type B Target"
        raise nfc.clf.UnsupportedTargetError(info.format(device=self))
934293
def set_buf_size(fd):
    """"""
    if OS_PIPE_SZ and hasattr(fcntl, 'F_SETPIPE_SZ'):
        fcntl.fcntl(fd, fcntl.F_SETPIPE_SZ, OS_PIPE_SZ)
554410
public final void fsub(X87Register dst, X87Register src)
  {
    assert(dst.index() == 0 || src.index() == 0);
    emitX86(INST_FSUB, dst, src);
  }
753836
def MTF(self, px_per_mm):
        '''
        
        '''
        res = 100 #numeric resolution
        r = 4 #range +-r*std
        
        #size of 1 px:
        px_size = 1 / px_per_mm
        
        #standard deviation of the point-spread-function (PSF) as normal distributed:
        std = self.std*px_size #transform standard deviation from [px] to [mm]

        x = np.linspace(-r*std,r*std, res)
        #line spread function:
        lsf = self.gaussian1d(x, 1, 0, std)
        #MTF defined as Fourier transform of the line spread function:
            #abs() because result is complex
        y = abs(np.fft.fft(lsf)) 
            #normalize fft so that max = 1
        y /= np.max(y)
            #step length between xn and xn+1
        dstep = r*std/res
            # Fourier frequencies - here: line pairs(cycles) per mm
        freq = np.fft.fftfreq(lsf.size, dstep)
        #limit mtf between [0-px_per_mm]:
        i = np.argmax(freq>px_per_mm)
        self.mtf_x = freq[:i]
        self.mtf_y = y[:i]
        return self.mtf_x, self.mtf_y
837670
void rfftb(final float a[], final int offa) {
		if (n == 1)
			return;
		int l1, l2, na, nf, ip, iw, ido, idl1;

		final int twon = 2 * n;
		nf = (int) wtable_r[1 + twon];
		na = 0;
		l1 = 1;
		iw = n;
		for (int k1 = 1; k1 <= nf; k1++) {
			ip = (int) wtable_r[k1 + 1 + twon];
			l2 = ip * l1;
			ido = n / l2;
			idl1 = ido * l1;
			switch (ip) {
				case 2:
					if (na == 0) {
						radb2(ido, l1, a, offa, ch, 0, iw);
					} else {
						radb2(ido, l1, ch, 0, a, offa, iw);
					}
					na = 1 - na;
					break;
				case 3:
					if (na == 0) {
						radb3(ido, l1, a, offa, ch, 0, iw);
					} else {
						radb3(ido, l1, ch, 0, a, offa, iw);
					}
					na = 1 - na;
					break;
				case 4:
					if (na == 0) {
						radb4(ido, l1, a, offa, ch, 0, iw);
					} else {
						radb4(ido, l1, ch, 0, a, offa, iw);
					}
					na = 1 - na;
					break;
				case 5:
					if (na == 0) {
						radb5(ido, l1, a, offa, ch, 0, iw);
					} else {
						radb5(ido, l1, ch, 0, a, offa, iw);
					}
					na = 1 - na;
					break;
				default:
					if (na == 0) {
						radbg(ido, ip, l1, idl1, a, offa, ch, 0, iw);
					} else {
						radbg(ido, ip, l1, idl1, ch, 0, a, offa, iw);
					}
					if (ido == 1)
						na = 1 - na;
					break;
			}
			l1 = l2;
			iw += (ip - 1) * ido;
		}
		if (na == 0)
			return;
		System.arraycopy(ch, 0, a, offa, n);
	}
247872
function cam02de(coefs) {
  return function(o) {
    if (!(o instanceof Jab)) o = jabConvert(o);

    var k_l = coefs.k_l,
        diffJ = Math.abs(this.J - o.J),
        diffA = Math.abs(this.a - o.a),
        diffB = Math.abs(this.b - o.b);

    var de = Math.sqrt( (diffJ/k_l)*(diffJ/k_l) + diffA*diffA + diffB*diffB );

    return de;
  };
}
630998
public float ms_per_frame() // E.B
	{
		if (h_vbr == true)
		{			
			double tpf = h_vbr_time_per_frame[layer()] / frequency();
			if ((h_version == MPEG2_LSF) || (h_version == MPEG25_LSF)) tpf /= 2;
			return ((float) (tpf * 1000));
		}
		else
		{
			float ms_per_frame_array[][] = {{8.707483f,  8.0f, 12.0f},
											{26.12245f, 24.0f, 36.0f},
											{26.12245f, 24.0f, 36.0f}};
			return(ms_per_frame_array[h_layer-1][h_sample_frequency]);
		}
	}
349006
function GraphicalEq(sampleRate) {
  this.FS = sampleRate;
  this.minFreq = 40.0;
  this.maxFreq = 16000.0;

  this.bandsPerOctave = 1.0;

  this.filters = [];
  this.freqzs = [];

  this.calculateFreqzs = true;

  this.recalculateFilters = function() {
    var bandCount = Math.round(Math.log(this.maxFreq/this.minFreq) * this.bandsPerOctave/ Math.LN2);

    this.filters = [];
    for (var i=0; i<bandCount; i++) {
      var freq = this.minFreq*(Math.pow(2, i/this.bandsPerOctave));
      var newFilter = new Biquad(DSP.PEAKING_EQ, this.FS);
      newFilter.setDbGain(0);
      newFilter.setBW(1/this.bandsPerOctave);
      newFilter.setF0(freq);
      this.filters[i] = newFilter;
      this.recalculateFreqz(i);
    }
  };

  this.setMinimumFrequency = function(freq) {
    this.minFreq = freq;
    this.recalculateFilters();
  };

  this.setMaximumFrequency = function(freq) {
    this.maxFreq = freq;
    this.recalculateFilters();
  };

  this.setBandsPerOctave = function(bands) {
    this.bandsPerOctave = bands;
    this.recalculateFilters();
  };

  this.setBandGain = function(bandIndex, gain) {
    if (bandIndex < 0 || bandIndex > (this.filters.length-1)) {
      throw "The band index of the graphical equalizer is out of bounds.";
    }

    if (!gain) {
      throw "A gain must be passed.";
    }
   
    this.filters[bandIndex].setDbGain(gain);
    this.recalculateFreqz(bandIndex);
  };
 
  this.recalculateFreqz = function(bandIndex) {
    if (!this.calculateFreqzs) {
      return;
    }

    if (bandIndex < 0 || bandIndex > (this.filters.length-1)) {
      throw "The band index of the graphical equalizer is out of bounds. " + bandIndex + " is out of [" + 0 + ", " + this.filters.length-1 + "]";
    }
       
    if (!this.w) {
      this.w = Float32Array(400);
      for (var i=0; i<this.w.length; i++) {
         this.w[i] = Math.PI/this.w.length * i;
      }
    }
   
    var b = [this.filters[bandIndex].b0, this.filters[bandIndex].b1, this.filters[bandIndex].b2];
    var a = [this.filters[bandIndex].a0, this.filters[bandIndex].a1, this.filters[bandIndex].a2];

    this.freqzs[bandIndex] = DSP.mag2db(DSP.freqz(b, a, this.w));
  };

  this.process = function(buffer) {
    var output = buffer;

    for (var i = 0; i < this.filters.length; i++) {
      output = this.filters[i].process(output);
    }

    return output;
  };

  this.processStereo = function(buffer) {
    var output = buffer;

    for (var i = 0; i < this.filters.length; i++) {
      output = this.filters[i].processStereo(output);
    }

    return output;
  };
}
1161913
function _fnBlur()
	{
		_fnRemoveFocus( _nOldFocus );
		_iOldX = null;
		_iOldY = null;
		_nOldFocus = null;
		_fnReleaseKeys();
	}
1092226
def lmx_moe_h1k_f4k_x32():
  """"""
  hparams = lmx_h1k_f4k()
  hparams.ffn_layer = "local_moe_tpu"
  hparams.moe_num_experts = 32
  hparams.weight_dtype = "bfloat16"
  hparams.batch_size = 8192
  return hparams
961026
def lfprob (dfnum, dfden, F):
    
    p = betai(0.5*dfden, 0.5*dfnum, dfden/float(dfden+dfnum*F))
    return p
442417
@Nonnull
  public TypeaheadRemote setRateLimitFn (@Nonnull final ETypeaheadRemoteRateLimitFunction eRateLimitFn)
  {
    m_eRateLimitFn = ValueEnforcer.notNull (eRateLimitFn, "RateLimitFunction");
    return this;
  }