Skip to content

Instantly share code, notes, and snippets.

@lxfly2000
lxfly2000 / mlas.txt
Created August 30, 2019 08:08
机器学习辅助作图的应用设想
机器学习辅助作图(Machine Learning assisted sketching)
1. 根据部分线条或草稿生成完整干净的线稿;
2. 根据已完成线稿和颜色框线(提示色线,色点)上色;
3. 线稿:根据两(或多个)关键帧插帧线稿帧(动画应用);
4. 根据两(或多个)关键帧对当前线稿上色(动画应用);
5. 线稿:三视图(人设等)下的三维变换生成线稿。
#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 / 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)
@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 / clsord.py
Created February 25, 2020 11:20
用于输出CID码表各字符所属区间的码表分布
#python 3.8.1
#encoding=utf-8
#用于输出CID码表各字符所属区间的码表分布
import sys
table=dict()
def readtable(path):
#include<Windows.h>
#include<vector>
#include<algorithm>
struct SpectrumPoint
{
int p;
union{
struct
{
@lxfly2000
lxfly2000 / LuaBot.cpp
Last active August 24, 2020 09:33
Lua机器人示例
#include <iostream>
#include <string>
#include "lua.hpp"
#pragma comment(lib,"lua54.lib")
#define PushFunctionToLua(lua_state,lua_cfunction) lua_register(lua_state,_CRT_STRINGIZE(lua_cfunction),lua_cfunction)
#define LUA_CFUNCTION(function_name,lua_state) int function_name(lua_State* lua_state)
@lxfly2000
lxfly2000 / rmdup.sh
Last active September 18, 2020 04:44
删除重复的文件
#!/system/bin/sh
if (($# < 1)) then
echo "未指定路径。"
exit 1
fi
#通过参数指定一个目录
path=$1 #定义时变量不用加$,而引用时则需要加$,若要避免歧义则需要写成${path}形式,另外=左右不能有空格
@lxfly2000
lxfly2000 / filehash.bat
Last active September 18, 2023 06:58
使用时把脚本放到SendTo文件夹
@echo off
if "%~1"=="" (
echo 未指定文件。
goto :end
)
for %%i in (%*) do call :calchash %%i
:end
if "%~0"=="%~dpnx0" pause
goto :eof
:calchash
@echo off
echo CPU:
wmic cpu get Manufacturer
wmic cpu get Name
wmic cpu get ProcessorID
echo Hard Disk:
wmic diskdrive get serialnumber
echo BIOS:
wmic baseboard get serialnumber
echo MAC Address: