Initial refactor commit

Added AMI UCP BIOS Extractor v2.0_a1

Added AMI BIOS Guard Extractor v4.0_a1
This commit is contained in:
platomav 2022-04-01 17:43:22 +03:00
parent 2029ffc8b7
commit 132457afda
14 changed files with 1240 additions and 731 deletions

11
common/num_ops.py Normal file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env python3
#coding=utf-8
# https://leancrew.com/all-this/2020/06/ordinals-in-python/ by Dr. Drang
def get_ordinal(number):
s = ('th', 'st', 'nd', 'rd') + ('th',) * 10
v = number % 100
return f'{number}{s[v % 10]}' if v > 13 else f'{number}{s[v]}'