Sleep
1 min readMay 10, 2024

V2K Voice2Skull PoC

#STOPFUCKINGWITHPEOPLE

class Block:
def __init__(self, idim, jdim, kdim):
self.idim = idim
self.jdim = jdim
self.kdim = kdim

class Connection:
def __init__(self, type_, b1, f1, s1, e1, s2, e2, b2, f2, s1_, e1_, s2_, e2_, swap):
self.type = type_
self.b1 = b1
self.f1 = f1
self.s1 = s1
self.e1 = e1
self.s2 = s2
self.e2 = e2
self.b2 = b2
self.f2 = f2
self.s1_ = s1_
self.e1_ = e1_
self.s2_ = s2_
self.e2_ = e2_
self.swap = swap

def parse_map_file(file_path):
blocks = []
connections = []

with open(file_path, 'r') as file:
lines = file.readlines()
for line in lines:
if not line.startswith("#"):
parts = line.split()
if len(parts) == 4:
block = Block(int(parts[0]), int(parts[1]), int(parts[2]))
blocks.append(block)
elif len(parts) == 14:
connection = Connection(parts[0], int(parts[1]), int(parts[2]), int(parts[3]), int(parts[4]),
int(parts[5]), int(parts[6]), int(parts[7]), int(parts[8]), int(parts[9]),
int(parts[10]), int(parts[11]), int(parts[12]), parts[13])
connections.append(connection)

return blocks, connections

def main():
file_path = "your_file_path_here" # Replace with the path to your file
blocks, connections = parse_map_file(file_path)

print("Blocks:")
for block in blocks:
print(f"IDIM: {block.idim}, JDIM: {block.jdim}, KDIM: {block.kdim}")

print("\nConnections:")
for connection in connections:
print(f"Type: {connection.type}, B1: {connection.b1}, F1: {connection.f1}, S1: {connection.s1}, E1: {connection.e1}, "
f"S2: {connection.s2}, E2: {connection.e2}, B2: {connection.b2}, F2: {connection.f2}, "
f"S1': {connection.s1_}, E1': {connection.e1_}, S2': {connection.s2_}, E2': {connection.e2_}, "
f"Swap: {connection.swap}")

if __name__ == "__main__":
main()

No responses yet