<commit_before>from PyQt5 import QtOpenGL, QtWidgets
import ModernGL as GL
import struct

context = {}

class QGLControllerWidget(QtOpenGL.QGLWidget):
	def __init__(self, format = None):
		super(QGLControllerWidget, self).__init__(format, None)

	def initializeGL(self):
		GL.InitializeModernGL()
		GL.Viewport(0, 0, 800, 600)

		vert = GL.NewVertexShader('''
			#version 330

			in vec2 vert;

			void main() {
				gl_Position = vec4(vert, 0.0, 1.0);
			}
		''')

		frag = GL.NewFragmentShader('''
			#version 330
			
			out vec4 color;

			void main() {
				color = vec4(0.30, 0.50, 1.00, 1.0);
			}
		''')

		prog, iface = GL.NewProgram([vert, frag])
		vbo = GL.NewVertexBuffer(struct.pack('6f', 0.0, 0.8, -0.6, -0.8, 0.6, -0.8))
		context['vao'] = GL.NewVertexArray(prog, vbo, '2f', ['vert'])

	def paintGL(self):
		GL.Clear(240, 240, 240)
		if 'vao' in context:
			GL.RenderTriangles(context['vao'], 3)

class QTWithGLTest(QtWidgets.QMainWindow):
	def __init__(self, parent = None):
		super(QTWithGLTest, self).__init__(parent)

		fmt = QtOpenGL.QGLFormat()
		fmt.setVersion(4, 1)
		fmt.setProfile(QtOpenGL.QGLFormat.CoreProfile)
		fmt.setSampleBuffers(True)

		self.setFixedSize(800, 600)
		self.widget = QGLControllerWidget(fmt)
		self.setCentralWidget(self.widget)
		self.show()

app = QtWidgets.QApplication([])
window = QTWithGLTest()
window.show()
app.exec_()
<commit_msg>resize to fit VM<commit_after>from PyQt5 import QtOpenGL, QtWidgets
import ModernGL as GL
import struct

context = {}

class QGLControllerWidget(QtOpenGL.QGLWidget):
	def __init__(self, format = None):
		super(QGLControllerWidget, self).__init__(format, None)

	def initializeGL(self):
		GL.InitializeModernGL()
		GL.Viewport(0, 0, 320, 240)

		vert = GL.NewVertexShader('''
			#version 330

			in vec2 vert;

			void main() {
				gl_Position = vec4(vert, 0.0, 1.0);
			}
		''')

		frag = GL.NewFragmentShader('''
			#version 330
			
			out vec4 color;

			void main() {
				color = vec4(0.30, 0.50, 1.00, 1.0);
			}
		''')

		prog, iface = GL.NewProgram([vert, frag])
		vbo = GL.NewVertexBuffer(struct.pack('6f', 0.0, 0.8, -0.6, -0.8, 0.6, -0.8))
		context['vao'] = GL.NewVertexArray(prog, vbo, '2f', ['vert'])

	def paintGL(self):
		GL.Clear(240, 240, 240)
		if 'vao' in context:
			GL.RenderTriangles(context['vao'], 3)

class QTWithGLTest(QtWidgets.QMainWindow):
	def __init__(self, parent = None):
		super(QTWithGLTest, self).__init__(parent)

		fmt = QtOpenGL.QGLFormat()
		fmt.setVersion(4, 1)
		fmt.setProfile(QtOpenGL.QGLFormat.CoreProfile)
		fmt.setSampleBuffers(True)

		self.setFixedSize(320, 240)
		self.widget = QGLControllerWidget(fmt)
		self.setCentralWidget(self.widget)
		self.show()

app = QtWidgets.QApplication([])
window = QTWithGLTest()
window.show()
app.exec_()

{'fraction_non_alphanumeric': 0.15529071867100036, 'fraction_numerical': 0.047670639219934995, 'mean_word_length': 4.054744525547445, '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': '4311347', 'n_tokens_mistral': 1270, 'n_tokens_neox': 1063, 'n_words': 221}