#Outline:
- a program
- for talking to the os
- a scripting language
# take session-by-session output from lfads run in posterior sample and average | |
# mode, reassemble train and test trials, trim back to correct length (they | |
# were padded for batching), and bundle up in a single hdf5 file like | |
# the one used for behavior | |
import numpy as np | |
import h5py | |
import os | |
lfads_out_fpath = os.path.expanduser('~/data/penaltykick/model_data/lfads/fitted/') | |
lfads_in_fpath = os.path.expanduser('~/data/penaltykick/model_data/lfads/') |
# set prefix to backtick | |
set -g prefix ` | |
unbind C-b | |
bind ` send-prefix | |
# set delay between prefix and command (copied from tmux book) | |
set -s escape-time 1 | |
# set r to reload | |
bind r source-file ~/.tmux.conf \; display 'Reloaded!' |
from psychopy import core, visual | |
from psychopy.visual.circle import Circle | |
class Flicker(Circle): | |
""" | |
Creates a flickering circle in the upper right corner of the screen. | |
This is to be used as a timing marker by a photodiode. | |
The presence or absence of the circle marks out an 8-bit binary pattern, | |
flanked at the beginning and end by a 1 (e.g., 5 is 1000001011). | |
""" |
srand(12345) | |
function makeLtri(x) | |
l = length(x) | |
p = round(Int, (sqrt(1 + 8l) - 1) / 2) | |
L = zeros(eltype(x), (p, p)) | |
k = 1 | |
for j in 1:p | |
for i in j:p | |
L[i, j] = x[k] |
Getting Eclipse/Scala-IDE set up for the Coursera Scala class was a pain. This is because the course materials were created for Scala 2.10, but the editor and IDE are set up with 2.11. Plus lots of other versions, dependencies, etc. have changed.
So here's what I needed to do for the example
assignment:
project/buildSettings.sbt
. Instead, I changed it to version 2.2.0
, which worked. (I think 2.1.0
is deprecated and no longer hosted.)sbt eclipse
) and the package imported in Eclipse, but I had errors, and my Scala tests wouldn't run.2.10
. I got this tip from here