$ ffmpeg -i ccbt_logo_h264.mp4 -vf 'scale=2250:4000:force_original_aspect_ratio=decrease,pad=2250:4000:(ow-iw)/2:(oh-ih)/2:color=white,setsar=1,format=yuv420p' -r 30 -c:v libx264 -profile:v high -level 5.1 -movflags +faststart -c:a aac -ar 48000 -ac 2 -b:a 192k vid_2250x4000.mp4
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/env python3 | |
""" | |
Excel embedded image extractor | |
Extracts all images embedded in an .xlsx/.xlsm workbook and saves them | |
into a folder structure: {file_name}/{sheet_name}/{image} | |
Key points: | |
- No external dependencies. Parses the .xlsx (ZIP) and OOXML parts directly. | |
- Maps images to sheets via drawing relationships. |
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
Param( | |
[Parameter(Mandatory = $true)] | |
[string]$GitHubAccount | |
) | |
# GitHub アカウントを環境変数 ORG に設定 | |
$env:ORG = $GitHubAccount | |
# gh CLI でリポジトリ一覧を取得し、JSON を PowerShell オブジェクトに変換 | |
$repoList = gh repo list $GitHubAccount --limit 1000 --json name | ConvertFrom-Json |
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 is_vanilla() -> bool: | |
import sys | |
return not hasattr(__builtins__, "__IPYTHON__") and "bpython" not in sys.argv[0] | |
def setup_history(): | |
import os | |
import atexit | |
import readline |
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
export default class JsonSummarizer { | |
public static summarize(input: { [key: string]: string | number }[]) { | |
// 結果を格納する辞書 | |
const result: { [key: string]: Map<string, number> } = {}; | |
// 入力を処理する | |
for (const obj of input) { | |
// オブジェクト内の各キーを処理する | |
for (const key in obj) { | |
// 結果辞書にキーが存在しない場合は新しい Map を作成する |
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
if [[ $(command -v svn) ]]; then | |
function get_subfolders() { | |
svn export $( echo $1 | sed -E 's/^(https:\/\/github.com\/[^/]+\/[^/]+\/)([^/]+\/[^/]+)(\/.+)$/\1trunk\3/' ) | |
} | |
fi |