Skip to content

Instantly share code, notes, and snippets.

View MozyOk's full-sized avatar
😆
My Brain is Open!

Mozy Okubo MozyOk

😆
My Brain is Open!
View GitHub Profile
@MozyOk
MozyOk / consoleТетрис
Last active December 8, 2017 05:31
コンソールテトリスのベース
setInterval(function() { color = Math.floor(Math.random() * 16777216).toString(16); console.clear();
console.log("%c■■■■■■■■■\n■■■■■■■■■\n■■■■■■■■■", "background-color: #" + color + ";color: #" + color + ";"); }, 1000);
@MozyOk
MozyOk / Gemfile
Created February 26, 2018 15:23
Gemfileの書き方  
source "https://rubygems.org"
# Gemfile
gem "chromedriver-helper"
@MozyOk
MozyOk / comp.rb
Created March 17, 2018 15:35
arrayにnilが入るときの処理がcleverでいい感じのコード
def comp(array1, array2)
array1.sort.map {|num| num ** 2} == array2.sort
rescue
false
end
@MozyOk
MozyOk / path.py
Created June 4, 2018 16:12
スクリプト実行ディレクトリを絶対パスで取得
PATH = os.path.dirname(os.path.realpath(__file__))
@MozyOk
MozyOk / Description.md
Created June 4, 2018 16:27
python argument parser

ArgumentParser オブジェクト

class argparse.ArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=argparse.HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True)(原文)
新しい ArgumentParser オブジェクトを生成します。すべての引数はキーワード引数として渡すべきです。各引数についてはあとで詳しく説明しますが、簡単に言うと:
add_help - -h/--help オプションをパーサーに追加する (デフォルト: True)
allow_abbrev - 長いオプションが先頭の 1 文字に短縮可能 (先頭の文字が一意) である場合に短縮指定を許可する。(デフォルト: True)

などなど。 つまりは

@MozyOk
MozyOk / memo.txt
Created June 5, 2018 03:14
Introduction To Deep Learning Business Applications for Developers
Introduction To Deep Learning Business Applications for Developers
Intro
The Book give a short survey of the state-of-the-art algorithms of the whole field of deep leaning
- recommendation system
- natural language proessing
- language translation model with RNN
- financial risk assessment
@MozyOk
MozyOk / myfirstapp.kt
Created June 5, 2018 13:14
my first kotlin Function
fun main(args: Array<String>) {
println("Hello World")
println("Kotlin is Grate")
println("80 /10")
}
@MozyOk
MozyOk / myfirstapp.kt
Created June 5, 2018 15:21
明示的な型指定ができるのね
fun main(args: Array<String>) {
println("Hello World")
var age: int = 10
var msg: String = "Hello"
var isAlive: Boolean = true
}
@MozyOk
MozyOk / docker-all-remove.sh
Created June 11, 2018 07:42
手元のコンテナとイメージを全て吹き飛ばす魔法の言葉
docker ps -aq | xargs docker rm -f && docker images -aq | xargs docker rmi -f
@MozyOk
MozyOk / chrome
Created June 11, 2018 10:21
chrome prerenderの確認ができる
chrome://net-internals/#prerender