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
# pull official base image | |
FROM python:3.9.6 | |
ENV PYTHONDONTWRITEBYTECODE 1 | |
ENV PYTHONUNBUFFERED 1 | |
# Set working directory | |
WORKDIR /code |
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
# Containers ids | |
postgres-id=$(shell docker ps -a -q -f "name=postgres-container") | |
# Stop docker containers | |
stop-all: | |
@docker-compose stop | |
stop-db: | |
-@docker stop $(postgres-id) |
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
version: '3.3' | |
services: | |
db: | |
image: postgres:12.2 | |
container_name: 'postgres-container' | |
labels: | |
application: 'postgres-db' | |
volumes: | |
- postgres_data:/var/lib/postgresql/data/ |
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 djitellopy import Tello | |
import time | |
from pprint import pprint | |
print("Create Tello object") | |
tello = Tello() | |
print("Connect to Tello Drone") | |
tello.connect() |
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 djitellopy import Tello | |
import time | |
tello = Tello() | |
tello.connect() | |
time.sleep(2) | |
response = tello.get_battery() | |
print(response) |
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
# Test that the necessary imports and libraries are available | |
def print_setup_instructions(): | |
print("Make sure your python virtual environment is activated") | |
print("Open a Terminal window (MacOS) or Command Prompt (Windows) and run:") | |
print(""" | |
pip install -r requirements.txt | |
pip install https://github.com/damiafuentes/DJITelloPy/archive/master.zip | |
""") |
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
APScheduler==3.6.3 | |
Authlib==0.15.3 | |
Babel==2.9.0 | |
Flask-AppBuilder==3.1.1 | |
Flask-Babel==1.0.0 | |
Flask-Bcrypt==0.7.1 | |
Flask-Caching==1.9.0 | |
Flask-JWT-Extended==3.25.1 | |
Flask-Login==0.4.1 | |
Flask-OAuthlib==0.9.5 |
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
# USAGE | |
import argparse | |
import imutils | |
from imutils.video import VideoStream | |
import time | |
import cv2 | |
import requests |
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
""" | |
Script to run inference while following along with the blog: | |
https://gilberttanner.com/blog/tensorflow-object-detection-with-tensorflow-2-creating-a-custom-model | |
and YouTube | |
https://www.youtube.com/watch?v=cvyDYdI2nEI | |
""" |
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
python reinforcement_learning/GridEnvironmentQLearner.py --name simple --episodes 50000 --show-every 10000 --show-first-n 3 --show-last-n 15 | |