Skip to content

Instantly share code, notes, and snippets.

View yomichi's full-sized avatar

Yuichi Motoyama yomichi

View GitHub Profile
@yomichi
yomichi / install_2dmat.sh
Last active March 26, 2024 07:55
Install 2DMAT and solvers (sim-trhepd-rheed and sxrdcalc) in MALIVE! (Debian)
#!/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]

速習「ソフトウェア講習会のためのUNIX 環境」

本文書について

これは (ISSP-CCMS) ソフトウェア講習会に参加するために最低限必要と思われるUNIX 関連知識をざっくりと学ぶことを目的に作成された(非公式な)文書である。 解説の厳密性および完全性は目指していないことに注意。 また、本文書の内容が各種講習会の事前知識として十分であることは保証されていない。 もう少し余力がある場合には、他の資料、たとえば 計算機実験ハンドブック の第1章 (特に1.1) を予習すると良いだろう。

ライセンス

@yomichi
yomichi / hamiltonian.toml
Created February 2, 2020 02:27
SUN bond-hamiltonian generator for DSQSS/DLA
[[sites]]
type = 0
N = 3
values = [1.0, -0.5, -0.5, ]
elements = []
[[sites.sources]]
istate = [0,]
fstate = [1,]
value = 0.5
L=16
omegamax=3.15
omegaim=0.1
output="spectrum-L${L}.dat"
MPIEXEC="mpiexec -np 2"
HPHI=HPhi
cat << PARAM > gs.in
@yomichi
yomichi / switch_depwarn.jl
Last active September 27, 2015 06:31
switch on/off deprecation warning on running.
#=
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"""
#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>
@yomichi
yomichi / collatz.jl
Created December 19, 2014 16:40
JuliaLangAC2014 -- Day 18 sample codes
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)
@yomichi
yomichi / inline.jl
Last active August 29, 2015 14:10
sample and result of @inline macro
#=
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
{
"metadata": {
"name": "",
"signature": "sha256:703efec684d913428f3f08b8382caa48d896abd8fbbda8a2bfe09bb52f79dd64"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:8fe3aeecf046ae99ade6a8262511f6d0fc49eae9c9c26f63c5e6be07910c05c7"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{