This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require "matrix" | |
# training data | |
v1 = [Vector[1, 3, 0], 1] | |
v2 = [Vector[1, 4, 3], 1] | |
v3 = [Vector[1, 6, 4], 1] | |
v4 = [Vector[1, 1, 2], 2] | |
v5 = [Vector[1, 3, 5], 2] | |
v6 = [Vector[1, 4, 6], 2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const str = "some awesome sentence"; | |
const formatted_str = _.map( | |
_.replace(str, /(\r\n){3,}|\r{3,}|\n{3,}/g, '\n\n').trim().split('\n'), | |
(line, i) => <span>{line}<br /></span> | |
); |
NewerOlder