Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Satoshi Terasaki terasakisatoshi

🏠
Working from home
View GitHub Profile
View Gist Commit.py
import gistcheck
gistcheck.commit()
@terasakisatoshi
terasakisatoshi / pyising.ipynb
Last active Jan 17, 2018
Ising model のPython実装
View pyising.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@terasakisatoshi
terasakisatoshi / nimising.nim
Last active Jan 23, 2018
Ising Model(Nim implementation)
View nimising.nim
import random
import linalg
from math import ln,sqrt,exp
import times
const N = 100
const beta:float64 = ln(1+sqrt(2.0))/2
randomize()
@terasakisatoshi
terasakisatoshi / goising.go
Last active Jan 23, 2018
ising Model Golang
View goising.go
package main
import (
"fmt"
"github.com/gonum/matrix/mat64"
"math"
"math/rand"
"time"
)
@terasakisatoshi
terasakisatoshi / Cargo.toml
Last active Jan 23, 2018
Ising Model Rust
View Cargo.toml
[package]
name = "ising"
version = "0.1.0"
authors = ["SatoshiTeraaki <terasakisatoshi.math@gmail.com>"]
[dependencies]
ndarray = "0.11.0"
rand = "0.3"
ndarray-rand="0.7.0"
@terasakisatoshi
terasakisatoshi / ising.py
Last active Jan 22, 2018
Ising Model Python
View ising.py
# Reference: http://nbviewer.jupyter.org/gist/genkuroki/4fa46c68c56ee0f3b1a6fc8ec628b9d7
# Author MathSorcerer
from math import log, sqrt, exp
from random import choice, random
from copy import deepcopy
import time
from numba import jit
import numpy as np
@terasakisatoshi
terasakisatoshi / cyising.pyx
Last active Jan 28, 2018
Ising model cython
View cyising.pyx
# Reference: http://nbviewer.jupyter.org/gist/genkuroki/4fa46c68c56ee0f3b1a6fc8ec628b9d7
# Author MathSorcerer
from math import exp
import array
from cpython cimport array as carray
from random import choice, random
from libc.stdlib cimport rand, RAND_MAX
import time
cimport cython
View res.txt
Ising Model niter=1e9の場合の計測時間表.
PC環境
---------------------------
julia>versioninfo()
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) M-5Y51 CPU @ 1.10GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
View gibbs-animate.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@terasakisatoshi
terasakisatoshi / binary GCD (aka Stein's) algorithm.ipynb
Last active Jan 25, 2018
binary GCD (aka Stein's) algorithm (Python implementation)
View binary GCD (aka Stein's) algorithm.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.