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
import _ from 'lodash' | |
// Transforms a function into a deep function | |
_.mixin({ | |
deeply: function (map) { | |
var deeplyArray = function (obj, fn) { | |
return obj.map(function(x) { | |
return _.isPlainObject(x) ? _.deeply(map)(x, fn) : x; | |
}) | |
} |
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
import tensorflow as tf | |
import numpy as np | |
def cartesian_graph(a): | |
""" | |
Given at least 2 elements in a, generates the Cartesian product of all | |
elements in the list. | |
""" | |
tile_a = tf.expand_dims(tf.tile(tf.expand_dims(a[0], 1), [1, tf.shape(a[1])[0]]), 2) | |
tile_b = tf.expand_dims(tf.tile(tf.expand_dims(a[1], 0), [tf.shape(a[0])[0], 1]), 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
hi |
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
[vagrant@bazinga ly_test]$ lyp use 2.19.18 | |
Using Lilypond version 2.19.18 | |
[vagrant@bazinga ly_test]$ lyp compile test.ly | |
Lyp 1.3.5 | |
GNU LilyPond 2.19.18 | |
Processing `/tmp/lyp/wrappers/test.ly' | |
Parsing... | |
Interpreting music... | |
Preprocessing graphical objects... | |
Finding the ideal number of pages... |
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
use std::sync::Arc; | |
use std::cell::RefCell; | |
use bounded_spsc_queue::{Producer, Consumer, make}; | |
use sample::Signal; | |
const SPLIT_BUFFER_SIZE: usize = 512; | |
#[allow(dead_code)] |
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
#![feature(test, integer_atomics)] | |
// On my computer. | |
// | |
// test bench_increment_arc_data ... bench: 28,315,200 ns/iter (+/- 3,614,573) | |
// test bench_increment_cell_data ... bench: 3,905,437 ns/iter (+/- 826,350) | |
// test bench_increment_raw_data ... bench: 3,895,535 ns/iter (+/- 1,103,250) | |
// test bench_increment_rc_data ... bench: 3,771,218 ns/iter (+/- 682,398) | |
// test bench_spawn_thread_and_increment ... bench: 34,876,612 ns/iter (+/- 4,553,297) | |
// test bench_spawn_thread_and_increment_f64 ... bench: 55,028,376 ns/iter (+/- 6,402,499) |
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
Output from rust-lldb - panic on LU Factorization | |
frame #4: 0x0000000100060cb1 partition`rulinalg::matrix::{{impl}}::det<f64>(self=&0x101bce000) + 2417 at mod.rs:506 | |
503 (self[[0, 1]] * self[[1, 0]] * self[[2, 2]]) - | |
504 (self[[0, 2]] * self[[1, 1]] * self[[2, 0]]) | |
505 } else { | |
-> 506 let (l, u, p) = self.lup_decomp().expect("Could not compute LUP decomposition."); | |
507 | |
508 let mut d = T::one(); | |
509 |
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
extern crate soundsym; | |
extern crate vox_box; | |
extern crate portaudio; | |
extern crate hound; | |
extern crate crossbeam; | |
extern crate bounded_spsc_queue; | |
use soundsym::*; | |
use portaudio::*; |
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
* thread #1: tid = 0x72791c, 0x000000010d1abe30 rbx`rubinius::GlobalCache::resolve_i(rubinius::State*, rubinius::Symbol*, rubinius::Dispatch&, rubinius::LookupData&) + 240, name = 'ruby.main', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x52) | |
* frame #0: 0x000000010d1abe30 rbx`rubinius::GlobalCache::resolve_i(rubinius::State*, rubinius::Symbol*, rubinius::Dispatch&, rubinius::LookupData&) + 240 | |
frame #1: 0x000000010d199d22 rbx`rubinius::Dispatch::send(rubinius::State*, rubinius::LookupData&, rubinius::Arguments&, rubinius::MethodMissingReason) + 50 | |
frame #2: 0x000000010d2aee8b rbx`rubinius::Object::send(rubinius::State*, rubinius::Symbol*, rubinius::Array*, rubinius::Object*, bool) + 219 | |
frame #3: 0x000000010d2ee85c rbx`rubinius::memory::ManagedFinalizer::finalize(rubinius::State*) + 124 | |
frame #4: 0x000000010d2ef276 rbx`rubinius::memory::FinalizerThread::finish(rubinius::State*) + 198 | |
frame #5: 0x000000010d19d6ff rbx`rubinius::Environment::halt(rubinius |
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
// TODO: macro-ify this | |
fn parse_input() -> Result<Input, io::Error> { | |
let q = regex!(r"^[qQ]\s+$"); | |
let o = regex!(r"^[oO]\s+$"); | |
let p = regex!(r"^[pP]\s+$"); | |
let d = regex!(r"^[dD]\s+$"); | |
let clear = regex!(r"^clear\s+$"); | |
let cluster = regex!(r"^cluster (\d+)\s+$"); | |
let partition = regex!(r"^partition (\d+), (\d+)"); | |
let split = regex!(r"^split (\d+), (\d+)"); |
NewerOlder