Skip to content

Instantly share code, notes, and snippets.

@kokimiza
kokimiza / invoice.typ
Created March 5, 2026 02:34
The core template logic. Features a layout driven by the Golden Ratio (phi), MECE-based status management (Issue Type, Document Phase, Settlement), and dynamic typography contrast.
// --- 定数・カラー定義 ---
#let phi = 1.618
#let primary-navy = rgb("#111827")
#let secondary-gray = rgb("#4b5563")
#let bg-gray = rgb("#f9fafb")
#let alert-red = rgb("#b91c1c")
#let success-green = rgb("#10b981")
#let proforma-blue = rgb("#0ea5e9")
// --- ヘルパー関数 ---
@kokimiza
kokimiza / financialCloseFinalReport.md
Last active February 16, 2026 01:08
Monthly financial close finalization workflow with IFRS compliance, audit trail controls, and batch processing specifications

月次決算確報作成規程


第1章 はじめに

1.1 目的

本規程は、企業活動に伴い発生する経済事象を発生日基準で完全に捕捉し、適用会計基準に準拠した評価・表示処理を実施したうえで、財務情報としての再現性および監査可能性を保証した状態で確定させることを目的とする。

@kokimiza
kokimiza / mastermind_par_estimator.rs
Last active February 9, 2026 02:03
Non-Adaptive Mastermind PAR Estimator in Rust Estimates the average number of guesses (Perfect-Information Average, PAR) required to solve a Mastermind code using information-theoretic principles.
use rand::Rng;
use rand::RngExt;
use rand::prelude::IndexedRandom;
use rayon::prelude::*;
use std::collections::HashMap;
use std::env;
use std::time::Instant;
// =====================
// モデルパラメータ
// =====================
@kokimiza
kokimiza / yokanParty.hs
Created January 7, 2026 14:01
This program solves the problem of dividing a rectangular jelly into K+1 pieces using N cuts to maximize the length of the shortest piece.
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeApplications #-}
import qualified Data.ByteString.Char8 as BS
import Data.Char (isSpace)
import Data.List (foldl', unfoldr)
-- 最小ピース長が minSize 以上で k 個以上のピースに分割可能かをチェックする関数
isValidPartition :: Int -> [Int] -> Int -> Bool
isValidPartition minSize pieces k = count >= k