Skip to content

Instantly share code, notes, and snippets.

size(1200, 800); noFill();
rect(119.198-3, 260.71405-3, 5, 5);
rect(80.8122-3, 149.59726-3, 5, 5);
rect(112.12692-3, 83.93734-3, 5, 5);
rect(416.1829-3, 11.206351-3, 5, 5);
rect(648.51794-3, 5.145436-3, 5, 5);
rect(649.5281-3, 128.38405-3, 5, 5);
rect(656.5991-3, 358.69882-3, 5, 5);
rect(658.61945-3, 409.20645-3, 5, 5);
rect(229.30463-3, 417.2877-3, 5, 5);

To build with examples:

git clone https://github.com/opencv/opencv.git
cd opencv
git checkout -b 3.1.0 3.1.0  # make sure we build that version
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_EXAMPLES=ON ..

make -j4

trait Histo {
def bins: Array[Int]
def name: String
}
def mkChart(histo: Histo): XYChart = {
val data = histo.bins.zipWithIndex.map { case (num, idx) =>
histo.center(idx) -> num
} .toVector
import scalax.chart.api._
// quick hack -- no idea if this is elegant or fast
implicit class NextPrime(n: Int) {
def nextPrime: Int =
Iterator.from(n).filter(_.isPrime).next
def isPrime: Boolean = n > 1 && (2 until n).forall(m => n % m != 0)
}
#!/bin/bash
for a in {0..255..4}
do
./dbuscontrol.sh setalpha $a
sleep 0.02s
done
# cf. https://raw.githubusercontent.com/popcornmix/omxplayer/master/dbuscontrol.sh
/etc/kernel/header_postinst.d/dkms:
Error! Bad return status for module build on kernel: 4.7.0-0.bpo.1-amd64 (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.248/build/make.log for more information.
Error! Bad return status for module build on kernel: 4.7.0-0.bpo.1-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-current/340.96/build/make.log for more information.
Setting up linux-libc-dev:amd64 (3.16.36-1+deb8u2) ...
///////////////////////////////////////////
DKMS make.log for broadcom-sta-6.30.223.248 for kernel 4.7.0-0.bpo.1-amd64 (x86_64)
def Protect(in: GE, lo: Double, hi: Double, dynamic: Boolean): GE = {
val c1 = if (lo.isInfinite) in else in.max(lo)
val c2 = if (hi.isInfinite) c1 else c1.min(hi)
if (dynamic) LeakDC.ar(c2) else c2
}
def NegatumOut(in: GE): Unit = {
val ok = CheckBadValues.ar(in, post = 0) sig_== 0
val gate = Gate.ar(in, ok)
Out.ar(0, LeakDC.ar(gate.clip2(1)) * 0.47)
// version: 3 (18-Sep-16)
(1: GE).poll(0, "listen")
val indicesIn = "buses-in".ir
val numCh = NumChannels(indicesIn)
val in = PhysicalIn.ar(indices = indicesIn)
val fftSize = 1024
val fftBuf = LocalBuf(numFrames = fftSize, numChannels = numCh)
val fft = FFT(buf = fftBuf, in = in, hop = 0.5, winType = 1)
val loudness = Loudness(fft)
(1 :GE).poll(0, "zerophase-rendering")
val in = AudioFileIn("file-in")
val inLen = in.numFrames
// 'analysis'
val fftSize = 131072
val winStep = fftSize / 4
val inW = Sliding (in = in , size = fftSize, step = winStep)
val fft = Real1FullFFT (in = inW, size = fftSize)
val in = AudioFileIn("file-in")
val inLen = in.numFrames
// 'analysis'
val fftSize = 131072
val winStep = fftSize / 4
val inW = Sliding (in = in , size = fftSize, step = winStep)
val fft = Real1FullFFT (in = inW, size = fftSize)
case class CepCoef(crr: Int, cri: Int, clr: Int, cli: Int,