This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def support_gbk(zip_file: zipfile.ZipFile): | |
name_to_info = zip_file.NameToInfo.copy() | |
for name, info in name_to_info.items(): | |
try: | |
real_name = name.encode('cp437').decode('gbk') | |
except UnicodeDecodeError: | |
real_name = name.encode('utf-8').decode('utf-8') | |
if real_name != name: | |
info.filename = real_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.14) | |
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) | |
include(get_platform) | |
include(CPM) | |
include(import_library) | |
project(ppocr LANGUAGES CXX CUDA) | |
message(STATUS "CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################## Project ################################################## | |
cmake_minimum_required(VERSION 3.24) | |
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) | |
include(utils) | |
extract_version() | |
include(get_platform) | |
include(CPM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 将远程 10.30 的 8888 端口转发到本机的 8080 端口 | |
ssh -L localhost:8080:localhost:8888 [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "spdlog/async.h" | |
#include "spdlog/sinks/basic_file_sink.h" | |
#include "spdlog/sinks/rotating_file_sink.h" | |
#include "spdlog/sinks/stdout_color_sinks.h"// or "../stdout_sinks.h" if no color needed | |
#include "spdlog/spdlog.h" | |
#include <chrono> | |
#include <iostream> | |
#include <memory> | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constexpr unsigned int hash(const char* s, int off = 0) { | |
return !s[off] ? 5381 : (hash(s, off + 1) * 33) ^ s[off]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO ON | |
set BASEDIR=%~dp0 | |
PUSHD %BASEDIR% | |
RMDIR /Q /S release | |
mkdir release | |
REM for connan | |
conan install . -if=./release --build=missing -s build_type=Release --profile=default-x86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"items":[{"name":"圆角矩形01","uuid":"dce7fa90-ca23-11ed-be30-f7d500738953","x":100,"y":50,"width":200,"height":200,"type":"RoundRect","visible":true,"shapeDataType":"Path","style":{"locked":false,"rotation":0,"cornerRadius":4,"opacity":1,"strokeWidth":1,"lineStyle":"solid","dashArray":[],"bgFillEnable":true,"strokeEnable":true,"bgColor":{"type":"theme","value":"$theme.local.color.bgColor"},"bgMainColor":"#FFFF00","bgGradientColor":"#ffffff","bgGradientFillType":"fill","bgFillType":"purityStyle","strokeColor":{"type":"string","value":"#000000"},"fontFamily":"宋体","fontSize":16,"scaleX":1,"scaleY":1},"layer":{"uuid":"d982d690-ca23-11ed-be30-f7d500738953","name":"图层1","visible":true},"animation":{},"action":{},"scripts":"","shape":{"pathData":"M104.93827,250c-2.72733,0 -4.93827,-2.29598 -4.93827,-5.12821v-189.74359c0,-2.83223 2.21094,-5.12821 4.93827,-5.12821h190.12346c2.72733,0 4.93827,2.29598 4.93827,5.12821v189.74359c0,2.83223 -2.21094,5.12821 -4.93827,5.12821z","componentWidth":162,"componentHeight":156,"compon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 递归删除下工程内的所有node_modules | |
find . -name "node_modules" -type d -exec rm -rf '{}' + | |
# 命令拆解注释 | |
# . 当前目录 | |
# -name 名字匹配,指定字符串作为寻找文件或目录的范本样式; | |
# -type 查询文件类型。 -d 就是目录 | |
# -exec 就是匹配后执行一些命令 | |
# rm -rf '{}' 删除匹配到到('{}') | |
# + 是个骚操作 | |
# 一个-exec只能执行一个命令,而且必须在命令后面加上终结符,终结符有两个:“;”和“+”。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.formatOnSave": false, | |
"editor.codeActionsOnSave": { | |
"source.fixAll.eslint": true, | |
"source.fixAll": true | |
} | |
} |
NewerOlder