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
# -*- coding: utf-8 -*- | |
=begin | |
This script was written by Takashi SUGA on January 2017-November 2019 | |
You may use and/or modify this file according to the license described in the MIT LICENSE.txt file https://raw.githubusercontent.com/suchowan/watson-api-client/master/LICENSE. | |
=end | |
require 'open-uri' | |
require 'openssl' | |
require 'json' |
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
# -*- coding: utf-8 -*- | |
=begin | |
This script was written by Takashi SUGA on July 2017 - December 2022 | |
You may use and/or modify this file according to the license described in the MIT LICENSE.txt file | |
https://raw.githubusercontent.com/suchowan/watson-api-client/master/LICENSE. | |
See also https://suchowan.seesaa.net/article/202212article_25.html | |
=end | |
require 'pp' |
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
# -*- coding: utf-8 -*- | |
=begin | |
Copyright (C) 2015-2019 Takashi SUGA | |
You may use and/or modify this file according to the license | |
described in the LICENSE.txt file included in https://github.com/suchowan/when_exe. | |
=end | |
# | |
# 中心差にみる重修大明暦と授時暦の類似性 |
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
# -*- coding: utf-8 -*- | |
=begin | |
Copyright (C) 2013-2021 Takashi SUGA | |
You may use and/or modify this file according to the license described in the LICENSE.txt file included in this archive. | |
=end | |
# | |
# When::TM::Duration のための標準クラスの拡張 | |
# |
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
module Static | |
refine Array do | |
# 平均 | |
def mean | |
self.inject(&:+) / self.length | |
end | |
# 標準偏差 | |
def sdev | |
m = self.mean |
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
# -*- coding: utf-8 -*- | |
=begin | |
寛政暦時代の二十四節気日時の確認 | |
参考 https://eco.mtk.nao.ac.jp/koyomi/wiki/BEC3C4B9CBA1.html | |
寛政暦では暦定数を10年ごとに更新するので、まず10年目ごとの | |
天正冬至の日時を正確に計算し、すべての二十四節気は、その間 |
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
#require 'pp' | |
require 'open-uri' | |
require 'openssl' | |
require 'matrix' | |
Encoding.default_external = 'UTF-8' | |
Encoding.default_internal = 'UTF-8' | |
####################################### | |
## |
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
require 'pp' | |
require 'when_exe' | |
include When | |
=begin | |
check script for https://suchowan.seesaa.net/article/201208article_19.html | |
=end | |
t1 = [1, 2].map {|n| | |
Ephemeris.root(23*n, 0) {|t| |