本文档从 CC-Viewer 项目中提取全部 Prompt 系统的设计模式, 覆盖 Preset Shortcuts(3 个内置预置)和 UltraPlan(2 个专家模板), 共 12 个可复用设计模式(A-L),供其他 Claude Code 项目参考。
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
| #!/usr/bin/env python3 | |
| """ | |
| 完整的 Bambu Lab 中国区登录测试脚本,绕过 Cloudflare 并测试完整流程 | |
| """ | |
| import json | |
| import argparse | |
| import time | |
| from curl_cffi import requests as curl_requests | |
| import cloudscraper |
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
| [Physics::Module] Initialized MultithreadedJobDispatcher with 23 workers. | |
| Initialize engine version: 2022.3.11f1m1 (0) | |
| [Subsystems] Discovering subsystems at path D:/Program Files (x86)/Steam/steamapps/common/NoRestForTheWicked/NoRestForTheWicked_Data/UnitySubsystems | |
| GfxDevice: creating device client; threaded=1; jobified=1 | |
| Direct3D: | |
| Version: Direct3D 11.0 [level 11.1] | |
| Renderer: NVIDIA GeForce RTX 4090 (ID=0x2684) | |
| Vendor: NVIDIA | |
| VRAM: 24142 MB | |
| Driver: 31.0.15.5222 |
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
| #!/usr/bin/env python3 | |
| import hashlib | |
| import logging | |
| import os | |
| import time | |
| from pathlib import Path | |
| logging.basicConfig( | |
| format="%(asctime)s - %(filename)s:%(lineno)d - %(levelname)s - %(message)s", | |
| level=logging.DEBUG, |
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
| from sly import Lexer, Parser | |
| import pytest | |
| from enum import Enum | |
| class QUOTE(Enum): | |
| START = 0 | |
| END = 1 | |
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 re | |
| from iredis.commands_csv_loader import all_commands | |
| from iredis.exceptions import InvalidArguments | |
| from iredis.utils import split_command_args | |
| from prompt_toolkit import PromptSession | |
| from prompt_toolkit.auto_suggest import AutoSuggestFromHistory | |
| from prompt_toolkit.completion import CompleteEvent, Completer, WordCompleter | |
| from prompt_toolkit.document import Document | |
| from prompt_toolkit.history import FileHistory |
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
| [tool.poetry] | |
| name = "20191008" | |
| version = "0.1.0" | |
| description = "" | |
| authors = ["ruohan.chen <crhan123@gmail.com>"] | |
| [tool.poetry.dependencies] | |
| python = "^2.7, <3.0 || ^3.7, < 3.8" | |
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
| virtualenv --no-site-packages hodor | |
| hodor/bin/pip install simplejson ujson cbor tnetstring msgpack-python | |
| curl -s 'http://www.json-generator.com/api/json/get/cvfsLVmKiG?indent=2' > test.json | |
| hodor/bin/python shootout.py |
支持的功能:
- 支持光照度条件, 环境光足够亮就不开灯, 例如阳台灯
- 支持多个 sensor 共同触发, 例如卫生间可以放两个人体传感器, 玄关可以放一个门窗传感器+人体传感器
- 支持只关不开(厕所排气扇场景)或者只开不关(不知道为啥要这样, 你想到了告诉我)
- 支持延时关闭, 根据自身情况设定, 规避人体传感器不灵敏的问题
这个功能不适合经常有人呆着的地方, 比如书房, 卧室, 客厅.
替换上你的 Token,域名ID,记录ID等参数,就可以运行了。 跟原代码不同的是,该版本每次执行就运行一次,方便使用调度系统来进行调度
获得domain_id可以用curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=xxx"
获得record_id类似
curl -k https://dnsapi.cn/Record.List -d "login_token=xxx&domain_id=xxx"
NewerOlder