Add build, deploy and test sources
This commit is contained in:
1 parent
b962581812
commit
3d1a08f230
259 files changed
+15273
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
python3 - <<'EOF'
|
||||
from PIL import Image
|
||||
import numpy as np
|
||||
|
||||
for name, path in (('x86-1','/mnt/f/efi/Boot/1x86.bmp'), ('x86-2','/mnt/f/efi/Boot/2x86.bmp')):
|
||||
im = Image.open(path).convert('RGB'); a = np.array(im).astype(int)
|
||||
print('==', name)
|
||||
for y in (484, 488, 492, 496):
|
||||
row = a[y]
|
||||
nb = np.abs(row - np.array([233,233,233])).sum(axis=1) > 30
|
||||
# runs
|
||||
runs = []
|
||||
i = 0
|
||||
while i < len(nb):
|
||||
if nb[i]:
|
||||
j = i
|
||||
while j < len(nb) and nb[j]: j += 1
|
||||
runs.append((i, j-1))
|
||||
i = j
|
||||
else:
|
||||
i += 1
|
||||
# только крупные
|
||||
big = [r for r in runs if r[1]-r[0] > 3]
|
||||
print(f' y={y}: ' + ', '.join(f'{r[0]}..{r[1]}' for r in big[:6]))
|
||||
EOF
|
||||
Reference in new issue
Block a user