Skip to content

Instantly share code, notes, and snippets.

View Hammer2900's full-sized avatar
🌲
___

Yevhen Ts. Hammer2900

🌲
___
View GitHub Profile
@Hammer2900
Hammer2900 / IAcommit.py
Last active May 28, 2025 07:41 — forked from tailot/IAcommit.py
This Python script analyzes the commit history of a specified Git repository using a locally running Ollama instance and a user-selected AI model. It takes the repository path, an Ollama model name, and an optional commit limit as command-line arguments. For each selected commit, the script extracts the changes (diff) and prompts the AI to gener…
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),
@Hammer2900
Hammer2900 / random_walk_dungeon.lobster
Created May 18, 2025 13:41
procedural dungeon generator using random walk in lobster
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
import vec
import color
import gl
import std
let WIDTH = 800.0
let HEIGHT = 600.0
class Circle:
position: float2
@Hammer2900
Hammer2900 / grid_based_particle_interaction.lobster
Created May 18, 2025 10:48
particle interaction simulation with grid optimization in lobster
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
@Hammer2900
Hammer2900 / primordial_particle_swarm.lobster
Created May 18, 2025 07:24
self-organizing particle swarm with heading-based interaction in lobster
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
@Hammer2900
Hammer2900 / n_body_particle_simulation.lobster
Created May 18, 2025 06:50
interactive n-body particle simulation in lobster
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] = []
@Hammer2900
Hammer2900 / ball_anim.lobster
Created May 17, 2025 17:27
ball animation lobster
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!"
@Hammer2900
Hammer2900 / drops.lobster
Last active May 17, 2025 11:28
rain drops lobster
import std
import vec
import color
import gl
// Window settings
let SCREEN_WIDTH = 700.0
let SCREEN_HEIGHT = 700.0
let WINDOW_TITLE = "Rain"
@Hammer2900
Hammer2900 / comet.lobster
Created May 17, 2025 09:45
comet particles lobster
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
@Hammer2900
Hammer2900 / circle-to-triangle-animation.lobster
Created May 17, 2025 09:28
Circle to Triangle Animation lobster
import std
import vec
import color
import gl
// Window dimensions
let sw = 700
let sh = 700
// Center coordinates