Skip to content

Instantly share code, notes, and snippets.

from PyQt5.QtWidgets import QHeaderView, QTableWidgetItem
from PyQt5.QtCore import Qt
from ui_orderconversion import Ui_OrderConversion
class OrderConversion(Ui_OrderConversion):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# initialize ui
self.setupUi(self)
from PyQt5.QtWidgets import QHeaderView
from ui_orderconversion import Ui_OrderConversion
class OrderConversion(Ui_OrderConversion):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.setupUi(self)
self.column_width()
height = None
while height is None:
try:
height = int(input("Enter something: "))
except (ValueError):
print("Not an integer!")
else:
if not 0 < height < 23:
print("Height's smaller than 0 or bigger than 23")
@altendky
altendky / loop.py
Created February 2, 2017 20:36 — forked from anonymous/loop.py
for counter, addresses in enumerate(sales_addresses):
cell = 'A' + counter
sheet[cell] = addresses
def monitor_model():
try:
user = User().save()
except:
result = 'failed'
else:
result = 'passed'
user.delete()
return django.http.Response(result)
@altendky
altendky / aisgen.py
Last active March 20, 2019 15:38 — forked from eliotb/aisgen.py
Tools for working with Texas Instruments COFF and AIS files
#!/usr/bin/env python
'''Read fully linked TI COFF file, and generate AIS format file
Commandline parameters
enable sequential read,
pll and emifb configuration
pinmux configuration
enable checksums
'Eliot Blennerhassett' <eblennerhassett@audioscience.com>
@altendky
altendky / kwargs.diff
Last active April 23, 2016 18:41 — forked from anonymous/-
diff --git a/canmatrix/canmatrix.py b/canmatrix/canmatrix.py
index 12b0eed..82eed9e 100644
--- a/canmatrix/canmatrix.py
+++ b/canmatrix/canmatrix.py
@@ -116,69 +116,47 @@ class Signal(object):
# def __init__(self, name, startbit, signalsize, is_little_endian, is_signed=False, factor=1, offset=0, min=0, max=0, unit="", receiver=[], multiplex=None):
def __init__(self, name, **kwargs):
- if 'startBit' in kwargs:
- self._startbit = int(kwargs["startBit"])