Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Arduinoに接続されたRTCの時刻をシリアルモニタで調整するサンプルプログラム | |
// memo: デフォルトでは、Stalker v3.1に搭載されているDS1337を対象にしていますが、他のICでもほとんど改造せずに使えるはずです。 | |
// author: Katsuhiro Morihsita | |
// created: 2018-09-07 | |
// license: MIT | |
#include <DS1337.h> | |
// RTC関係 | |
DS1337 RTC; |
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
# 不定形のベクトルの一致を判定する | |
# 数値計算の試験の解答用に開発した。 | |
# author: Katsuhiro Morishita | |
# created: 2018-02 | |
# lisence: MIT | |
import numpy as np | |
import collections | |
def flatten(foo): |
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> |
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
# Excelの表からhtmlのtableを作成する | |
# memo: 体育大会の試合結果をWebに掲載するために作成した。 | |
# author: Katsuhiro Morishita | |
# created: 2017-08-24 | |
# lisence: MIT | |
import pandas as pd | |
import math | |
import re | |
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-10 | |
# license: MIT | |
import sys | |
import numpy as np | |
import pandas | |
argvs = sys.argv # コマンドライン引数を格納したリストの取得 | |
if len(argvs) < 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
# 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: 機械学習用のデータセットに含まれるラベルを整数に置換する | |
# 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
# waveファイルを一定の時間毎に切断する | |
# author: Katsuhiro Morishita | |
# created: 2017-06-21 | |
# lisence: MIT | |
import glob | |
import wave | |
import os.path | |
term = 60.0 # 切断後のファイルの時間幅[s] |
NewerOlder