Skip to content

Instantly share code, notes, and snippets.

View tbenst's full-sized avatar

Tyler Benster tbenst

View GitHub Profile
Trial>> run('/home/tyler/Dropbox/Shared/PDtrustOT_Tyler/MATLAB/distance/cSPIKE_package_v1.1/cSPIKEmex/MEX_compile.m')
Verbose mode is on.
... Looking for compiler 'g++' ...
... Executing command 'which g++' ...Yes ('/usr/bin/g++').
... Executing command 'g++ -print-file-name=libstdc++.so' ...Yes ('/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.so').
Found installed compiler 'g++'.
Options file details
-------------------------------------------------------------------
Compiler location: /usr/bin/gcc-4.9
Options file: /home/tyler/.matlab/R2017a/mex_C++_glnxa64.xml
Trial>> run('/home/tyler/Dropbox/Shared/PDtrustOT_Tyler/MATLAB/distance/cSPIKE_package_v1.1/cSPIKEmex/MEX_compile.m')
Verbose mode is on.
... Looking for compiler 'g++' ...
... Executing command 'which g++' ...Yes ('/usr/bin/g++').
... Executing command 'g++ -print-file-name=libstdc++.so' ...Yes ('/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.so').
Found installed compiler 'g++'.
Options file details
-------------------------------------------------------------------
Compiler location: /usr/bin/gcc-4.9
Options file: /home/tyler/.matlab/R2017a/mex_C++_glnxa64.xml
[ 14.450]
X.Org X Server 1.18.4
Release Date: 2016-07-19
[ 14.450] X Protocol Version 11, Revision 0
[ 14.450] Build Operating System: Linux 4.4.0-97-generic x86_64 Ubuntu
[ 14.450] Current Operating System: Linux sia 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64
[ 14.450] Kernel command line: BOOT_IMAGE=/vmlinuz-4.4.0-97-generic.efi.signed root=/dev/mapper/ubuntu--vg-root ro cgroup_enable=memory swapaccount=1 quiet nosplash
[ 14.451] Build Date: 13 October 2017 01:57:05PM
[ 14.451] xorg-server 2:1.18.4-0ubuntu0.7 (For technical support please see http://www.ubuntu.com/support)
[ 14.451] Current version of pixman: 0.33.6
------------------------- Informations -------------------------
| Number of recorded channels : 4096
| Number of analyzed channels : 4096
| File format : BRW
| Data type : uint16
| Sampling rate : 17 kHz
| Duration of the recording : 26 min 0 s 535 ms
| Width of the templates : 5 ms
| Spatial radius considered : 250 um
| Threshold crossing : negative
@tbenst
tbenst / gist:8efe65c10f50dc5166a88f9d443989e0
Created January 24, 2018 19:34
Python2 pickle -> Julia jld
using PyCall, JLD
@pyimport pickle as pkl
@pywith pybuiltin("open")("trained_mnist_model","rb") as f begin
global cpts = pkl.load(f)
end
save("trained_mnist_model.jld", "data", cpts)
using Plots
x = reshape(collect(Iterators.flatten(Iterators.product(0:1,0:1))),(2,4))'
y_and = float(mapslices(x -> x[1] & x[2],x,2))*2-1
y_xor = float(mapslices(x -> x[1] ⊻ x[2],x,2))*2-1
x = hcat(ones(4),float(x))*2-1
ΔW(x, y, σ, lr) = σ==y ? 0 : 2*σ*x*lr
type Perceptron
W::Array{<:Real,2}
import torch as T
import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.utils.data import DataLoader, Dataset
import numpy as np
from __future__ import print_function
import gc
class MyData(Dataset):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.