Skip to content

Instantly share code, notes, and snippets.

View tsukumijima's full-sized avatar
📺
TTS & DTV

tsukumi tsukumijima

📺
TTS & DTV
View GitHub Profile
@shimarin
shimarin / check-openssh-version.py
Created July 1, 2024 16:03
指定ホストの22/tcpに接続し、SSHサーバのバージョン情報を表示するスクリプト
#!/usr/bin/python
import socket
import argparse
def get_ssh_version_string(host, port=22, timeout=5):
try:
# ソケットアドレス情報を取得
addr_info = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
for res in addr_info:
@tori29umai0123
tori29umai0123 / nsfw_filter.py
Last active June 11, 2024 13:02
nsfw_filter.py
import argparse
import csv
import glob
import os
from pathlib import Path
import cv2
import numpy as np
import torch
from PIL import Image
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active July 10, 2025 23:32
ローカルLLMはこーやって使うの💢
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thesamesam
thesamesam / xz-backdoor.md
Last active July 8, 2025 19:40
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@litagin02
litagin02 / pattern.py
Last active June 24, 2025 00:16
笑い声・感動詞を文字列から識別するやつ
import re
import jaconv
# お好きな日本語文章正規化をimport, jaconv.normalizeとかでいいかも
from text import text_normalize
import regex
import pyopenjtalk
# 「ー」と「っ」を取り除いた文章に対するひらがなの笑い声の正規表現
warai_pattern = (
r"("
@alfredplpl
alfredplpl / gemma_finetune_lora.py
Created February 24, 2024 04:23
Gemma初心者ファインチューニングコードです。HFの設定などはよしなにやってください。
# Reference #1: https://note.com/npaka/n/nc55e44e407ff
# Reference #2: https://huggingface.co/blog/gemma-peft
# Licence: MIT
from peft import LoraConfig
lora_config = LoraConfig(
r=8,
target_modules=["q_proj", "o_proj", "k_proj", "v_proj", "gate_proj", "up_proj", "down_proj"],
task_type="CAUSAL_LM",
[
{
"word": "Asshole",
"kana": "アスホール",
"meaning": "いやな奴(Ass=お尻、Hole=穴)",
"notice": "「うざい野郎」「ろくでなし」"
},
{
"word": "あばずれ",
"kana": "あばずれ",
@litagin02
litagin02 / safetensors.ipynb
Last active June 24, 2025 00:15
学習したpthファイルから事前学習モデルsafetensorsを作るやつ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yyya-nico
yyya-nico / README.md
Last active May 31, 2024 18:48
KonomiTVですべての地上波チャンネルを同時視聴する

KonomiTVですべての地上波チャンネルを同時視聴する

KonomiTVにファイルを足すことで、地上波多チャンネル同時視聴ができるかもしれない。
当然チューナーは必要数用意
まずフォルダーを以下の場所に作る。

  • {KonomiTVインストールフォルダー}/client/dist/wholech/
  • {KonomiTVインストールフォルダー}/client/dist/wholech/css/
  • {KonomiTVインストールフォルダー}/client/dist/wholech/js/

htmlファイルはwholechフォルダー、cssファイルはcssフォルダー、jsファイルはjsフォルダーに置く。

@subaru-shoji
subaru-shoji / aivis-dataset_and_style-bert-vits2.ipynb
Created January 2, 2024 13:30
aivis-dataset_and_style-bert-vits2.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.