Skip to content

Instantly share code, notes, and snippets.

@rakersfu
rakersfu / hfactive.py
Created September 1, 2025 08:55
hfactive.py
import requests
import logging
import os
# 配置日志
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
# Hugging Face Space URL 和 API 令牌
SPACE_URL = "https://rakersfu-rakelinux.hf.space"
HF_TOKEN = os.getenv("HF_TOKEN") # 从环境变量读取 HF_TOKEN
@rakersfu
rakersfu / webdav_velss.py
Last active September 1, 2025 07:31
webdav_velss.py
import requests
from requests.auth import HTTPBasicAuth
import os
import logging
from tenacity import retry, stop_after_attempt, wait_fixed
# 配置日志
log_file = '/tmp/scheduler.log' if os.path.exists('/tmp') else 'scheduler.log'
logging.basicConfig(
level=logging.INFO,
@rakersfu
rakersfu / webdav.py
Last active August 30, 2025 08:33
webdav.py
import requests
from requests.auth import HTTPBasicAuth
import os
import logging
import sys
from tenacity import retry, stop_after_attempt, wait_fixed
import time
# 配置日志(输出到文件和控制台)
log_file = '/tmp/scheduler.log' if os.path.exists('/tmp') else 'scheduler.log'
@rakersfu
rakersfu / domains.txt
Last active September 1, 2025 05:43
domains.txt
github.com
alive.github.com
api.github.com
avatars3.githubusercontent.com
avatars2.githubusercontent.com
camo.githubusercontent.com
cloud.githubusercontent.com
avatars1.githubusercontent.com
avatars0.githubusercontent.com
avatars.githubusercontent.com
@rakersfu
rakersfu / githubhosts.py
Last active August 30, 2025 07:36
githubhosts.py
import dns.resolver
import requests
import logging
import sys
import os
from pathlib import Path
from typing import List
from io import StringIO
# 配置日志(输出到文件和控制台)
@rakersfu
rakersfu / download_files.py
Last active August 30, 2025 07:44
download_files.py
import requests
import os
import logging
import sys
from pathlib import Path
# 配置日志(输出到文件和控制台)
log_file = '/tmp/scheduler.log' if os.path.exists('/tmp') else 'scheduler.log'
logging.basicConfig(
level=logging.DEBUG,