Skip to content

Instantly share code, notes, and snippets.

View robmarkcole's full-sized avatar
💭
Busy pythonizing

Robin Cole robmarkcole

💭
Busy pythonizing
View GitHub Profile
@dgomes
dgomes / filter.py
Created February 13, 2018 03:02
Filter Component for Home Assistant
"""
Support for filtering for sensor values.
Example config:
sensor:
- platform: filter
entity_id: sensor.outside_temperature
For more details about this platform, please refer to the documentation at
@psychemedia
psychemedia / SimpleAPI.ipynb
Created September 6, 2017 16:27
Demo of a simple API defining Jupyter notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Teagan42
Teagan42 / example.yaml
Last active April 12, 2020 12:13
A custom camera component that allows you to see the detected regions from the OpenCV image processor in Home-Assistant. Add this to your configuration directory: {CONFIG_DIRECTORY}/custom_components/opencv.py
camera:
- platform: opencv
camera: camera.front_door
processor: image_processing.front_door_opencv_faces
# Optional Parameters
name: OpenCV Camera
@deehzee
deehzee / psycopg2_sshtunnel.py
Last active January 16, 2025 15:22
How to Connect To PostgreSQL Using SSHTunnelForwarder and Psycopg2
import psycopg2
from sshtunnel import SSHTunnelForwarder
# For interactive work (on ipython) it's easier to work with explicit objects
# instead of contexts.
# Create an SSH tunnel
tunnel = SSHTunnelForwarder(
('128.199.169.188', 22),
ssh_username='<username>',
@balloob
balloob / MQTT_ESP8266_temperature_humidity.ino
Created June 20, 2016 04:11
Sketch for the ESP8266 to publish temperature and humidity values received from a DHT22 to MQTT
// Get ESP8266 going with Arduino IDE
// - https://github.com/esp8266/Arduino#installing-with-boards-manager
// Required libraries (sketch -> include library -> manage libraries)
// - PubSubClient by Nick ‘O Leary
// - DHT sensor library by Adafruit
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mojodna
mojodna / README.md
Last active May 17, 2024 12:53
GDAL 2.0 on Amazon Linux
sudo yum -y update
sudo yum-config-manager --enable epel
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | tar zxf -
cd gdal-2.0.0/
./configure --prefix=/usr/local --without-python
make -j4
sudo make install
@jqtrde
jqtrde / modern-geospatial-python.md
Last active August 1, 2023 14:50
Modern remote sensing image processing with Python
@jkeefe
jkeefe / raspberry-pi-ble-sniffer.md
Last active September 16, 2023 14:33
Notes on using Adafruit's "Bluefruit" BLE sniffer with a Raspberry Pi

BLUETOOTH SNIFFER

Working to sniff Bluetooth Low Energy with the adafruit sniffer

For more information, see this blog post

Going the python route, as described here

before installing pySerial, did ...

@mgymrek
mgymrek / ipython-pretty-tables.ipynb
Created January 12, 2014 19:05
Making formatted tables for IPython notebooks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.