<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel><title>feeday</title><link>https://feeday.xyz</link><description>BB Work No Money</description><copyright>feeday</copyright><docs>http://www.rssboard.org/rss-specification</docs><generator>python-feedgen</generator><image><url>https://github.githubassets.com/favicons/favicon.svg</url><title>avatar</title><link>https://feeday.xyz</link></image><lastBuildDate>Wed, 05 Aug 2026 12:37:40 +0000</lastBuildDate><managingEditor>feeday</managingEditor><ttl>60</ttl><webMaster>feeday</webMaster><item><title>realfake-img</title><link>https://feeday.xyz/realfake-img.html</link><description>图像真伪检测

# [Poixe AI 图片模型成本对比](https://poixe.com/pricing?i=token)

| 模型 | 单张实际价格（美元） | 折合人民币/张（≈7.2汇率） | 速度 | 特点 | 推荐用途 |
|---|---:|---:|---:|---|---|
| gemini-3.1-flash-lite | $0.000462 ～ $0.000469 | ≈0.0033 ～ 0.0034元 | ≈1.7秒 | 成本最低，速度快，适合大量图片分析 | 批量初筛首选 |
| gpt-4o | $0.003250 ～ $0.004182 | ≈0.023 ～ 0.030元 | ≈6.7秒 | 图片理解能力强，细节分析稳定 | 重点图片复核 |
| grok-3 | $0.0127968 ～ $0.0162408 | ≈0.092 ～ 0.117元 | ≈8.6～11秒 | 推理能力强，但成本最高 | 疑难图片最终判断 |

| 检测数量 | gemini-3.1-flash-lite | gpt-4o | grok-3 |
|---|---:|---:|---:|
| 1000张 | ≈3.3元 | ≈25～30元 | ≈90～120元 |
| 1万张 | ≈33元 | ≈250～300元 | ≈900～1200元 |
| 10万张 | ≈330元 | ≈2500～3000元 | ≈9000～12000元 |











```
# -*- coding: utf-8 -*-

import sys
import subprocess
import importlib
import os
import base64
import mimetypes
import time
import re
from pathlib import Path


# ==================================================
# 自动安装缺失依赖
# ==================================================

def install_package(package):
    try:
        importlib.import_module(package)
    except ImportError:
        print(f'正在安装依赖: {package}')
        subprocess.check_call([
            sys.executable,
            '-m',
            'pip',
            'install',
            package
        ])


required_packages = [
    'requests',
    'pandas',
    'tqdm',
    'openpyxl'
]

for pkg in required_packages:
    install_package(pkg)


import requests
import pandas as pd
from tqdm import tqdm


# ==================================================
# API 配置
# ==================================================

API_URL = 'https://api.poixe.com/v1/chat/completions'

# 不建议把 Key 写死在代码里
# 运行后手动输入更安全
API_KEY = input('请输入你的 Poixe API Key：').strip()

headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Bearer {API_KEY}'
}


# ==================================================
# 模型选择
# ==================================================

'''
可选模型：

1. gpt-4o
2. grok-3
3. gemini-3.1-flash-lite
'''

MODEL = 'gemini-3.1-flash-lite'


# ==================================================
# 图片目录与输出文件
# ==================================================

image_dir = Path(r'C:\img')
output_excel = Path(r'C:\真伪检测结果.xlsx')

INCLUDE_SUBFOLDERS = True


# ==================================================
# 支持格式
# ==================================================

image_ext = {
    '.jpg',
    '.jpeg',
    '.png',
    '.webp',
    '.bmp'
}


# ==================================================
# AI 检测提示词
# ==================================================

prompt = '''
你是一名专业的AI生成内容鉴定专家。</description><guid isPermaLink="true">https://feeday.xyz/realfake-img.html</guid><pubDate>Mon, 13 Jul 2026 13:54:21 +0000</pubDate></item><item><title>bat-1gb-txt</title><link>https://feeday.xyz/bat-1gb-txt.html</link><description>通过代码命令快速创建指定大小容量的文件。</description><guid isPermaLink="true">https://feeday.xyz/bat-1gb-txt.html</guid><pubDate>Sun, 05 Jul 2026 05:17:17 +0000</pubDate></item><item><title>hf-up</title><link>https://feeday.xyz/hf-up.html</link><description>- https://colab.new
- https://hf-mirror.com
- https://huggingface.co/datasets/datxy/demo/blob/main/test/eso1242a.psb
- https://hf-mirror.com/datasets/datxy/demo/blob/main/test/eso1242a.psb

```
from huggingface_hub import login, HfApi
import requests
from tqdm import tqdm

login()

repo_id = 'datxy/demo'

url_list = [
    {
        'url': 'https://cdn2.eso.org/images/original/eso1242a.psb',
        'name': 'eso1242a.psb'
    }
]

api = HfApi()
api.create_repo(repo_id=repo_id, repo_type='dataset', exist_ok=True)

for item in url_list:
    url = item['url']
    name = item['name']

    print(f'\n⬇️ downloading: {name}')

    r = requests.get(url, stream=True)
    total = int(r.headers.get('content-length', 0))

    with open(name, 'wb') as f, tqdm(total=total, unit='B', unit_scale=True) as bar:
        for chunk in r.iter_content(1024 * 1024):
            if chunk:
                f.write(chunk)
                bar.update(len(chunk))

    print(f'☁️ uploading to test/ folder')

    api.upload_file(
        path_or_fileobj=name,
        path_in_repo=f'test/{name}',
        repo_id=repo_id,
        repo_type='dataset'
    )

    print(f'✅ done: test/{name}')
```
![ScreenShot_2026-07-04_133815_204.png](https://i.imgur.com/77UHCUb.png)

```
import os
from huggingface_hub import snapshot_download, hf_hub_download

# =========================
# 🌍 镜像（可选）
# Windows PowerShell 
# $env:HF_ENDPOINT = 'https://hf-mirror.com'
# =========================
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'


# =========================
# 🧠 自动识别 repo 类型
# =========================
def detect_repo_type(repo_id: str):

    r = repo_id.lower()

    if any(x in r for x in ['dataset', 'data', 'demo']):
        return 'dataset'

    return 'model'


# =========================
# 🚀 ULTRA CORRECT ENGINE
# =========================
def download(repo_id, file_list=None, local_dir='./downloads'):

    os.makedirs(local_dir, exist_ok=True)

    repo_type = detect_repo_type(repo_id)

    print('\n==============================')
    print('🚀 ULTRA CORRECT ENGINE START')
    print('==============================')
    print('📦 Repo:', repo_id)
    print('🧠 Type:', repo_type)
    print('📁 Dir :', local_dir)
    print('==============================\n')

    # =========================
    # CASE 1：全量下载（唯一正确方式）
    # =========================
    if not file_list:

        print('📦 FULL SNAPSHOT MODE')

        path = snapshot_download(
            repo_id=repo_id,
            repo_type=repo_type,
            local_dir=local_dir,
            resume_download=True,
            local_dir_use_symlinks=False
        )

        print('\n✅ 完成:', path)
        return


    # =========================
    # CASE 2：单文件（正确方式，不猜路径）
    # =========================
    print('📦 SINGLE FILE MODE')

    for file in file_list:

        print('\n⬇️ 目标文件:', file)

        try:

            # ❗ 不再猜 test/ data/
            # ❗ 只使用真实路径
            path = hf_hub_download(
                repo_id=repo_id,
                filename=file,
                repo_type=repo_type,
                local_dir=local_dir
            )

            print('✅ 成功:', path)

        except Exception as e:
            print('❌ 失败:', file)
            print('原因:', str(e))


# =========================
# 🚀 示例使用
# =========================
if __name__ == '__main__':

    # =========================
    # 🔥 你只需要改这里
    # =========================

    REPO = 'datxy/demo'

    # 👉 None = 全量下载
    FILES = None

    # 👉 指定文件（必须写完整路径！！）
    # FILES = ['test/eso1242a.psb']

    download(
        repo_id=REPO,
        file_list=FILES,
        local_dir='./downloads'
    )
```
![ScreenShot_2026-07-04_150813_644.png](https://i.imgur.com/kT69aFt.png)。</description><guid isPermaLink="true">https://feeday.xyz/hf-up.html</guid><pubDate>Sat, 04 Jul 2026 05:39:26 +0000</pubDate></item><item><title>Utopia</title><link>https://feeday.xyz/Utopia.html</link><description>乌托镇:没有谁需要证明自己配活着

![vI5ogyC.jpeg](https://i.imgur.com/vI5ogyC.jpeg)

很久以前，在森林、草原、河流和雪山交界的地方，有一座小镇。</description><guid isPermaLink="true">https://feeday.xyz/Utopia.html</guid><pubDate>Thu, 02 Jul 2026 16:10:05 +0000</pubDate></item><item><title>v2a.py</title><link>https://feeday.xyz/v2a.py.html</link><description>多视频合并一个音频
```
import os
import time
import shutil
import zipfile
import subprocess
import urllib.request
from concurrent.futures import ThreadPoolExecutor, as_completed

# =========================
# 配置
# =========================
input_dir = r'E:\2016'
output_dir = r'E:\2016o'
output_file = 'output.mp3'

video_exts = ('.mp4', '.mkv', '.mov', '.avi', '.ts', '.flv', '.m4v', '.webm')
os.makedirs(output_dir, exist_ok=True)

# =========================
# FFmpeg 自动检测/下载
# =========================
ffmpeg_root = os.path.join(os.getcwd(), 'ffmpeg_bin')
ffmpeg_exe = None
ffprobe_exe = None


def find_local_ffmpeg():
    global ffmpeg_exe, ffprobe_exe

    ffmpeg_exe = shutil.which('ffmpeg')
    ffprobe_exe = shutil.which('ffprobe')

    if ffmpeg_exe and ffprobe_exe:
        return True

    if os.path.exists(ffmpeg_root):
        for root, _, files in os.walk(ffmpeg_root):
            for f in files:
                if f == 'ffmpeg.exe':
                    ffmpeg_exe = os.path.join(root, f)
                if f == 'ffprobe.exe':
                    ffprobe_exe = os.path.join(root, f)

    return ffmpeg_exe is not None


def download_file(url, path):
    print(f'📥 下载：{url}')
    try:
        urllib.request.urlretrieve(url, path)
        return True
    except:
        return False


def download_ffmpeg():
    print('⚠️ 未检测到 FFmpeg，开始下载...')

    os.makedirs(ffmpeg_root, exist_ok=True)
    zip_path = os.path.join(ffmpeg_root, 'ffmpeg.zip')

    urls = [
        'https://ghproxy.com/https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip',
        'https://download.fastgit.org/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip',
        'https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip'
    ]

    for url in urls:
        if download_file(url, zip_path):
            break
    else:
        raise Exception('FFmpeg 下载失败')

    with zipfile.ZipFile(zip_path, 'r') as z:
        z.extractall(ffmpeg_root)

    os.remove(zip_path)


if not find_local_ffmpeg():
    download_ffmpeg()
    find_local_ffmpeg()

print('✅ FFmpeg:', ffmpeg_exe)
print('✅ FFprobe:', ffprobe_exe)

# =========================
# 视频扫描
# =========================
def collect_videos(path):
    files = []
    for root, _, fs in os.walk(path):
        for f in fs:
            if f.lower().endswith(video_exts):
                files.append(os.path.join(root, f))
    return files


videos = collect_videos(input_dir)
videos.sort()

if not videos:
    raise Exception('未找到视频')

print(f'🎬 视频数量: {len(videos)}')

# =========================
# concat list（修复Windows路径问题）
# =========================
list_file = os.path.join(output_dir, 'list.txt')

with open(list_file, 'w', encoding='utf-8') as f:
    for v in videos:
        f.write(f'file '{v.replace('\\', '/')}'\n')

output_path = os.path.join(output_dir, output_file)

# =========================
# 🚀 并行 ffprobe（真正吃CPU）
# =========================
def get_duration(file):
    cmd = [
        ffprobe_exe,
        '-v', 'error',
        '-show_entries', 'format=duration',
        '-of', 'default=noprint_wrappers=1:nokey=1',
        file
    ]
    try:
        p = subprocess.run(cmd, capture_output=True, text=True)
        return float(p.stdout.strip())
    except:
        return 0


print('⏳ 并行计算时长...')

with ThreadPoolExecutor(max_workers=os.cpu_count() * 2) as ex:
    durations = list(ex.map(get_duration, videos))

total_duration = sum(durations)

print(f'📊 总时长: {total_duration:.2f}s')

# =========================
# 🚀 FFmpeg 真正优化参数
# =========================
cmd = [
    ffmpeg_exe,
    '-y',

    # 🔥 多线程解码（关键）
    '-threads', '0',

    '-f', 'concat',
    '-safe', '0',
    '-i', list_file,

    '-vn',

    # 🔥 音频编码优化（真正提速点）
    '-acodec', 'libmp3lame',
    '-preset', 'fast',
    '-q:a', '2',

    '-progress', 'pipe:1',
    output_path
]

print('🚀 开始转换...')

process = subprocess.Popen(
    cmd,
    stdout=subprocess.PIPE,
    stderr=subprocess.STDOUT,
    text=True
)

start = time.time()
current = 0

# =========================
# 进度解析
# =========================
while True:
    line = process.stdout.readline()
    if not line:
        break

    line = line.strip()

    if 'out_time_ms' in line:
        try:
            current = int(line.split('=')[1]) / 1_000_000
        except:
            pass

    if total_duration &gt; 0:
        percent = current / total_duration * 100
        speed = current / (time.time() - start + 0.001)
        eta = (total_duration - current) / (speed + 0.001)

        print(
            f'\r📊 {percent:6.2f}% | {current:.1f}s / {total_duration:.1f}s | ETA {eta:.1f}s',
            end=''
        )

process.wait()

print('\n\n✅ 完成输出:', output_path)
```。</description><guid isPermaLink="true">https://feeday.xyz/v2a.py.html</guid><pubDate>Fri, 19 Jun 2026 05:50:15 +0000</pubDate></item><item><title>md</title><link>https://feeday.xyz/md.html</link><description># GitHub 推送合并教程

## 目录

1. 引言：Git与GitHub的基本概念
2. 准备工作：安装Git、配置用户信息、创建SSH密钥
3. 本地仓库的创建与初始提交
4. 远程仓库关联与推送（Push）
5. 合并操作详解：Merge、Rebase与Fast-forward
6. Pull Request（PR）工作流：从创建到合并
7. 冲突的产生与解决方法
8. 高级话题：合并策略、Squash、Cherry-pick
9. 最佳实践与常见错误
10. 总结

---

## 1. 引言

Git是目前最流行的分布式版本控制系统，而GitHub是基于Git的代码托管平台。</description><guid isPermaLink="true">https://feeday.xyz/md.html</guid><pubDate>Sat, 13 Jun 2026 11:01:31 +0000</pubDate></item><item><title>gemini-log-20260611</title><link>https://feeday.xyz/gemini-log-20260611.html</link><description>---

**提问：海拉细胞故事为什么能活那么久**

**回答：**
“海拉细胞”（HeLa cells）是人类医学史上最重要的细胞系之一，也是第一个在体外培养中实现“永生”的人类细胞系。</description><guid isPermaLink="true">https://feeday.xyz/gemini-log-20260611.html</guid><pubDate>Thu, 11 Jun 2026 23:18:48 +0000</pubDate></item><item><title>codex</title><link>https://feeday.xyz/codex.html</link><description>### 常用链接

- 网页使用：[https://chatgpt.com/codex/cloud/](https://chatgpt.com/codex/cloud/)
- 用量查询：[https://chatgpt.com/codex/cloud/settings/analytics#usage](https://chatgpt.com/codex/cloud/settings/analytics#usage)
- 工具下载：[https://chatgpt.com/zh-Hans-CN/download](https://chatgpt.com/zh-Hans-CN/download/)
- 插件安装：[VS Code 插件安装页](https://marketplace.visualstudio.com/items?itemName=openai.chatgpt)
- 使用说明：[https://developers.openai.com/codex/ide](https://developers.openai.com/codex/ide)


安装插件后，在 VS Code 侧边栏打开 Codex，使用 ChatGPT 账号登录即可。</description><guid isPermaLink="true">https://feeday.xyz/codex.html</guid><pubDate>Sun, 31 May 2026 13:48:53 +0000</pubDate></item><item><title>qwen3.6-bat</title><link>https://feeday.xyz/qwen3.6-bat.html</link><description>
## 下载工具和模型
```
https://github.com/ggml-org/llama.cpp/releases/download/b9437/llama-b9437-bin-win-cuda-13.3-x64.zip
https://modelscope.cn/models/Qwen/Qwen3.6-35B-A3B
```
## 解压工具包
```
llama-b9437-bin-win-cuda-13.3-x64.zip
```
在目录下创建 models 文件夹
把下载的模型放进去

## 运行脚本

在目录文件夹下创建 run.bat 

```
@echo off
chcp 65001 &gt;nul
title LLM 模型与多模态文件选择器（完美穿透局域网版）

cd /d '%~dp0'

:: --- 自动获取本机局域网真实的真实 IP（防止被虚拟机干扰） ---
set 'local_ip=127.0.0.1'

:: 优先寻找 192.168.x.x 格式的真实物理网卡 IP
for /f 'tokens=4 delims= ' %%i in ('route print ^| findstr 0.0.0.0 ^| findstr '192.168.'') do (
    set 'local_ip=%%i'
)

:: 如果没找到 192 段，再尝试寻找 10.x.x.x 段
if '%local_ip%'=='127.0.0.1' (
    for /f 'tokens=4 delims= ' %%i in ('route print ^| findstr 0.0.0.0 ^| findstr ' 10.'') do (
        set 'local_ip=%%i'
    )
)

:: 万一还是没找到（比如 172 纯物理内网），则使用保底兼容逻辑
if '%local_ip%'=='127.0.0.1' (
    for /f 'tokens=4 delims= ' %%i in ('route print ^| findstr 0.0.0.0 ^| findstr /v '255.255.255.255'') do (
        set 'local_ip=%%i'
    )
)

:menu
cls
setlocal enabledelayedexpansion
echo ===========================================
echo       LLM 模型与多模态文件启动器
echo ===========================================
echo.

:: --- 第一步：扫描并选择主模型文件 ---
echo === [第一步] 请选择主模型文件 ===
set model_count=0
for %%f in (models\*.gguf) do (
    echo '%%~nxf' | findstr /i /v 'mmproj' &gt;nul
    if !errorlevel! equ 0 (
        set /a model_count+=1
        set 'model_file[!model_count!]=%%~nxf'
        echo !model_count!. %%~nxf
    )
)
echo.
set /p m_choice=请输入模型编号：
if not defined model_file[%m_choice%] goto :menu
set 'selected_model=!model_file[%m_choice%]!'

:: --- 第二步：扫描并选择多模态映射文件 ---
echo.
echo === [第二步] 请选择 mmproj 文件 (输入 0 跳过) ===
set mm_count=0
for %%f in (models\*mmproj*.gguf) do (
    set /a mm_count+=1
    set 'mm_file[!mm_count!]=%%~nxf'
    echo !mm_count!. %%~nxf
)
echo 0. 不使用多模态文件
echo.
set /p mm_choice=请输入 mmproj 编号：

:: --- 第三步：自定义服务端口 ---
echo.
echo === [第三步] 请设置服务端口 ===
set port=8080
set /p user_port=请输入端口号 (直接回车默认使用 8080)：
if not '!user_port!'=='' set port=!user_port!

:: --- 🎛️ 核心新增：全自动动态放行防火墙端口 ---
echo.
echo 🛡️ 正在检查并自动优化防火墙设置，确保局域网顺畅访问...
netsh advfirewall firewall delete rule name='LLM_Server_AutoPort' &gt;nul 2&gt;&amp;1
netsh advfirewall firewall add rule name='LLM_Server_AutoPort' dir=in action=allow protocol=TCP localport=!port! &gt;nul 2&gt;&amp;1
if !errorlevel! equ 0 (
    echo  [成功] 已自动为您开放局域网进站端口: !port!
) else (
    echo  [提示] 自动开放端口失败。</description><guid isPermaLink="true">https://feeday.xyz/qwen3.6-bat.html</guid><pubDate>Sun, 31 May 2026 03:01:45 +0000</pubDate></item><item><title>llama.cpp</title><link>https://feeday.xyz/llama.cpp.html</link><description>- https://github.com/ggml-org/llama.cpp/releases/tag/b9433

## 启动脚本
```
@echo off
chcp 65001 &gt;nul
title LLM 模型与多模态文件选择器（支持局域网访问）

cd /d '%~dp0'

:: --- 自动获取本机局域网真实的真实 IP ---
set 'local_ip=127.0.0.1'
for /f 'tokens=4 delims= ' %%i in ('route print ^| findstr 0.0.0.0 ^| findstr /v '255.255.255.255'') do (
    set 'local_ip=%%i'
)

:menu
cls
setlocal enabledelayedexpansion
echo ===========================================
echo      LLM 模型与多模态文件启动器
echo ===========================================
echo.

:: --- 第一步：扫描并选择主模型文件 ---
echo === [第一步] 请选择主模型文件 ===
set model_count=0
for %%f in (models\*.gguf) do (
    echo '%%~nxf' | findstr /i /v 'mmproj' &gt;nul
    if !errorlevel! equ 0 (
        set /a model_count+=1
        set 'model_file[!model_count!]=%%~nxf'
        echo !model_count!. %%~nxf
    )
)
echo.
set /p m_choice=请输入模型编号：
if not defined model_file[%m_choice%] goto :menu
set 'selected_model=!model_file[%m_choice%]!'

:: --- 第二步：扫描并选择多模态映射文件 ---
echo.
echo === [第二步] 请选择 mmproj 文件 (输入 0 跳过) ===
set mm_count=0
for %%f in (models\*mmproj*.gguf) do (
    set /a mm_count+=1
    set 'mm_file[!mm_count!]=%%~nxf'
    echo !count!. %%~nxf
)
echo 0. 不使用多模态文件
echo.
set /p mm_choice=请输入 mmproj 编号：

:: --- 第三步：自定义服务端口 ---
echo.
echo === [第三步] 请设置服务端口 ===
set port=8080
set /p user_port=请输入端口号 (直接回车默认使用 8080)：
if not '!user_port!'=='' set port=!user_port!

:: --- 核心优化：在启动前疯狂提示真实的访问地址 ---
echo.
echo ============================================================
echo   📢 服务即将启动！请复制以下真实访问地址：
echo ------------------------------------------------------------
echo   [本地访问] http://127.0.0.1:!port!/v1
echo   [局域网访问] http://%local_ip%:!port!/v1
echo ============================================================
echo   (注：下方 llama-server 提示的 0.0.0.0 代表正在监听上述所有地址)
echo ============================================================
echo.
timeout /t 3 &gt;nul

if '%mm_choice%'=='0' (
    llama-server.exe ^
        -m 'models\%selected_model%' ^
        -ngl 999 -c 131072 -np 1 -n 8192 ^
        --host 0.0.0.0 --port !port!
) else (
    if defined mm_file[%mm_choice%] (
        set 'selected_mm=!mm_file[%mm_choice%]!'
        llama-server.exe ^
            -m 'models\%selected_model%' ^
            --mmproj 'models\!selected_mm!' ^
            -ngl 999 -c 131072 -n 8192 ^
            --host 0.0.0.0 --port !port!
    ) else (
        echo 输入错误，正在返回主菜单...
        pause
        goto :menu
    )
)

pause
```
。</description><guid isPermaLink="true">https://feeday.xyz/llama.cpp.html</guid><pubDate>Sat, 30 May 2026 14:27:35 +0000</pubDate></item><item><title>gpt4o</title><link>https://feeday.xyz/gpt4o.html</link><description>图像反推提示词

## 正反提示词
```
# 自动安装依赖
try:
    import requests
except ImportError:
    import os
    os.system('pip install requests')
    import requests

import base64

# API 配置  0.02 折合每张  https://poixe.com/pricing?i=token
url = 'https://api.poixe.com/v1/chat/completions'

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'sk-2'
}

# 本地图片路径
image_path = r'C:\Users\X\Downloads\douyin\无人\douyin_20260525_0173.jpg'

# 读取图片
with open(image_path, 'rb') as image_file:
    base64_image = base64.b64encode(image_file.read()).decode('utf-8')

# 提示词
prompt = '''
你是世界级 AI 绘图提示词反推专家。</description><guid isPermaLink="true">https://feeday.xyz/gpt4o.html</guid><pubDate>Mon, 25 May 2026 14:52:02 +0000</pubDate></item><item><title>qwen3.5</title><link>https://feeday.xyz/qwen3.5.html</link><description># 下载模型

```
wget -c 'https://huggingface.co/HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive/resolve/main/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-Q4_K_M.gguf' -O Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-Q4_K_M.gguf
wget -c 'https://huggingface.co/HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive/resolve/main/mmproj-Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-BF16.gguf' -O mmproj-Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-BF16.gguf
```

# 工具加载模型

- https://github.com/LostRuins/koboldcpp
- https://github.com/a-ghorbani/pocketpal-ai。</description><guid isPermaLink="true">https://feeday.xyz/qwen3.5.html</guid><pubDate>Sun, 24 May 2026 05:58:17 +0000</pubDate></item><item><title>sql-root-centos</title><link>https://feeday.xyz/sql-root-centos.html</link><description>centos 重置数据库 root 密码。</description><guid isPermaLink="true">https://feeday.xyz/sql-root-centos.html</guid><pubDate>Sat, 23 May 2026 07:53:23 +0000</pubDate></item><item><title>js-url-go</title><link>https://feeday.xyz/js-url-go.html</link><description>通过判断识别终端自动跳转到指定的网址。</description><guid isPermaLink="true">https://feeday.xyz/js-url-go.html</guid><pubDate>Sat, 23 May 2026 07:50:34 +0000</pubDate></item><item><title>url</title><link>https://feeday.xyz/url.html</link><description>## 常用链接
* [ChatGPT](https://chat.openai.com/) - 全能型 AI 助手，支持文本、代码、识图与绘图。</description><guid isPermaLink="true">https://feeday.xyz/url.html</guid><pubDate>Sat, 23 May 2026 06:38:46 +0000</pubDate></item><item><title>win10-Menu-Key</title><link>https://feeday.xyz/win10-Menu-Key.html</link><description># 微软系统右键菜单修改

Windows 11 默认右键菜单被简化，若要恢复类似 Windows 10 的完整菜单，可通过以下方法实现。</description><guid isPermaLink="true">https://feeday.xyz/win10-Menu-Key.html</guid><pubDate>Sun, 10 May 2026 04:01:40 +0000</pubDate></item><item><title>VEDetector</title><link>https://feeday.xyz/VEDetector.html</link><description>
关闭剪映电脑版启动时的环境监测

## 重命名程序文件

通过重命名或移除环境检测程序文件（例如 `VEDetector.exe`），可以跳过启动时的环境监测。</description><guid isPermaLink="true">https://feeday.xyz/VEDetector.html</guid><pubDate>Sun, 10 May 2026 03:54:49 +0000</pubDate></item><item><title>hf-mirror-download</title><link>https://feeday.xyz/hf-mirror-download.html</link><description>HF 国内镜像下载模型数据集

## 安装依赖
```
pip install -U huggingface_hub
```
- Linux/macOS (临时生效):
```
export HF_ENDPOINT=https://hf-mirror.com
```
- Windows PowerShell (临时生效):
```
$env:HF_ENDPOINT = 'https://hf-mirror.com'
```
## 下载模型文件

```
import os
from huggingface_hub import snapshot_download

# 1. 设置环境变量，指向国内镜像站
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'

# 2. 定义模型 ID 和保存路径
model_id = 'HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive'
local_dir = './Qwen3.5-9B-Uncensored'

print(f'开始从镜像站下载模型: {model_id} ...')

# 3. 执行下载
snapshot_download(
    repo_id=model_id,
    local_dir=local_dir,
    local_dir_use_symlinks=False, # 建议设为 False，直接下载真实文件而非软链接
    ignore_patterns=['*.msgpack', '*.h5', '*.ot'], # 可选：忽略不需要的格式（如 Pytorch 用户忽略 Rust/TensorFlow 文件）
    resume_download=True
)

print('下载完成！模型存放在:', local_dir)
```

## 下载单个模型文件

```
import os
from huggingface_hub import hf_hub_download

# 1. 设置环境变量，强制走国内镜像站
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'

# 2. 定义模型 ID 和保存路径
model_id = 'HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive'
local_dir = 'E:/Models/Qwen3.5-9B-Uncensored'

# 3. 精确指定要下载的文件（单文件模型 + 视觉编码器）
files_to_download = [
    'Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-Q6_K.gguf',
    'mmproj-Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-BF16.gguf'
]

for filename in files_to_download:
    print(f'\n开始从镜像站下载: {filename} ...')
    try:
        # 新版 huggingface_hub 默认自带断点续传和非软链接特性
        file_path = hf_hub_download(
            repo_id=model_id,
            filename=filename,
            local_dir=local_dir
        )
        print(f'✅ 下载成功！文件已存放在: {file_path}')
    except Exception as e:
        print(f'❌ 下载报错: {e}')
```。</description><guid isPermaLink="true">https://feeday.xyz/hf-mirror-download.html</guid><pubDate>Mon, 04 May 2026 07:16:42 +0000</pubDate></item><item><title>iptables</title><link>https://feeday.xyz/iptables.html</link><description>Linux 系统上常用的防火墙命令代码。</description><guid isPermaLink="true">https://feeday.xyz/iptables.html</guid><pubDate>Mon, 04 May 2026 05:39:32 +0000</pubDate></item><item><title>centos-hostname</title><link>https://feeday.xyz/centos-hostname.html</link><description>通过 hostname 命令修改主机名。</description><guid isPermaLink="true">https://feeday.xyz/centos-hostname.html</guid><pubDate>Mon, 04 May 2026 05:35:50 +0000</pubDate></item><item><title>sql-root-centos</title><link>https://feeday.xyz/sql-root-centos.html</link><description>centos 重置数据库 root 密码。</description><guid isPermaLink="true">https://feeday.xyz/sql-root-centos.html</guid><pubDate>Mon, 04 May 2026 05:26:21 +0000</pubDate></item><item><title>formatting-wordpress</title><link>https://feeday.xyz/formatting-wordpress.html</link><description>通过修改配置文件的代码可以改文章字数。</description><guid isPermaLink="true">https://feeday.xyz/formatting-wordpress.html</guid><pubDate>Mon, 04 May 2026 05:21:58 +0000</pubDate></item><item><title>js-url-go</title><link>https://feeday.xyz/js-url-go.html</link><description>通过判断识别终端自动跳转到指定的网址。</description><guid isPermaLink="true">https://feeday.xyz/js-url-go.html</guid><pubDate>Mon, 04 May 2026 05:15:11 +0000</pubDate></item><item><title>CentOS-7.6-SSH</title><link>https://feeday.xyz/CentOS-7.6-SSH.html</link><description>#  普通连接

```
ssh -p 22 root@192.168.1.1
```
#  密钥连接

- https://github.com/settings/ssh/new

```
ssh-keygen -t rsa -b 4096 -C '123@qq.com'
type C:\.ssh\id_rsa.pub

ssh -i &lt;私钥文件路径&gt; &lt;用户名&gt;@&lt;服务器IP&gt;

ssh -T git@github.com
git@github.com:tcq20256/feeday.git
```

# 封禁攻击的IP

```
#!/usr/bin/env bash
# setup_ssh_antibrute.sh
# CentOS 7.6：Fail2Ban SSH 防暴力破解（安装/配置 + 自愈修复 一体化）
# - 仅动 fail2ban，不改 sshd 端口/认证方式，不影响其他服务
# - firewalld 在跑：firewallcmd-ipset（运行时规则，非永久）；否则用 iptables-multiport
# - BAN/UNBAN 审计日志可自定义路径（默认 /home/lighthouse/bash/ssh-ban.log，或 BAN_LOG='__SCRIPT_DIR__'）
# - 检测到 socket 连接失败会自动执行修复流程（清理残留、重建 /run/fail2ban、恢复 SELinux 上下文、补齐 iptables）

set -euo pipefail

### ===== 可调参数（也可用环境变量覆盖）=====
BANTIME='${BANTIME:-3600}'     # 被封时长（秒）
FINDTIME='${FINDTIME:-600}'    # 观察窗口（秒）
MAXRETRY='${MAXRETRY:-5}'      # 失败次数阈值
MY_IP='${MY_IP:-}'             # 可选：你的出口白名单，如 1.2.3.4
DEFAULT_BAN_LOG='/home/lighthouse/bash/ssh-ban.log'

# 日志位置：支持 BAN_LOG='__SCRIPT_DIR__'
SCRIPT_DIR='$(cd -- '$(dirname -- '${BASH_SOURCE[0]}')' &amp;&amp; pwd)'
if [[ '${BAN_LOG:-}' == '__SCRIPT_DIR__' ]]; then
  BAN_LOG='${SCRIPT_DIR}/ssh-ban.log'
else
  BAN_LOG='${BAN_LOG:-$DEFAULT_BAN_LOG}'
fi

### ===== 小工具 =====
msg(){ echo -e '\033[1;32m[INFO]\033[0m $*'; }
warn(){ echo -e '\033[1;33m[WARN]\033[0m $*'; }
err(){ echo -e '\033[1;31m[ERR ]\033[0m $*'; }

require_root(){ [[ ${EUID:-$(id -u)} -eq 0 ]] || { err '请用 root 运行：sudo bash $0'; exit 1; }; }
file_put(){ # $1:path  $2:content
  local p='$1'; shift
  umask 022; cat &gt;'$p' &lt;&lt;&lt;'$*'
  chmod 0644 '$p'
}

### ===== 修复流程：清理残留 / 目录 / SELinux / 组件 =====
repair_fail2ban(){
  warn '触发自愈修复：清理残留并重建运行环境……'
  systemctl stop fail2ban || true
  pkill -9 -f fail2ban-server || true

  rm -rf /run/fail2ban /var/run/fail2ban
  install -d -m 755 -o root -g root /run/fail2ban
  ln -sfn /run/fail2ban /var/run/fail2ban

  # SELinux（若启用则恢复上下文，无副作用）
  if command -v selinuxenabled &gt;/dev/null 2&gt;&amp;1 &amp;&amp; selinuxenabled; then
    restorecon -Rv /run/fail2ban || true
  fi

  # 组件兜底：当前 banaction 可能用到 iptables
  yum install -y -q iptables iptables-services || true

  # 确保 fail2ban.conf 使用标准 socket 路径（仅修正缺失/异常情况）
  local conf='/etc/fail2ban/fail2ban.conf'
  if [[ -f '$conf' ]]; then
    grep -qE '^\s*socket\s*=\s*/var/run/fail2ban/fail2ban\.sock' '$conf' || \
      sed -ri 's|^\s*socket\s*=.*|socket = /var/run/fail2ban/fail2ban.sock|g' '$conf'
    grep -qE '^\s*pidfile\s*=\s*/var/run/fail2ban/fail2ban\.pid' '$conf' || \
      sed -ri 's|^\s*pidfile\s*=.*|pidfile = /var/run/fail2ban/fail2ban.pid|g' '$conf'
  fi

  systemctl restart fail2ban
  sleep 1
}

### ===== 主流程 =====
require_root

# 1) 安装依赖
if ! rpm -qa | grep -qiE '^epel-release'; then
  msg '安装 epel-release ...'
  yum install -y epel-release
fi
if ! rpm -qa | grep -qiE '^fail2ban(-server)?'; then
  msg '安装 fail2ban ...'
  yum install -y fail2ban
else
  msg 'fail2ban 已安装'
fi

# 2) 检测 firewalld
FIREWALLD_ACTIVE=0
if systemctl is-active firewalld &gt;/dev/null 2&gt;&amp;1; then
  FIREWALLD_ACTIVE=1
  msg 'firewalld 运行中：banaction=firewallcmd-ipset（运行时规则，非永久）'
else
  warn 'firewalld 未运行：banaction=iptables-multiport'
fi
BANACTION='iptables-multiport'
[[ $FIREWALLD_ACTIVE -eq 1 ]] &amp;&amp; BANACTION='firewallcmd-ipset'

# 3) 自定义动作：log-ban（正确使用 &lt;name&gt;/&lt;ip&gt;/&lt;port&gt;/&lt;failures&gt;；printf 用 %%s；date 用 %%F %%T）
file_put /etc/fail2ban/action.d/log-ban.local \
'[Definition]
actionban   = /bin/sh -c '\''printf '%%s\tBAN\tjail=&lt;name&gt;\tip=&lt;ip&gt;\tport=&lt;port&gt;\tfailures=&lt;failures&gt;\tsrc=%(src)s\n' '$(date '+%%F %%T')' &gt;&gt; %(logfile)s'\''
actionunban = /bin/sh -c '\''printf '%%s\tUNBAN\tjail=&lt;name&gt;\tip=&lt;ip&gt;\n' '$(date '+%%F %%T')' &gt;&gt; %(logfile)s'\'''
chmod 0644 /etc/fail2ban/action.d/log-ban.local

# 4) 生成 jail.local（仅开启 sshd 监狱）
JAIL_LOCAL='/etc/fail2ban/jail.local'
if [[ -f '$JAIL_LOCAL' ]]; then
  cp -a '$JAIL_LOCAL' '${JAIL_LOCAL}.bak.$(date +%Y%m%d-%H%M%S)'
  msg '已备份原配置：${JAIL_LOCAL}.bak.*'
fi
IGNOREIP='127.0.0.1/8'
[[ -n '$MY_IP' ]] &amp;&amp; IGNOREIP='$IGNOREIP $MY_IP'
file_put '$JAIL_LOCAL' \
'[DEFAULT]
bantime   = ${BANTIME}
findtime  = ${FINDTIME}
maxretry  = ${MAXRETRY}
backend   = auto
ignoreip  = ${IGNOREIP}
banaction = ${BANACTION}

[sshd]
enabled  = true
port     = ssh
filter   = sshd
logpath  = /var/log/secure
action   = %(action_)s
           log-ban[logfile=${BAN_LOG}, src=/var/log/secure]
'
chmod 0644 '$JAIL_LOCAL'

# 5) 日志与 logrotate
mkdir -p '$(dirname -- '$BAN_LOG')'
touch '$BAN_LOG'
chmod 0640 '$BAN_LOG'
chown root:root '$BAN_LOG'
file_put /etc/logrotate.d/ssh-ban \
'${BAN_LOG} {
    daily
    rotate 14
    missingok
    notifempty
    compress
    create 0640 root root
}
'

# 6) 兜底运行目录
install -d -m 755 -o root -g root /run/fail2ban
ln -sfn /run/fail2ban /var/run/fail2ban

# 7) 语法测试 &amp; 启动
msg '校验 fail2ban 配置语法 ...'
if ! fail2ban-client -t; then
  err '配置语法校验失败，请检查上方输出。</description><guid isPermaLink="true">https://feeday.xyz/CentOS-7.6-SSH.html</guid><pubDate>Wed, 22 Apr 2026 23:13:17 +0000</pubDate></item><item><title>hi</title><link>https://feeday.xyz/hi.html</link><description>hello。</description><guid isPermaLink="true">https://feeday.xyz/hi.html</guid><pubDate>Sun, 19 Apr 2026 03:24:50 +0000</pubDate></item></channel></rss>