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
#!/usr/bin/env python3 | |
from bla import * | |
from ldap3 import * | |
from contextlib import contextmanager | |
from sys import argv | |
import ipaddress as ip | |
netmask = lambda s: str(ip.IPv4Network("0.0.0.0/%s" % s.dhcpNetmask).netmask) |
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
#/!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Perversion | |
""" | |
from collections import MutableMapping, Counter, MutableSequence | |
from json import * | |
from functools import reduce |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Perversion | |
""" | |
from collections import MutableMapping, Counter | |
from json import * | |
from functools import reduce |
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 functools import reduce as r | |
from time import time as t | |
add = str.__add__ | |
class S(str): | |
__neutral = "" | |
def __radd__(s, o): | |
o = o or S.__neutral | |
return add(s, o) | |
def __ladd__(o, s): |
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 functools import reduce | |
class string(str): | |
def __radd__(self, other): | |
other = other or "" | |
return reduce(str.__add__,("L" , other , "R+" , "R" , self)) | |
def __add__(self, other): | |
other = other or "" |
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 functools import reduce | |
class string(str): | |
def __ladd__(self, other): | |
other = other or "" | |
return reduce(str.__add__,("L" , self , "L+" , "R" , other)) | |
def __radd__(self, other): | |
other = other or "" | |
return reduce(str.__add__,("L" , self , "R+" , "R" , other)) |
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
#!/usr/bin/env python3 | |
from archery import mdict, vdict | |
from math import pi, cos, sin, acos | |
class Matrix(mdict): | |
def __call__(self, other): | |
res= mdict() | |
for (src, dst), functor in self.items(): | |
res += mdict({ dst: functor(other[src])}) | |
return res |
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
"""Licence : Julien Tayon (2018) | |
If you find me a job in GIS or BigData I will change this license to a full | |
2 clauses BSD | |
Licence proprietaire sur un fichier a code source ouvert | |
ca me laissera le plaisir de poursuivre ceux qui le reutilisent sans mon accord | |
Proprietary licence with opened source. This a bait for all the newbies | |
that copy paste from the internet without taking attention of the licenses. |
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
# -*- coding: utf-8 -*- | |
# -*- coding: utf-8 -*- | |
from sys import version | |
import platform | |
import locale | |
print("platfrom is %s" % platform.platform()) | |
print("default locale is "+repr( locale.getdefaultlocale())) | |
print("locale is "+repr( locale.getlocale())) |
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
<html> | |
<header> | |
<script> | |
window.addEventListener("load", function(event) { | |
var color = %(color)s; | |
for( dep in color ) { | |
var el = document.getElementsByClassName("departement" + dep); | |
console.log(el); | |
el[0].style["fill"] = color[dep]; | |
} |