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 subprocess | |
import ollama | |
import os | |
_OLLAMA_SYSTEM_PROMPT = 'You are an assistant that analyzes Git commits and their diffs to generate improved commit messages according to the Conventional Commits standard.' | |
_COMMIT_ANALYSIS_PROMPT_TEMPLATE = """Analyze the following 'git show' output, which includes the original commit message and the diff of the changes. | |
Your task is to generate a new, concise, and well-written commit message following Conventional Commits standards, | |
based ONLY ON THE CHANGES (the diff). Ignore the original commit message present in the input. | |
Provide only the commit message itself, without any introductory or concluding phrases. | |
The message should start with a type (e.g., feat, fix, docs, style, refactor, test, chore), |
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 vec | |
import color | |
import gl | |
import std | |
let screen_width = 800 | |
let screen_height = 600 | |
let tile_size = 20 | |
let map_width = screen_width / tile_size |
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 vec | |
import color | |
import gl | |
import std | |
let WIDTH = 800.0 | |
let HEIGHT = 600.0 | |
class Circle: | |
position: float2 |
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 std | |
import vec | |
import color | |
import gl | |
// --- System Parameters (Global Constants) --- | |
let SIM_WIDTH = 400.0 | |
let SIM_HEIGHT = 400.0 | |
let PARTICLE_COUNT = 2000 | |
let INTERACTION_RADIUS = 15.0 |
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 std | |
import vec | |
import color | |
import gl | |
// --- System Parameters (Global Constants) --- | |
let SIM_WIDTH = 200.0 | |
let SIM_HEIGHT = 100.0 | |
let PARTICLE_COUNT = 300 | |
let INTERACTION_RADIUS = 5.0 |
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 std | |
import vec | |
import color | |
import gl | |
// --- Global Particle Data (Structure of Arrays - SoA) --- | |
var masses:[float] = [] | |
var positions_x:[float] = [] | |
var positions_y:[float] = [] | |
var velocities_x:[float] = [] |
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 std | |
import vec | |
import color | |
import gl | |
let SCREEN_WIDTH = 800.0 | |
let SCREEN_HEIGHT = 450.0 | |
let RAIN_BASE_COLOR_RGB = float3 { 230.0/255.0, 41.0/255.0, 55.0/255.0 } | |
let CAPTION1 = "PRESS [R] TO RESTART" | |
let CAPTION2 = "PRESS [ENTER] TO PLAY AGAIN!" |
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 std | |
import vec | |
import color | |
import gl | |
// Window settings | |
let SCREEN_WIDTH = 700.0 | |
let SCREEN_HEIGHT = 700.0 | |
let WINDOW_TITLE = "Rain" |
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 std | |
import vec | |
import color | |
import gl | |
let WIDTH = 800 | |
let HEIGHT = 600 | |
let MAX_TAIL_LENGTH = 50 | |
// Particle class to represent parts of the comet's tail |
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 std | |
import vec | |
import color | |
import gl | |
// Window dimensions | |
let sw = 700 | |
let sh = 700 | |
// Center coordinates |
NewerOlder