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
Warning: A new session was created in folder 'session_1' | |
> In session.session>session.instance at 79 | |
In abstract_node.get_data_dir at 40 | |
In abstract_node.get_full_dir at 36 | |
In abstract_node.initialize at 35 | |
In abstract_node.run at 88 | |
In meeg at 17 | |
Error using datahash.DataHash>CoreHash (line 319) | |
Java exception occurred: | |
java.lang.OutOfMemoryError: Java heap space |
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 pylab as plt | |
import numpy as np | |
def gen(x, evolve, project, n=1000, sigma=.1): | |
y = [] | |
for i in xrange(int(n)): | |
y.append(np.dot(project, x)) | |
x = np.dot(evolve, x) | |
x = np.clip(x, -100, 100) | |
x += np.random.randn(*x.shape) * sigma |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
// Implementation of baseline fixed-point algorithm in [1]. | |
// | |
// [1] Kolář, Miroslav, and Seamus F. O'Shea. "Fast, portable, and |
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
from scipy import linalg, stats | |
import numpy as np | |
from functools import reduce | |
N = 16 | |
def eval_scrambler(pat, reps=1): | |
pat = np.atleast_1d(pat) | |
D = np.diag(np.where(pat==1, -1, 1)) | |
H = linalg.hadamard(pat.size) |
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
// [1] Sutton, Richard S., et al. "Fast gradient-descent methods for | |
// temporal-difference learning with linear function approximation." | |
// Proceedings of the 26th Annual International Conference on Machine | |
// Learning. ACM, 2009. | |
#define TDC_NFEAT 4 | |
typedef struct { | |
float gamma; | |
float theta[TDC_NFEAT], w[TDC_NFEAT]; |
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
libsum.so: sum.c | |
cc -shared -o libsum.so sum.c |
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.044 | -0.15 | 0.013 | 0.28 | 1 | 1 | -0.047 | 0.046 | 0.018 | -0.013 | |
---|---|---|---|---|---|---|---|---|---|---|
-0.047 | 0.046 | 0.018 | -0.013 | 1 | 1 | -0.046 | 0.24 | 0.018 | -0.3 | |
-0.046 | 0.24 | 0.018 | -0.3 | 0 | 1 | -0.041 | 0.046 | 0.012 | -0.0013 | |
-0.041 | 0.046 | 0.012 | -0.0013 | 1 | 1 | -0.04 | 0.24 | 0.012 | -0.29 | |
-0.04 | 0.24 | 0.012 | -0.29 | 1 | 1 | -0.035 | 0.44 | 0.0063 | -0.58 | |
-0.035 | 0.44 | 0.0063 | -0.58 | 1 | 1 | -0.026 | 0.63 | -0.0053 | -0.87 | |
-0.026 | 0.63 | -0.0053 | -0.87 | 1 | 1 | -0.014 | 0.83 | -0.023 | -1.2 | |
-0.014 | 0.83 | -0.023 | -1.2 | 1 | 1 | 0.0027 | 1 | -0.046 | -1.5 | |
0.0027 | 1 | -0.046 | -1.5 | 1 | 1 | 0.023 | 1.2 | -0.075 | -1.8 | |
0.023 | 1.2 | -0.075 | -1.8 | 1 | 1 | 0.047 | 1.4 | -0.11 | -2.1 |
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 <assert.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <time.h> | |
typedef struct { | |
size_t size[2]; | |
size_t stride[2]; | |
float *elements; |
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
// Generate expander graph. See https://mathoverflow.net/q/124714. | |
// cc expander.c -o expander && ./expander | \ | |
// neato -Tpng -o expander.png -Goverlap=false -Gsplines=true | |
// From https://rosettacode.org/wiki/Modular_inverse#C | |
int mod_inv(int a, int b) { | |
int b0 = b, t, q; | |
int x0 = 0, x1 = 1; | |
if (b == 1) return 1; | |
while (a > 1) { |
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 "fx.h" | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <math.h> | |
#include <assert.h> | |
void static inline wht_butterfly(float * const s, float * const d) { | |
float temp = *s; | |
*s += *d; | |
*d = temp - *d; |