This file contains hidden or 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/python3 | |
import tflite_runtime.interpreter as tflite | |
import sys | |
import os | |
import argparse | |
import cv2 | |
import numpy as np |
This file contains hidden or 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
var WIDGETPOS={tl:32,tr:g.getWidth()-32,bl:32,br:g.getWidth()-32}; | |
var WIDGETS={}; | |
function drawWidgets() { for (var w of WIDGETS) w.draw(); } | |
require("Storage").list().filter(a=>a[0]=='=').forEach(widget=>eval(require("Storage").read(widget))); | |
setTimeout(drawWidgets,100); |
This file contains hidden or 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
// drawWidgets() is added by bootloader.js when loading a clock app, but when you upload via the IDE it just | |
// resets the watch and skips out running bootloader.js completely. So add the relevant code from the bootloader. | |
var WIDGETPOS={tl:32,tr:g.getWidth()-32,bl:32,br:g.getWidth()-32}; | |
var WIDGETS={}; | |
function drawWidgets() { for (var w of WIDGETS) w.draw(); } | |
require("Storage").list().filter(a=>a[0]=='=').forEach( | |
widget=>eval(require("Storage").read(widget))); | |
setTimeout(drawWidgets,100); |
This file contains hidden or 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
let creditCardNumbers = [ | |
4964149475059987, | |
4898620401632387, | |
4393958570449195, | |
4751492711160905, | |
4437340772573099, | |
] | |
let valid = creditCardNumbers.filter | |
{ number in |
This file contains hidden or 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
#define Debug Serial | |
float average = 0.0; | |
float total = 0.0; | |
int count = 0; | |
void setup() { | |
analogReadResolution(12); | |
pinMode(A0, INPUT); | |
Debug.begin(9600); |
This file contains hidden or 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/env python3 | |
import sys | |
import os | |
import time | |
import vcgencmd as vc | |
from gpiozero import OutputDevice | |
def main(): | |
fan = OutputDevice(18) |
This file contains hidden or 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/env python3 | |
import sys | |
import os | |
import time | |
import vcgencmd as vc | |
def main(): | |
start_time = time.time() | |
fb = open("/home/pi/readings.txt","a+") |
This file contains hidden or 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/env python3 | |
import sys | |
import os | |
import logging as log | |
import argparse | |
import subprocess | |
from timeit import default_timer as timer | |
from PIL import Image |
This file contains hidden or 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/env python3 | |
import tensorflow as tf | |
import sys | |
import os | |
import logging as log | |
import argparse | |
import subprocess | |
from timeit import default_timer as timer |
This file contains hidden or 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/env python3 | |
import platform | |
PLATFORM = platform.system().lower() | |
GOOGLE = 'edge_tpu' | |
INTEL = 'ncs2' | |
NVIDIA = 'jetson_nano' | |
PI = 'raspberry_pi' | |
IS_LINUX = (PLATFORM == 'linux') |