This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
論理クイズ(https://kuizy.net/user/Noir_KUS)のソルバー | |
""" | |
from typing import Callable, Sequence | |
class State: | |
""" | |
マルバツ全10問に対する答えの、ひとつの組み合わせ表現するimmutableなオブジェクト. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf8 -*- | |
import optparse | |
import sys | |
from contextlib import closing | |
import yaml | |
import jinja2 | |
from openpyxl import load_workbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ansible 'lineinfile' like function in Shell Script. | |
# Works on both Bash and Zsh. | |
function lineinfile(){ | |
if [[ $# != 3 ]];then | |
local THIS_FUNC_NAME="${funcstack[1]-}${FUNCNAME[0]-}" | |
echo "$THIS_FUNC_NAME - 3 arguments are expected. given $#. args=[$@]" >&2 | |
echo "usage: $THIS_FUNC_NAME PATTERN LINE FILE" >&2 | |
return 1 | |
fi |
OlderNewer