Skip to content

Instantly share code, notes, and snippets.

@ignacio82
ignacio82 / ge_zw4008.yaml
Last active April 11, 2023 23:14 — forked from shannonfritz/ge_zw4008.yaml
GE/Jasco 46201 / ZW4008 Home Assistant Blueprint
blueprint:
name: GE/Jasco 43072 / ZW4008DV Switch (Z-Wave JS) v0.02
description: Create automations for the GE/Jasco Switches using the Z-Wave JS integration.
domain: automation
input:
ge_jasco:
name: Switch Device
description: List of available GE/Jasco 46201 / ZW4008 switches
selector:
device:
@ignacio82
ignacio82 / tts-door-opening.yaml
Last active August 31, 2022 03:35 — forked from rokam/tts-door-opening.yaml
Send a greetings TTS message using tts.google_say service after opening the door, considering who arrived in the configured minutes.
blueprint:
name: Welcome on door opening with persons at home
description: Sends TTS message to a media_player when door is oppened with the person
at home
domain: automation
input:
door_sensor:
name: Door sensor
selector:
entity:
@ignacio82
ignacio82 / motion_smart_dimmer_V1.yaml
Last active August 2, 2022 17:12
Home Assistant Blueprint: Motion Smart Dimmer V1.0
blueprint:
name: Motion Smart Light Dimmer V1.0
description: |
Version 1.0
Dim or turn off light based on the value of a light sensor
source_url: https://gist.github.com/ignacio82/d1e3ae98ad35182e6d974e2ac4801e5c/edit
domain: automation
input:
schedule_start:
name: Schedule start time
functions {
// lower bound is a, upper bound is b, rv is x, mean is mu, sd is sigma
vector xi(vector x, real mu, real sigma) {
return((x - mu)./sigma);
}
real alpha(real a, real mu, real sigma) {
real out;
out = (a==negative_infinity())? negative_infinity(): (a - mu)/sigma;
@ignacio82
ignacio82 / ssh.R
Last active January 27, 2018 18:36
ssh into github
library(googleComputeEngineR)
vm <- gce_vm_template(template = "r-base",
predefined_type = "f1-micro",
name = "test1",
dynamic_image = gce_tag_container("im-rstudio"),
wait = TRUE)
vm <- gce_ssh_setup(vm,
username = "ignacio",
@ignacio82
ignacio82 / embarrassingly.R
Last active January 27, 2018 20:47
embarrassingly parallel with google cloud
library(googleComputeEngineR)
library(dplyr)
library(stringr)
library(future)
library(future.apply)
# plan(multiprocess)
# Create some fake data ---------------------------------------------------
set.seed(12618)
n<-10000
opts: {"data":[{"x":-3.8416283464934,"y":0.0000197722731730933},{"x":-3.8345163403057,"y":0.0000216975384427691},{"x":-3.827404334118,"y":0.0000237967571458154},{"x":-3.8202923279303,"y":0.0000261010485621142},{"x":-3.8131803217426,"y":0.0000285877072687884},{"x":-3.8060683155549,"y":0.000031267240449446},{"x":-3.79895630936719,"y":0.000034150471644882},{"x":-3.79184430317949,"y":0.000037277162987852},{"x":-3.78473229699179,"y":0.0000406884275257408},{"x":-3.77762029080409,"y":0.0000443510920342548},{"x":-3.77050828461639,"y":0.0000482782288270495},{"x":-3.76339627842869,"y":0.0000524832296821296},{"x":-3.75628427224099,"y":0.0000570184445832498},{"x":-3.74917226605329,"y":0.0000619362836827529},{"x":-3.74206025986559,"y":0.000067189866376498},{"x":-3.73494825367789,"y":0.0000727947311630567},{"x":-3.72783624749019,"y":0.0000787666999094524},{"x":-3.72072424130248,"y":0.0000851723761725516},{"x":-3.71361223511478,"y":0.0000920761247048909},{"x":-3.70650022892708,"y":0.0000994138966837492},{"x":-3.69938822273

Keybase proof

I hereby claim:

  • I am ignacio82 on github.
  • I am ignacio (https://keybase.io/ignacio) on keybase.
  • I have a public key whose fingerprint is 6EBB EA95 9378 B144 E75E C83D BB40 34B7 94DD C09D

To claim this, I am signing this object: