Skip to content

Instantly share code, notes, and snippets.

View yoshipon's full-sized avatar

Yoshiaki Bando yoshipon

View GitHub Profile
@yoshipon
yoshipon / bench.py
Last active September 25, 2021 01:32 — forked from denkiwakame/bench.py
numba-cpp benchmarks
from benchmarks.bench_ising import IsingModel, setup
import time
if __name__ == '__main__':
t = time.time()
setup()
im = IsingModel()
print('compile', time.time()-t)
t = time.time()
im.time_ising()
@yoshipon
yoshipon / noglobal.py
Last active November 20, 2022 03:45 — forked from ax3l/noglobal.py
Useful Noglobal in Python
# License:
# I hereby state this snippet is below "threshold of originality" where applicable (public domain).
#
# Otherwise, since initially posted on Stackoverflow, use as:
# CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl
# http://stackoverflow.com/a/31047259/2719194
# http://stackoverflow.com/a/4858123/2719194
import types
import inspect