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 linux; | |
use log; | |
use core::fmt::Write; | |
use core::fmt; | |
use log::{LogRecord, LogLevel, LogMetadata}; | |
#[derive(Default)] | |
struct DMesgLogger; |
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 pipeline = framed_reader | |
.map(move |b| { | |
let message: proto::Message = bincode::deserialize(&b).unwrap(); | |
let file; | |
let blocking_future; | |
match message { | |
proto::Message::Request(m) => { | |
file = m.file.clone(); | |
if m.file == Path::new("/root/test/file").to_path_buf() { | |
blocking_future = poll_fn(move || { |
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
"""Please, let me know which child is calling me: 'parent' ? """ | |
class A: | |
"""This is a mixin class to share code for DRY""" | |
def __init__(self, var=None): | |
super().__init__() | |
self.override_me() | |
def override_me(self): |
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
blueprint: | |
name: Wake-up light alarm with sunrise effect | |
description: 'A wake-up light alarm with a brightness and color temperature sunrise | |
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!' | |
domain: automation | |
input: | |
light_entity: | |
name: Wake-up light entity | |
description: The light to control. Turning it off during the sunrise will keep | |
it off. Color temperature range is auto-detected. |
OlderNewer