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
import processing.sound.*; | |
AudioIn input; | |
LowPass lowPass; | |
FFT fft; | |
int bands = 2048; | |
int samplerate = 44100; | |
float[] spectrum = new float[samplerate]; |
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
// Variables | |
@import "admin/variables"; | |
// Bulma | |
@import "node_modules/bulma/sass/utilities/_all"; | |
// Override Bulma variables here | |
// Set the default font | |
$family-primary: 'Lato', 'Open Sans', sans-serif; | |
$family-secondary: 'Open Sans', sans-serif; |
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
# The Path class | |
class Path: | |
def __init__(self, knot0, knot1, metric, sort=False): | |
self.knot0 = knot0 | |
self.knot1 = knot1 | |
self.metric = metric | |
def other(self, knot): | |
if self.knot0 == knot: | |
return self.knot1 |
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
/** | |
* Given a Rect with params left, top, right, bottom where each corner gets a value from the | |
* top left corner, return the Rect for a scaled bitmap at (x,y). | |
* | |
* size is the new width of the image. | |
*/ | |
public Rect drawBitmapWithAspectRatio(Bitmap bitmap, float x, float y, float size, boolean centered) { | |
// Get the nee height based on the desired size and the bitmaps aspect ratio |
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
{ | |
init: function(elevators, floors) { | |
var elevator = elevators[0]; // Let's use the first elevator | |
var requested_floors = new Set(); | |
var stop_for_leavers = new Set(); | |
var collectPassengersOnPass = function(elevator) { | |
elevator.on("passing_floor", function(floorNum, direction) { |
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
from zigpy.profiles import PROFILES, zha | |
from zigpy.zcl.clusters.general import Basic, Identify,\ | |
Ota, PowerConfiguration, Time, Groups | |
from zigpy.zcl.clusters.hvac import Thermostat | |
from zigpy.quirks import CustomDevice, CustomCluster | |
import zigpy.types as types | |
from zigpy.zcl import foundation | |
THERMOSTAT_CHANNEL = 'thermostat' |
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
esphome: | |
name: water_bottles | |
platform: ESP8266 | |
board: d1_mini | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
api: |
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
import bpy, os | |
result = "" | |
obdata = bpy.context.object.data | |
result += 'Vertices: \n' | |
for v in obdata.vertices: | |
result += ('{}, {}, {}, '.format(v.co.x, v.co.z, v.co.y)) + '\n' |
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
[{"id":"7dd9b949.241c5","type":"server-state-changed","z":"888ff54.01d0f08","name":"Echo Input is playing","server":"e02cc9b7.16ead8","entityidfilter":"media_player.echo_input","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"playing","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":130,"y":120,"wires":[[],["94457b00.b5f5a8"]]},{"id":"cac76f36.abacc8","type":"api-call-service","z":"888ff54.01d0f08","name":"Select line3","server":"e02cc9b7.16ead8","service_domain":"media_player","service":"select_source","data":"{\"entity_id\":\"media_player.receiver\",\"source\":\"line3\"}","mergecontext":"","output_location":"","output_location_type":"none","x":810,"y":120,"wires":[[]]},{"id":"1f5384a.3c845fb","type":"api-call-service","z":"888ff54.01d0f08","name":"Turn Receiver on","server":"e02cc9b7.16ead8","service_domain":"media_player","service":"turn_on","data":"{\"entity_id\":\"media_player.receiver\"}","mergecontext":"","output_locat |
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
[ | |
{ | |
"id": "1a171a83.11dfdd", | |
"type": "api-call-service", | |
"z": "25e52f9c.ae111", | |
"name": "save state", | |
"server": "e02cc9b7.16ead8", | |
"version": 1, | |
"debugenabled": false, | |
"service_domain": "scene", |
OlderNewer