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 sys | |
import csv | |
import json | |
# Converts the JSON output of a PowerBI query to a CSV file | |
def extract(input_file, output_file): | |
input_json = read_json(input_file) | |
data = input_json["results"][0]["result"]["data"] | |
dm0 = data["dsr"]["DS"][0]["PH"][0]["DM0"] |
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
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
typedef enum { | |
EMPTY, | |
START_ENTERING, // bee is entering the gate from outside, so it's entering | |
MIDDLE_ENTERING, | |
END_ENTERING, // bee is almost all inside | |
START_EXITING, // bee is entering the gate from inside, so it's exiting |
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
/* | |
* | |
* gate 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 | |
* inside 1 || 3 || 5 || 7 || 9 || 11 || 13 || 15 || 17 || 19 || 21 || 23 || 25 || 27 || 29 || 31 || 33 || 35 || 37 || 39 || 41 || 43 || 45 || 47 | |
* outside 2 || 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 22 || 24 || 26 || 28 || 30 || 32 || 34 || 36 || 38 || 40 || 42 || 44 || 46 || 48 | |
* | |
* | |
* HOW long can we drive the LEDs ON without current limiting resistors? | |
* LED timed pulse (tp) allowance vs period (T) | |
* with increasing forward current the IR LED cutsheet says max tp/T = 0.01 |
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
/* | |
* | |
* gate 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 | |
* inside 1 || 3 || 5 || 7 || 9 || 11 || 13 || 15 || 17 || 19 || 21 || 23 || 25 || 27 || 29 || 31 || 33 || 35 || 37 || 39 || 41 || 43 || 45 || 47 | |
* outside 2 || 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 22 || 24 || 26 || 28 || 30 || 32 || 34 || 36 || 38 || 40 || 42 || 44 || 46 || 48 | |
* | |
* | |
* HOW long can we drive the LEDs ON without current limiting resistors? | |
* LED timed pulse (tp) allowance vs period (T) | |
* with increasing forward current the IR LED cutsheet says max tp/T = 0.01 |