<commit_before># Test functions all together
# Import input generation functions
from bibliopixel.shapeGen import*
import random
from bibliopixel.interpretMood import*
from time import sleep

# Setup configurations
from bibliopixel.led import*
from bibliopixel.drivers.APA102 import*

#### Setup #####
# Global Vars
NUM = 8*8

#create driver for a 8*8 grid, use the size of your display
driver = DriverAPA102(NUM, c_order = ChannelOrder.BGR) # 64 LEDs, 2 MHz speed using SPI, BRG order
led = LEDMatrix(driver,rotation = 2,vert_flip = True) # Correct Orientation

class Visualize(BaseMatrixAnim):
	def __init__(self, led):
		super(MatrixTest, self).__init__(led)
		
	def step(self, amt = 1):
		self._step += amt
		
def done():
	print 'Done'
			

# Create sample volumes
sampleVolumes = [0]*10
for i in range(0, 10):
	sampleVolumes[i] = random.random()
# make functions
color = genColor(genMood(key='Cma'))
makeDisplay(sampleVolumes, 100, color)<commit_msg>runMiniDemo now has Visualize class, but doesn't show separate shapes)<commit_after># Test functions all together

#### Setup #####
# Setup configurations
from bibliopixel.led import*
from bibliopixel.drivers.APA102 import*
from bibliopixel.animation import*

# Global Vars
NUM = 8*8

#create driver for a 8*8 grid, use the size of your display
driver = DriverAPA102(NUM, c_order = ChannelOrder.BGR) # 64 LEDs, 2 MHz speed using SPI, BRG order
led = LEDMatrix(driver,rotation = 2,vert_flip = True) # Correct Orientation

##### Key Functions #####
# Import input generation functions
from bibliopixel.genShapes import genShapes
from bibliopixel.interpretMood import*
from time import sleep

# For testing
import random

class Visualize(BaseMatrixAnim):
	def __init__(self, led, color, shapes):
		super(Visualize, self).__init__(led)
		self.colorVal = color
		self.shapeVals = shapes
		
	def step(self, amt = 1):
		for i in range(len(self.shapeVals)):
			self._led.fillRect(self.shapeVals[i][0], self.shapeVals[i][1], self.shapeVals[i][2], self.shapeVals[i][3], self.colorVal)
		self._step += amt
	
	def testRect(self, x, y, w, h, color = None):
		self._led.fillRect(x, y, w, h, color)	
		print 'inside function'
		print x
		
def done():
	print 'Done'
			

# Create sample volumes
sampleVolumes = [0]*10
for i in range(0, 10):
	sampleVolumes[i] = random.random()
# Get color and shape from values
color = genColor(genMood(key='Cma'))
shapes = genShapes(sampleVolumes)
# Create object and set values
visualize = Visualize(led, color, shapes)
# Run object
#~ visualize.run(sleep = 500)
visualize.testRect(2,2,3,3,(255,0,0))
{'fraction_non_alphanumeric': 0.11655011655011654, 'fraction_numerical': 0.0236985236985237, 'mean_word_length': 5.130952380952381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5236550', 'n_tokens_mistral': 927, 'n_tokens_neox': 843, 'n_words': 268}