Skip to content

Instantly share code, notes, and snippets.

View Arnold-git's full-sized avatar
:octocat:
Working from home

Arnold Ighiwiyisi Arnold-git

:octocat:
Working from home
View GitHub Profile
FROM python:3.9
WORKDIR /sentimentApi
#
COPY ./app/requirements.txt /sentimentApi/requirements.txt
#
RUN pip install --no-cache-dir --upgrade -r /sentimentApi/requirements.txt
FROM python:3.9
WORKDIR /sentimentApi
#
COPY ./app/requirements.txt /sentimentApi/requirements.txt
#
RUN pip install --no-cache-dir --upgrade -r /sentimentApi/requirements.txt
@Arnold-git
Arnold-git / edge_detection_image
Created October 27, 2020 18:56
Python script to detect edges in image
import numpy as np
import argparse
import glob
import cv2
def auto_canny(image, sigma=0.33):
v = np.median(image)
lower = int(max(0, (1.0 - sigma) * v))
upper = int(min(255, (1.0 + sigma) *v))
@Arnold-git
Arnold-git / edge_detection_video.py
Created October 27, 2020 18:54
Python script to detect edges in a video stream
import cv2
import numpy as np
cap = cv2.VideoCapture('cafe.mp4')
if (cap.isOpened() == False):
print("Error opening Video stream or file")
fgbg = cv2.createBackgroundSubtractorMOG2(