This file contains hidden or 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
| def show_lockers(lockers, msg=None): | |
| if msg is not None: | |
| print('\n' + ('-' * 70) + f'\n{msg}\n' + ('-' * 70)) | |
| for j in range(0, 20): | |
| targets = [10 * j + i for i in range(1, 11)] | |
| print(' '.join([ | |
| f'{i:3d}:{"□" if lockers[i] else "■"}' | |
| for i in targets | |
| ])) | |
| print(f'開いているロッカーの数は: {sum(lockers.values())}\n') |
This file contains hidden or 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
| // NOTE: Requires the saku: protocol to be registered. | |
| // ==UserScript== | |
| // @name Open with saku: protocol | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2026-04-03 | |
| // @description Add a button to open this file with the saku: protocol. | |
| // @author CookieBox26 | |
| // @match file:///*.html | |
| // @grant none |
This file contains hidden or 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
| @import "/css/theme/evergreen/evergreen.css"; | |
| :root { | |
| --cb-steelblue: #4682b4; | |
| --cb-yellow: #f9e18b; | |
| --cb-yellowgreen: #b1eba1; | |
| --cb-font-family-header: 'M PLUS Rounded 1c', sans-serif; | |
| --cb-font-family-text: Armata, 'IBM Plex Sans JP', sans-serif; | |
| --cb-font-family-mono: 'JetBrains Mono', 'M PLUS 1 Code', monospace; | |
| --cb-color-text: #393939; | |
| } |
This file contains hidden or 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
| // NOTE: This script assumes the Google Slides UI is in English or Japanese. | |
| // Do not hover the mouse over the menu until the script finishes running. | |
| // ==UserScript== | |
| // @name Google Slides Snap to Grid | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2026-03-22 | |
| // @description When opening Google Slides, check "View -> Snap to -> Grid". | |
| // @author CookieBox26 | |
| // @match https://docs.google.com/presentation/* |
This file contains hidden or 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
| # [必須] mp4 を出力するフォルダを指定します | |
| # パスの最後にはスラッシュを付けてください | |
| # 空文字列にした場合この台本ファイルがあるフォルダに出力します | |
| out_dir = "" | |
| # [任意] BGM を指定します | |
| [bgm_settings] | |
| mp3_path = "" # BGM なしなら空文字列に | |
| adjust = -10 # BGM の音量調整 |
This file contains hidden or 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/bash | |
| # Creates .claude/settings.local.json and .claude/CLAUDE.md if they do not exist. | |
| # Args: target directory, setting file flag, prompt file flag | |
| # Ex. cld-ini.sh "`pwd`" "1Wb" "0" | |
| # Ex. cld-ini.sh "`pwd`" "1WrWb" "0" | |
| # Ex. cld-ini.sh "`pwd`" "1WrWb" "1" | |
| # Setting file flag: one of "0", "1", "1Wb", "1WrWb" ("0" means do not create). | |
| # Prompt file flag: "0" or "1" ("0" means do not create). Currently always generates Python rules. | |
| # Assumes prompt templates are stored under ~/.claude_templates/. | |
| set -euo pipefail # Fail fast on errors, undefined variables, and broken pipelines |
This file contains hidden or 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
| """ | |
| Python の schedule でタスクを定期実行するための便利クラス (遅刻・ダウンタイム・回数上限設定可) | |
| このクラスの使い方: https://qiita.com/CookieBox26/items/9334a4d0e701ebbf0cdb | |
| schedule ライブラリ: https://schedule.readthedocs.io/en/stable/index.html | |
| """ | |
| from abc import ABC, abstractmethod | |
| import schedule | |
| import time | |
| import datetime |
This file contains hidden or 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
| from bs4 import BeautifulSoup | |
| from pathlib import Path | |
| import requests | |
| import numpy as np | |
| import pandas as pd | |
| import time | |
| class JMADataDaily: | |
| def __init__(self, prec_no=51, block_no=47636, year=2025, month=12, suffix='_nagoya'): |
This file contains hidden or 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/bash | |
| # Ex. ./convexts.sh ./Dropbox/obsidian/Mercury/References/ | |
| set -euo pipefail # Fail fast on errors, undefined variables, and broken pipelines | |
| [ "$#" -eq 1 ] || { echo "Usage: $0 <target_dir>" >&2; exit 1; } | |
| target_dir=$1 | |
| [ -e "$target_dir" ] || { echo "Error: not found: $target_dir" >&2; exit 2; } | |
| cd "$target_dir" | |
| shopt -s nullglob # Make globs expand to empty when no files match | |
| li_txt=( *.txt ) |
This file contains hidden or 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
| """タスクバリデーションスクリプト | |
| Usage: python path/to/validate_tasks.py | |
| スクリプトの隣にある README.md 内のタスク一覧と Tasks/ 以下に作成済みのフォルダ一覧を比較して、 | |
| 以下に該当するタスクがあれば標準出力します。Python 標準モジュールのみ使います。 | |
| - README にあるが Tasks/ 以下に未作成 | |
| - Tasks/ 以下にあるが README に未管理 | |
| - 締切日まで0日を切っているが未完了 | |
| - 締切日まで3日を切っているが未着手 |
NewerOlder