Skip to content

Instantly share code, notes, and snippets.

View masuday's full-sized avatar

Yutaka Masuda masuday

View GitHub Profile

Fixed-length text format

  • perl -lane 'BEGIN{$,="\t"} @x=unpack('A9A9A9'); print $x[0],$x[1],$x[2]' file
@masuday
masuday / R.md
Last active September 13, 2023 12:02

R with MKL

Environment

  • AlmaLinux 8.8
  • OneAPI 2023.1 (with ifort and MKL)
# Activate ifort & MKL on bash
$ . /opt/intel/oneapi/setvars.sh
@masuday
masuday / random_number.md
Last active February 6, 2020 00:27
PRNG API

Basic random number generators

Language Basic function Kind Range Open/Close
Fortran random_number() real32/64 [0,1) N/A
C rand() integer [0,RAND_MAX] N/A
C++ uniform_real_distribution() real32/64 [a,b) N/A
Rust .gen() real64 [0,1) N/A
Go .Float64() and .Float32() real64 [0,1) N/A
.Net framework NextDouble() real64 [0,1) N/A
Solving environment: ...working... done
## Package Plan ##
environment location: c:\fresh_miniconda3
added / updated specs:
- jupyter