Skip to content

Instantly share code, notes, and snippets.

@lxfly2000
lxfly2000 / clsord.py
Created February 25, 2020 11:20
用于输出CID码表各字符所属区间的码表分布
#python 3.8.1
#encoding=utf-8
#用于输出CID码表各字符所属区间的码表分布
import sys
table=dict()
def readtable(path):
@lxfly2000
lxfly2000 / dump_emt.py
Last active March 6, 2024 02:45
获取缓存的QQ表情列表,URL,名字
#python 3.7.3
#encoding=utf-8
import os
import json
from urllib import request
em_url="https://imgcache.qq.com/qqshow/admindata/comdata/vipEmoji_item_%d/xydata.json"
br_url="https://gxh.vip.qq.com/club/themes/mobile/bq/html/detail.html?id=%d"
f=open("emlist.txt","w",encoding="utf-8")
@lxfly2000
lxfly2000 / bsub2srt.py
Created October 25, 2019 17:37
将哔哩哔哩的CC字幕转换成SRT格式
#python 3.7.3
#encoding=utf-8
import json
import sys
def srtftime(s):
m=int(s/60)
s-=m*60
h=int(m/60)
#include<iostream>
#include<string>
#include<regex>
//查找并返回串中的第一个子串(小括号里的),若未找到则返回空字符串
std::string regex_match1(const std::string& src, const std::string& reg_str)
{
std::regex r(reg_str);
std::smatch m;
if (!std::regex_search(src, m, r))
@lxfly2000
lxfly2000 / mlas.txt
Created August 30, 2019 08:08
机器学习辅助作图的应用设想
机器学习辅助作图(Machine Learning assisted sketching)
1. 根据部分线条或草稿生成完整干净的线稿;
2. 根据已完成线稿和颜色框线(提示色线,色点)上色;
3. 线稿:根据两(或多个)关键帧插帧线稿帧(动画应用);
4. 根据两(或多个)关键帧对当前线稿上色(动画应用);
5. 线稿:三视图(人设等)下的三维变换生成线稿。
@lxfly2000
lxfly2000 / msxmlrw.cpp
Last active September 23, 2019 05:53
Parse XML data using MSXML.
#include<Windows.h>
#include<atlmem.h>
#include<tchar.h>
#include<assert.h>
#include<time.h>
#define HC(e)assert(SUCCEEDED(e))
TCHAR output[4096]{};
@lxfly2000
lxfly2000 / cleardns.bat
Created June 24, 2019 09:45
Configure DNS by using cmdline.
@echo off
netsh interface ipv6 set dnsservers WLAN dhcp
if %errorlevel%==0 goto:eof
echo 这个操作需要管理员权限……
mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~0 %*","%cd%","runas",1)(close)
@lxfly2000
lxfly2000 / bilicche.bat
Last active June 23, 2019 08:48
Copy Bilibili cache from phone to PC.
@echo off
setlocal enabledelayedexpansion
set ADB_PATH=D:\Android\Sdk\platform-tools\adb.exe
set DEVICE_CACHE_PATH=/sdcard/Android/data/com.bilibili.app.in/download
set LOCAL_CACHE_PATH=D:\Yueyu\Bilibili\download
set INCLUDE=0
if /i "%~2"=="video" set INCLUDE=1
if /i "%~2"=="bangumi" set INCLUDE=2
if /i "%~2"=="all" set INCLUDE=3
@lxfly2000
lxfly2000 / remotecall.cpp
Created March 7, 2019 07:19
创建远程线程(远程线程注入)的方法
//https://blog.csdn.net/xfgryujk/article/details/50478295
#include<Windows.h>
#include<TlHelp32.h>
#include<iostream>
//https://gist.github.com/lxfly2000/d7a2eba66c4038002b93e0dd94e81317
DWORD QueryFirstPIDOfProcessName(LPCWSTR pn)
{
PROCESSENTRY32 pe;
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ShowSecondsInSystemClock"=-