Skip to content

Instantly share code, notes, and snippets.

View ibaaj's full-sized avatar

Ismaïl Baaj ibaaj

  • Paris, France
View GitHub Profile
default(realprecision, 9000);
t=[28,29,24,25,0,0,7];
k=20
p=751
{
for (i=1,7,
r=t[i]*k + 1;
q= Mod(r^3 -r + 188, 751);
for(j=0,t[i]+1,
@ibaaj
ibaaj / padding.gp
Created October 22, 2016 18:01
coppersmith_padding.gp
default(realprecision,9000);
setrand(1);
p=nextprime(random(2^15));
q=nextprime(random(2^15));
N=p*q;
print("N=p*q="N);
P = random(N); \\ le padding
print("padding="P)
e = 3; \\ expo public
An object of class "SpatialPolygonsDataFrame"
Slot "data":
id xref yref zref
1 1 939247.5 6484247 1136
2 2 939007.7 6483825 1103
3 3 936801.6 6480678 1140
4 4 939823.0 6485043 1093
5 5 937895.0 6481820 1215
Slot "polygons":

#Tic Tac Toe P7 Online

code signification
00 Début du jeu
{LETTRE A,B,C SUIVI DE 1,2, ou 3} A,B,C ça correspond à la colonne du jeu 1,2,3 ça correspond à la ligne du jeu

Connexion entre Clients : UDP

Connexion entre Client et Serveur : TCP

@ibaaj
ibaaj / vigenere.c
Created September 19, 2016 12:44
vig
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#define MAX_ASCII_ALPHABET_LOWERCASE 122
#define MIN_ASCII_ALPHABET_LOWERCASE 97
struct Caractere {
@ibaaj
ibaaj / iphoneVid.sh
Last active July 26, 2016 01:10
iphoneVid
iphoneVid() { ffmpeg -i $1 -c:v libx264 -profile:v Main -level 3.1 -movflags +faststart -pix_fmt yuv420p -refs 11 $2;
}
lowIphoneVid() {
ffmpeg -i $1 -s qvga -b 384k -vcodec libx264 -r 23.976 -acodec libfaac -ac 2 -ar 44100 -ab 64k -crf 22 -deinterlace $2;
}
convert *.jpg -evaluate-sequence mean -alpha off out.jpg
@ibaaj
ibaaj / artvid.sh
Last active June 3, 2016 12:58
artistic vid with ami-b36981d8
sudo add-apt-repository ppa:mc3man/trusty-media;
sudo apt-get update;
sudo apt-get install -y software-properties-common curl wget git libprotobuf-dev protobuf-compiler man;
sudo apt-get install ffmpeg;
luarocks install loadcaffe && luarocks install image && luarocks install nn;
luarocks install torch && \
luarocks install cutorch && \
luarocks install cunn && \
luarocks install sys;
@ibaaj
ibaaj / textbuild.sh
Created May 16, 2016 21:17
TextBuilding.sh
#!/bin/bash
W=`identify ./img.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./img.jpg | cut -f 3 -d " " | sed s/.*x//` #height
convert -size ${W}x${H} xc:black -fill white -stroke black -draw "path 'M +780+1000 +2075+1054 +2431+3115 +80+2865" mask.png
convert img.jpg mask.png -alpha off -compose CopyOpacity -composite final.png
@ibaaj
ibaaj / double-down.sh
Created May 14, 2016 05:16
double-down.sh
#!/bin/bash
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height
if [[ $W > $H ]]; then
NW=$H;
else
NW=$W;