Skip to content

Instantly share code, notes, and snippets.

View akawashiro's full-sized avatar

Akira Kawata akawashiro

View GitHub Profile
@slarson
slarson / Hodgkin Huxley.py
Created December 6, 2014 19:53
Hodgkin Huxley Python Implementation
import scipy as sp
import pylab as plt
from scipy.integrate import odeint
from scipy import stats
import scipy.linalg as lin
## Full Hodgkin-Huxley Model (copied from Computational Lab 2)
# Constants
C_m = 1.0 # membrane capacitance, in uF/cm^2
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeInType #-}
import Data.Kind
import Data.Proxy
import Data.Singletons
import Data.Singletons.TypeLits
import Data.Type.Equality
import GHC.TypeLits
#ThisScriptIsWrittenInPython2.7.WhenYouExecute,PleaseDoInPython2.7.NoteThatItDoesNotWorkInPython3.x.
W=" ";U="_";D='"'*3;Q="'"*3;S="<";L="&";T=">";zc=r"""import<re,random,zlib,base64&f=['eNrtld0JgDAMhI
e 5wb L/FgqC9pI 0ptGK D
w 0I5 UL5zG+BZ WmT3e 6
UxViMxZjLsEbO44DzRH6Sz O8d QsC4LtJ3eaykIOKq 5KBY0 QbQRk CSYUT1IPlkqOu+pBE9hg0a
Thp8SXTz9BkIGT0JuiMmxM ENE c+HWw8EydcVlntGs a/ Il5jz wnz4mQ13yeicc+C1rZOQnq
28MQYmM+qLO82QbxiYzHjy xCU Z7z+jf7ENVaI+Qw= =','eNr dlkES gDAIAx/Th+X/v3Cc8dCGQN
GBHuRYq1tLCIzxk8Ad/qM6 Bk4 wcIKBEwycYKCZodV VzJCQao aClDM EpJ5hIQ0MA+lgMKSFQZAeh
iU69Zq9U1kYfHWZH37LYA3 4XW YV5CuGfHfjmbsOpE sPqW+Yj c/qnr HYS3wXtNEcyGfMPslysuF8
d+OFs+HnGEOr0bdC0x0TtS jV6 DuhaPNRPpTG+PTRw DCfKEas 6WUlh JOPU/JybUrhks1wThROhmj
@qinjian623
qinjian623 / onnx2pytorch.py
Last active September 26, 2024 13:55
ONNX file to Pytorch model
import onnx
import struct
import torch
import torch.nn as nn
import torchvision as tv
import warnings
# enum DataType {
# UNDEFINED = 0;