Skip to content

Instantly share code, notes, and snippets.

View ShadowPower's full-sized avatar

夜光喵喵 ShadowPower

View GitHub Profile
# 安装依赖:
# pip install opencv-contrib-python
import numpy as np
import cv2
import os
from cv2.ximgproc import guidedFilter
input_dir = input('请输入存放输入图像的目录:')
@ShadowPower
ShadowPower / pixiv_to_webp.ps1
Last active February 22, 2025 16:37
convert pixiv ugoira to webp
param (
[Parameter(Mandatory = $true)]
[string]$PixivZipPath
)
# 检查 ffmpeg 是否可用
function Check-FFmpeg {
$ffmpegPath = Get-Command ffmpeg -ErrorAction SilentlyContinue
if (-not $ffmpegPath) {
Write-Error "ffmpeg is not installed or not in PATH."
@ShadowPower
ShadowPower / ds_store_cleaner.py
Created March 2, 2025 17:19
remove .DS_Store and ._*
import os
from collections import deque
# 可自定义的垃圾文件规则配置
RULES = (
{
"name": "DS_Store files",
"match": lambda n: n == ".DS_Store",
"condition": lambda e: e.stat().st_size <= 1024**2, # 1MB
},