Skip to content

Instantly share code, notes, and snippets.

View kmader's full-sized avatar

Kevin Mader kmader

  • Zurich, Switzerland
View GitHub Profile
@kmader
kmader / test.scala
Created July 9, 2016 12:53
Nashhorn JS in Notebooks / Scala
classpath.add("de.christophkraemer" % "rhino-script-engine" % "1.1.0") // since it's not in the classpath with notebooks per default
// A simple test to make sure JavaScript is working properly
val factory = new javax.script.ScriptEngineManager()
val engine = factory.getEngineByName("JavaScript")
println(s"Engine Name $engine")
engine.eval("print('Hello, World\\n')")
@kmader
kmader / README.md
Last active March 15, 2021 13:25 — forked from bellbind/loader.html
[threejs][html5]STL File Viewer with HTML5 File API
Hallo ich bin’s
Ha mi gfragt ob di mi nach all dene jahre hesch welle treffe
Zu über alles rede
Sie saget sie teilt alle wünde aber isch bei mir ned vil verheilet
Hallo ghörsch mi, ich bin i kalifornia und träumt vo dem wo mer gha händ
Wo mer jünger gse sind u frei 
Han vergässe wie es sich ääfühlt bevor dr welt vo dr füss ghait
Es git so viel unterschied zwischet eus und ein millione meile
@kmader
kmader / remove_files.sh
Created March 9, 2016 07:16
Clean invisible garbage from Dropbox
find . -type f -name "*._*" # list the files
find . -type f -name "*._*" -exec rm {} \; # delete them
@kmader
kmader / Overview.md
Last active February 18, 2016 16:42
SLIC REST API

The first face for IQAE using shiny and image maps to create an interactive segmentation which can be used to specify the parameters and criteria for analyzing large datasets.

List images

http://86.119.33.242:5000/slic_generator/list_images

Output

@kmader
kmader / Scala-REPL-Bug.ipynb
Last active January 15, 2016 22:53
A bug in the Scala REPL in jupyter-scala from https://github.com/alexarchambault/jupyter-scala
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmader
kmader / knime-plotting-snippet.R
Last active November 4, 2015 13:25
KNIME Shape Node Histogram Processing
library(ggplot2)
library(reshape2)
library(plyr)
library(dplyr)
cd.df<- knime.in %>%
select(Label,starts_with("CentroidDistance")) %>%
melt(id.vars="Label") %>%
ddply(.(Label),
function(in.df) mutate(in.df,
@kmader
kmader / Example-Images.md
Last active October 26, 2015 14:04
3D Printing Instructions to make an STL file for 3D printers
@kmader
kmader / README.md
Last active October 22, 2015 20:35
Dropbox API for Scala

Overview

Basically a translation of the official Java API (https://www.dropbox.com/developers-v1/core/start/java) a bit scala-fied.

SimpleCreds

You must adapt this file to contain the api and access tokens from your credentials before starting (make generateNewToken equal to true)

SimpleTests

Instead of having a demo program this runs as a very basic scalatest. This means you can run it from the sbt console by just typing &gt;test

@kmader
kmader / BreezeTests.scala
Last active October 12, 2015 16:31
Breeze Dot Product Tests
package fourquant
import breeze.linalg._
import org.scalatest.{FunSuite, Matchers}
import scala.util.Random
/**
* Created by mader on 10/12/15.
*/