<commit_before>from utils import *
from Song import Song

player = None

def loadQueue(state):
	print "load queue"

	# dummy example from test_ffmpeg
	def songs():
		files = [
			"/Users/az/Music/Classic/Glenn Gould Plays Bach/Two- & Three-Part Inventions - Gould/19 Bach - Invention 13 in a (BWV 784).mp3",
			"/Users/az/Music/Rock/Tool/Lateralus/09 Lateralus.flac",
			"/Users/az/Music/Cults - Cults 7/Cults - Cults 7- - 03 The Curse.flac",
			"/Users/az/Music/Special/zorba/(01) - Theme From Zorba The Greek.ogg",
			"/Users/az/Music/Classic/Glenn Gould Plays Bach/French Suites, BWV812-7 - Gould/Bach, French Suite 5 in G, BWV816 - 5 Bourree.mp3",
			"/Users/az/Music/Electronic/Von <NAME>ner - Aaron.mp3",
			"/Users/az/Music/Electronic/One Day_Reckoning Song (Wankelmut Remix) - Asaf Avidan & the Mojos.mp3",
		]
		i = 0
		while True:
			yield Song(files[i], state._main["player"])
			i += 1
			if i >= len(files): i = 0
	return songs()
	
def loadRecentlyplayedList(state):
	pass

class State:
	queue = initBy(loadQueue)
	recentlyPlayedList = initBy(loadRecentlyplayedList)
	
	playState = oneOf(<commit_msg>use RandomFileQueue. first very simple but useable music player!<commit_after>from utils import *
from Song import Song

player = None

def loadQueue(state):
	print "load queue"
	
	def songs():
		import os
		from RandomFileQueue import RandomFileQueue
		fileQueue = RandomFileQueue(
			rootdir = os.path.expanduser("~/Music"),
			fileexts = ["mp3", "ogg", "flac"])
		while True:
			f = fileQueue.getNextFile()
			yield Song(f, state._main["player"])
			
	return songs()
	
def loadRecentlyplayedList(state):
	pass

class State:
	queue = initBy(loadQueue)
	recentlyPlayedList = initBy(loadRecentlyplayedList)
	
	playState = oneOf(
{'fraction_non_alphanumeric': 0.12291786329695577, 'fraction_numerical': 0.018380241240666284, 'mean_word_length': 3.838888888888889, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6353763', 'n_tokens_mistral': 711, 'n_tokens_neox': 602, 'n_words': 162}