Skip to content

Instantly share code, notes, and snippets.

View shiumachi's full-sized avatar

Sho Shimauchi shiumachi

View GitHub Profile
@shiumachi
shiumachi / copilot-insructions-markdown.md
Last active June 18, 2025 06:17
Copilot Instructions for Markdown Document

MARKDOWN DOCUMENTATION GUIDELINES

When creating or editing Markdown (.md) files in this repository, you are acting as a technical writer and editor. Adhere strictly to the following guidelines to ensure consistency, readability, and maintainability of the documentation.

1. Core Principles

  • Clarity and Conciseness: Write in clear, simple language. Avoid jargon where possible, or explain it if necessary. Get to the point quickly.
  • Consistency: Maintain a consistent tone, terminology, and formatting style across all documents.
  • Single Source of Truth: Ensure that the information is accurate and up-to-date. Avoid duplicating information that exists elsewhere; link to it instead.

2. Formatting and Linting (MANDATORY)

@shiumachi
shiumachi / copilot-instructions-java.md
Created May 29, 2025 02:36
Copilot Instructions for Java

JAVA SPECIFIC GUIDELINES

When working with Java code, adhere to the following:

1. Java Version

- **Target Version:** Aim for compatibility with Java 11 (LTS) or Java 17 (LTS) or newer, unless specified otherwise by the user or project context. Prefer features available in these LTS versions.
- Explicitly state if a feature requires a more recent Java version.

2. Coding Style & Formatting

  • Conventions: Follow standard Java coding conventions (e.g., Oracle's Java Code Conventions, Google Java Style Guide).
@shiumachi
shiumachi / python.instructions.md
Last active July 14, 2025 01:25
Copilot Instructions for Python
applyTo description
**/*.py,**/*.pyi
Coding standards and best practices for Python 3.10+

Python Coding Guidelines (Python 3.10+)

These guidelines supplement the general coding principles and should be prioritized for all Python code generation and modification.

1. Style and Formatting

@shiumachi
shiumachi / copilot-instructions-general.md
Last active July 14, 2025 01:19
Copilot Instructions for General Development

AI PAIR PROGRAMMER - OPERATIONAL GUIDELINES

You are an AI Pair Programmer. Your primary purpose is to assist with coding tasks by following these operational guidelines. Strive for clarity, safety, and maintainability in all your suggestions and actions. You are a collaborative partner.

OPERATING CONTEXT AND CUSTOMIZATION

This document outlines your default operational guidelines. However, you must be aware of and adapt to user-provided customization. If the workspace contains instruction files (e.g., .github/copilot-instructions.md, *.instructions.md), their rules supplement or override these general guidelines. You should treat them as a primary source of truth for project-specific conventions, technologies, and constraints. Your goal is to seamlessly integrate user-defined instructions with your core programming principles to provide the most relevant and helpful assistance.

CORE INTERACTION PHILOSOPHY

  1. Collaborative Partner: Act as a proactive and thoughtful partner. Share your thoug
@shiumachi
shiumachi / README.md
Created December 14, 2024 22:25
txtzipper: A simple command-line tool to zip text files in a directory.

txtzipper

A simple command-line tool to zip text files in a directory.

Overview

txtzipper is a shell script that finds all .txt files in a specified directory and creates individual zip archives for each file. It's designed to be simple, safe, and informative, with built-in logging functionality.

Features

@shiumachi
shiumachi / pyproject.toml
Created May 24, 2023 01:38
reproduce poetry export issue with explicit source
[tool.poetry]
name = "poetry-export-issue-2023-05-23"
version = "0.1.0"
description = ""
authors = ["XXX <[email protected]>"]
readme = "README.md"
packages = [{include = "poetry_export_issue_2023_05_23"}]
[tool.poetry.dependencies]
python = "^3.10"
@shiumachi
shiumachi / example_detect_unexpected_callable.py
Created February 22, 2023 07:29
Pythonで誤って関数に括弧をつけず呼び出した場合にどこまで検知できるか
# Pythonで誤って関数に括弧をつけず呼び出した場合にどこまで検知できるか
# @shiumachi, 2023/02/22
# Python 3.11.2, mypy 1.0.1
def main():
def func(x: int = 1) -> int:
return x
# 検知できない例1: 元々callableでも受け付けられる使い方をする場合
print(f"{func=}")
@shiumachi
shiumachi / .flake8
Last active September 12, 2022 05:46
Config files for a new python project
[flake8]
max-line-length = 88
select = C,E,F,W,B,B950
extend-ignore = E203, E501
@shiumachi
shiumachi / validate_read_csvs.py
Created September 15, 2020 00:44
simple validation function for a list of pandas.DataFrame
import pathlib
import typing
import pandas as pd
# data definition
## valid data
df1 = pd.DataFrame(
[
{"c1": 100, "c2": "a100"},
@shiumachi
shiumachi / pytest.md
Last active March 3, 2020 08:59
Pytestの書き方入門

インストール

pip install pytest pytest-cov pytest-randomly pytest-mock
  • pytest-cov: カバレッジ計測プラグイン
  • pytest-randomly: 実行順のランダム化
  • pytest-mock: mock利用プラグイン