Skip to content

Instantly share code, notes, and snippets.

@disdyakis
disdyakis / Hilbert-Markov.py
Created July 30, 2018 01:28
Script to generate images using a markov chain trained on hilbert curve mapped images
import markovify
import hilbert
import os
import os.path
import numpy as np
from PIL import Image
def rgb2hex(rgb):
hex_result = "".join([str(format(val, '02x')).upper() for val in rgb])