Skip to content

Instantly share code, notes, and snippets.

View terasakisatoshi's full-sized avatar

Satoshi Terasaki terasakisatoshi

View GitHub Profile
@terasakisatoshi
terasakisatoshi / tmux.conf
Last active July 8, 2024 07:34
terasaki's tmux config
# Store in `~/.config/tmux/tmux.conf`
set -g prefix C-t
unbind C-b
set -g mouse on
bind-key -T edit-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T edit-mode-vi WheelDownPane send-keys -X scroll-down
@terasakisatoshi
terasakisatoshi / draw_surface_all_images.py
Last active June 19, 2024 14:35
2次元非線形長波方程式による津波伝播計算
# https://github.com/kaigan-osu/2D_Tsunami/blob/main/draw_surface_all_images.py
# を改造したもの
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import BoundaryNorm
from natsort import natsorted
import glob
mx = 750 # 東西方向の格子数
my = 495 # 南北方向の格子数
@terasakisatoshi
terasakisatoshi / barplot_cpu_usage.jl
Last active June 21, 2024 12:18
barplot_cpu_usage.jl
#=
CPU Usage
┌ ┐
id: 0 ┤■■■■■■■■■■ 23
id: 1 ┤ 0
id: 2 ┤■■■■■ 11.1111
id: 3 ┤ 0
id: 4 ┤■■ 5.05051
id: 5 ┤ 0
id: 6 ┤■ 3
@terasakisatoshi
terasakisatoshi / build_tarball.jl
Created May 16, 2024 09:23
How to Build Mujoco v3 using BinaryBuilder.jl
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder
name = "MuJoCo"
version = v"3.1.5"
# Collection of sources required to build mujoco
sources = [
GitSource("https://github.com/deepmind/mujoco", "e001975f083e769898811763c4c887afb52523c2"),
@terasakisatoshi
terasakisatoshi / errlog.txt
Created May 4, 2024 11:47
cppcode_matome /Twitter_240420_2.cpp のコンパイルエラーレポート
❯ clang -std=c++17 -Xpreprocessor -fopenmp -lomp Twitter_240420_2.cpp
Undefined symbols for architecture x86_64:
"std::runtime_error::what() const", referenced from:
vtable for boost::wrapexcept<std::runtime_error> in Twitter_240420_2-3978ff.o
vtable for boost::wrapexcept<boost::math::evaluation_error> in Twitter_240420_2-3978ff.o
vtable for boost::math::evaluation_error in Twitter_240420_2-3978ff.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::find(char, unsigned long) const", referenced from:
boost::multiprecision::backends::cpp_dec_float<170u, long long, void>::rd_string(char const*) in Twitter_240420_2-3978ff.o
boost::multiprecision::backends::cpp_dec_float<170u, long long, void>::rd_string(char const*) in Twitter_240420_2-3978ff.o
boost::multiprecision::backends::cpp_dec_float<170u, long long, void>::rd_string(char const*) in Twitter_240420_2-3978ff.o
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-96x96.48689391.png" integrity=
@terasakisatoshi
terasakisatoshi / Stunning notebook.html
Created February 14, 2024 22:45
Studying discrete-time dynamical systems
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-96x96.48689391.png" integrity=
@terasakisatoshi
terasakisatoshi / Small invention.html
Last active February 13, 2024 23:22
Nice orbits
This file has been truncated, but you can view the full file.
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.19.36/frontend-dist/favicon-96x96.48689391.png" integrity=
@terasakisatoshi
terasakisatoshi / Cargo.toml
Last active January 31, 2024 01:09
変分モンテカルロ法で遊ぶ(色々直した版)
[package]
name = "vmc"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rand = "0.8"
rand_distr = "0.4.3"
@terasakisatoshi
terasakisatoshi / main_vmc.f90
Last active January 5, 2024 05:08
main_vmc.f90
! gfortran -O3 -Wall -std=f2008 main_vmc.f90 && time ./a.out
module vmc
use, intrinsic :: iso_fortran_env, only: dp => real64
implicit none
private