支持的功能:
- 支持光照度条件, 环境光足够亮就不开灯, 例如阳台灯
- 支持多个 sensor 共同触发, 例如卫生间可以放两个人体传感器, 玄关可以放一个门窗传感器+人体传感器
- 支持只关不开(厕所排气扇场景)或者只开不关(不知道为啥要这样, 你想到了告诉我)
- 支持延时关闭, 根据自身情况设定, 规避人体传感器不灵敏的问题
这个功能不适合经常有人呆着的地方, 比如书房, 卧室, 客厅.
[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 |
#!/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, |
from sly import Lexer, Parser | |
import pytest | |
from enum import Enum | |
class QUOTE(Enum): | |
START = 0 | |
END = 1 | |
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 |
[tool.poetry] | |
name = "20191008" | |
version = "0.1.0" | |
description = "" | |
authors = ["ruohan.chen <[email protected]>"] | |
[tool.poetry.dependencies] | |
python = "^2.7, <3.0 || ^3.7, < 3.8" | |
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 |
支持的功能:
这个功能不适合经常有人呆着的地方, 比如书房, 卧室, 客厅.
替换上你的 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"
module Gem | |
class << self | |
## | |
# Returns full path of previous but one directory of dir in path | |
# E.g. for '/usr/share/ruby', 'ruby', it returns '/usr' | |
def previous_but_one_dir_to(path, dir) | |
split_path = path.split(File::SEPARATOR) | |
File.join(split_path.take_while { |one_dir| one_dir !~ /^#{dir}$/ }[0..-2]) |