Skip to content

Instantly share code, notes, and snippets.

View shotadft's full-sized avatar
💭
School Report And Work Report. I has overwork?

Shotadft shotadft

💭
School Report And Work Report. I has overwork?
View GitHub Profile
@shotadft
shotadft / pokelist.js
Last active April 12, 2026 11:36
Obsidian DataviewJS用に書いたヤツ。使用する際は必ずコメントを見てください(見ずに利用することを禁じます)。
/*
(C)2026 Pokémon. (C)1995-2026 Nintendo/Creatures Inc./GAME FREAK inc.
ポケットモンスター・ポケモン・Pokémonは任天堂・クリーチャーズ・ゲームフリークの商標です。
================================================================================
Author: Shotadft
GitHub: https://github.com/shotadft
Gist: https://gist.github.com/shotadft/5f2aee36cc14c177d84ed4590b8c49b4
@shotadft
shotadft / bin2bmp.py
Created September 26, 2025 15:36
バイナリをBMP形式の画像に変換するだけの関数。https://x.com/McDonaldsJapan/status/1971530192137990518 解読の為に作った
from PIL import Image
import numpy as np
def binary_to_image(bin: str, width: int, height: int):
data = np.array([int(b) * 0xFF for b in bin], dtype=np.uint8)
out = np.pad(data, (0, (width * height) - len(data)), 'constant')
img = Image.fromarray(out.reshape((height, width)))
return img
@shotadft
shotadft / logger.py
Last active July 7, 2025 15:29
超汎用的なロガークラス
from enum import Enum
class Color(Enum):
RESET = "\033[0m"
RED = "\033[31m"
YELLOW = "\033[33m"
GREEN = "\033[32m"
BLUE = "\033[34m"
@shotadft
shotadft / createDesktopSC.hpp
Last active January 8, 2025 08:01
デスクトップにショートカットを作るだけのプログラムです。 (要C++ 17以上)(要最適化)
/**
* @file createDesktopSC.h
* @brief The additional stringEx type extends the string type and adds various functions.
* @author Shotadft
* @license MIT License, Copyright 2024 Shotadft.
* @date 2024:08:03::20:35
*/
#ifndef CREATE_DESKTOPSC_H
#define CREATE_DESKTOPSC_H
@shotadft
shotadft / stringEx.hpp
Last active January 8, 2025 08:00
C++のstring型にC#のstring型関連の関数をstringEx型として追加します。(要C++ 17以上)(未完成)
/**
* @file stringEx.h
* @brief The additional stringEx type extends the string type and adds various functions.
* @author Shotadft
* @license MIT License, Copyright 2024 Shotadft.
* @date 2024:08:03::13:03
*/
#ifndef STRING_EX_H
#define STRING_EX_H