Skip to content

Instantly share code, notes, and snippets.

View GautierLePire's full-sized avatar

Gautier Le Pire GautierLePire

  • France
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gautierlepire on github.
  • I am gautierlepire (https://keybase.io/gautierlepire) on keybase.
  • I have a public key ASCxHyogcvmDupSon3a44sxR4pjoseSVkC1tWVM4h4PtyQo

To claim this, I am signing this object:

@GautierLePire
GautierLePire / toboggan.py
Last active May 14, 2019 10:11
Juste des toboggans
"""
2019
La Brachistochrone Réelle
Un TIPE réalisé par Gautier BEN AÏM
http://tobog.ga
"""
import numpy as np
#
"""
Dans ce TP, on se propose d'implémenter l'algorithme de Huffman en Python.
L'objectif est de compresser efficacement un texte en exploitant le fait que
les caractères aient une fréquence d'apparition loin d'être uniforme.
(Par exemple, le "e" est beaucoup plus fréquent que le "w", donc on va
faire en sorte qu'il prenne moins de place en mémoire.)
"""
def compterOccurences(texte):
@GautierLePire
GautierLePire / ytthumbnails.user.js
Last active November 11, 2017 07:24
[Youtube Userscript] Hover over a thumbnail to see images from the video
// ==UserScript==
// @name YT Thumbnails
// @namespace http://thegeeex.free.fr/
// @version 1.4.2
// @description Hover over a thumbnail to see images from the video
// @author Geeex
// @match https://www.youtube.com/*
// @grant none
// @downloadURL https://gist.github.com/thegeeex/e91b14764e7cd781ff9c/raw/ytthumbnails.user.js
// @run-at document-end
<?php
/**
* This function works the same as substr, except the fact that
* - <tag prop="value"> is 0 chars long
* - so is </tag>
* - &entity; is 1 char long
* - every opened tag is closed at the end, after $suffix got appended
* @license PUBLIC DOMAIN - do wathever you want with this code
* @PHP >= 5
@GautierLePire
GautierLePire / quine.php
Created November 28, 2014 20:00
PHP Quine
<?php
highlight_string(str_replace(!0,addslashes($q='<?php
highlight_string(str_replace(!0,addslashes($q=\'1\'),$q));'),$q));