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 / calc_rcc_kendall.f95
Last active Jan 29, 2020
Fortran 95 source code to calculate a Kendall's Rank Correlation Coefficient.
View calc_rcc_kendall.f95
!****************************************************
! ケンドールの順位相関係数の計算
!
! DATE AUTHOR VERSION
! 2019.12.13 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2019 mk-mode.com All Rights Reserved.
!****************************************************
!
module cst
@komasaru
komasaru / calc_rcc_spearman.f95
Created Jan 29, 2020
Fortran 95 source code to calculate a Spearman's Rank Correlation Coefficient.
View calc_rcc_spearman.f95
!****************************************************
! スピアマンの順位相関係数の計算
!
! DATE AUTHOR VERSION
! 2019.12.12 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2019 mk-mode.com All Rights Reserved.
!****************************************************
!
module cst
@komasaru
komasaru / calc_rcc_spearman.rb
Created Jan 28, 2020
Ruby script to calculate a Kendall's Rank Correlation Coefficient.
View calc_rcc_spearman.rb
#! /usr/local/bin/ruby
class Array
def rcc_kendall(y)
# 以下の場合は例外スロー
# - 引数の配列が Array クラスでない
# - 自身配列が空
# - 配列サイズが異なる
# - 数値以外のデータが存在する
raise "Argument is not a Array class!" unless y.class == Array
@komasaru
komasaru / calc_rcc_spearman.rb
Created Jan 28, 2020
Ruby script to calculate a Spearman's Rank Correlation Coefficient.
View calc_rcc_spearman.rb
#! /usr/local/bin/ruby
class Array
def rcc_spearman(y)
# 以下の場合は例外スロー
# - 引数の配列が Array クラスでない
# - 自身配列が空
# - 配列サイズが異なる
# - 数値以外のデータが存在する
raise "Argument is not a Array class!" unless y.class == Array
@komasaru
komasaru / binom_coeff.f95
Created Jan 27, 2020
Fortran 95 source code to calculate binomial coefficients.
View binom_coeff.f95
!****************************************************
! 二項係数の計算
!
! DATE AUTHOR VERSION
! 2019.12.11 mk-mode.com 1.00 新規作成
!
! Copyright(C) 2019 mk-mode.com All Rights Reserved.
!****************************************************
!
module cst
@komasaru
komasaru / linear_programming.cpp
Created Dec 21, 2017
C++ source code to execute linear programming with Simplex method.
View linear_programming.cpp
/*********************************************
* 線形計画法(シンプレックス法) *
*********************************************/
#include <iostream> // for cout
#include <stdio.h> // for printf()
#define N_ROW 4 // 行数
#define N_COL 6 // 列数
#define N_VAR 2 // 変数の数
@komasaru
komasaru / Mysql.cpp
Created Aug 17, 2014
C++ source code to connect to MariaDB(MySQL).
View Mysql.cpp
/*
* Example to connect to MariaDB(MySQL)
*/
#include <iostream>
#include <mysql/mysql.h> // require libmysqlclient-dev
#include <string>
using namespace std;
/*
@komasaru
komasaru / correlation_coefficient.py
Last active Dec 10, 2019
Python script to compute correlation coefficient.
View correlation_coefficient.py
#! /usr/local/bin/python3.6
"""
Correlation coefficient computaion
"""
import math
import sys
import traceback
class CorrelationCoefficient:
@komasaru
komasaru / .tmux.conf
Last active Nov 4, 2019
tmux config(setting) file.
View .tmux.conf
# ==== Basic
# Default shell
set-option -g default-shell /bin/bash
set-option -g default-command /bin/bash
# Allow UTF-8
set-window-option -g utf8 on
# Disable ESC delay
set-option -s escape-time 0
# ==== Reload config (r)
@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:
You can’t perform that action at this time.