Skip to content

Instantly share code, notes, and snippets.

View Gedevan-Aleksizde's full-sized avatar
⚔️

S-Katagiri Gedevan-Aleksizde

⚔️
View GitHub Profile
@Gedevan-Aleksizde
Gedevan-Aleksizde / cross-platform-font-test.R
Last active September 10, 2021 13:34
font embedding test in R graphics
require(tidyverse)
fonts_win = tibble::tribble(
~family, ~name, ~group, ~os,
"Yu Mincho", "游明朝", "明朝", "windows 10",
"游明朝", "游明朝", "明朝", "windows 10", # WSL
"BIZ UDMincho", "BIZ UD明朝", "明朝", "windows 10",
"BIZ UD明朝", "BIZ UD明朝", "明朝", "windows 10",
"BIZ UDPMincho", "BIZ UDP明朝", "明朝", "windows 10",
"BIZ UDP明朝", "BIZ UDP明朝", "明朝", "windows 10",
# Auto generated file - do not change manually
# setWorkingDirToProjectDir
setWorkingDirToProjectDirLabel = プロジェクトのディレクトリを作業ディレクトリにする
setWorkingDirToProjectDirButtonLabel =
setWorkingDirToProjectDirMenuLabel = プロジェクトのディレクトリへ(_P)
setWorkingDirToProjectDirDesc = プロジェクトのルートディレクトリを作業ディレクトリにする
# setWorkingDirToActiveDoc
setWorkingDirToActiveDocLabel = Set Working Directory to Current Document's Directory
setWorkingDirToActiveDocButtonLabel =
#! /usr/bin/env bash
sudo apt install -yqq ./rstudio.deb
MKRUNUSERDIR_PATH="/usr/sbin/wsl-user-mk-runuserdir"
set -e
cat > ${MKRUNUSERDIR_PATH} << \EOF
### User runtime dir
# Executed as part of 00-wsl-user-env.sh
RUNUSER_DIR="/run/user"
@Gedevan-Aleksizde
Gedevan-Aleksizde / pop.pdf
Last active October 22, 2020 15:38
有限母集団のやつ
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
pacman::p_load_gh("uribo/fgdr", "franapoli/pbarETA")
pacman::p_load(sf, raster, tabularaster, tidyverse, broom, ggthemes, plotly, Metrics)
plot_surface <- function(mat) plot_ly(x=mat[, 1], y=colnames(mat), z=mat[, -1]) %>% add_surface()
options(pillar.sigfig = 10)
list_xml <- list.files("data", pattern="FG-GML-5133-36.+DEM5.+.xml", full.names=T)
pb <- txtProgressBar(min=2, max=length(list_xml), style=3, char="█", width=getOption("width") - 30)
source <- list()
for(i in 1:length(list_xml)){
require(rstan)
require(bayesplot)
require(ggplot2)
require(ggthemes)
require(patchwork)
require(tidyverse)
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())
#### rstan でモデルをコンパイルしサンプリング ####
---
title: "benchmark"
author: "ill-identified"
output:
pdf_document: default
html_document: default
---
## JIT 有効になってるとこれの結果が変わるかを検証
require(tidyverse) # ver. 1.2.1
require(CARBayes) # ver. 5.0
require(sf) # ver. 0.6-3
require(ggplot2) # ver. 3.0.0
require(ggthemes) # ver. 4.0.0
require(ggmcmc) # ver. 1.1
rmse <- function(y, pred){
return(sqrt(mean((y - pred)^2)))
}
@Gedevan-Aleksizde
Gedevan-Aleksizde / heatmap.R
Created July 22, 2018 16:15
気象庁からダウンロードした気温データでヒートマップ作成する
require(tidyverse)
require(ggthemes)
require(rjson)
require(jsonlite)
# 参考
# https://www.data.jma.go.jp/gmd/risk/obsdl/index.php
# https://www.data.jma.go.jp/gmd/risk/obsdl/top/help3.html#hukajoho
# https://twitter.com/mehori/status/1020644999703089152
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.