- EZR
http://www.jichi.ac.jp/saitama-sct/SaitamaHP.files/statmed.html - Anaconda (Python3)
便利なライブラリがほぼ全部入りのPythonディストリビューション
https://www.continuum.io/downloads - Sublime Text
少し気の利いた、美しいテキストエディタです。
https://www.sublimetext.com/3
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
Function vector_plus(vect1, vect2) | |
' ベクトルの足し算 | |
ans = vect1 ' deep copy (たぶん、ディープコピー) | |
For i = 0 To UBound(ans) | |
ans(i) = vect1(i) + vect2(i) | |
Next i | |
vector_plus = ans | |
End Function |
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
Function my_func(x) | |
' とある関数(数学)の計算結果を返す | |
my_func = 100 * x ^ 2 + 50 * x - 500 | |
End Function | |
Function diff(x, dx) | |
' 1階微分の結果を返す | |
diff = (my_func(x + dx) - my_func(x)) / dx | |
End Function |
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
""" | |
数値計算の計算結果を評価する | |
""" | |
def flatten(foo): | |
""" 多次元配列を1次元配列に変換する | |
""" | |
series = [] | |
for mem in foo: | |
if isinstance(mem, list): |
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
# purpose: 重回帰分析用のサンプルデータを自動的に作成する | |
# author: Katsuhiro Morishita | |
# created: 2017-05-18 | |
# license: MIT | |
import numpy as np | |
size = 5 # 説明変数の数 | |
def ndarray2str(val): | |
""" ndarray型の変数を文字列に変換する |
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
# waveファイルを一定の時間毎に切断する | |
# author: Katsuhiro Morishita | |
# created: 2017-06-21 | |
# lisence: MIT | |
import glob | |
import wave | |
import os.path | |
term = 60.0 # 切断後のファイルの時間幅[s] |
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
# purpose: 機械学習用のデータセットに含まれるラベルを整数に置換する | |
# author: Katsuhiro Morishita | |
# created: 2017-07-11 | |
# license: MIT | |
import sys | |
import pandas as pd | |
import math | |
import numpy as np | |
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
# purpose: Pythonで扱えない文字の入っているUTF-8のファイルから、処理できる文字のみを残す | |
# memo: 副作用として、文字列が崩れる可能性もある。 | |
# author: Katsuhiro Morishita | |
# created: 2017-07-18 | |
# license: MIT | |
import sys | |
import os | |
def main(): |
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
// purpose: チャタリング対策のテスト | |
// 2016年に作った気がするが、その前だったかも。 | |
// ボタンを押すと、ただLEDが光るサンプルコード。チャタリング対策用のクラスがみそ | |
// author: Katsuhiro Morishita | |
// created: 2017-10-18 | |
// lisence: MIT | |
const int led1 = 4; | |
const int led2 = 5; | |
const int butt1 = 6; |
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
/************************* | |
blynkのnotifyは一度送信すると10秒ほど不感知となり、送信リクエストが失われます。 | |
そこで、リクエストされたメッセージを取りこぼすことなく送信するためのクラスを作成しました。 | |
author: Katsuhiro Morishita | |
created: 2018-01-25 | |
lisence: MIT | |
**************************/ | |
#include <Blynk.h> | |
#include <BlynkSimpleStream.h> |
OlderNewer