Skip to content

Instantly share code, notes, and snippets.

View yvan-sraka's full-sized avatar

Yvan Sraka yvan-sraka

View GitHub Profile

Statuts de XXX, association régie par la loi du 1er juillet 1901 et le décret du 16 août 1901

Article 1. Constitution

Entre les comparants et les personnes qui adhéreront aux présents statuts, il existe une association régie par la loi du 1er juillet 1901, le décret d'application du 16 août 1901 et les textes en vigueur actuellement l'ayant modifiée ou complétée, ainsi que par lesdits statuts.

Article 2. Objet

@yvan-sraka
yvan-sraka / gist:f3f8bba130c8deada37cc922e8ab0a51
Created May 7, 2017 09:39 — forked from andphe/gist:3232343
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@yvan-sraka
yvan-sraka / pocketdedupe.py
Created May 6, 2017 14:20 — forked from Mierdin/pocketdedupe.py
A Python script to intelligently remove duplicate entries from Pocket
#!/usr/bin/env python
from pocket import Pocket
import webbrowser, sys
# Get consumer key from cmd line
consumer_key = sys.argv[1]
request_token = Pocket.get_request_token(
consumer_key=consumer_key,

L'algorithmique, qu'est-ce que c'est ?

Une suite instructions pour résoudre un problème :

INPUT -> AlGORITHM -> OUPUT

function ALGORITHM(INPUT) {
	...
	...
/* DEFINITION
f(0) = f(1) = 1
f(n) = f(n - 1) + f(n - 2)
f(0) = 1
f(1) = 1
f(2) = 1 + 1 = 2
f(3) = 1 + 2 = 3
f(4) = 2 + 3 = 5
// ALGORITHME
const max2 = (a, b) => (a > b ? a : b);
// Version iterative
const max_iter = function (T) {
if (!T.length)
throw "Can't use max() an empty array";
let m = T[0];
<?php
// ALGORITHME
function max2($a, $b) {
if ($a > $b) {
return $a;
} else {
return $b;
}
#include <iostream>
// ALGORITHME
int max2(int a, int b) {
if (a > b) {
return a;
} else {
return b;
}
#include "stdio.h"
//stop
void stop()
{
throw 42;
}
//operation
#! /usr/bin/python3
# - - - - - - - - - - -
# IAMSI - 2016
# joueur d'Awélé
# - - - - -
# REM: ce programme a été écrit en Python 3.
#
# En salle machine : utiliser la commande "python3"
# - - - - - - - - - - -