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 ctypes | |
| import math | |
| import numpy as np | |
| import scipy.io.wavfile as wavfile | |
| # 加载DLL | |
| soundtouch_dll = ctypes.CDLL("soundtouch_dll-2.3.3/SoundTouchDLL_x64.dll") | |
| # 定义函数原型 |
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
| use std::fs::OpenOptions; | |
| use std::io::Write; | |
| use std::path::PathBuf; | |
| fn main() -> std::io::Result<()> { | |
| let functions_dir = PathBuf::from("src/functions"); | |
| let mut out = String::from("use clap::Command;\n"); | |
| let entries = std::fs::read_dir(&functions_dir)?; | |
| let filenames: Vec<_> = entries |
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
| use crate::error::Result; | |
| use curp::client::ClientApi; | |
| use futures::{future::BoxFuture, FutureExt}; | |
| use pin_project::pin_project; | |
| use std::future::Future; | |
| use std::task::Poll; | |
| use std::{pin::pin, sync::Arc}; | |
| use tonic::Status; | |
| use xlineapi::{ | |
| command::{Command, CommandResponse, KeyRange, SyncResponse}, |
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 win32com.client | |
| excel = win32com.client.GetActiveObject("Excel.Application") | |
| wb = excel.ActiveWorkbook | |
| sheet = wb.ActiveSheet | |
| selected = excel.Selection | |
| columns = selected.Columns.Count | |
| out = open("output.typ", "w", encoding="utf-8") | |
| out.write(f"#table(columns: {columns}, ") |
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
| #let get_text(knt) = { | |
| let temp = knt.at("body", default: false) | |
| if temp == false { temp = knt.at("text") } | |
| temp | |
| } | |
| #let get_text2(knt) = { | |
| knt.at("body", default: knt.at("text", default: "anything")) | |
| } | |
| #let get_text3(knt) = { | |
| knt.at("body", default: knt.at("text")) |
NewerOlder