Skip to content

Instantly share code, notes, and snippets.

View koke2c95's full-sized avatar

名無しKさん koke2c95

View GitHub Profile
@koke2c95
koke2c95 / replaceRules.js
Last active January 6, 2024 10:35
逆行転生 Vtuber/くまプーさんホームランとはじめるリーグ運営 regexp
// https://github.com/erickRecai/Replace-Text
// なろう・カクヨム閲覧設定
let replaceRules = [
// voicevox
//[/[A-za-z]{4,}/g,""],
//[/[A-Z]([a-z]+ )+[a-z]+/g,""],
[/[A-Z]([a-z]+ [A-Z]?)+[a-z]+/g,"英語"],
[/ーー/g,""],[/w/g,"w"],[/゛/g,""],
@koke2c95
koke2c95 / script.js
Last active November 29, 2023 07:51
なろう情報入り込む
// ==UserScript==
// @name なろう情報入り込む
// @namespace Violentmonkey Scripts
// @match https://ncode.syosetu.com/n*
// @exclude https://*.syosetu.com/n*/*/
// @grant none
// @version 1.0
// @author -
// ==/UserScript==
@koke2c95
koke2c95 / merge_qlora_with_quantized_model.py
Created August 26, 2023 10:44 — forked from ChrisHayduk/merge_qlora_with_quantized_model.py
Merging QLoRA weights with quantized model
import torch
import peft
import json
import shutil
from peft.utils import _get_submodules
import os
import bitsandbytes as bnb
from bitsandbytes.functional import dequantize_4bit
from peft import PeftModel
from transformers import AutoModelForCausalLM, LlamaForCausalLM, LlamaTokenizer, BitsAndBytesConfig, CodeLlamaTokenizer
@koke2c95
koke2c95 / semantic_search_with_gzip.py
Created July 15, 2023 11:31 — forked from kyo-takano/lexical_search_with_gzip.py
Semantic Search with gzip (gzipによるセマンティック検索)
import gzip
def gzip_search(query: str, candidate_chunks: list[str], top_k: int=1):
"""
文字列ベースで類似したテキストチャンクを推定するアルゴリズム.
`query`, `chunk`, および`query + " " + chunk`をそれぞれgzipで圧縮し、編集距離のようなものをベースに評価する.
Parameters:
query (str): 検索クエリとして使用する文字列.
top_k (int, optional): 返される類似チャンクの上位k個を指定する (default: 1).
title year
1/11 じゅういちぶんのいち 2018
10DANCE 2018
1518! イチゴーイチハチ! 2018
1518! イチゴーイチハチ! 2019
1日外出録ハンチョウ 2018
2.5次元の誘惑 2022
30歳まで童貞だと魔法使いになれるらしい 2020
30歳まで童貞だと魔法使いになれるらしい 2022
ACMA:GAME 2018
@koke2c95
koke2c95 / cap.py
Last active October 7, 2023 07:27
sft example : animes image align human caps following anime visual knowledge
texts = [
"flat 2d demonstrate a chibi toutetsu_yuuma attacking pudding with oversized spork in colored simple comic say motion line and sound effect",
"a anniversary poster show hatsune miku in a vocaloid parody senbonzakura as shrine miko cosplay Inspired designs with face to right dynamic pose",
"cute chibi art of umamusume hugging sleeping bow banana shaped dakimakura in simple background",
"light rkgk art of vanilla style alice wonderland, maid outfit girl holding many balloon with plush rabbit on right",
"character symbol rkgk of a complex pose cat girl in taisho maid outfit with tayaki red tea in the air",
"character symbol rkgk of a complex throwing vintage book girl in taisho maid outfit with blue petals",
"wide up body crop of decorated wedding complex pose girl facing to camera in the centre of frame",
"old rkgk to_heart of leg croped cat girl in a serafuku with skirt removed",
"hard realistic shadow fan level art of a girl happy play with bird under a tree",
@koke2c95
koke2c95 / imagenet_class_index.json
Created May 16, 2022 04:46 — forked from PonDad/imagenet_class_index.json
imagenetのラベルを日本語化するjsonです。
[
{
"num": "n01440764",
"en": "tench",
"ja": "テンチ"
},
{
"num": "n01443537",
"en": "goldfish",
"ja": "金魚"
#!/usr/bin/env python3
"""Classifier-free guidance sampling from a diffusion model."""
import argparse
from functools import partial
from pathlib import Path
from PIL import Image
import torch
@koke2c95
koke2c95 / animation.md
Last active April 2, 2022 23:09
アニメの制作支援メモ, アニメ制作素材/中間素材/中間生産物/中間制作物の研究者向け

アニメリトルウィッチアカデミア2013絵コンテ等データを研究に活用

TRIGGER制作アニメの制作素材データ/中間素材データ/中間生産物データ/中間制作物データをアカデミア研究者向けに提供開始

https://www.nii.ac.jp/news/release/2022/0315.html

Little Witch Academia (2013) 1 episodes 26 mins, animenewsnetwork

not the (2015 Kickstarter campaign) or (2017 television animation Little Witch Academia 25 episodes)

the dataset is for develop new and improved methods and technique

@koke2c95
koke2c95 / shots.txt
Last active February 18, 2022 09:03
I organised shot statistics information from storyboard materials and various source this is anime Shot Detection/count GT
anime name, shot count, duration(1sec=0+24), page number of storyboards
Cross Ange EP22, 309=26+A116+B167, 1274+12=96+0|A492+0|B686+12, 155p
Encouragement of Climb S3 EP7, 156, 651+06, 64p
Encouragement of Climb S2 EP12, 168, 654+0, 70p
Muromi-san EP13, 135, 630+12, 66p
Encouragement of Climb OVA EP2, 165, 657+0, 78p
Encouragement of Climb OVA EP1, 149, null, 54p
Tengen Toppa Gurren Lagann: Parallel Works 2 SP EP5, 84, null, 42p
WorldEnd: What are you doing at the end of the world? EP1, 312, null, 160p