Skip to content

Instantly share code, notes, and snippets.

View astronasutarou's full-sized avatar

Ryou Ohsawa astronasutarou

View GitHub Profile
@holazt
holazt / Docker CE on Linux Mint 18.1
Created April 13, 2017 08:27
Docker CE on Linux Mint 18.1
Here are the instructions to installing Docker CE on Linux Mint 18.1 Serena.
Step1. `sudo apt-get install apt-transport-https ca-certificates curl software-properties-common`
Step2. `curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -`
The following line in the SOURCE automatically determines the distribution, which is Serena,
but there are no Linux Mint packages for Docker. You have to change it to the matching Ubuntu distribution.
FYI Linux Mint Serena is based on Ubuntu 16.04 Xenial.
@MatsuuraKentaro
MatsuuraKentaro / 0-replica-exchange-mcmc.R
Last active December 17, 2020 02:21
replica exchange MCMC
library(rstan)
library(doParallel)
replica.exchange.mcmc <- function (inv_T, n_ex, stanmodel, data, par_list, init, iter, warmup) {
n_rep <- length(inv_T)
len <- iter - warmup
n_param <- sum(unlist(lapply(par_list, prod))) + 2 # number of parameters included E and lp__
ms_T1 <- matrix(0, len*n_ex, n_param) # MCMC samples at inv_T=1
idx_tbl <- matrix(0, n_ex, n_rep) # index table of (exchange time, replica)
E_tbl <- matrix(0, n_ex, n_rep) # E table along idx_tbl
@lukas-h
lukas-h / license-badges.md
Last active June 25, 2024 11:34
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@Akiyah
Akiyah / jibanyan_equation
Created November 12, 2014 00:28
jibanyan_equation
jibanyan_equation <- function(x,y) {
min(max(min(1-(x/108)^2-(y/94)^2,y),min(1-((abs(x)-119)/103)^2-((y-56)/86)^2,1-((abs(x)-15)/77)^2-((y-119)/100)^2),1-((abs(x)-42)/66)^2-(y/55)^2,min(55+y,51-abs(x),-y)),3*abs(y-100)-2*(x-75)) *
min(min(max(min(1-(x/106)^2-(y/92)^2,y),min(1-((abs(x)-119)/101)^2-((y-56)/84)^2,((abs(x)-99)/40)^2+((y-54)/86)^2-1,92-abs(x)),1-((abs(x)-42)/64)^2-(y/53)^2),min(((abs(x)-52)/26)^2+((y+28)/26)^2-1,((abs(x)-51)/13)^2+(y/13)^2-1,max(abs(x)-51,y))),abs(x/51+10/51*sin(abs(y/61.2)^(1.2)*pi*(7/2)))^(2/3)+abs(y/61.2)^(2/3)-1) *
min(1-(x/32)^2-((y+30)/32)^2,1-((abs(x)+5)/22)^2-((y-18)/22)^2) *
min(1-((abs(x)-18)/20)^2-((y+10)/20)^2,((abs(x)-20)/22)^2+((y+7)/20)^2-1) *
(1-((abs(x)-51)/11)^2-(y/11)^2)
}
x <- seq(-150, 150, length=400)
z <- outer(x,x, Vectorize(jibanyan_equation))