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
| javascript:(function() { | |
| // 获取当前时间 | |
| var now = new Date(); | |
| var formattedTime = now.toISOString().slice(0, 16); // 格式化为 YYYY-MM-DDTHH:MM | |
| // 找到 DateTimePicker 的 input 元素 | |
| var inputElement = document.querySelector('.el-date-editor input'); | |
| if (inputElement) { | |
| // 模拟用户点击 input 元素 | |
| inputElement.click(); |
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 os | |
| import logging | |
| import requests | |
| import subprocess | |
| from pathlib import Path | |
| from datetime import datetime | |
| import time | |
| import json | |
| import time |
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
| // 对于没有命名空间的变量 | |
| #define BUILD_MY_FUNC_SINGLE(name) Build##name##Processor() | |
| // 对于有命名空间的变量 | |
| #define BUILD_MY_FUNC_NS(ns, name) Build##ns##name##Processor() | |
| // 定义一个辅助宏,根据参数数量调用正确的宏 | |
| #define GET_MACRO(_1,_2,NAME,...) NAME | |
| #define BUILD_MY_FUNC(...) GET_MACRO(__VA_ARGS__, BUILD_MY_FUNC_NS, BUILD_MY_FUNC_SINGLE)(__VA_ARGS__) |
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
| type PromiseFunction<T> = () => Promise<T>; | |
| type PromiseResult<T> = { status: 'fulfilled', value: T } | { status: 'rejected', reason: any }; | |
| async function allSettledWithConcurrency<T>(promises: PromiseFunction<T>[], concurrency: number): Promise<PromiseResult<T>[]> { | |
| const results: PromiseResult<T>[] = new Array(promises.length); | |
| let running = 0; | |
| let index = 0; | |
| return new Promise((resolve) => { | |
| const enqueue = () => { |
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 json | |
| from mitmproxy import http, ctx | |
| from collections.abc import Iterable | |
| import time | |
| import jwt # pip install PyJWT / pipx inject mitmproxy PyJWT | |
| import re | |
| GLM_TOKEN = "[INSERT_YOUR_TOKEN]" | |
| GLM_HOST = "open.bigmodel.cn" |
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 numpy as np | |
| import csv | |
| from tqdm import tqdm | |
| import seaborn as sns | |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| def simulate_wait_times(num_machines, num_simulations, mean, std_dev): | |
| wait_times = [] |
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
| // should read | |
| // https://hedzr.com/c++/algorithm/cxx-is_detected-and-detection-idioms | |
| #include <iostream> | |
| #include <type_traits> | |
| #include <experimental/type_traits> | |
| // AClass definition | |
| class AClass { | |
| public: | |
| std::string dueDate; |
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
| mpv --no-video "https://www.youtube.com/watch?v=jfKfPfyJRdk" --script-opts=ytdl_hook-ytdl_path=yt-dlp.exe |
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
| export function fibonacci(num) { | |
| if (num <= 1) return num; | |
| return fibonacci(num - 1) + fibonacci(num - 2); | |
| } |
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 sseclient | |
| # API_KEY = 'sk-xxx' | |
| def performRequestWithStreaming(): | |
| reqUrl = 'https://api.openai.com/v1/chat/completions' | |
| reqHeaders = { |