Skip to content

Instantly share code, notes, and snippets.

@Et7f3
Et7f3 / morpion.py
Last active November 22, 2022 21:12
morpion python
def check(m):
#on verifie les colonnes
for i in range(0,3):
if(m[i][0]==m[i][1]==m[i][2]!=" "):
print('GG le joueur:',m[i][0])
return 0
#on verifie les lignes
for i in range(0,3):
if(m[0][i]==m[1][i]==m[2][i]!=" "):
@Et7f3
Et7f3 / libcaddi.c
Created September 13, 2017 18:59
fichier à jour
#include "./libcaddinFile/_libcaddin.h"
int main(void)
{
unsigned int key;
Bdisp_AllClr_DDVRAM();
//locate(1,3);
Print((unsigned char*)"This application is");
@Et7f3
Et7f3 / printf.c
Created October 30, 2017 22:43
implementation de printf
#include <stdarg.h>
void format(char * f, va_list ap);
int printf(char *f,...){
va_list ap;
va_start(ap, f);
char retour asm ("reto");/* point de retour*/
asm("push %eipd\r\npop reto");//on affecte la valeur à reto
format(f,ap);
va_end(ap);
@Et7f3
Et7f3 / pointers.c
Created November 18, 2017 22:11
generic pointer function showing how to cast and call function by it address
#include <stdio.h>
#define FUNC_CAST(retour,function,args...) retour(*function)(args)
typedef FUNC_CAST(void,callback_t,void);
#undef FUNC_CAST
#define FUNC_CAST(retour,function,args...) ((retour(*)(args))function)
int a(int a){
return printf("%d",a);
}
@Et7f3
Et7f3 / parser.c
Created November 20, 2017 12:46
parser arg one malloc
#include <stdio.h>
#include <stdlib.h>
//#include <string.h>
struct s_argument
{
int valc; //# de valeurs
char *opt; //Nom de l'option sans tiret
char **val; //Tableau d'argument de taille `valc`
};
@Et7f3
Et7f3 / gradientAnimation.html
Last active November 23, 2017 07:22 — forked from anonymous/my.css
CSS Gradient Animation
<!DOCTYPE html>
<html>
<head>
<style>
/*an exemple for my friend
**voici un exemple d'animation*/
div
{
width: 100px;
height: 100px;
@Et7f3
Et7f3 / deezer.js
Created August 30, 2018 08:19
Deezer Reaper
// ==UserScript==
// @name deezer reaper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author élie
// @match https://www.deezer.com/*
// @grant none
// ==/UserScript==
var exports = {}
@Et7f3
Et7f3 / TP5.java
Last active November 9, 2018 12:53
TP5 universite paris diderot informatique
import java.util.Random;
import java.util.Arrays;
public class TP5
{
static Random rand = new Random();
static int randRange(int a, int b)
{
return (rand.nextInt(b - a) + a);
@Et7f3
Et7f3 / main.cs
Created November 9, 2018 11:39
array to string
using System;
using System.Linq;
namespace Outils {
class intArrayToString {
static void Main(string[] args) {
Console.WriteLine("{0}", deepToString(new int[][]{new int[]{5}, new int[]{5}, new int[]{5}}));
Console.ReadLine();
}
static string deepToString(int[][] a)
@Et7f3
Et7f3 / TP5.cs
Created November 9, 2018 12:51
TP5 universite paris diderot informatique
using System;
using System.Linq;
namespace Main {
public class TP5 {
static Random rand = new Random();
static int randRange(int a, int b)
{
return (rand.Next(b - a - 1) + a);
}