Skip to content

Instantly share code, notes, and snippets.

@Trevol
Trevol / toQImage.py
Created May 4, 2020 19:00 — forked from smex/toQImage.py
Convert numpy arrays (from opencv) to QImage
from PyQt4.QtGui import QImage, qRgb
import numpy as np
class NotImplementedException:
pass
gray_color_table = [qRgb(i, i, i) for i in range(256)]
def toQImage(im, copy=False):
if im is None:
@Trevol
Trevol / msi-gtx1060-ubuntu-18.04-deeplearning.md
Created July 5, 2019 13:37 — forked from hereismari/msi-gtx1060-ubuntu-18.04-deeplearning.md
Setting up a MSI laptop with GPU (gtx1060), Installing Ubuntu 18.04, CUDA, CDNN, Pytorch and TensorFlow
@Trevol
Trevol / Install NVIDIA Driver and CUDA.md
Last active April 5, 2019 14:06 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@Trevol
Trevol / timer_example.enaml
Created October 15, 2018 08:27 — forked from jason-s/timer_example.enaml
timer example using a view controller
from enaml.widgets.api import Window, Container, PushButton, Timer
class StateMachine(object):
# normally handles some complicated view controller process
# but here we just want to listen for the timer timeout
def __init__(self, view):
self.view = view
self.timer = Timer()
self.timer.interval = 350
self.timer.single_shot = True