この文章のオリジナルは https://gist.github.com/t-nissie/4edcf8d62144b4d77f5c に置いてある。
使用するパソコンはIntel Core i5程度のノートパソコンで十分。
cpa2002v009c.tgz
のAugust 26, 2015版を
http://kkr.phys.sci.osaka-u.ac.jp/jp/
から入手した。
! zundoko.f -*-f90-*- | |
!「ズン」「ドコ」のいずれかをランダムで出力し続けて | |
!「ズン」「ズン」「ズン」「ズン」「ドコ」の配列が出たら | |
!「キ・ヨ・シ!」って出力した後終了 | |
! Ref1: https://twitter.com/kumiromilk/status/707437861881180160 | |
! Ref2: http://qiita.com/shunsugai@github/items/971a15461de29563bf90 | |
!! | |
subroutine kiyoshi(c) | |
implicit none | |
integer,intent(in) :: c |
この文章のオリジナルは https://gist.github.com/t-nissie/4edcf8d62144b4d77f5c に置いてある。
使用するパソコンはIntel Core i5程度のノートパソコンで十分。
cpa2002v009c.tgz
のAugust 26, 2015版を
http://kkr.phys.sci.osaka-u.ac.jp/jp/
から入手した。
#!/usr/bin/env ruby | |
# interpolations.rb interpolates a data set. | |
# Gist: https://gist.github.com/t-nissie/9f7cd7d4991530a3fac7 | |
# Author: Takeshi Nishimatsu | |
# Copying: | |
# Copyright (c) 2016 by Takeshi Nishimatsu | |
# interpolations.rb is distributed in the hope that | |
# it will be useful, but WITHOUT ANY WARRANTY. | |
# You can copy, modify and redistribute interpolations.rb, | |
# but only under the conditions described in |
下に置いてある短いライブラリ https://gist.github.com/t-nissie/b6ef8d39229a2534498b/raw/integrations.rb はRubyのRangeを積分範囲としてブロックで与えられた関数を数値積分します。 台形公式か シンプソンの公式か が選べます。
使い方
dvipdfmxを正しく使ってもgnuplotで作ったEPS画像を挿入するとずれるようです。 tgifなどで作ったEPSは大丈夫。
http://d.hatena.ne.jp/zrbabbler/20140121/1390313675 を参考にdvipdfmxは正しく使っているつもりです。
(いつもはpdflatexでPDFの図を挿入した英語のLaTeX文章をそのままPDFに変換しているので気がつきませんでした。 古い日本語のLaTeX文章をコンパイルしないといけない…)
#!/usr/bin/env julia | |
# Gist: https://gist.github.com/t-nissie/641df996b9035f85b230 | |
# Three ways of generating n-th Fibonacci number in Julia language | |
# Put perfutil.jl in the same directory as: | |
# wget https://raw.githubusercontent.com/JuliaLang/julia/master/test/perf/perfutil.jl | |
# Turn off garbage collection (GC), when you get occasional bad timings. See perfutil.patch below. | |
### | |
using Base.Test | |
include("perfutil.jl") |
OCamlを自習する。 浅井健一著『プログラミングの基礎』とそのWebサイト http://pllab.is.ocha.ac.jp/~asai/book-mov/ を使う。
UTF-8で漢字の入出力に対応させるのがわりと面倒。
UbuntuなどDebian系のGNU/Linuxにはapt-get
で簡単にインストールできる:
Original files are in https://gist.github.com/t-nissie/ad99810ddf1bceb602f6 .
git clone https://gist.github.com/ad99810ddf1bceb602f6.git anatase08-k6x6x4-band-dos-gist
.cd anatase08-k6x6x4-band-dos-gist
.O.pw-mt_fhi.UPF
and Ti.pw-mt_fhi.UPF
form http://www.quantum-espresso.org/pseudopotentials/ .bands.x
, dos.x
, plotband.x
and pw.x
in the
current directory, i.e. ln -s /SOMEWHERE/espresso-5.1.2/bin/bands.x
.! sincos.F | |
! You cannot say "sin(pi/2)=1, cos(pi/2)=0, sin(pi/4)=cos(pi/4)". | |
! Time-stamp: <2015-12-14 08:12:49 takeshi> | |
! Author: Takeshi NISHIMATSU | |
! Ref1: http://notabs.org/fpuaccuracy/index.htm | |
! Ref2: http://tomeapp.jp/archives/1282 | |
! Ref3: https://sourceware.org/ml/libc-alpha/2015-12/msg00205.html | |
! Ref4: https://twitter.com/takehiro_t/status/676006684259540992 | |
!! | |
#if defined(__PGI) || defined(__sparc) |