Skip to content

Instantly share code, notes, and snippets.

View nwtgck's full-sized avatar
:octocat:
Feel free to make my English natural by native speakers

Ryo Ota nwtgck

:octocat:
Feel free to make my English natural by native speakers
View GitHub Profile

Keybase proof

I hereby claim:

  • I am nwtgck on github.
  • I am nwtgck (https://keybase.io/nwtgck) on keybase.
  • I have a public key ASCVjBOylZl2feq-9k_stMOgvRwSEdNUVOhuMr6R0ELlXgo

To claim this, I am signing this object:

@nwtgck
nwtgck / install_docker_for_ubuntu16.sh
Last active August 7, 2019 12:46
Install docker for Ubuntu16
#! /bin/sh -x
# (from: https://soralab.space-ichikawa.com/2017/04/docker-ce-install/)
sudo apt-get update
sudo apt-get install -y\
apt-transport-https \
ca-certificates \
curl \
software-properties-common
#! /bin/sh
# (from: https://qiita.com/mochizukikotaro/items/ae7ae1461ea4bf495bd0)
VERSION=1.23.1
sudo curl -L "https://github.com/docker/compose/releases/download/$VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo docker-compose -v
#! /bin/sh
# Backup purpose
docker images --format="container:{{.Repository}}:{{.Tag}}" | sed 's/container://g' | grep -v "<none>"
<script>
document.write(location.href.length);
</script>
import scala.collection.mutable
trait Memorized[T,R] {
val cache = new mutable.HashMap[T,R]
def cacheOrApply( t:T )( f: => R ): R = cache.getOrElse(t, {
val rv = f
cache += t -> rv
rv
})
}
@nwtgck
nwtgck / README.md
Last active October 24, 2018 15:55
Othello Game Tree

Othello Game Tree

def mit_license(year, person_name)
<<EOS
MIT License
Copyright (c) #{year} #{person_name}
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell