This file contains hidden or 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
| # Unable to let Gemini 3.1 Pro to identify the vertices, angles and radii | |
| xv <- c(18, 203, 372, 360, 216, 150) | |
| xv <- c(xv, 0, -rev(xv)) | |
| yv <- c(-406, -244, -13, 137, 171, 302) | |
| yv <- c(yv, 400, rev(yv)) | |
| angles <- c(93, 170, 110, 219, 155, 252, 192, 293, 227, 259, 210, 297) | |
| angles <- c(angles, (180 - rev(angles) + 360) %% 360) | |
| radii <- c(19, rep(13, 10), 10) | |
| # modified the code generated with Gemini 3.1 Pro |
This file contains hidden or 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
| title: 日本語タイトル | |
| author: 榎本剛 | |
| date: 9 April 2024 | |
| format: | |
| pdf: default | |
| html: | |
| grid: | |
| margin-width: 350px | |
| reference-location: margin | |
| citation-location: margin |
This file contains hidden or 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
| CPPFLAGS+= -DTBB_INTERFACE_NEW=true | |
| LDFLAGS+= -ltbb -ltbbmalloc |
This file contains hidden or 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
| eps <- 0.622 | |
| calc.es <- function(T) { | |
| # WMO, JMA | |
| exp(19.482-4303.4/(T-29.65))*100 | |
| } | |
| pref <- 1e5 | |
| Rv <- 461 # J/K/kg | |
| gm <- 7/5 | |
| t <- 288 |
This file contains hidden or 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
| .SUFFIXES: | |
| .SUFFIXES: .o .f90 | |
| FC = gfortran12 | |
| LDLIBS = -lfftw3 | |
| LDFLAGS = -L/usr/local/lib | |
| FFLAGS = -O2 -I/usr/local/include | |
| SRCS = $(TARGET).f90 | |
| OBJS = $(SRCS:.f90=.o) | |
| TARGET = fftw_test |
This file contains hidden or 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
| eps <- 0.622 | |
| e2q <- function (e, p) { | |
| eps*e/(p-(1.0-eps)*e) | |
| } | |
| q2e <- function(q, p) { | |
| p*q/(eps+(1.-eps)*q) | |
| } |
This file contains hidden or 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
| import os | |
| import sys | |
| def decode_meta(rep): | |
| dd = rep[2][:2] | |
| hh = rep[2][2:4] | |
| lat = int(rep[6][2:]) * 0.1 | |
| lon = int(rep[7][1:]) * 0.1 | |
| meta = {"dd":dd, "hh":hh, "vessel":rep[4], "lon":lon, "lat":lat} |
This file contains hidden or 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 <cstdlib> | |
| #include <cstdio> | |
| #include <random> | |
| #include <chrono> | |
| int enzyme_dup; | |
| int enzyme_dupnoneed; | |
| int enzyme_out; | |
| int enzyme_const; |
This file contains hidden or 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
| tab10 <- c('#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf') | |
| tab10.new <- c('#5778a4', '#e49444', '#d1615d', '#85b6b2', '#6a9f58', '#e7ca60', '#a87c9f', '#f1a2a9', '#967662', '#b8b0ac') |
This file contains hidden or 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
| // C translation of https://www.nag-j.co.jp/fortran/coarray/code/quad1.f90 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| double rectangle_rule(double (*f)(double), double from, double to, int nstep) | |
| { | |
| double integral; | |
| double x1, x2, y, stepval; | |
| int i; |
NewerOlder