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 | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import sys | |
| import csv | |
| import json | |
| import shutil | |
| import subprocess | |
| from pathlib import Path |
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
| #!/bin/bash | |
| set -euo pipefail | |
| cd $(dirname $0) | |
| LOG_DIR="./log" | |
| LOG_NAME="build-log" | |
| ELOG_NAME="build-elog" | |
| LOG_FILE="${LOG_DIR}/${LOG_FILE}" | |
| ELOG_FILE="${LOG_DIR}/${ELOG_FILE}" | |
| if [ ! -d "$LOG_DIR" ]; then |
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
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <math.h> | |
| #include <time.h> | |
| int fast_approx_log10(float x, uint32_t C_offset, uint32_t C_mult) { | |
| uint32_t X = *(uint32_t*)&x; | |
| uint64_t diff = (uint64_t)X - C_offset; | |
| uint32_t shift = (uint32_t)((diff * C_mult) >> 32); |
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
| " ================================================================================ | |
| " 基本設定 | |
| " ================================================================================ | |
| " リーダーキーの設定 | |
| let mapleader = " " | |
| " ================================================================================ | |
| " IdeaVim 基本オプション | |
| " ================================================================================ |
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
| { | |
| "claude_code_permissions": { | |
| "version": "1.0", | |
| "description": "CLAUDE Code execution permissions for safe code development", | |
| "categories": { | |
| "SAFE": { | |
| "description": "Commands that are safe to run in development contexts", | |
| "auto_allow": true, | |
| "commands": [ | |
| "ls", "cat", "head", "tail", "grep", "find", "which", "type", "file", "stat", |
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
| { | |
| "claude_git_permissions": { | |
| "version": "1.0", | |
| "description": "CLAUDE Code Git execution permissions for safe Git operations", | |
| "categories": { | |
| "SAFE": { | |
| "description": "Git commands that are safe for read-only operations and basic development", | |
| "auto_allow": true, | |
| "commands": [ | |
| "git help", "git version", "git --version", |
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
| powershell.exe -NoExit -Command " $ENV:FORCE_CMAKE='1'; $ENV:CMAKE_ARGS='-DGGML_CUDA=on'; &{Import-Module """C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"""; Enter-VsDevShell 4a9b1b4f -SkipAutomaticLocation -DevCmdArguments """-arch=x64 -host_arch=x64"""}" |
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
| $plc = $MyInvocation.MyCommand.Path | |
| function global:SelfSign-Script { | |
| param( | |
| [string]$MyPs1 | |
| ) | |
| if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("Administrators")) { | |
| Start-Process -Verb RunAs -FilePath "pwsh.exe" -ArgumentList "-ExecutionPolicy", "RemoteSigned", "-NoProfile", "-NoExit", "-Command", "$plc;", "SelfSign-Script $MyPs1", ";Read-Host -Prompt 'Press Enter to exit'", ";exit" | |
| } |
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 logging | |
| from colorama import init, Fore, Back | |
| init(autoreset=True) | |
| class ColorFormatter(logging.Formatter): | |
| COLORS = { | |
| "WARNING": Fore.RED, | |
| "ERROR": Fore.RED + Back.WHITE, |
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
| Get-ChildItem -Path . -Recurse -Filter "*.ts" | ForEach-Object { | |
| $tmp = $_.FullName -replace "\.ts$", ".mp4" | |
| $bitrate = ffprobe -v error -select_streams v:0 -show_entries format=bit_rate -of default=noprint_wrappers=1:nokey=1 "$_" | |
| if ([string]::IsNullOrEmpty($bitrate)) { | |
| $bitrate = "2000000" # default: 2mbps | |
| } | |
| Write-Output "変更ファイル:$($_.BaseName)" | |
| Write-Output "ビットレート:$bitrate" | |
| # 1パス目 | |
| ffmpeg -v error -stats -i "$_" -c:v hevc_nvenc -preset slow -b:v 0 -pass 1 -an -f null /dev/null |
NewerOlder