Skip to content

Instantly share code, notes, and snippets.

View ohno's full-sized avatar

Shuhei Ohno ohno

View GitHub Profile
@ykonishi
ykonishi / mt19937.f90
Last active May 15, 2023 03:43
MT19937, Mersenne Twister Random Number Generator in Fortran90
! MT19937, Mersenne Twister Random Number Generator ([0,1) Real Number)
! in Fortran90
!
! Usage:
! 1) When you use mt19937, add the sentence "use mt19937"
! above the implicit sentence.
! 2) To set an initial seed, call sgrnd(seed). (The "seed" is an integer.)
! If you do not call this, the seed is 4357.
! 3) Use the function grnd().
! (Do not declare "real(8) :: grnd".)
@rafaqz
rafaqz / fortran-julia.jl
Last active March 17, 2024 21:34
Fortran-Julia conversion script
#=
This julia script converts fortran 90 code into julia.
It uses naive regex replacements to do as much as possible,
but the output WILL need further cleanup.
Known conversion problems such as GOTO are commented and marked with FIXME
Most variable declaration lines are entirely deleted, which may or
may not be useful.
@feanor12
feanor12 / numerov.jl
Last active November 12, 2022 16:01
using UnicodePlots
using OrdinaryDiffEq
using Parameters
struct Numerov <: OrdinaryDiffEqAlgorithm end
mutable struct NumerovCache <: OrdinaryDiffEq.OrdinaryDiffEqMutableCache
uprev # last u value
g
gprev
@genkuroki
genkuroki / Plots.jlにおけるPNGの高精細表示.ipynb
Last active May 6, 2023 19:37
Plots.jlにおけるPNGの高精細表示
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@genkuroki
genkuroki / GP.jl
Created April 16, 2021 23:09
Pluto notebook: Animation of Gaussian process regression
### A Pluto.jl notebook ###
# v0.14.2
using Markdown
using InteractiveUtils
# ╔═╡ 9dcadaad-5e5e-494f-931d-1ab9269ed8c1
using Plots, LinearAlgebra
# ╔═╡ 077d65e8-a167-4527-9bb8-8fa9eb614c46
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.