This file contains hidden or 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
.display-linebreak { | |
white-space: pre-line; | |
} |
This file contains hidden or 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
Attribute VB_Name = "模块1" | |
Option Explicit | |
Sub DynamicSplitPagesAsDocuments() | |
Dim oSrcDoc As Document, oNewDoc As Document | |
Dim strSrcName As String, strNewName As String | |
Dim oRange As Range | |
Dim nIndex As Integer, nSubIndex As Integer, nTotalPages As Integer, nBound As Integer | |
Dim fso As Object |
This file contains hidden or 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
# coding: utf-8 | |
import os | |
import datetime | |
def update_time(dtime, delta_second): | |
hms, ms = dtime.split('.') | |
h, m, s = hms.split(':') | |
delta = datetime.timedelta(seconds=delta_second) | |
update_dtime = datetime.datetime.strptime(hms, "%H:%M:%S") + delta |
This file contains hidden or 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
# codng: utf-8 | |
import win32api | |
import win32con | |
import time | |
#Giant dictonary to hold key name and VK value | |
VK_CODE = {'backspace':0x08, | |
'tab':0x09, | |
'clear':0x0C, | |
'enter':0x0D, |
This file contains hidden or 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
# coding: utf-8 | |
import json | |
import os | |
import subprocess | |
import pickle | |
import time | |
import base64 | |
import numpy as np | |
from flask import (Blueprint, Flask, current_app, jsonify, make_response, | |
request, send_file) |
This file contains hidden or 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
# coding: utf-8 | |
import json | |
import os | |
import subprocess | |
import pickle | |
import time | |
import base64 | |
import numpy as np | |
from flask import (Blueprint, Flask, current_app, jsonify, make_response, | |
request, send_file) |
This file contains hidden or 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 cal_PR(TP, FN, FP, TN): | |
print(TP, FN, FP, TN) | |
P = TP / (TP + FP) | |
R = TP / (TP + FN) | |
Acc = (TP + TN) / (TP + TN + FP + FN) | |
return Acc, P, R | |
def count_tfnp(label, output, TN, FP, TP, FN): |
This file contains hidden or 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 gradio as gr | |
from utils import read_image_from_stream | |
# For Gradio | |
f = read_image_from_stream() | |
def func(data): | |
image = "" | |
while True: |
This file contains hidden or 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 gradio as gr | |
res = [] # It can only be stored in lists. | |
def generate_text(): | |
for x in range(10): | |
res.append(str(x)) | |
yield " ".join(res) # Here is to add to the display, not replace it. | |
yield " ".join(res) | |
f = generate_text() |
This file contains hidden or 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 requests | |
import json | |
import time | |
# 创建bot时获取,注:需要在OAuth & Permission中添加若干权限,channels:history,channels:read,channels:write,groups:history,groups:read,groups:write,chat:write, im:history, im:write, mpim:history,mpim:read, mpim:write | |
token = "" # 固定 | |
# F12 获取 | |
user_token = "" # 固定 | |
header_text = "" # 形如----WebKitFormBoundary********,把*替换正确数值 |
OlderNewer