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
# This is the prompt library for openai_powershell_sdk |
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
from flask import Flask, render_template, request | |
from dotenv import load_dotenv | |
import os | |
import requests | |
app = Flask(__name__) | |
load_dotenv() | |
def classify_image(image_data): | |
endpoint = "https://japaneast.api.cognitive.microsoft.com/customvision/v3.0/Prediction/44bd0c2b-20c3-43d9-9805-2f5de1476c3b/classify/iterations/Iteration2/image" |
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 requests | |
from dotenv import load_dotenv | |
import os | |
def classify_image(image: str, local: bool = False): | |
load_dotenv() | |
if local: | |
endpoint = "https://japaneast.api.cognitive.microsoft.com/customvision/v3.0/Prediction/44bd0c2b-20c3-43d9-9805-2f5de1476c3b/classify/iterations/Iteration2/image" | |
headers = { |
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
name: 单元格赋值 | |
description: 单元格赋值 | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(run)); | |
async function run() { | |
await Excel.run(async (context) => { |
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
name: 基本知识 | |
description: 介绍了基本知识 | |
host: EXCEL | |
api_set: {} | |
script: | |
content: > | |
// 那些Excel中的脚本 (公众号:code365) | |
// 作者:陈希章 |
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
name: 随机之美 | |
description: 随机数以及它在Excel中的有趣应用 | |
host: EXCEL | |
api_set: {} | |
script: | |
content: |+ | |
$("#run").click(() => tryCatch(run)); | |
async function run() { | |
await Excel.run(async (context) => { |
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
name: 读取当前脚本运行环境信息 | |
description: 读取应用程序和平台信息 | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(run)); | |
async function run() { | |
Office.onReady(async (info)=>{ |
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
name: 引用外部模块 | |
description: 本例演示了如何引用外部的npm模块来简化编程 | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(run)); | |
async function run() { | |
await Excel.run(async (context) => { |
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
name: 读取远程图片并插入文档 | |
description: 读取网络图片,并且解析,然后写到工作表中 | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(run)); | |
async function run() { | |
await Excel.run(async (context) => { |
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
name: 选择图片并插入文档 | |
description: Create a new snippet from a blank template. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(run)); | |
async function run() { | |
await Excel.run(async (context) => { |
NewerOlder