This file contains 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
import numpy | |
class IzhikevichNeuron(object): | |
def __init__(self, a, b, c, d, v, u = None): | |
self.a = a | |
self.b = b | |
self.c = c | |
self.d = d | |
self.v = v | |
self.u = u if u is not None else b * v |
This file contains 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
#include <cstdio> | |
template <int D, int A, typename B> | |
struct K | |
{ | |
static const int x = K<D + 1, 0, K<D, A, B>>::x | |
+ K<D + 1, 1, K<D, A, B>>::x | |
+ K<D + 1, 2, K<D, A, B>>::x | |
+ K<D + 1, 3, K<D, A, B>>::x | |
+ K<D + 1, 4, K<D, A, B>>::x; |
This file contains 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
{-# LANGUAGE BangPatterns #-} | |
module Main where | |
import qualified Data.IntMap as IM | |
import Data.Char (chr, ord) | |
import Data.Array | |
type State = (Int, IM.IntMap Int) | |
data Dir = Up | Down |
NewerOlder