Skip to content

Instantly share code, notes, and snippets.

View eyllanesc's full-sized avatar
:octocat:
I may be slow to respond.

Edwin Yllanes eyllanesc

:octocat:
I may be slow to respond.
View GitHub Profile
from Operation import Operation
class BoundariesOperation(Operation):
@staticmethod
def Execute(inputPixmap):
return inputPixmap
from PyQt5 import QtWidgets
from testCloseEventDialog import TestDialog
from testCloseEventMain import TestMain
class newDialog(QtWidgets.QDialog, TestDialog):
def __init__(self, *args, **kwargs):
QtWidgets.QDialog.__init__(self, *args, **kwargs)
self.setupUi(self)
from PySide.QtCore import Qt, QTimer
from PySide.QtGui import QLabel, QPainter, QApplication, QVBoxLayout, QFormLayout, QLineEdit, QSlider, \
QHBoxLayout, QWidget, QPushButton, QRadioButton, QFontDialog, QColorDialog, QPalette
class MarqueeLabel(QLabel):
def __init__(self, parent=None):
QLabel.__init__(self, parent)
self.px = 0
self.py = 15
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class Widget(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.setLayout(QGridLayout())
from math import *
def f(x: float) -> float:
return exp(x) - sin(x)
def secant(x0: float, x1: float, f, epsilon: float, delta: float, iter_max: int) -> float:
fx0 = f(x0)
fx1 = f(x1)
print("{0} {1:.20f} {2:.20f}".format(0, x0, fx0))
if iter_max == 0:
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
self.keyworddict = {}
self.count = {}
MainWindow.setObjectName("MainWindow")
MainWindow.resize(698, 581)
MainWindow.setMinimumSize(QtCore.QSize(698, 581))
MainWindow.setMaximumSize(QtCore.QSize(698, 581))
from random import random, randint
from PyQt5.QtCore import QAbstractListModel, Qt, QModelIndex, QVariant, QCoreApplication, QPointF, QUrl, QByteArray, \
QTimer
from PyQt5.QtGui import QColor, QGuiApplication
from PyQt5.QtQml import QQmlApplicationEngine
class MarkerItem(object):
def __init__(self, position, color=QColor("red")):
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
class FadeWidget(QWidget):
def __init__(self, parent = None):
QWidget.__init__(self, parent)
self._heightMask = self.height()
import sys
from PyQt5 import QtCore, QtSql, QtWidgets, QtGui
class SqlTableModel(QtSql.QSqlTableModel):
ExecuteRole = QtCore.Qt.UserRole + 1
def __init__(self, parent=None, db = QtSql.QSqlDatabase()):
QtSql.QSqlTableModel.__init__(self, parent, db)
self.d = {}
@eyllanesc
eyllanesc / CompleterWithQSqlTableModel.pro
Created September 22, 2017 18:34
Example QCompleter with QSqlTableModel
#-------------------------------------------------
#
# Project created by QtCreator 2017-09-17T11:02:01
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql