Skip to content

Instantly share code, notes, and snippets.

Avatar

Meithal

  • Reims
View GitHub Profile
@Meithal
Meithal / gist:415debccf04fa96c5c681dd457ca8e17
Last active Oct 21, 2020
Crosscompile on Python build pip, etc
View gist:415debccf04fa96c5c681dd457ca8e17
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 Oct 30, 2018
javaquarium python generators
View pyquarium.py
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 Aug 20, 2018
p4 new gen
View p4.c
#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)
View p4.c
#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)
View p4 wip
#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 Jun 14, 2018
puissance 4 de zeste de savoir
View p4.c
#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 Jun 15, 2018
puissance 4
View p4.c
#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)
View puissance4.c
#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 Apr 22, 2018
split a a string into array of stings with C
View array_split_demo.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
*/
View gist:13d331faaf1d75733e7fdccf9329da3a
label start:
call screen master
"[_return]"
$ foo = renpy.call_screen("master")
$ renpy.say(None, _return)
$ renpy.say(None, foo)
You can’t perform that action at this time.