This file contains 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: ZHA - IKEA five button remote for lights with majority voting | |
description: 'Control lights with an IKEA five button remote (the round ones). | |
The middle "on" button, toggle the lights on/off to the last set brightness | |
based on the majorities state. | |
Dim up/down buttons will change the brightness smoothly and can be pressed |
This file contains 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 triangle_filter(self, n): | |
f = np.zeros((1+2*n)) | |
for i in range(n): | |
f[i] = i+1 | |
f[-i-1] = i+1 | |
f[n] = n + 1 | |
return f / np.sum(f) | |
filter = triangle_filter(smoothing_factor) | |
tmp = np.pad(data, smoothing, mode='edge') |
This file contains 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
#!/usr/bin/swift -suppress-warnings | |
// based on https://chrisbrandow.svbtle.com/csv-to-multimarkdown-tables | |
import Foundation | |
let separators: [Character: String] = ["=": ":---:", ">": "----:", "<": ":----"] | |
let separatorSet = CharacterSet(charactersIn: "><=, ") | |
func csv(data: String) -> [[String]] { | |
var result: [[String]] = [] | |
let rows = data.components(separatedBy: "\n") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Symbol List</string> | |
<key>scope</key> | |
<string>meta.function.headline.latex</string> | |
<key>settings</key> | |
<dict> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder