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 math | |
import matplotlib.pyplot as plt | |
from dataclasses import dataclass | |
# --------------------------- context + generators --------------------------- | |
@dataclass | |
class PositionGeneratorContext: | |
velocity: float | |
acceleration: float | |
jerk_time: 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
This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Debian) (format=lualatex 2024.7.30) 7 AUG 2024 13:48 | |
system commands enabled. | |
file:line:error style messages enabled. | |
**index.tex | |
(./index.tex | |
LaTeX2e <2023-11-01> patch level 1 | |
L3 programming layer <2024-01-22> | |
Lua module: luaotfload 2023-08-31 3.26 Lua based OpenType font support | |
Lua module: lualibs 2023-07-13 2.76 ConTeXt Lua standard libraries. | |
Lua module: lualibs-extended 2023-07-13 2.76 ConTeXt Lua libraries -- extended c |
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
// g++ test.cpp -lGL -lGLEW -lglfw -lGLU -lsfml-window -lsfml-system -lglut | |
// Works under WSL2 | |
#include <GL/glew.h> | |
#include <GL/glut.h> | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
#define WIDTH 800 | |
#define HEIGHT 600 |
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
""" | |
MxGraph Primitives | |
<move x="0" y="0"/> | |
<line x="0" y="0"/> | |
<quad x1="0" y1="0" x2="0" y2="0"/> | |
<curve x1="0" y1="0" x2="0" y2="0" x3="0" y3="0"/> | |
Updated with changed from https://gist.github.com/dabenny | |
""" | |
from xml.dom import minidom | |
import re |
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
#pragma once | |
#include <iostream> | |
#include <cmath> | |
template <class T> | |
class Vector2 { | |
public: | |
using value_type = T; |
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
/** | |
* Generate a Sudoku grid. | |
* Author: Y. Chevallier <[email protected]> | |
*/ | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> |
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
""" Monty Hall Problem - The Game | |
https://fr.wikipedia.org/wiki/Probl%C3%A8me_de_Monty_Hall | |
Supposez que vous êtes sur le plateau d'un jeu télévisé, face à trois portes | |
et que vous devez choisir d'en ouvrir une seule, en sachant que derrière l'une | |
d'elles se trouve une voiture et derrière les deux autres des chèvres. | |
Vous choisissez une porte, disons la numéro 1, et le présentateur, qui sait, | |
lui, ce qu'il y a derrière chaque porte, ouvre une autre porte, disons la numéro 3, | |
porte qui une fois ouverte découvre une chèvre. |
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
#include <SFML/Graphics.hpp> | |
#include <SFML/Graphics/Color.hpp> | |
#include <algorithm> | |
#include <cmath> | |
struct HSL { | |
double Hue; | |
double Saturation; | |
double Luminance; |
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
#define _POSIX_SOURCE | |
#include <stdlib.h> | |
#include <curses.h> | |
#include <signal.h> | |
#include <sys/time.h> | |
#include <errno.h> | |
#include <time.h> | |
#include <string.h> | |
#include <stdbool.h> |
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
/** | |
* Boid (Bird-oid). An artificial life simulation of a single | |
* boid initially developed by Craig Reynolds in 1986 and based | |
* on three rules: Separation, Cohesion and Alignment. | |
*/ | |
#include <cmath> | |
#include <functional> | |
#include <random> |
NewerOlder