Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / README.md
Last active June 26, 2017 16:24
ACM-ICPC OB/OG の会 2017年度 模擬国内予選
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 / 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.
@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 / 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 / queue_test.go
Created January 25, 2017 18:08
type assertion is too slow
package main
import (
"testing"
"errors"
)
var (
ErrQueueEmpty = errors.New("Queue is empty")
)
@arosh
arosh / main.go
Created December 18, 2016 07:14
image server
package main
import (
"net/http"
"log"
"runtime/debug"
"io/ioutil"
"strconv"
)
@arosh
arosh / main.go
Last active December 17, 2016 17:13
goroutine cancel
package main
import (
"fmt"
"time"
)
func main() {
cancel := make(chan struct{})
go func() {