Applicable to Odoo XML and JS files. See LICENSE file on for full copyright and licensing details.
The script was applied to the entire odoo codebase and was able to automatically convert most icons in a few seconds.
""" | |
Overpopulation: if a living cell is surrounded by more than three living cells, it dies. | |
Stasis: if a living cell is surrounded by two or three living cells, it survives. | |
Underpopulation: if a living cell is surrounded by fewer than two living cells, it dies. | |
Reproduction: if a dead cell is surrounded by exactly three cells, it becomes a live cell. | |
""" | |
from curses import wrapper, curs_set | |
from math import sqrt | |
from numpy import array, int8, ndenumerate |
error.json | |
__pycache__/ |
*.pyc | |
__pycache__ |
#!/usr/bin/env python3 | |
from collections.abc import MutableSequence | |
from itertools import zip_longest, chain | |
from io import StringIO | |
from sys import argv | |
def inputint(prompt="", lower_bound=None, upper_bound=None): | |
while True: |
from itertools import product, chain, starmap | |
SURFACE = 0b01 | |
SIDE = 0b10 | |
def square(x, y, radius, min_x, min_y, max_x, max_y, mode): | |
""" | |
Coordinates in/on the square center: (x, y), side length: 2 * radius | |
:param x: The center abscissa | |
:param y: The center ordinate |
""" | |
Simple infix mathematic expression calculator | |
Author: Julien Castiaux (github.com/Julien00859) | |
Licence: MIT | |
""" | |
from operator import add, sub, mul, truediv, mod | |
def shuntingyard(expr): | |
"""Convert infix expression to postfix""" |
import re | |
from base64 import b64encode | |
specialsre = re.compile(r'[][\\()<>@,:;".]') | |
escapesre = re.compile(r'[\\"]') | |
def formataddr(pair): | |
"""Takes a 2-tuple of the form (realname, email_address) and returns | |
the string value suitable for an RFC 2822 From, To or Cc header. |
Applicable to Odoo XML and JS files. See LICENSE file on for full copyright and licensing details.
The script was applied to the entire odoo codebase and was able to automatically convert most icons in a few seconds.
from collections import deque | |
from itertools import cycle, chain, zip_longest | |
from pprint import pprint | |
from random import random, randint, sample, shuffle | |
class Sudoku: | |
def __init__(self, grid): | |
self.grid = grid |
__pycache__/ | |
build/ | |
dist/ | |
*.egg-info/ | |
*.pyc/ |