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.
class TicTacToe: | |
def __init__(self, first_player="x"): | |
self.board = [[" " for _ in range(3)] for _ in range(3)] | |
self.player = first_player | |
self._turns = [] | |
@property | |
def other_player(self): | |
return {"x": "y", "y": "x"}[self.player] |
# src-layout | |
# replace the many <module>! | |
[build-system] | |
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"] | |
build-backend = "setuptools.build_meta" | |
[project] | |
name = "<module>" | |
version = "0.0.1" |
date;title-en;title-fr;title-alt;link-en;link-fr | |
2012/02/22;Interview;Entretien… la Debug quoi ?;1sur4 Entretien;/2012/02/Strip-1sur4-interview-800-final1.jpg;/2012/02/Strip-1sur4-Entretien-800-final2.jpg | |
2012/02/23;Interview…harder than it seems;Entretien… Même Yahoo ça serait passé. Mais pas ça.;2sur4 entretien;/2012/02/Strips-2sur4-interview-800-final1.jpg;/2012/02/Strips-2sur4-entretien-800-final2.jpg | |
2012/02/24;Interview…almost!;Entretien…presque !;3sur4 entretiens;/2012/02/Strip-3sur4-interview-800-final--1024x321.jpg;/2012/02/Strip-3sur4-entretiens-800-final-1.jpg | |
2012/02/27;Interview…Let there be light, and there was light!;Entretien…et la lumière fut;4sur4 entretien;/2012/02/Strip-4sur4-interview-800-final.jpg;/2012/02/Strip-4sur4-entretien-800-final.jpg | |
2012/02/29;First meeting;Première rencontre;Rencontre PM;/2012/02/Meeting-PM-800-final3.jpg;/2012/02/Rencontre-PM-800-final1.jpg | |
2012/03/01;“Artistic” meeting!;Rencontre « artistique » !;Rencontre DA;/2012/03/Meeting-DA-800-final.jpg;/2012/02/Rencont |
#a# #b# #c# | |
################################# ### ### | |
################################### ### ################## | |
### ### ### #################### | |
### \\\\################# ### ### ### ### | |
### ////################# ### ### ### ### | |
### +----------###-+ ### ### +-###----------+ ### | |
l############## c | ### ### ##### a ####### #####d | |
###############l | ### ### ######l d###### ####### | |
| | ### ### ### | | ### |
# Using those electronic building blocs: | |
# | |
# NOT GATE NAND GATE NOR GATE | |
# | |
# GNR GNR GNR | |
# a------< a------< a------< | | |
# POW-ww-+-c b------< b------(-< | |
# POW-ww-+--c POW-ww-+-+--c | |
# | |
# We define "and" and "or": |
# Courtesy of JKE | |
from odoo import http | |
from functools import partial | |
from contextlib import closing | |
import datetime | |
import time | |
class JucController(http.Controller): |
import secrets | |
import hashlib | |
def harden_pwd(pwd: str, version=1) -> bytes: | |
# scrypt n factor should be at least 2<<15 for interfactive usage, | |
# oddly enough, a n value higher than 2<<13 doesn't work on my machine | |
# https://blog.filippo.io/the-scrypt-parameters/ | |
if version == 1: | |
salt = secrets.token_urlsafe(16).encode() # so there is no $ symbol | |
hardened = hashlib.scrypt(pwd.encode(), salt=salt, n=2<<13, r=8, p=1) |
__pycache__/ | |
build/ | |
dist/ | |
*.egg-info/ | |
*.pyc/ |
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 |
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.