This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import sys | |
import time | |
import pathlib | |
import re | |
AST_LOWERING_TOTAL = 600 | |
AST_LOWERING_INCREMENT = 50 | |
SEMA_TOTAL = 45000 | |
SEMA_INCREMENT_MIN = 350 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_TranslatedM = TypeVar("_TranslatedM", bound="TranslatedModel", covariant=True) | |
class TranslationModelBase(Generic[_TranslatedM], Model): | |
"""Base class for translation models.""" | |
language = models.ForeignKey["Language", "Language"]( | |
to="Language", on_delete=models.CASCADE, verbose_name=_("Language") | |
) | |
parent: "models.ForeignKey[_TranslatedM, _TranslatedM]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool | |
Font::render_batch( | |
glm::mat4 const &projection, std::vector<FontSpec> const &strings, | |
Program *shader) { | |
// Load VAO and VBO | |
glBindVertexArray(s_vao); | |
glBindBuffer(GL_ARRAY_BUFFER, s_vbo); | |
// Use the shader program specified. | |
if (shader == nullptr) { |