Skip to content

Instantly share code, notes, and snippets.

subhacom

Block or report user

Report or block subhacom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@subhacom
subhacom / colab_bug.ipynb
Last active Jun 8, 2019
Demonstration of a bug where colab misses out some cells created in Jupyter
View colab_bug.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@subhacom
subhacom / hh_squid.py
Created Oct 29, 2018
Python implementation of Hodgkin and Huxley's squid giant axon model using scipy ode solver.
View hh_squid.py
# hh_squid.py ---
# Author: Subhasis Ray
# Created: Fri Oct 26 10:21:21 2018 (-0400)
# Last-Updated: Mon Oct 29 12:32:49 2018 (-0400)
# By: Subhasis Ray
# Version: $Id$
# Code:
"""A python implementation of Hodgkin-Huxley`s Squid Giant Axon model."""
@subhacom
subhacom / lzcomplexity.c
Created Sep 13, 2018
A small C program to compute Lempel-Ziv complexity of a string
View lzcomplexity.c
/* lzcomplexity.c ---
* Author: Subhasis Ray
* Created: Thu Sep 13 11:54:21 2018 (-0400)
* Last-Updated: Thu Sep 13 14:01:18 2018 (-0400)
* By: Subhasis Ray
* Version: $Id$
/* This implements the algorithm described by Casper and Schu"ster, 1987, Physical Review A:
"Easily calculable measure for the complexity of spatiotemporal patterns". */
/* Code: */
#include <stdio.h>
@subhacom
subhacom / vtk_size_color.py
Created Aug 9, 2018
Simple script showing how to set size and color of glyphs using different scalar arrays
View vtk_size_color.py
# vtk_size_color.py ---
# Author: Subhasis Ray
# Created: Thu Aug 9 11:04:16 2018 (-0400)
# Last-Updated: Thu Aug 9 14:24:15 2018 (-0400)
# By: Subhasis Ray
# Version: $Id$
# Code:
"""Test simultaneous radius and color settings in glyph.
@subhacom
subhacom / line_color_anim.py
Last active Jul 20, 2018
Minimal example of spheres and lines animated by changing colors based on scalar value
View line_color_anim.py
# line_color_anim.py ---
# Author: Subhasis Ray
# Created: Thu Jul 19 16:58:58 2018 (-0400)
# Last-Updated: Fri Jul 20 11:18:41 2018 (-0400)
# By: Subhasis Ray
# Version: $Id$
# Code:
"""Short example of animating line colors with color transfer function
@subhacom
subhacom / biomodelsclient.py
Last active Nov 4, 2015
This is a Python implementation to query the webservice of biomodels database (https://www.ebi.ac.uk/biomodels-main/) I originally wrote for the MOOSE gui (https://github.com/BhallaLab/moose-gui) back in 2010. This gist is updated to work with Python3 and PyQt4 and provides a client class as well as a graphical widget for downloading models.
View biomodelsclient.py
# biomodelsclient.py ---
#
# Filename: biomodelsclient.py
# Description:
# Author: Subhasis Ray (original client & widget),
# GV Harsharani (pickled cache).
# Maintainer:
# Created: Tue Mar 2 07:57:39 2010 (+0530)
# Version:
# Last-Updated: Wed Nov 04 15:02:32 2015 (EDT)
@subhacom
subhacom / cpmd5.sh
Last active Nov 26, 2018
rsync and md5sum: Use rsync to copy a directory and then generate a file containing the md5sum of all the files in source directory. Finally do a check of the md5sum of the target.
View cpmd5.sh
#!/bin/bash
if [ $# -lt 2 ]; then
echo "Usage: $0 source dest [md5file]"
echo "Copy source directory into dest directory and put md5 sum of the files in source in md5file. "
echo "If no md5 file is unspecified it is created in current directory"
echo
exit 0
fi
source=$1
target=$2
@subhacom
subhacom / ranksurprise.py
Created Dec 19, 2012
Detect bursts in spiketimes using Rank-Surprise method by Boris Gourevitch and Jos J. Eggermont. Although we use the word spike trains specific to Neuroscience, it is essentially a series of event times t0, t1, t2, ... tn and inter-spike-interval (ISI) is the interval between these events (t1-t0, t2-t1, ...). Reference: Gourevitch, B. & Eggermon…
View ranksurprise.py
# ranksurprise.py ---
#
# Filename: ranksurprise.py
# Description: Rank-surprise (RS) algorithm for burst identification.
# Author: Subhasis Ray
# Maintainer:
# Created: Thu Dec 13 15:03:05 2012 (+0530)
# Version:
# Last-Updated: Wed Dec 19 17:31:45 2012 (+0530)
# By: subha
You can’t perform that action at this time.