This file contains hidden or 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
import operator | |
from abc import abstractmethod, ABC | |
from dataclasses import dataclass | |
from functools import reduce | |
from itertools import product, repeat | |
import random as rnd | |
class Element(ABC): | |
i: int |
This file contains hidden or 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
import operator | |
import random as rnd | |
from abc import abstractmethod, ABC | |
from dataclasses import dataclass | |
from functools import reduce | |
from itertools import product, islice, cycle | |
from math import log, factorial | |
from time import sleep | |
This file contains hidden or 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 partial | |
from hashlib import md5 | |
from timeit import timeit | |
from numba import njit, jit, cfunc | |
@cfunc("list(byte)(byte, byte)") | |
def int2pmat(number, side=35): | |
"""Convert number into permutation matrix. |
This file contains hidden or 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 partial | |
from hashlib import md5 | |
from timeit import timeit | |
def int2pmat(number, side=35): | |
"""Convert number into permutation matrix. | |
Pads to side. If None, no padding. |
This file contains hidden or 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 abc import abstractmethod | |
from typing import get_type_hints | |
class DataOrColl: | |
pass | |
class Collection(DataOrColl): | |
pass |
This file contains hidden or 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 lru_cache | |
from itertools import repeat | |
def pca(d): | |
return d * 2 | |
def svm(d): |
This file contains hidden or 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 itertools import repeat | |
# Usado apenas em pipes que tenham multi. | |
from cururu.amnesia import Amnesia | |
from cururu.pickleserver import PickleServer | |
def expand(d): | |
return repeat(d) |