Skip to content

Instantly share code, notes, and snippets.

View terasakisatoshi's full-sized avatar

Satoshi Terasaki terasakisatoshi

View GitHub Profile
import gistcheck
gistcheck.commit()
@terasakisatoshi
terasakisatoshi / pyising.ipynb
Last active January 17, 2018 11:29
Ising model のPython実装
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@terasakisatoshi
terasakisatoshi / res.txt
Created January 21, 2018 20:16
ising result
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)
@terasakisatoshi
terasakisatoshi / ising.py
Last active January 22, 2018 10:14
Ising Model Python
# 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 / Cargo.toml
Last active January 23, 2018 03:27
Ising Model Rust
[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 / goising.go
Last active January 23, 2018 03:28
ising Model Golang
package main
import (
"fmt"
"github.com/gonum/matrix/mat64"
"math"
"math/rand"
"time"
)
@terasakisatoshi
terasakisatoshi / nimising.nim
Last active January 23, 2018 03:28
Ising Model(Nim implementation)
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 / binary GCD (aka Stein's) algorithm.ipynb
Last active January 25, 2018 14:56
binary GCD (aka Stein's) algorithm (Python implementation)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@terasakisatoshi
terasakisatoshi / cyising.pyx
Last active January 28, 2018 01:32
Ising model cython
# 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
@terasakisatoshi
terasakisatoshi / Playing_ChainerCV_in_advance.ipynb
Created March 21, 2018 05:37
playing_chainercv_in_advance
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.