Skip to content

Instantly share code, notes, and snippets.

@arosh
arosh / hello.js
Last active March 14, 2017 02:37
Promise sleep
function wait () {
return new Promise((resolve, reject) => {
setTimeout(resolve, 1000)
})
}
function foo (i) {
return new Promise((resolve, reject) => {
console.log(i)
resolve()
@arosh
arosh / gist:3f777066dfb0152d70c4
Last active April 9, 2017 08:25
go tutorial
package main

import (
  "fmt"
)

func main() {
  var total int = 0
  for n := 2; n <= 100; n++ {
@arosh
arosh / simple.ipynb
Created April 17, 2017 12:17
stan-aoj (1)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def stanfit_to_dataframe(fit, pars=None):
"""
Parameters
==========
fit : pystan.StanFit4model
"""
import pandas
summary = fit.summary(pars=pars)
columns = summary['summary_colnames']
index = summary['summary_rownames']
@arosh
arosh / README.md
Last active June 26, 2017 16:24
ACM-ICPC OB/OG の会 2017年度 模擬国内予選
@arosh
arosh / nginx.conf
Last active November 25, 2017 00:46
Nginx WebDAV
user www-data;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 10240;
}
http {
sendfile on;
@arosh
arosh / .bashrc
Last active February 13, 2018 03:58
Ubuntu Serverで最低限追記しておきたい設定
alias ls='ls -p --color=auto'
alias l='ls'
alias ll='ls -lFh'
alias la='ls -A'
alias lla='ll -A'
alias mv='mv -i'
alias cp='cp -i'
alias rmdir='rm -rf'
alias grep='grep --color=auto'
alias egrep='grep -E'
@arosh
arosh / off.html
Created February 27, 2018 07:04
Spring Seminar
<form action="on.html"><button type="submit" style="padding: 0.5em 1em; font-size: 18px; background-color: #4CAF50; color: #FFF; border: none;">OFF -&gt; ON</button></form>
@arosh
arosh / Bayes.md
Created October 8, 2018 12:04
楽しいベイズモデリングの誤植?
  • p.16 $\hat{R}&gt;1.1$$\hat{R}&lt;1.1$ の間違い?