これは (ISSP-CCMS) ソフトウェア講習会に参加するために最低限必要と思われるUNIX 関連知識をざっくりと学ぶことを目的に作成された(非公式な)文書である。 解説の厳密性および完全性は目指していないことに注意。 また、本文書の内容が各種講習会の事前知識として十分であることは保証されていない。 もう少し余力がある場合には、他の資料、たとえば 計算機実験ハンドブック の第1章 (特に1.1) を予習すると良いだろう。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install 2DMAT and solvers (sim-trhepd-rheed and sxrdcalc) in MALIVE! (Debian) | |
## Install py2dmat and dependences | |
sudo apt -y update | |
sudo apt -y install python3-tk libgsl-dev eog | |
python3 -m pip install --upgrade pip setuptools wheel | |
python3 -m pip install py2dmat[all] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L=16 | |
omegamax=3.15 | |
omegaim=0.1 | |
output="spectrum-L${L}.dat" | |
MPIEXEC="mpiexec -np 2" | |
HPHI=HPhi | |
cat << PARAM > gs.in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[sites]] | |
type = 0 | |
N = 3 | |
values = [1.0, -0.5, -0.5, ] | |
elements = [] | |
[[sites.sources]] | |
istate = [0,] | |
fstate = [1,] | |
value = 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ time julia -e '' | |
real 0m0.268s | |
user 0m0.261s | |
sys 0m0.066s | |
$ time julia-0.2 -e '' | |
real 0m2.395s | |
user 0m2.433s | |
sys 0m0.117s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= | |
Yuichi Motoyama 2015 | |
This is distributed under the Boost Software License Version 1.0 | |
http://www.boost.org/LICENSE_1_0.txt | |
=# | |
@enum DepwarnFlag DepwarnOff=0 DepwarnOn=1 DepwarnError=2 | |
doc""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/any.hpp> | |
#include <complex> | |
struct Any{ | |
boost::any any_; | |
template <class T> | |
Any(T const& x):any_(x){} | |
template <class T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function collatz_branch(N::Integer) | |
i = 0 | |
while N > 1 | |
N = iseven(N) ? div(N,2) : 3N+1 | |
i += 1 | |
end | |
return i | |
end | |
function collatz_select(N::Integer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= | |
These sample functions are taken from https://github.com/JuliaLang/julia/pull/8297 | |
=# | |
function f(x) | |
y = x+5 | |
z = y*y | |
q = z/y | |
m = q-3 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:703efec684d913428f3f08b8382caa48d896abd8fbbda8a2bfe09bb52f79dd64" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
NewerOlder