Skip to content

Instantly share code, notes, and snippets.

possible_move_distances = \
[
(2, 1),
(-2, 1),
(2, -1),
(-2, -1),
(1, 2),
(-1, 2),
(1, -2),
(-1, -2),
@gmkado
gmkado / create_drawio_pts.py
Created August 13, 2020 18:11
Generate the points style string necessary to add points to a shape in drawio
import numpy as np
def pt_str(x,y):
return f'[{x:.2f}, {y:.2f}]'
# SET THESE TO THE NUMBER OF POINTS YOU NEED
top = 0
left = 0
right = 13
bottom = 0