Skip to content

Instantly share code, notes, and snippets.

View Ishotihadus's full-sized avatar

Ishotihadus Ishotihadus

View GitHub Profile
@Ishotihadus
Ishotihadus / generate_keybindings.rb
Last active October 29, 2025 12:22
Windows 版 VSCode のショートカットキーを Mac 版とほぼ同じにするスクリプト 生成された keybindings.json を追加する 詳細: https://note.com/ishotihadus/n/ne1171989949a
# frozen_string_literal: true
require 'json'
require 'net/http'
@key_map = {}
# ターミナル用に機械的に生成したもの
@ascii_arrays = [['shift', '2'], ['a'], ['b'], ['c'], ['d'], ['e'], ['f'], ['g'], ['h'], ['i'], ['j'], ['k'], ['l'],
['m'], ['n'], ['o'], ['p'], ['q'], ['r'], ['s'], ['t'], ['u'], ['v'], ['w'], ['x'], ['y'], ['z'],

AGENTS.md

You are an expert programmer with extensive knowledge of language features and libraries. The user is also an experienced programmer and is expected to understand the code regardless of the algorithms or libraries used. Write the code as an expert for expert readers.

Implement the user's instructions with the definitely minimal necessary change, and never do anything not requested.

Note that the user may be editing the code. Everytime you modify the code, always verify the current contents before proceeding.

@Ishotihadus
Ishotihadus / _usage.py
Last active September 19, 2025 05:30
A GPU-friendly wrapper of USM in Google Gemma 3n
# sudo apt install libsox-dev
# mkdir -p ~/.cache/huggingface && echo 'hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' > ~/.cache/huggingface/token
# uv run --with "transformers,torch,torchaudio<2.9" python
import torchaudio
from google_usm import USMWrapper
usm = USMWrapper("google/gemma-3n-E4B")
wav, sr = torchaudio.load("VOICEACTRESS100_001.wav")
@Ishotihadus
Ishotihadus / qq
Last active October 23, 2025 05:34
qsub をラクにするやつ qq -P group run.sh arg1 arg2 ...
#!/usr/bin/python3
import os
import shlex
import subprocess
import sys
from datetime import datetime
from pathlib import Path
options = []
@Ishotihadus
Ishotihadus / example.sh
Last active December 27, 2023 02:19
ABCI のバッチジョブを 1 行で投げるやつ(zsh 用)
qs -l USE_SSH=1 -l rt_F=1 -l h_rt=72:00:00 -g gax12345 'module load cuda/12.3 cudnn/8.9 && python train.py'
@Ishotihadus
Ishotihadus / README.md
Last active February 14, 2025 02:30
デフォルトの requirements.txt

Useful pip packages as default

Requirements

Python =~ 3.11

Install

pip install -U -r &lt;(curl -L https://gist.githubusercontent.com/Ishotihadus/f88fe21b501dee1ff5a60e9c7512f811/raw/requirements.txt\?t=$(date +%s))
@Ishotihadus
Ishotihadus / .rubocop.yml
Last active January 21, 2025 02:12
いつも使ってる rubocop.yml
AllCops:
NewCops: enable
TargetRubyVersion: 3.4
Metrics/AbcSize:
Max: 170
Metrics/BlockLength:
Max: 250
@Ishotihadus
Ishotihadus / base32.rb
Last active April 21, 2022 03:26
Fast Base32 Implementation in Pure Ruby
module Base32
TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'
TABLE_REVERSE = Array.new(256)
TABLE.each_byte.with_index{|c, i| TABLE_REVERSE[c.ord] = i}
TABLE_REVERSE.freeze
PADDING = [0, 0, 0, 0, 0].pack('C*').freeze
def self.encode32(str, padding: false)
bytes = String.new(str, encoding: Encoding::ASCII_8BIT)
bytesize = bytes.bytesize
@Ishotihadus
Ishotihadus / gist:eb9b6fbe8953e311ec526275e6ec2c26
Last active April 10, 2025 02:10
ゴシップサイトブロッカーリスト https://chrome.google.com/webstore/detail/mjojhcmecfehllhcjcbhkkpohadogplk / ゴミカスな検索引っかかりまくるサイトがあれば自由にコメントしてください。私怨あり。
.*\\.pacificabahai\\.org regexp soft
.*\\.uwenku\\.com regexp soft
(.\+\\.)?gamedbs\\.jp regexp soft
(.\+\\.)?pinterest\\.[a-z]\+ regexp soft
(.\+\\.)?stackovernet\\.com regexp soft
4answered.com soft
android.developreference.com soft
askdev.info soft
askjapan.me soft
atmarkit.itmedia.co.jp soft
@Ishotihadus
Ishotihadus / memo.md
Last active June 23, 2021 14:34
入試小説読んだ感想メーター