Skip to content

Instantly share code, notes, and snippets.

@Sciss
Sciss / min-char-rnn.py
Created June 4, 2016 09:47 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
val N = 1
val b = Buffer.alloc(s, numFrames = 32768, numChannels = N)
b.write(path = (userHome/"Music"/"work"/"_killme3.aif").path, sampleFormat = io.SampleFormat.Int24,
numFrames = 0, leaveOpen = true)
val x = play {
val in = PhysicalIn.ar(0, numChannels = N)
DiskOut.ar(b.id, in)
()
}
// import de.sciss.file._
import edu.emory.mathcs.jtransforms.fft.DoubleFFT_2D
import javax.imageio.ImageIO
import java.awt.image.BufferedImage
val dir = userHome/"Documents"/"projects"/"Anemone"/"ConvTest"
val p1 = dir/"Rattle_shot150131sz.png"
val p2 = dir/"Wolkenpumpe141214_135413sz.png"
@Sciss
Sciss / FXMorphing.java
Created February 27, 2016 01:24 — forked from gontard/FXMorphing.java
JFX 2 : morphing 2D Transition. The FXMorphing class is an application thats demonstrate how to use the Morphing2D Transition.
import javafx.animation.Interpolator;
import javafx.animation.Transition;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.shape.Ellipse;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.Shape;
import javafx.stage.Stage;
import javafx.util.Duration;
/*---
Adapted from: Designing Sound in SuperCollider
Source: https://en.wikibooks.org/wiki/Designing_Sound_in_SuperCollider
*/
/*---
24. Pedestrians
*/

Highlight bugs

This file contains all the remaining highlight errors of IntelliJ in my code-base, for future reference and so that I don't report the same thing twice. Scala plug-in version last checked is: 2.0.3.

The code base for encountering these bugs is SoundProcesses. Line of wrong highlight is marked // !

Private setter wrongly marked as 'is never used'

class Foo {
def vmVersion(): String = {
val name = sys.props.getOrElse("java.vm.name" , "???")
val version = sys.props.getOrElse("java.vm.version", "???")
val info = sys.props.getOrElse("java.vm.info" , "???")
s"$name (build $version, $info)"
}
def jreVersion(): String = {
val name = sys.props.getOrElse("java.runtime.name" , "???")
val version = sys.props.getOrElse("java.runtime.version", "???")