Skip to content

Instantly share code, notes, and snippets.

View jabberwocky0139's full-sized avatar

Yusaku Torii jabberwocky0139

View GitHub Profile
@jabberwocky0139
jabberwocky0139 / file0.txt
Last active November 2, 2018 17:00
初心者〜初級者のためのEmacs-Helm事始め : 前編 ref: https://qiita.com/jabberwocky0139/items/86df1d3108e147c69e2c
(require 'helm-config)
(helm-mode 1)
@jabberwocky0139
jabberwocky0139 / file0.txt
Last active December 20, 2016 08:44
Pythonで覗く, こわくない量子力学1 : 無限井戸型ポテンシャル ref: http://qiita.com/jabberwocky0139/items/136f34add9e522f2d3ff
H\psi_\ell(x) = \left(-\frac{\hbar^2}{2m}\frac{d^2}{dx^2} + V(x)\right)\psi_\ell(x) = E_\ell\psi_\ell(x)\\
V(x) = \begin{cases}
0 & 0 < x < L\\
\infty & otherwise
\end{cases}
@jabberwocky0139
jabberwocky0139 / file0.txt
Created December 3, 2016 12:59
NumPy・SciPyを用いた数値計算の高速化 : 落ち穂拾い ref: http://qiita.com/jabberwocky0139/items/19c9bf93d0243cd869b5
import numpy as np
import math as m
m.log(0) # ValueError: math domain error
mp.log(0) # RuntimeWarning: divide by zero encountered in log
>>> -inf
mp.log(-1) # RuntimeWarning: invalid value encountered in log
>>> nan
@jabberwocky0139
jabberwocky0139 / file0.txt
Last active November 26, 2016 08:53
NumPy・SciPyを用いた数値計算の高速化 : 応用その2 ref: http://qiita.com/jabberwocky0139/items/26451d7942777d0001f1
from scipy.optimize import bisect
def f(x):
return np.sin(x) - x/2
bisect(f, 1.5, 2)
>>> 1.895494267034337
@jabberwocky0139
jabberwocky0139 / file0.txt
Last active December 23, 2016 11:17
NumPy・SciPyを用いた数値計算の高速化 : 応用その1 ref: http://qiita.com/jabberwocky0139/items/a9751d11caa64bc19226
\frac{d^2}{dx^2}\psi(x) = \frac{\psi(x + \Delta x) - 2\psi(x) + \psi(x - \Delta x)}{\Delta x^2} + {\cal O}(\Delta x^2)
@jabberwocky0139
jabberwocky0139 / file0.txt
Last active November 25, 2016 11:39
NumPyによる数値計算の高速化 : 基礎 ref: http://qiita.com/jabberwocky0139/items/c3620fb2f011f20a633b
info = LAPACKE_zheevr(LAPACK_COL_MAJOR, 'V', 'A', 'L', H, (lapack_complex_double*)a, lda, vl, vu, il, iu, abstol, &mm, w, (lapack_complex_double*)z, ldz, isuppz);
@jabberwocky0139
jabberwocky0139 / file0.txt
Created November 17, 2016 08:50
PyAutoGuiでlocateCenterOnScreenが動かない ref: http://qiita.com/jabberwocky0139/items/8f79e2ba41628d056e07
import pyautogui as pa
position = pa.locateCenterOnScreen("target.png")
;; Japanese setting
(prefer-coding-system 'utf-8)
(setq dired-default-file-coding-system 'utf-8)
(setq quail-japanese-use-double-n t)
(require 'mozc)
;(set-language-environment "Japanese")
(setq default-input-method "japanese-mozc")
(global-set-key (kbd "C-SPC") 'toggle-input-method)
(setq mozc-candidate-style 'echo-area)