OpenAI has a nice automatic image captioning service, you can get this up and running by
-
Create a virtual environment:
python3 -m venv venv
[Unit] | |
Description=Syncthing - Open Source Continuous File Synchronization | |
Documentation=man:syncthing(1) | |
After=network.target | |
[Service] | |
User=pi | |
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0 | |
Restart=on-failure | |
RestartSec=5 |
#!/bin/bash | |
docker run -itd --name Portainer -p 8000:8000 -p 9443:9443 -v /var/run/docker.sock:/var/run/docker.sock cr.portainer.io/portainer/portainer-ce:latest |
import time | |
from gpiozero import LED | |
# Setup | |
led = LED(17) | |
iterations = 100000 # Number of times the LED will be toggled on and off | |
# Benchmark | |
start_time = time.time() |
// Lesson 01 Movement | |
// www.smarsfan.com/play/lessons/lesson_01_movement | |
// set Motor A to Arduino Pins | |
int motor_A = 12; | |
int motor_B = 13; | |
// set the Motor Speed using the Arduino Pins | |
int motor_A_speed = 10; | |
int motor_B_speed = 11; |
# SPDX-FileCopyrightText: 2023 Pete Warden | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# Example of accessing the Tiny Code Reader from Useful Sensors on a Trinkey | |
# using CircuitPython. See https://usfl.ink/tcr_dev for the full developer guide. | |
# Modified by Kevin McAleer to run on standard MicroPython (original code was CircuitPython) | |
from machine import I2C, Pin | |
import struct |
# Did you know you can print Emojis in Python? | |
print("🥰 Happy 🌎 Emoji day! ❤️ 🐍🐍🐍") |
# Kevin McAleer | |
# 2023-06-28 | |
# Bluetooth cores specification versio 5.4 (0x0D) | |
import sys | |
import aioble | |
import bluetooth | |
import machine | |
import uasyncio as asyncio |
# from icons import food_icon | |
from machine import I2C, Pin | |
from ssd1306 import SSD1306_I2C | |
from icon import Animate, Icon, Toolbar, Button, Event | |
from time import sleep | |
import framebuf | |
import gc | |
sda = Pin(0) | |
scl = Pin(1) |
from pybricks.geometry import Axis | |
from pybricks.hubs import InventorHub | |
from pybricks.parameters import Direction, Port | |
from pybricks.pupdevices import ColorSensor, Motor | |
from pybricks.tools import StopWatch, wait | |
# Initialize motors. | |
left = Motor(Port.C, Direction.COUNTERCLOCKWISE) | |
right = Motor(Port.D) | |
left.reset_angle(0) |