Skip to content

Instantly share code, notes, and snippets.

@boisgera
boisgera / sandbox.py
Created May 4, 2026 11:47
Basic constructs for the snake game
import pyxel
import random
# initialisation du jeu
pyxel.init(160, 120, fps=30)
# variables GLOBALES, évaluées une seule fois au lancement du jeu
y = random.randint(0, 120)
text_color = random.randint(0, 15)
@boisgera
boisgera / game.zig
Last active April 25, 2025 12:35
Game Screens (zig + raylib)
const std = @import("std");
const raylib = @import("raylib.zig");
const stdout = std.io.getStdOut().writer();
const screenWidth = 800;
const screenHeight = 450;
const GameScreen = enum(u2) {
logo,
@boisgera
boisgera / Gigist.md
Created October 10, 2024 15:45
Gigist
@boisgera
boisgera / README.md
Created October 10, 2024 15:44
README

stackedit-sandbox

StackEdit SaEEEEndboxZZ

Youpi yay!

image oky doky

Mmm I can do it. Write here whenever I want.

@boisgera
boisgera / README.md
Created October 10, 2024 15:44
README

stackedit-sandbox

StackEdit SaEEEEndboxZZ

Youpi yay!

image oky doky

Mmm I can do it. Write here whenever I want.

@boisgera
boisgera / dumb.py
Created January 9, 2024 13:29
Dumb code
if True:
pass
@boisgera
boisgera / euler.py
Created January 7, 2024 21:58
Euler explicite
def solve_euler_explicit(f, x0, dt, t0, tf):
N = int((tf-t0)/dt)
t = np.linspace(t0,tf,N)
x = np.array([x0]*N)
for i in range(1,N):
x[i] = x[i-1] + dt*f(t[i-1],x[i-1])
if type(x0) == int or type(x0) == float:
return t,x
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.