<commit_before># MusicPlayer, https://github.com/albertz/music-player
# Copyright (c) 2012, <NAME>, www.az2000.de
# All rights reserved.
# This code is under the 2-clause BSD license, see License.txt in the root directory of this project.
import better_exchook
better_exchook.install()

import ffmpeg

try:
	import faulthandler
	faulthandler.enable(all_threads=True)
except ImportError:
	print "note: module faulthandler not available"
	
class Song:
	def __init__(self, fn):
		self.url = fn
		self.f = open(fn)
		
	def readPacket(self, bufSize):
		s = self.f.read(bufSize)
		#print "readPacket", self, bufSize, len(s)
		return s<commit_msg>test_ffmpeg: Song.__eq__. needed for player-engine stream peeking<commit_after># MusicPlayer, https://github.com/albertz/music-player
# Copyright (c) 2012, <NAME>, www.az2000.de
# All rights reserved.
# This code is under the 2-clause BSD license, see License.txt in the root directory of this project.
import better_exchook
better_exchook.install()

import ffmpeg

try:
	import faulthandler
	faulthandler.enable(all_threads=True)
except ImportError:
	print "note: module faulthandler not available"
	
class Song:
	def __init__(self, fn):
		self.url = fn
		self.f = open(fn)
		
	def __eq__(self, other):
		return self.url == other.url
	
	def readPacket(self, bufSize):
		s = self.f.read(bufSize)
		#print "readPacket", self, bufSize, len(s)
		return s
{'fraction_non_alphanumeric': 0.10639827462257369, 'fraction_numerical': 0.012940330697340043, 'mean_word_length': 4.658536585365853, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '4389962', 'n_tokens_mistral': 521, 'n_tokens_neox': 481, 'n_words': 143}