Skip to content

Instantly share code, notes, and snippets.

View stevenjlm's full-sized avatar

Steven Munn stevenjlm

View GitHub Profile
@stevenjlm
stevenjlm / nginx.conf
Last active August 19, 2024 19:15
Nginx reverse proxy for streamlit https
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
@stevenjlm
stevenjlm / vision.py
Last active December 17, 2019 04:43
mini-vision image fade
""" Fade detection """
class Fade(VisionTask):
def run(self, system):
log.info("Testing for image fade")
log.info(system.image_gray.shape)
mn = np.amin(system.image_gray)
if mn > 30.0:
system.full_caption += system.tools.cv_comms['fade']
return
@stevenjlm
stevenjlm / vision.py
Last active December 17, 2019 04:46
mini-vision contrast
mean_s = np.mean(system.hsv[:,:,2])
std_s = np.std(system.hsv[:,:,2])
log.info("Mean and std value %f, %f" % (mean_s, std_s))
if std_s > 80.0:
system.full_caption += system.tools.cv_comms['new-contrast']