Skip to content

Instantly share code, notes, and snippets.

View edrdo's full-sized avatar

Eduardo R. B. Marques edrdo

View GitHub Profile
@choice17
choice17 / tflite_summary.py
Last active September 30, 2021 08:50
show model summary and tflite operators information
import sys
### require tflite >= v2.4.0
import tflite
import os
from collections import defaultdict
from datetime import datetime
### TFL3 schema compatible
ACTIVATION_DICT = {
0 : "NONE",
@zmeri
zmeri / gist:3c43d3b98a00c02f81c2ab1aaacc3a49
Last active June 22, 2022 10:05
This is a function that implements a Whittaker smoother in Python. Reference: Paul H. C. Eilers. "A Perfect Smoother". Analytical Chemistry, 2003, 75 (14), pp 3631–3636.
import scipy as sp
import scipy.sparse
import scipy.linalg
from scipy.sparse.linalg import cg
def whitsm(y, lmda):
m = len(y)
E = sp.sparse.identity(m)
d1 = -1 * np.ones((m),dtype='d')
d2 = 3 * np.ones((m),dtype='d')
@daniel-j-h
daniel-j-h / 1-notes.md
Last active February 16, 2025 21:35
SMT Solvers and Constraint Programming

On Logic Solvers

From SAT to SMT and back.

There is a Gist, see references [@gist].

Satisfiability (SAT)

Is a given formula (i.e. $\lnot A \land (B \lor C)$) satisfiable?