WIP: Examine develop branch #9

Closed
Kenwood wants to merge 18 commits from develop into master
11 changed files with 41 additions and 0 deletions
Showing only changes of commit 0d06a71fca - Show all commits

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
# Python # Python
__pycache__ __pycache__
Pipfile
Pipfile.lock
# CAD # CAD
*.stl *.stl

View File

@ -0,0 +1,16 @@
from PIL import Image
import base64
im = Image.open('still.jpg')
# using Image.ADAPTIVE to avoid dithering
for i in range(8, 0, -1):
out = im.convert('P', palette=Image.ADAPTIVE, colors=i)
out.save(f'out_{i}_bits.png')
with open(f'out_{i}_bits.png', 'rb') as image_file:
encoded_string = base64.a85encode(image_file.read())
with open(f'out_{i}_bits.txt', 'w') as f:
f.write(encoded_string.decode('UTF-8'))

View File

@ -0,0 +1 @@
M,6r;%14!\!!!!.8Ou6I!!!)I!!!&X#Qk&,!4s2MScA`m!)Q?g7AGd(zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz!.5pZZiC(+%V8a6Akbu".KBGK#QOi)zdSl>0!!-\'6pXdsSF+-I!<<*"_P$QtD$r"izzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz!!!"D(e?.W!V_LqE<#t=!(fUS7'8jaJc

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
import time, pyotp
totp = pyotp.TOTP(pyotp.random_base32(), interval=45)
code = totp.now()
for i in range(0,60):
if totp.verify(code):
print(f'{code} verified fine at t+{i}')
else:
print(f'{code} expired at t+{i}')
break
time.sleep(1)