Skip to content

Instantly share code, notes, and snippets.

@Sciss
Sciss / audio_lstm_samplernn_keras.ipynb
Created May 13, 2017 06:24 — forked from naotokui/audio_lstm_samplernn_keras.ipynb
Audio generation with LSTM. inspired by SampleRNN architecture (work in progress)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Sciss
Sciss / Monte Carlo simulation of the 2D Potts model - Part 2.ipynb
Created August 14, 2017 19:05 — forked from genkuroki/Monte Carlo simulation of the 2D Potts model - Part 2.ipynb
Julia/Ising/Monte Carlo simulation of the 2D Potts model - Part 2.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Sciss
Sciss / Macros.scala
Created August 31, 2017 14:47 — forked from pedrofurla/Macros.scala
Example of how to get source locations using scala macros
package slickdemo
import scala.reflect.macros.Context
import scala.language.experimental.macros
object Macros {
// scala.reflect.runtime.currentMirror
// universe.reify
@Sciss
Sciss / sipiradio.py
Created September 10, 2017 17:08 — forked from JonathanThorpe/sipiradio.py
Si473x i2c/i2s radio for Rasperrby Pi
#!/usr/bin/python3
import quick2wire.i2c as i2c
import time
import RPi.GPIO as GPIO
import alsaaudio
import threading
import logging
import sys
#Work in progress library for Si473x for Raspberry Pi by Jonathan Thorpe <[email protected]>
@Sciss
Sciss / build.sbt
Created September 1, 2019 12:44 — forked from markehammons/build.sbt
Packaging your application with a minimized runtime courtesy of jlink
import java.io.{ByteArrayOutputStream, PrintWriter}
import java.util.spi.ToolProvider
enablePlugins(JavaAppPackaging)
//this allows us to run tools like jdeps and jlink from within the JVM
def runTool(name: String, arguments: Seq[String]): Either[String,String] = {
val maybeTool: Option[ToolProvider] = {
val _tool = ToolProvider.findFirst(name)
if(_tool.isPresent) {
@Sciss
Sciss / library,js
Created December 27, 2020 19:28 — forked from aknuds1/library,js
Emscripten - how to pass an array of floating point numbers from JavaScript to a C callback, to let the latter fill it with data.
// "use strict";
var LibraryTst = {
initialize: function (callback) {
callback = Runtime.getFuncWrapper(callback, 'vi')
var numBytes = 2 * Float32Array.BYTES_PER_ELEMENT
var ptr = Module._malloc(numBytes)
try {
callback(ptr)