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 eclipse-temurin:17-alpine | |
| RUN apk --no-cache add curl | |
| WORKDIR /opt/apps/musicbot | |
| RUN addgroup -S musicbot && adduser --no-create-home -S -G musicbot musicbot | |
| RUN chown musicbot:musicbot . | |
| USER musicbot:musicbot | |
| RUN curl https://github.com/jagrosh/MusicBot/releases/download/0.3.8/JMusicBot-0.3.8.jar --output JMusicBot.jar --location |
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 cv2 import VideoCapture, waitKey | |
| from pyzbar import pyzbar | |
| camera = VideoCapture(0) | |
| while not (waitKey(1) & 0xFF == ord('q')) and camera is None or camera.isOpened(): | |
| for barcode in pyzbar.decode(camera.read()[1]): | |
| print(barcode.data.decode('UTF-8')) | |
| camera.release() |