Skip to content

Instantly share code, notes, and snippets.

mk-mode komasaru

Block or report user

Report or block komasaru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@komasaru
komasaru / google_geocode.rb
Last active Jul 11, 2019
Ruby script to get a address or latitude, longitude with Google Geocoding API.
View google_geocode.rb
#*********************************************
# 住所から緯度・経度を取得する、又は、
# 緯度・経度から住所を取得する。
# ( by Google Geocode API )
#*********************************************
#
require 'json'
require 'net/http'
BASE_URL = "http://maps.googleapis.com/maps/api/geocode/json"
@komasaru
komasaru / regression_multi.rb
Last active Jun 26, 2019
Ruby script to calculate a multiple regression function.
View regression_multi.rb
#! /usr/local/bin/ruby
#*********************************************
# Ruby script to calculate a multiple regression function.
#*********************************************
#
class Array
def reg_multi(y)
# 元の数、変量内のサンプル数
e_size, s_size = self.size, y.size
# 以下の場合は例外スロー
@komasaru
komasaru / regression_curve_2.f95
Last active Jun 19, 2019
Fortran 95 source code to compute a simple regression curve(2d)(ver.2).
View regression_curve_2.f95
!****************************************************
! 単回帰曲線(2次回帰)計算
! : y = a + b * x + c * x^2
! : 連立方程式を ガウスの消去法で解く方法
!
! date name version
! 2019.03.17 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2019 mk-mode.com All Rights Reserved.
!****************************************************
@komasaru
komasaru / regression_curve.f95
Last active Jun 19, 2019
Fortran 95 source code to compute a simple regression curve(2d).
View regression_curve.f95
!****************************************************
! 単回帰曲線(2次回帰)計算
! : y = a + b * x + c * x^2
!
! date name version
! 2019.03.17 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2019 mk-mode.com All Rights Reserved.
!****************************************************
!
@komasaru
komasaru / regression_line_2.f95
Last active Jun 13, 2019
Fortran 95 source code to calculate a simple linear regression line.(Ver.2)
View regression_line_2.f95
!****************************************************
! 単回帰直線計算
! : y = a + b * x
! : 連立方程式を ガウスの消去法で解く方法
!
! date name version
! 2018.12.18 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2018 mk-mode.com All Rights Reserved.
!****************************************************
@komasaru
komasaru / spline_interpolation.py
Created Jan 10, 2018
Python script to calc 3D-Spline-Interpolation.
View spline_interpolation.py
#! /usr/local/bin/python3.6
"""
3-D spline interpolation
(with graph drawing by matplotlib)
"""
import matplotlib.pyplot as plt
import sys
import traceback
class SplineInterpolation:
@komasaru
komasaru / sle_lu.f95
Last active Jun 4, 2019
Fortran 95 source code to solve simultaneous equations by LU-decomposition(outer-product form).
View sle_lu.f95
!************************************************************
! 連立1次方程式の解法 ( LU 分解(外積形式ガウス法) )
!
! date name version
! 2019.03.13 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2019 mk-mode.com All Rights Reserved.
!************************************************************
!
module const
@komasaru
komasaru / csv.cpp
Created Jan 12, 2017
C++ source code to read csv data.
View csv.cpp
/**
* @file csv.cpp
* @brief CSV 処理クラス
*
* @date 2017-01-10 新規作成
* @author mk-mode.com
*/
#include <iostream>
#include <string>
#include <vector>
@komasaru
komasaru / sle_lu.rb
Last active Jun 1, 2019
Ruby script to solve simultaneous equations by LU-decomposition(outer-product form).
View sle_lu.rb
#! /usr/local/bin/ruby
#*********************************************
# 連立1次方程式の解法 ( LU 分解(外積形式ガウス法) )
#*********************************************
#
class SleLu
#A = [
# [1, 2],
# [4 ,5]
#]
@komasaru
komasaru / lu_decomposition.f95
Last active May 22, 2019
Fortran 95 source code to do LU-decomposition by outer-product form.
View lu_decomposition.f95
!************************************************************
! LU 分解(外積形式ガウス法(outer-product form))
!
! date name version
! 2019.03.08 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2019 mk-mode.com All Rights Reserved.
!************************************************************
!
module const
You can’t perform that action at this time.