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
0 CGLChoosePixelFormat(attribs = {kCGLPFADoubleBuffer, kCGLPFAClosestPolicy, kCGLPFAColorSize, 32, kCGLPFAAlphaSize, 8, kCGLPFADepthSize, 24, kCGLPFAStencilSize, 8, kCGLPFAOpenGLProfile, kCGLOGLPVersion_GL4_Core, 0}, pix = &0x7ff593d1f1e0, npix = &2) = kCGLNoError | |
1 CGLRetainPixelFormat(pix = 0x7ff593d1f1e0) = 0x7ff593d1f1e0 | |
2 CGLReleasePixelFormat(pix = 0x7ff593d1f1e0) | |
3 CGLCreateContext(pix = 0x7ff593d1f1e0, share = NULL, ctx = &0x7ff596850a00) = kCGLNoError | |
4 CGLRetainContext(ctx = 0x7ff596850a00) = 0x7ff596850a00 | |
5 CGLReleaseContext(ctx = 0x7ff596850a00) | |
6 CGLGetVirtualScreen(ctx = 0x7ff596850a00, screen = &0) = kCGLNoError | |
7 CGLDescribePixelFormat(pix = 0x7ff593d1f1e0, pix_num = 0, attrib = kCGLPFAAccelerated, value = &1) = kCGLNoError | |
8 CGLGetVirtualScreen(ctx = 0x7ff596850a00, screen = &0) = kCGLNoError | |
9 CGLDescribePixelFormat(pix = 0x7ff593d1f1e0, pix_num = 0, attrib = kCGLPFAColorSize, value = &32) = kCGLNoError |
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 piston; | |
extern crate piston_window; | |
extern crate graphics; | |
extern crate gfx_graphics; | |
use piston::input::*; | |
use piston::window::{Window as Win, AdvancedWindow, WindowSettings}; | |
use piston_window::{PistonWindow as Window}; | |
fn main() { |
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
function! g:SendRight(...) range | |
if a:0 > 0 | |
let start = a:1 | |
let end = a:1 | |
else | |
let start = a:firstline | |
let end = a:lastline | |
endif | |
for line in getline(start, end) |
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
#include <stdio.h> | |
#include <iostream> | |
#include <fstream> | |
#include <Accelerate/Accelerate.h> | |
void print_matrix(const int row_count, const int col_count, __CLPK_real* matrix) { | |
for(int i = 0; i < row_count; i++) { | |
for(int j = 0; j < col_count; j++) { | |
printf("% 7.3f", matrix[i*row_count + j]); |
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
[331] pry(main)> out | |
=> | |
{ layers: | |
[ | |
[0, 1] | |
[0, 0] | |
] | |
[ | |
[1, 0] |
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
UnitTest { | |
var <assertionCount = 0, <successCount = 0, <failureCount = 0; | |
test { | |
arg name, func; | |
("Testing: " ++ name).postln; | |
func.value(this); | |
("Assertions: " ++ assertionCount ++ "\t Successes: " ++ successCount ++ "\t Failures: " ++ failureCount).postln; | |
} |
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
( | |
SynthDef(\cloudin, { | |
arg freq = 440, env_input = 0; | |
var signal, envs; | |
// env_input is the number of the control-rate channel with the env signal | |
signal = Saw.ar(400 * 1) * In.kr(env_input); | |
Out.ar(0, signal); | |
}).add; | |
) |
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
require 'sinatra' | |
require 'sinatra/reloader' if development? | |
require 'digest/md5' | |
require 'haml' | |
# enable :sessions | |
use Rack::Session::Cookie, :key => 'rack.session', :path => '/', :secret => 'change_me' | |
auth_dir = "./auth" |
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
x = {|gate=1| Out.ar([0,1], EnvGen.ar(Env.asr(0.1, 1, 0.1), gate, doneAction: 2) * Splay.ar({[SinOsc.ar(80, 0, 0.05)] ++ Resonz.ar(WhiteNoise.ar(1), ExpRand(310,330), 0.01)}.dup(20) ++ {SinOsc.ar(ExpRand(200,280), 0, 0.01)}.dup(20) ++ [SinOsc.ar(84, 0, 0.1)] ));}.play; |
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
max_iterations.times do |iter| | |
begin | |
# puts "Iteration #{iter}" | |
# puts "Now #{current_cost} away at #{current_point.to_a}" | |
print "\rIteration #{iter}: #{current_cost} away at #{current_point.to_a}" | |
cost = NMath.sqrt(((tuneable_data[true,1,true,true] - goal_vector) ** 2).sum(0)) | |
# If this is the first run-through, keep the interval index the same | |
if initial_run | |
interval_index = 0 |