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
#! /usr/local/bin/python3.6 | |
""" | |
URL shorten with TinyURL API | |
""" | |
import requests | |
import sys | |
import traceback | |
import urllib | |
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
!**************************************************** | |
! 階乗計算 | |
! | |
! date name version | |
! 2018.08.20 mk-mode.com 1.00 新規作成 | |
! | |
! Copyright(C) 2018 mk-mode.com All Rights Reserved. | |
!**************************************************** | |
! | |
program fact_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
#! /usr/local/bin/ruby | |
#--------------------------------------------------------------------------------- | |
# ECEF -> BLH 変換 | |
# : ECEF(Earth Centered Earth Fixed; 地球中心・地球固定直交座標系)座標を | |
# WGS84 の緯度(Latitude)/経度(Longitude)/楕円体高(Height)に変換する。 | |
# | |
# Date Author Version | |
# 2019.02.19 mk-mode.com 1.00 新規作成 | |
# | |
# Copyright(C) 2019 mk-mode.com All Rights Reserved. |
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
#include "calc.hpp" | |
/* | |
* @brief 単回帰曲線(5次)の計算 | |
* | |
* @param[ref] a (double) | |
* @param[ref] b (double) | |
* @param[ref] c (double) | |
* @param[ref] d (double) | |
* @param[ref] e (double) |
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
#! /usr/local/bin/ruby | |
#********************************************* | |
# Ruby script to calculate a simple regression curve. | |
# : y = a + b * x + c * x^2 + d * x^3 + e * x^4 + f * x^5 | |
# : 連立方程式を ガウスの消去法(ピボット選択)で解く方法 | |
#********************************************* | |
# | |
class Array | |
def reg_curve_5d(y) | |
# 以下の場合は例外スロー |
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
#! /usr/local/bin/python3.6 | |
""" | |
Computation of Napier's constant | |
""" | |
import sys | |
import traceback | |
class CalcNapier: | |
L = 1000 # Digits of computation |
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
#include "calc.hpp" | |
#include <algorithm> // for std::count | |
#include <cmath> // for std::sqrt | |
#include <iostream> | |
#include <unordered_map> | |
#include <vector> | |
Calc::Calc(std::vector<std::vector<double>>& data) { | |
try { |
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
#include <iostream> | |
#include <string.h> | |
using namespace std; | |
/* | |
* [CLASS] Proc | |
*/ | |
class Proc | |
{ |
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
#! /usr/local/bin/python3.6 | |
""" | |
ECEF -> BLH 変換 | |
: ECEF(Earth Centered Earth Fixed; 地球中心・地球固定直交座標系)座標を | |
WGS84 の緯度(Latitude)/経度(Longitude)/楕円体高(Height)に変換する。 | |
Date Author Version | |
2018.06.28 mk-mode.com 1.00 新規作成 | |
Copyright(C) 2018 mk-mode.com All Rights Reserved. |
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
#!/bin/bash | |
# ------------------------------------------------------------ | |
# Bash script to check processes. | |
# ------------------------------------------------------------ | |
# RETURN CODE | |
# 0: processes are not running. | |
# 1: one process is running. (CPU time < configured value) | |
# 2: one process is running. (CPU time >= configured value) | |
# 3: more than two processes are running. | |
# ------------------------------------------------------------ |