Skip to content

Instantly share code, notes, and snippets.

View Meithal's full-sized avatar

Meithal

  • ESGI - Agence 369
  • Lognes
View GitHub Profile
@Meithal
Meithal / gist:415debccf04fa96c5c681dd457ca8e17
Last active October 21, 2020 19:38
Crosscompile on Python build pip, etc
https://docs.python.org/3/distutils/builtdist.html#cross-compiling-on-windows
python setup.py build --plat-name=win-amd64
python setup.py build --plat-name=win32
python setup.py build --plat-name=win-amd64 bdist_wininst
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
@Meithal
Meithal / pyquarium.py
Last active October 30, 2018 00:51
javaquarium python generators
import collections
import random
chiffres, lettres = '0123456789', 'abcdefghijklmnopqrstuvwxyz'
regles = (line.strip() for line in open('pop.txt') if line.strip() and not line.startswith("//"))
def valgen(dep, diff = 0, sent=-1):
while dep != sent:
dep = (yield dep) or dep + diff
@Meithal
Meithal / p4.c
Last active August 20, 2018 17:08
p4 new gen
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include "max.h"
#define LARGEUR_DAMIER (17)
#define HAUTEUR_DAMIER (16)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#define LARGEUR_DAMIER (17)
#define HAUTEUR_DAMIER (16)
#define LONGUEUR_DAMIER (LARGEUR_DAMIER * HAUTEUR_DAMIER)
@Meithal
Meithal / p4 wip
Last active August 9, 2018 17:08
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#define LARGEUR_DAMIER (17)
#define HAUTEUR_DAMIER (16)
#define LONGUEUR_DAMIER (LARGEUR_DAMIER * HAUTEUR_DAMIER)
@Meithal
Meithal / p4.c
Created June 14, 2018 09:10
puissance 4 de zeste de savoir
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
#include <string.h>
#include <memory.h>
#define LARGEUR_DAMIER (7)
#define HAUTEUR_DAMIER (6)
@Meithal
Meithal / p4.c
Last active June 15, 2018 21:17
puissance 4
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
#define LARGEUR_DAMIER (7)
#define HAUTEUR_DAMIER (6)
#define LONGUEUR_DAMIER (LARGEUR_DAMIER * HAUTEUR_DAMIER)
@Meithal
Meithal / puissance4.c
Created June 5, 2018 21:17
puissance 4
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
#define LARGEUR_DAMIER (7)
#define HAUTEUR_DAMIER (6)
#define LONGUEUR_DAMIER (LARGEUR_DAMIER * HAUTEUR_DAMIER)
#define LONGUEUR_VICTOIRE (4)
@Meithal
Meithal / array_split_demo.c
Created April 22, 2018 19:08
split a a string into array of stings with C
/**
* Meithal @github
*
* Splits a string into several strings every new line and return a pointer to the first one
* The very last string will be \0
* Will be ub for lines > 50
* Doesn't free
* Doesnt check for several functions return values
*/
label start:
call screen master
"[_return]"
$ foo = renpy.call_screen("master")
$ renpy.say(None, _return)
$ renpy.say(None, foo)