Skip to content

Instantly share code, notes, and snippets.

View nomutin's full-sized avatar
🦭

Nomura Yuta nomutin

🦭
View GitHub Profile
# terminal
shell-integration = bash
term = xterm-256color
# appearance
theme = carbonfox
background-opacity = 0.9
cursor-style-blink = false
window-padding-x = 8
window-padding-y = 8
import re
import re._parser as sre_parse # type: ignore[import-not-found]
import string
from random import SystemRandom
from re._constants import MAXREPEAT # type: ignore[import-not-found]
from typing import Any, cast
STAR_PLUS_LIMIT = 10
RANDOM = SystemRandom()
WORD_CHARS = string.ascii_letters + string.digits + "_"
-- ====== OPTIONS ======
vim.loader.enable()
vim.g.mapleader = " "
vim.opt.title = true
vim.opt.termguicolors = true -- ターミナルの色を24ビットカラーに設定
vim.opt.completeopt = { "menuone", "noselect" } -- 補完メニューを表示し、自動で選択しない
vim.opt.ignorecase = true -- 検索時に大文字小文字を区別しない
vim.opt.pumheight = 10 -- ポップアップメニューの高さを10行に設定
vim.opt.showtabline = 2 -- タブラインを常に表示
vim.opt.smartcase = true -- 検索パターンに大文字が含まれている場合は大文字小文字を区別
@nomutin
nomutin / update_mp3_tags.py
Last active March 22, 2025 05:57
Update mp3 tags(album, artist, thumbnail, etc)
# copyright 2023 nomutin
"""
Update mp3 tags(album, artist, thumbnail, etc).
Usage
-----
```bash
curl -s https://gist.githubusercontent.com/nomutin/0b5f87bfc2768f699625e1d01070430c/raw -o update_mp3_tags.py
uv run update_mp3_tags.py <direcotry> <artist>
```
"""
Save scripted pinpad data.
Usage
-----
Thanks to [uv](https://docs.astral.sh/uv/), we do not need to build an environment.
```bash
mkdir pinpad-collect && cd pinpad-collect
curl -s https://gist.githubusercontent.com/nomutin/1d9bcd39941d0b2b6df87fa8d71dab53/raw -o main.py
"""
Save & Process [Language-Table](https://github.com/google-research/language-table).
Usage
-----
Thanks to [uv](https://docs.astral.sh/uv/), we do not need to build an environment.
```bash
mkdir language_table && cd language_table
curl -s https://gist.githubusercontent.com/nomutin/f1983b9c9500353ce5dc073bcc749586/raw -o language_table_linux_x86_64.py
# Copyright (c) 2025, nomutin
"""
Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Codes modified from https://gist.github.com/chrisdiana/c71f224626b5b9516bdb
Resources
"""ConvLSTMCell from https://github.com/jrobine/smaller-world-models/blob/main/layers/convlstm.py."""
import math
from dataclasses import dataclass
import torch
from torch import Tensor, nn
__all__ = ["ConvLSTMCell"]