Skip to content

Instantly share code, notes, and snippets.

@elijahc
elijahc / README.md
Last active July 12, 2017 18:59
Updates - FORCE learning and timeconstant

In walking through the math to derive the equation they use in their code to maintain/model the X(t) neuron state vector I realized I was not using an appropriate time step size. After correcting the step size the model appears to make better predictions as quantified by mean Pearson Correlation Coefficient

N = 1000

214 Cells in Experiment 500964514

Using 50 cell ids: [ 7 11 26 28 40 41 45 47 49 50 54 63 68 69 70 76 77 82

Download cuda-8.run file
Download Nvidia-367.18-driver.run file
Remove old drivers (apt remove --purge nvidia*)
Remove old nvidia.deb packages (just in case that's necessary?)
Remove my cuda folders (/usr/local/cuda*) (again, just in case)
reboot
Graphics probably won't work now (they didn't for me), so use tty (ctrl-alt-1) or ssh (might want to set that up before doing all this)
(I might have run the Nvidia-367.18.run file here, followed with a reboot, but I can't remember)
@elijahc
elijahc / readme.md
Created March 1, 2017 22:45 — forked from baraldilorenzo/readme.md
VGG-19 pre-trained model for Keras

##VGG19 model for Keras

This is the Keras model of the 19-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@elijahc
elijahc / jsondumps.py
Created February 16, 2017 19:43
Dumping input arguments as json
import json
...
# Parse arguments
parser = argparse.ArgumentParser(description='RNN for modeling neuron populations')
...
FLAGS = parser.parse_args()
return FLAGS
#!/usr/bin/env python
import json
import urllib2
import os
import sys
import pexpect
import time
usr,pts = str(sys.argv[1]).split('.')
@elijahc
elijahc / startup_and_shutdown.md
Last active August 29, 2015 14:05
Startup and Shutdown

Startup

$ cd /home/webapps2/vertex
$ unicorn_rails -c config/unicorn.rb
$ bundle exec sidekiq
$ sudo service nginx restart

# Redis should always be running, but in case its not and you have the permissions, I believe this is how you would start it.

$ sudo service redis start

class Blink < Sinatra::Base
require 'rbc'
get '/user/:id' do |id|
@user = User.find(id)
haml :users_show
end
get '/user/:id/destroy' do |id, status|
restrict! :to_below => 3
@elijahc
elijahc / linux_setup.md
Last active August 29, 2015 14:04
Vertex Installation

CentOS 6

Install Ruby

Using RVM (probably the most popular way)

$ \curl -sSL https://get.rvm.io | bash -s stable

OR

@elijahc
elijahc / subject_resque.rb
Created March 6, 2014 21:29
Subject model importer logic
require 'resque-status'
module Importer
require_relative 'importer_base'
require 'rbc'
class Pipe < ImporterBase
def initialize(key, options={})
@key = key
@options = options