From this stack overflow question I got this great snippet.
# Threaded function snippet
def threaded(fn):
"""To use as decorator to make a function call threaded.
Needs import
from threading import Thread"""
# -*- coding: utf-8 -*- | |
'''recorder.py | |
Provides WAV recording functionality via two approaches: | |
Blocking mode (record for a set duration): | |
>>> rec = Recorder(channels=2) | |
>>> with rec.open('blocking.wav', 'wb') as recfile: | |
... recfile.record(duration=5.0) | |
Non-blocking mode (start and stop recording): |
QTabBar, | |
QTabBar::tab | |
{ | |
font-family: "Noto Sans"; | |
font-size: 11px; | |
height: 16px; | |
padding: 2px; | |
border: 0px; | |
border-bottom: 3px solid palette(dark); | |
background-color: palette(dark); |
From this stack overflow question I got this great snippet.
# Threaded function snippet
def threaded(fn):
"""To use as decorator to make a function call threaded.
Needs import
from threading import Thread"""
''' pqt_tableview3.py | |
explore PyQT's QTableView Model | |
using QAbstractTableModel to present tabular data | |
allow table sorting by clicking on the header title | |
used the Anaconda package (comes with PyQt4) on OS X | |
(dns) | |
''' | |
#coding=utf-8 |
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
from PyQt5.QtCore import Qt | |
from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter | |
from PyQt5.QtPrintSupport import QPrintDialog, QPrinter | |
from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \ | |
qApp, QFileDialog | |
1×× Informational | |
100 Continue | |
101 Switching Protocols | |
102 Processing | |
2×× Success | |
200 OK | |
201 Created |