Solve some ordinary differential equations (ODE).
Winston is used for plotting, but using Winston
takes some time.
Github: https://github.com/nolta/Winston.jl
Documents: https://winston.readthedocs.io/
Solve some ordinary differential equations (ODE).
Winston is used for plotting, but using Winston
takes some time.
Github: https://github.com/nolta/Winston.jl
Documents: https://winston.readthedocs.io/
# Style sheet for julia | |
# Ref: https://groups.google.com/forum/#!topic/julia-users/tisM_9sKPCc | |
# Gist: https://gist.github.com/t-nissie/83174cab99b11a2b5fa075ad845e6b4f | |
## | |
style Julia is | |
written by "Takeshi Nishimatsu" | |
version is 0.0.1 | |
first alphabet is |
#!/usr/bin/env ruby | |
# fib(n) generates n-th Fibonacci number | |
# Matirx#**(Integer) is implemented around | |
# ruby-2.3.0/lib/matrix.rb:1132:z = z ? z * x : x if other[0] == 1. | |
# Note that Integer#[] returns a bit. | |
# Author: Takeshi Nishimatsu | |
# Gist: https://gist.github.com/t-nissie/339adc257d067a9b926cea2c45f1754c | |
## | |
require 'matrix' | |
require 'benchmark' |
#!/usr/bin/env ruby | |
=begin | |
= ToleranceFactorShannon.rb | |
Tolerance factor calculator for ABX_3 perovskite structures | |
== Source code at Gist | |
https://gist.github.com/t-nissie/2cf277328b9598e090f890f1bd55f57b | |
== Perovskite structure | |
The ABX_3 perovskite structure has | |
an ion A at the 12-coordinate a1 site, | |
an ion B at the 6-coordinate b1 site, and |
RubyにおけるTEST_COLORS
環境変数についてのドキュメントがさっぱり見つからなかったので
MacのiTerm 2上でいろいろ試してみた。
Version 2.3以上のRubyのソースを./configure
した場合、{yes, no, その他} に色が付く。
しかし背景が白いターミナル画面を使っていると明るい黄色の文字が見づらいことがある。
そのとき
! wall_clock.f -*-f90-*- | |
! Gist: https://gist.github.com/t-nissie/e317fd796d4b885106139f752ee4300d | |
!! | |
program wall_clock | |
implicit none | |
include 'mpif.h' | |
integer i_error, mpi_my_rank | |
real*8 start, finish | |
call MPI_INIT(i_error) | |
call MPI_COMM_RANK(MPI_COMM_WORLD, mpi_my_rank, i_error) |
# zundoko.gp | |
#「ズン」「ドコ」のいずれかをランダムで出力し続けて | |
#「ズン」「ズン」「ズン」「ズン」「ドコ」の配列が出たら | |
#「キ・ヨ・シ!」って出力した後終了 | |
# Author: Takeshi Nishimatsu | |
# Gist: https://gist.github.com/t-nissie/f4e9a58641f6747ff929 | |
# Ref1: https://twitter.com/kumiromilk/status/707437861881180160 | |
# Ref2: http://qiita.com/shunsugai@github/items/971a15461de29563bf90 | |
# Usage: 擬似乱数の種となる整数や整数を返す関数を引数としてcallします。 | |
# $ gnuplot # gnuplotをインタラクティブモードで起動 |