<commit_before>from Tkinter import *

import random
from building import Building

WINDOW_WIDTH = 1000
WINDOW_HEIGHT = 600
STREET_LEVEL = 480

BUILDING_WIDTH_LIMITS = (100, 200)
BUILDING_HEIGHT_LIMITS = (100, 450)
BUILDING_HEIGHT_DELTA_MIN = 0.1

master = Tk()
master.resizable(width=False, height=False)
canvas = Canvas(master, width=WINDOW_WIDTH, height=WINDOW_HEIGHT)
canvas.pack()
random.seed()

def generateBuildings(event):
	currentBuildingStartX = random.randint(-50, -30)
	lastBuildingHeight = random.randint(BUILDING_HEIGHT_LIMITS[0], BUILDING_HEIGHT_LIMITS[1])

	buildings = []
	while (currentBuildingStartX < WINDOW_WIDTH):
		newBuildingHeight = random.randint(BUILDING_HEIGHT_LIMITS[0], BUILDING_HEIGHT_LIMITS[1])
		while (newBuildingHeight > ((1.0 - BUILDING_HEIGHT_DELTA_MIN) * lastBuildingHeight) and
			   newBuildingHeight < ((1.0 + BUILDING_HEIGHT_DELTA_MIN) * lastBuildingHeight)):
			newBuildingHeight = random.randint(BUILDING_HEIGHT_LIMITS[0], BUILDING_HEIGHT_LIMITS[1])

		newBuilding = Building((currentBuildingStartX, STREET_LEVEL),
							   ((random.randint(BUILDING_WIDTH_LIMITS[0], BUILDING_WIDTH_LIMITS[1]), newBuildingHeight)),
							   "white")
		buildings.append(newBuilding)

		currentBuildingStartX += newBuilding.size[0]
		lastBuildingHeight = newBuilding.size[1]

	canvas.delete("all")
	canvas.create_rectangle(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, fill="black")<commit_msg>Had to add an offset to the fill rectangle to get it to the edges?<commit_after>from Tkinter import *

import random
from building import Building

WINDOW_WIDTH = 1000
WINDOW_HEIGHT = 600
STREET_LEVEL = 480

BUILDING_WIDTH_LIMITS = (100, 200)
BUILDING_HEIGHT_LIMITS = (100, 450)
BUILDING_HEIGHT_DELTA_MIN = 0.1

master = Tk()
master.resizable(width=False, height=False)
canvas = Canvas(master, width=WINDOW_WIDTH, height=WINDOW_HEIGHT)
canvas.pack()
random.seed()

def generateBuildings(event):
	currentBuildingStartX = random.randint(-50, -30)
	lastBuildingHeight = random.randint(BUILDING_HEIGHT_LIMITS[0], BUILDING_HEIGHT_LIMITS[1])

	buildings = []
	while (currentBuildingStartX < WINDOW_WIDTH):
		newBuildingHeight = random.randint(BUILDING_HEIGHT_LIMITS[0], BUILDING_HEIGHT_LIMITS[1])
		while (newBuildingHeight > ((1.0 - BUILDING_HEIGHT_DELTA_MIN) * lastBuildingHeight) and
			   newBuildingHeight < ((1.0 + BUILDING_HEIGHT_DELTA_MIN) * lastBuildingHeight)):
			newBuildingHeight = random.randint(BUILDING_HEIGHT_LIMITS[0], BUILDING_HEIGHT_LIMITS[1])

		newBuilding = Building((currentBuildingStartX, STREET_LEVEL),
							   ((random.randint(BUILDING_WIDTH_LIMITS[0], BUILDING_WIDTH_LIMITS[1]), newBuildingHeight)),
							   "white")
		buildings.append(newBuilding)

		currentBuildingStartX += newBuilding.size[0]
		lastBuildingHeight = newBuilding.size[1]

	canvas.delete("all")
	canvas.create_rectangle(0, 0, WINDOW_WIDTH + 2, WINDOW_HEIGHT + 2, fill="black")
{'fraction_non_alphanumeric': 0.10663424800277874, 'fraction_numerical': 0.03126085446335533, 'mean_word_length': 6.68, 'pattern_counts': {'":': 0, '<': 7, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '856537', 'n_tokens_mistral': 1139, 'n_tokens_neox': 989, 'n_words': 173}