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
""" | |
Loads and displays a video. | |
""" | |
# Importing OpenCV | |
import cv2 | |
import numpy as np | |
# Create a VideoCapture object and read from input file | |
# If the input is the camera, pass 0 instead of the video file name |
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
# boot.py | |
# Set Circuit Playground Express flash chip to program writeable | |
# If toggle switch is right, | |
# flash is program writeable and file access is frozen | |
# If toggle switch is left, | |
# flash chip file access ok, file writes give an error | |
# via Dan Conley | |
# https://learn.adafruit.com/cpu-temperature-logging-with-circuit-python/ | |
# writing-to-the-filesystem | |
# 2018 Mike Barela for Getting Started with Circuit Playground Express |
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
esphome: | |
name: m5cam | |
platform: ESP32 | |
board: m5stack-core-esp32 | |
wifi: | |
ssid: "ssid" | |
password: "password" | |
# Enable logging |
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
from machine import I2C, Pin | |
import ssd1306 | |
import mpu6050 | |
from simulation import Simulation | |
i2c = I2C(scl=Pin(5), sda=Pin(4)) | |
display = ssd1306.SSD1306_I2C(128, 64, i2c) | |
accel = mpu6050.accel(i2c) | |
s = Simulation(accel, display) |
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
target extended-remote /dev/ttyACM0 | |
monitor version | |
monitor swdp_scan | |
attach 1 | |
set mem inaccessible-by-default off |
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
[Unit] | |
DefaultDependencies=no | |
After=local-fs.target | |
[email protected] | |
[Service] | |
StandardInput=tty | |
StandardOutput=tty | |
ExecStart=/usr/bin/fbi -d /dev/fb0 --once --noverbose --autozoom /opt/splash.png |
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
import datetime as dt | |
import tkinter as tk | |
import tkinter.font as tkFont | |
import matplotlib.figure as figure | |
import matplotlib.animation as animation | |
import matplotlib.dates as mdates | |
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg | |
import tmp102 | |
import apds9301 |
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
import sys | |
sys.path.append('/opt/cocoapi/PythonAPI') | |
from pycocotools.coco import COCO | |
import nltk | |
nltk.download('punkt') | |
from data_loader import get_loader | |
from torchvision import transforms | |
import torch | |
from collections import Counter | |
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
public class FileLoggingTree extends Timber.DebugTree { | |
private static final String LOG_TAG = FileLoggingTree.class.getSimpleName(); | |
@Override | |
protected void log(int priority, String tag, String message, Throwable t) { | |
try { | |
String path = "Log"; | |
String fileNameTimeStamp = new SimpleDateFormat("dd-MM-yyyy", | |
Locale.getDefault()).format(new Date()); |
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
from machine import Pin, Signal, I2C, ADC, Timer | |
import ssd1306 | |
import time | |
adc = ADC(0) | |
i2c = I2C(-1, Pin(5), Pin(4)) | |
display = ssd1306.SSD1306_I2C(128, 32, i2c) | |
MAX_HISTORY = 250 |