<commit_before>import pygame


#sprite sheet cutter-outer
class Cutout(object):
	def __init__(self, src, w, h):
		#initialize with the target Sprite sheet,
		#along with the dimensions of the sprites
		self.w = w
		self.h = h
		self.rsource = pygame.Rect(0,0,w,h)
		self.srcimg = src
		self.img = pygame.Surface(self.rsource.size).convert()
		self.img.blit(self.srcimg, (0,0), self.rsource)
		
	def set_Sheet(self, src, w, h):
		#change the sprite sheet
		self.w = w
		self.h = h
		self.srcimg = src
		
	def set_Img(self, x,y):
		#pass in the indicies of the desired sprite
		myx = x*self.w
		myy = y*self.h
		self.rsource = pygame.Rect(myx,myy,self.w,self.h)
		self.img = pygame.Surface(self.rsource.size).convert()
		self.img.blit(self.srcimg, (0,0), self.rsource)
		
	def get_Img(self):
		#returns the set image
		return self.img<commit_msg>Update ss.py<commit_after>import pygame


#sprite sheet cutter-outer
class Cutout(object):
	def __init__(self, src, w, h):
		#initialize with the target Sprite sheet,
		#along with the dimensions of the sprites
		self.w = w
		self.h = h
		self.rsource = pygame.Rect(0,0,w,h)
		self.srcimg = src
		self.img = pygame.Surface(self.rsource.size).convert()
		self.img.blit(self.srcimg, (0,0), self.rsource)
		self.cktog = False
		self.ck = (0,255,0)
		
	def set_Sheet(self, src, w, h):
		#change the sprite sheet
		self.w = w
		self.h = h
		self.srcimg = src
		
	def set_Img(self, x,y):
		#pass in the indicies of the desired sprite
		myx = x*self.w
		myy = y*self.h
		self.rsource = pygame.Rect(myx,myy,self.w,self.h)
		self.img = pygame.Surface(self.rsource.size).convert()
		self.img.blit(self.srcimg, (0,0), self.rsource)
		self.cktog = False
		
	def get_Img(self):
		#applies colorkey
		if self.cktog:
			self.img.set_colorkey(self.ck)
		#returns the set image
		return self.img
		
	def set_colorkey(self, tog= True, col= (0,255,0)):
		#toggles colorkey on or off
		self.cktog = tog
		#sets colorkey color
		self.ck = col
		
{'fraction_non_alphanumeric': 0.133130081300813, 'fraction_numerical': 0.011178861788617886, 'mean_word_length': 3.475, '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': '5942443', 'n_tokens_mistral': 876, 'n_tokens_neox': 792, 'n_words': 195}