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
const {binary, temperature, humidity, numeric, battery} = require('zigbee-herdsman-converters/lib/modernExtend'); | |
const definition = { | |
zigbeeModel: ['Alab-PhSensor-1.0'], | |
model: 'Alab-PhSensor-1.0', | |
vendor: 'Alab', | |
description: '[DiY Wireless PH Sensor](https://github.com/9zigen/zigbee-ph-sensor)', | |
extend: [ | |
temperature(), | |
humidity(), |
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
#include <stdio.h> | |
#include <adc.h> | |
#include <device.h> | |
#include <math.h> | |
#include <sensor.h> | |
#include <zephyr.h> | |
#include <gpio.h> | |
#include <nrf_saadc.h> |
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 sys, smtplib, time | |
import datetime | |
import imaplib | |
import email | |
import json | |
EMAIL = "<YOURADDRESS>@gmail.com" | |
PWD = "<YOURSECRETPASSWORD>" | |
SMTP_SERVER = "imap.gmail.com" | |
SMTP_PORT = 993 |
Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.
Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown
Starts Youtube App
entity_id: media_player.shield
command: >-
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
def process_video(group_number): | |
cap = cv2.VideoCapture("input_file.mp4") | |
cap.set(cv2.CAP_PROP_POS_FRAMES, frame_jump * group_number) | |
proc_frames = 0 | |
out = cv2.VideoWriter("output_{}.avi".format(group_number), ...) | |
while proc_frames < frame_jump: | |
ret, frame = cap.read() | |
# ... DO SOME STUFF TO frame ... # | |
proc_frames += 1 | |
out.write(frame) |
Install OpenCV 4.1.2 on Raspbian Buster
$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.2/build
$ sudo make install
This gist allows you to implement a material drawer easily for your projects. It consists of three files:
- PageDrawer.qml The drawer itself, with an icon viewer, a list view and some hacks to execute the actions/functions assigned to each drawer item
- DrawerItem.qml Which can act as an action, a spacer, a separator or a link
- SvgImage.qml Ugly hack to make SVG images look crisp and smooth on HDPI screens
This code is released under the WTFPL, for more information click here.
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
#include <zephyr.h> | |
#include <misc/printk.h> | |
#include <device.h> | |
#include <gpio.h> | |
#include <sys_clock.h> | |
#include <misc/util.h> | |
#include <limits.h> | |
#define GPIO_OUT_PIN 1 | |
#define GPIO_INT_PIN 3 |