This file contains hidden or 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
#!/bin/bash | |
set -e | |
IVVER=18 | |
NRNVER=r1059 | |
XQVER=2.7.5 | |
READLINE=/usr/local/opt/readline/ | |
PYTHONBIN=/usr/bin/python | |
NRNDIR=/Applications/NEURON-$NRNVER |
This file contains hidden or 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
TITLE Morris-Lecar spiking dynamics | |
COMMENT | |
Written by Sungho Hong | |
Computational Neuroscience Unit | |
Okinawa Institute of Science and Technology | |
[email protected] | |
ENDCOMMENT |
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
This script is for a Monte Carlo simulation of the following puzzle: you | |
first put a white ball in a bag containing another "original" ball with | |
unknown color, which can be black or white with probability of 1/2. The | |
question is what is the probability that the original ball was white if | |
you pick one of two balls in the bag randomly and the chosen ball is | |
white. As a matter of fact, this problem is equivalent to finding the | |
probability of choosing a white ball out of one black and two white | |
balls, which should be 2/3. |
This file contains hidden or 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
TITLE Wang-Buzsaki model | |
COMMENT | |
Sungho Hong, CNS Unit, Okinawa Inst Sci Tech. Mar 2008 | |
ENDCOMMENT | |
UNITS { | |
(mA) = (milliamp) | |
(mV) = (millivolt) |
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
nsb_entropy.py | |
June, 2011 written by Sungho Hong, Computational Neuroscience Unit, Okinawa Institute of | |
Science and Technology | |
May, 2019 updated to Python 3 by Charlie Strauss, Los Alamos National Lab | |
This script is a python version of Mathematica functions by Christian Mendl |
This file contains hidden or 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 distutils.core import setup, Extension | |
from glob import glob | |
# directory containing libblas and liblapack | |
ATLAS_LIB_DIR = '/usr/lib' | |
# Set to 1 if you are using the random number generators in the GNU | |
# Scientific Library. | |
BUILD_GSL = 0 |
This file contains hidden or 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 numpy import mod, median | |
from numpy import pi | |
from numpy import vstack, hstack | |
def restrict_phase(theta): | |
return mod(theta+pi, 2*pi)-pi | |
def drmap(i,j, uu): | |
x = restrict_phase(uu[i,1:-1]-uu[j,1:-1]) |
This file contains hidden or 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 = pickle.load(open('final.no.40.pkl','r')) | |
In [383]: cgm = loadtxt('/Users/shhong/CGM/hwidth_HHLS_40.dat').tolist() | |
In [384]: l = [] | |
In [385]: for k in cgm: | |
l.append([(int(k[0]), int(k[1])), k[2]]) | |
.....: | |
.....: |