Skip to content

Instantly share code, notes, and snippets.

View Ishotihadus's full-sized avatar

Ishotihadus Ishotihadus

View GitHub Profile
@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 June 3, 2024 05:49
デフォルトの requirements.txt

Useful pip packages as default

Requirements

Python =~ 3.11

Install

pip install -U -r <(curl -L https://gist.githubusercontent.com/Ishotihadus/f88fe21b501dee1ff5a60e9c7512f811/raw/requirements.txt\?t=$(date +%s))
@Ishotihadus
Ishotihadus / .rubocop.yml
Last active May 17, 2024 16:00
いつも使ってる rubocop.yml
AllCops:
NewCops: enable
TargetRubyVersion: 3.3
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 June 29, 2024 06:50
ゴシップサイトブロッカーリスト 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
入試小説読んだ感想メーター
@Ishotihadus
Ishotihadus / custom.rule
Last active May 7, 2020 16:02
AquaSKK の設定 US キー向け
###
### custom.rule -- カスタム設定
###
la,ぁ,ァ,ァ
li,ぃ,ィ,ィ
lu,ぅ,ゥ,ゥ
le,ぇ,ェ,ェ
lo,ぉ,ォ,ォ
lka,ヵ,ヵ,カ
@Ishotihadus
Ishotihadus / eonkyo-trial
Last active November 17, 2019 16:41
e-onkyo の試聴をダウンロードするやつ。Usage: eonkyo-trial lacm14865
#!/usr/bin/env ruby
require 'json'
require 'net/http'
require 'shellwords'
require 'uri'
unless ARGV[0]
warn "usage: #{$0} RecordID [TrackNo] [Output]"
exit 1
end
@Ishotihadus
Ishotihadus / download.rb
Created October 7, 2019 11:08
デレマスのアレを全部ダウンロードするやつ
# frozen_string_literal: true
require 'net/http'
require 'uri'
def fetch(target, file)
query = URI.encode_www_form('mode' => 'dl', 'category' => 'character', 'target' => target)
uri = URI.parse('https://cinderella-mercari.idolmaster.jp/?' + query)
request = Net::HTTP::Get.new(uri)
request['Authority'] = 'cinderella-mercari.idolmaster.jp'
@Ishotihadus
Ishotihadus / Makefile
Last active September 27, 2019 11:34
macOS 用 64bit WaveSurfer の Makefile。r59 ベース。make osx-release すると release/ ディレクトリに dmg ファイルが作れる。ビルドしたやつ: https://www.dropbox.com/s/y0ibdwwhhl6blc7/wavesurfer-1.8.8p5_ishotihadus-osx64.dmg?dl=0
TCLSH = tclsh
PREFIX = /usr/local
TMP = /tmp/__wavesurfer_build
ROOT = $(shell pwd)
RUNTIME_win = $(ROOT)/build/kit/tclkit-8.5.8-win32.upx.exe
RUNTIME_linux = $(ROOT)/build/kit/tclkit-8.6.6-linux-i386-xcompile
RUNTIME_linux64 = $(ROOT)/build/kit/tclkit-8.6.6-linux-amd64
# for 32-bit OSX builds, uncomment these