Skip to content

Instantly share code, notes, and snippets.

View DaisukeMiyamoto's full-sized avatar

Daisuke Miyamoto DaisukeMiyamoto

  • Tokyo, Japan
View GitHub Profile
@DaisukeMiyamoto
DaisukeMiyamoto / neuron-python2.py
Created May 29, 2017 15:08
example2 of neuron with pyhon
import matplotlib.pyplot as plt
import neuron
soma = neuron.h.Section(name="soma")
# Set the geometry of the section
soma.nseg = 1
soma.diam = 10
soma.L = 10
# Insert Hodgkin Huxley channel models in this soma
@DaisukeMiyamoto
DaisukeMiyamoto / neuron-python3.py
Created May 29, 2017 15:09
example3 of neuron with python
import matplotlib.pyplot as plt
import neuron
soma = neuron.h.Section(name="soma")
# Set the geometry of the section
soma.nseg = 1
soma.diam = 10
soma.L = 10
# Insert Hodgkin Huxley channel models in this soma
@DaisukeMiyamoto
DaisukeMiyamoto / matrix.sh
Created May 30, 2017 20:59
send action message from zabbix to matrix.fm (alternative of https://github.com/ericoc/zabbix-slack-alertscript)
#!/bin/bash
URL=SET_URL
TOKEN=SET_TOKEN
ROOM_ID=$1
MSG="\"$2: $3\""
curl -XPOST -d \
'{"msgtype":"m.text", "body":'"${MSG}"'}' \
"https://${URL}/_matrix/client/r0/rooms/${ROOM_ID}/send/m.room.message?access_token=${TOKEN}"
@DaisukeMiyamoto
DaisukeMiyamoto / izhikevich.ipynb
Last active May 31, 2017 04:11
simulate Izhikevich neuron model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DaisukeMiyamoto
DaisukeMiyamoto / plot.py
Created June 4, 2017 01:29
generate plot image from data
import numpy as np
import matplotlib.pyplot as plt
import sys
argvs = sys.argv
argc = len(argvs)
if(argc != 3):
print 'Usage : ./%s (input_filename) (output_image)' % (argvs[0])
quit()
@DaisukeMiyamoto
DaisukeMiyamoto / hodgkin-huxley.c
Last active June 10, 2017 02:08
calculate hodgkin huxley neuron model by python and C code based on NEURON simulator's method
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "mpi.h"
#ifdef KCOMPUTER
#include "fj_tool/fapp.h"
#endif
@DaisukeMiyamoto
DaisukeMiyamoto / zabbix_rtx1210.xml
Last active January 25, 2023 10:16
zabbix template for YAMAHA RTX1210 by SNMP agent v2
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>3.2</version>
<date>2017-06-11T10:23:22Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@DaisukeMiyamoto
DaisukeMiyamoto / fizzbuzz.s
Created June 16, 2017 08:14
fizz buzz in assembler
.include "io.s"
.text
.global _start
_start:
mov x22, #1 // i = 1
mov x24, #30 // loop max
mov x23, #1 // 3 counter
mov x25, #3 // 3
mov x26, #1 // 5 counter
mov x27, #5 // 5
@DaisukeMiyamoto
DaisukeMiyamoto / zabbix_agent_userparameter.conf
Created July 3, 2017 01:54
get temp from TEMPerV1.4 for zabbix agent user parameter
UserParameter=temper.temp,temper | cut -d "," -f
eb create --database --vpc.id vpc-3c98c145 --vpc.dbsubnets subnet-9ff2b1b3,subnet-5790971f --vpc.ec2subnets subnet-9ff2b1b3,subnet-5790971f --vpc.elbsubnets subnet-9aefacb6,subnet-488b8c00 --vpc.elbpublic -db.i db.t2.micro -db.engine mysql --elb-type classic --service-role aws-elastic-beanstalk-service-role --instance_profile qls-1479818-2dbab78613effee2-AWSBeanstalkEc2Role-SBVJU5FKIIB