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
import os, os.path | |
def do_dir(file): #What you want to do with the file | |
pass | |
def do_file(file): #What you want to do with the | |
pass | |
def walk(where): #Walk file and dir in where | |
for localtion,dirlist,filelist in os.walk(where): | |
if dirlist: |
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
# 生成私钥 | |
openssl genrsa -out myselfsigned.key 2048 | |
# 利用私钥生成自签名证书 | |
openssl req -new -x509 -key myselfsigned.key -out myselfsigned.cer -days 36500 | |
# 利用私钥生成自签名证书,直接指定CN | |
openssl req -new -x509 -key myselfsigned.key -out myselfsigned.cer -days 36500 -subj /CN="*.abc.com" | |
# 创建一个CA的私钥和CA的证书 |
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 shuttle_text(shuttle): | |
t = '' | |
for i in shuttle: | |
t += i.text | |
return t | |
def docx_replace(doc, data): | |
for key in data: | |
for table in doc.tables: |
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
import wave | |
import hashlib | |
import argparse | |
from datetime import datetime | |
import os | |
from typing import Any | |
from fastapi import File, UploadFile, Form, FastAPI, Request | |
from src.whisper_ctranslate2.whisper_ctranslate2 import Transcribe, TranscriptionOptions | |
from src.whisper_ctranslate2.writers import format_timestamp | |
import opencc |