Skip to content

Instantly share code, notes, and snippets.

View mio7690's full-sized avatar
:octocat:

nameless mio7690

:octocat:
  • The Chinese University of Hong Kong
View GitHub Profile
@mio7690
mio7690 / auto_subtitle_matcher.py
Created August 9, 2024 14:41
视频-字幕自动重命名对齐脚本
import os
def remove_common_prefix_suffix(strings):
if not strings:
return []
# Find common prefix
prefix = os.path.commonprefix(strings)
# Find common suffix
@mio7690
mio7690 / NovelAI ckpt模型转diffuser模型.py
Created October 24, 2022 09:53
NovelAI ckpt模型转diffuser模型
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
PROMPT="%(?:%{$fg_bold[green]%}$(whoami) :%{$fg_bold[red]%}➜ )"
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info) 🌸 '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"