Skip to content

Instantly share code, notes, and snippets.

View EarthShaping's full-sized avatar

EarthShaping EarthShaping

View GitHub Profile
@EarthShaping
EarthShaping / opencv_qt_label.md
Created December 21, 2020 19:14 — forked from docPhil99/opencv_qt_label.md
How to display opencv video in pyqt apps

The code for this tutorial is here

Opencv provides are useful, but limited, method of building a GUI. A much more complete system could be acheived using pyqt. The question is, how do we display images. There are quite a few possible routes but perhaps the easiest is to use QLabel since it has a setPixmap function. Below is some code that creates two labels. It then creates a grey pixmap and displays it one of the labels. code: staticLabel1.py

from PyQt5.QtWidgets import QWidget, QApplication, QLabel, QVBoxLayout
from PyQt5.QtGui import QPixmap, QColor
import sys
Shader "Name" {
Properties {
name ("display name", Range (min, max)) = number
name ("display name", Float) = number
name ("display name", Int) = number
name ("display name", Color) = (number,number,number,number)
name ("display name", Vector) = (number,number,number,number)
@EarthShaping
EarthShaping / repositoryhosting-download-template.sh
Created September 2, 2018 11:13 — forked from samsalisbury/repositoryhosting-download-template.sh
RepositoryHosting.com backup download script
#!/bin/sh
# RepositoryHosting.com backup download script
#
# This script downloads your daily RepositoryHosting.com backups.
##################################################################
##
### Configuration
##
@EarthShaping
EarthShaping / gist:8113885
Last active March 24, 2017 20:11
MockData
MockData
========
MockData is a random data generator.
Last release is a Beta Version 0.0.7
Let show you how use it.
Suppose you have a MockObject :