diff -r dirA dirB
diff -rq dirA dirB
import pandas as pd | |
import os | |
import datetime | |
# ------------------------------------------------- | |
EXIST_DATA_DIR = "data" | |
FULL_PATH = os.getcwd() | |
DATA_PATH = os.path.join(FULL_PATH, EXIST_DATA_DIR) | |
ALLOWD_EXTENSION = [".csv", ".txt"] | |
# ------------------------------------------------- |
echo $(git branch | grep "*" | sed -e "s/\* //") |
const interval = async (msFunc, callback, continueCond) => { | |
const _interval = async () => { | |
const sleepTime = msFunc(); | |
console.log("sleepTime: ", sleepTime); | |
await new Promise(resolve => { | |
setTimeout(resolve, sleepTime); | |
}); | |
if (continueCond()) { | |
callback(); |
const interval = async (ms, callback, continueCond) => { | |
const _interval = async () => { | |
await new Promise(resolve => { | |
setTimeout(resolve, ms); | |
}); | |
if (continueCond()) { | |
callback(); | |
await _interval(); | |
} |
const sleep = (ms) => { | |
setTimeout(() => undefined, ms); | |
}; | |
const intervalCount = (ms) => { | |
let counter = 0; | |
setInterval(() => { | |
console.log("[Info] count: ", counter) | |
counter++; | |
}, ms); |
const slowDownInterval = (ms, limit=10) => { | |
_slowDownInterval(ms, limit, 0); | |
} | |
const _slowDownInterval = (ms, limit, counter) => { | |
const sleepTimme = ms + (counter * 100); | |
if (limit > counter) { | |
setTimeout(() => { | |
console.log(`Interval: count => ${counter} ...`); | |
_slowDownInterval(ms, limit, counter + 1); |
" syntax support | |
syntax on | |
set nocompatible | |
set backspace=indent,eol,start | |
set tabstop=2 | |
set shiftwidth=2 | |
set number | |
set expandtab | |
set autoindent | |
set title |
# 都度都度、sleepさせてあげれば動作を再現することは可能 | |
# パフォーマンスについては未検証。他に良い方法があれば知りたい | |
defmodule GamePrintf do | |
@print_interval 100 | |
@punctuations ["。", "、", ",", "."] | |
def print(content) do | |
IO.puts("[Info] #{content}") | |
end |
defmodule SecretSanta do | |
def static_solver, do: static_member() |> _solver() | |
def random_solver, do: random_member() |> _solver() | |
defp _solver(lst) do | |
lst |> Enum.shuffle() |> print_result() | |
end | |
defp static_member, do: ["tomoya", "nagisa", "kyou", "ryou", "tomoyo", "kotomi"] | |
defp random_member, do: Enum.map(1..100, fn n -> "mr_#{n}" end) | |
defp template_print(from, to), do: IO.puts("#{from} => #{to}") |