This file contains 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 os | |
from flask import Flask, redirect, url_for | |
from flask_dance.consumer import oauth_authorized | |
from flask_dance.consumer.backend.sqla import OAuthConsumerMixin, SQLAlchemyBackend | |
from flask_dance.contrib.github import make_github_blueprint, github | |
from flask_dance.contrib.twitter import make_twitter_blueprint, twitter | |
from flask_login import UserMixin, current_user, LoginManager, login_required, login_user, logout_user | |
from flask_migrate import Migrate, MigrateCommand | |
from flask_script import Manager |
This file contains 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
def preview_image(image, name="window", time=1000): | |
import cv2 | |
cv2.imshow(name, image) | |
if cv2.waitKey(time): | |
cv2.destroyAllWindows() |
This file contains 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 os | |
import cognitive_face as CF | |
from cognitive_face import CognitiveFaceException | |
KEY = '' | |
CF.Key.set(KEY) | |
BASE_URL = 'https://centralindia.api.cognitive.microsoft.com/face/v1.0' # Replace with your regional Base URL | |
CF.BaseUrl.set(BASE_URL) |
This is probably the quickest and the easiest ways to get Docker and Docker Compose running on the Raspberry Pi. (Tested with Raspberry Pi B+ Rev 1.2)
After searching the Inter-Webs for hours and having several things not work for me, I decided something needed to be done about it.
curl -sSL https://get.docker.com | sh
Install Dockersudo usermod -aG docker pi
Add permission to Pi User to run Docker Commands
This file contains 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
#!/bin/bash | |
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
sudo apt-get install curl python3-pip libffi-dev python-openssl libssl-dev zlib1g-dev gcc g++ make -y | |
curl -sSL https://get.docker.com/ | sh | |
sudo pip3 install docker-compose | |
sudo docker-compose --version |