Skip to content

Instantly share code, notes, and snippets.

View anirul's full-sized avatar

Frédéric Dubouchet anirul

View GitHub Profile

Keybase proof

I hereby claim:

  • I am anirul on github.
  • I am anirul (https://keybase.io/anirul) on keybase.
  • I have a public key whose fingerprint is 3570 9539 0E48 BBAD 9C3D 58E3 928C 0AEE 341A C93D

To claim this, I am signing this object:

@anirul
anirul / mult_random.cpp
Last active August 29, 2015 14:20
OpenCV mat mult
#include <iostream>
#include <vector>
#include <iomanip>
#include <chrono>
#include "opencv2/highgui/highgui.hpp"
#ifdef USE_CUBLAS
#include "opencv2/gpu/gpu.hpp"
#endif
#ifdef USE_CLBLAS
@anirul
anirul / time_count.cpp
Created May 20, 2015 15:23
Count time of action (using chrono)
#include <chrono>
#include <iostream>
int main(int ac, char** av) {
auto start = std::chrono::system_clock::now();
// action
auto end = std::chrono::system_clock::now();
std::chrono::duration<double> total = end - start;
std::cout << "time : " << total.count();
return 0;
@anirul
anirul / Sequences.lua
Last active September 20, 2021 04:58
Gnome Sequencer Pal(prot|ret) Demo (destr) Hunter (bm)
local _, Sequences = ... -- Don't touch this
Sequences['ProtST'] = {
StepFunction = [[
limit = limit or 1
if step == limit then
limit = limit % #macros + 1
step = 1
else
step = step % #macros + 1
@anirul
anirul / texture_vertex.glsl
Last active March 8, 2020 10:50
Vertex on how to draw a texture to surface.
#version 430 core
layout(location = 0) in vec4 in_position;
layout(location = 1) in vec3 in_color;
layout(location = 2) in vec2 in_texture_coordinate;
out vec3 out_color;
out vec2 out_texture_coordinate;
void main()
@anirul
anirul / texture_fragment.glsl
Last active March 8, 2020 10:50
Fragment on how to draw a texture to surface.
#version 430 core
layout(location = 0) out vec4 frag_color;
in vec3 out_color;
in vec2 out_texture_coordinate;
uniform sampler2D texture1;
void main()
@anirul
anirul / simple_vertex.glsl
Created March 8, 2020 09:29
Simple vertex shader to show a model with texture.
#version 410 core
layout(location = 0) in vec3 in_position;
layout(location = 1) in vec3 in_normal;
layout(location = 2) in vec2 in_texcoord;
out vec3 out_normal;
out vec2 out_texcoord;
uniform mat4 projection;
@anirul
anirul / simple_fragment.glsl
Created March 8, 2020 09:30
Simple fragment shader to show a model with texture.
#version 410 core
layout(location = 0) out vec4 frag_color;
in vec3 out_normal;
in vec2 out_texcoord;
uniform sampler2D texture1;
void main()
#include <iostream>
#include <string>
std::string histoire() {
int pv = 2;
std::cout << "\n\n""un vaisseau ennemi entre dans votre champ de vision\n\n";
std::cout << "combiens de d\x82\gats lui inflige vous ? (maximum 4)\n\n";
std::cin >> pv, "\n\n";
if (pv <= 2)
#include <string>
#include <iostream>
//je n'ai pas fais la fonctionalité exit car je viens de voir que j'ai déjà dépasser les 100 lignes.
enum class State
{
START,
WAKE_UP,
DIE,
FOUND_LAMP,
ESCAPE,