This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package x | |
import java.util.Stack | |
import java.io.File | |
import javax.xml.parsers.* | |
import org.xml.sax.* | |
import org.xml.sax.helpers.* | |
class Node(val l:String, val q:String, val u:String, val a:Map<String,String>) { | |
val children:MutableList<Node> = mutableListOf<Node>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var defaut = { | |
tranches: [ | |
{lo:0, hi:9964, per:0}, | |
{lo:9964, hi:27519, per:14}, | |
{lo:27519, hi:73779, per:30}, | |
{lo:73779, hi:156244, per:41}, | |
{lo:156244, hi:999999999999, per:45} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://output.jsbin.com/cinefupoda/ | |
// https://jsbin.com/voneyoraka/ | |
var tranches = [ | |
{lo:0, hi:9964, per:0}, | |
{lo:9964, hi:27519, per:14}, | |
{lo:27519, hi:73779, per:30}, | |
{lo:73779, hi:156244, per:41}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- lexical-binding: t -*- | |
(require 'dash) | |
;; (setq lexical-binding t) | |
;; from: https://impots.dispofi.fr/bareme-impot/calcul-impot-par-tranche | |
;; De 0€ à 9964€ 0% | |
;; De 9964€ à 27519€ 14% | |
;; De 27519€ à 73779€ 30% |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Width: | |
def __init__(self, w): | |
self.l = [] | |
self.w = w | |
def put(self, d): | |
self.l.append(d) | |
def __repr__(self): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from: https://www.ps.uni-saarland.de/~duchier/python/continuations.html | |
# more: https://duckduckgo.com/html?q=continuations%20in%20python | |
def sumc(x,y,k): | |
k(x+y) | |
def mulc(x,y,k): | |
k(x*y) | |
def f(x,k): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pprint import pprint as pp | |
from html.parser import HTMLParser | |
from collections import namedtuple | |
import requests | |
####### | |
# dom # | |
####### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; spart [] = [] | |
; spart [1] = [[1]] | |
; spart [1 1] = [[1 1]] | |
; spart [1 1 2] = [[1 1] [2]] | |
s [] = [] | |
s [x] = [x] | |
s x:xs = sp x:xs x [] [] | |
where sp [] p a r = r | |
sp x:xs p a r = |