Skip to content

Instantly share code, notes, and snippets.

View marcofavorito's full-sized avatar

Marco Favorito marcofavorito

View GitHub Profile
@marcofavorito
marcofavorito / LLM.md
Created August 17, 2023 19:32 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@marcofavorito
marcofavorito / Makefile
Created December 22, 2020 20:32 — forked from maciakl/Makefile
Pandoc, continous compilation setup.
# Run watch -n1 make
files := $(shell xargs -a COMPILELIST.TXT)
index.html: $(files)
pandoc $(files) --toc -f markdown -t html -c style.css -o $@
import math
from copy import copy
from typing import Optional
from pysat.solvers import Glucose3
def is_sat(clauses) -> bool:
g = Glucose3()
for c in clauses:
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows,automata}
\begin{document}
\begin{tikzpicture}
\tikzset{vertex/.style = {shape=circle,draw,minimum size=1.5em}}
\tikzset{edge/.style = {->,> = latex'}}
v?(?:(?:(?P<epoch>[0-9]+)!)?(?P<release>[0-9]+(?:\\.[0-9]+)*)(?P<pre>[-_\\.]?(?P<pre_l>(a|b|c|rc|alpha|beta|pre|preview))[-_\\.]?(?P<pre_n>[0-9]+)?)?(?P<post>(?:-(?P<post_n1>[0-9]+))|(?:[-_\\.]?(?P<post_l>post|rev|r)[-_\\.]?(?P<post_n2>[0-9]+)?))?(?P<dev>[-_\\.]?(?P<dev_l>dev)[-_\\.]?(?P<dev_n>[0-9]+)?)?)(?:\\+(?P<local>[a-z0-9]+(?:[-_\\.][a-z0-9]+)*))?

Keybase proof

I hereby claim:

  • I am marcofavorito on github.
  • I am marcofavorito (https://keybase.io/marcofavorito) on keybase.
  • I have a public key ASD7pEOGslF-lMBAHLVcmvQAC3gWsi682uLtQA2tQwREkwo

To claim this, I am signing this object:

# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@marcofavorito
marcofavorito / simple-merkle-tree.py
Created July 25, 2018 19:36
A simple implementation of a Merkle Tree
import hashlib
class MerkleNode(object):
def __init__(self, u=None, v=None, parent=None):
self.u = u
self.v = v
self.parent = parent
def compute_hash(self) -> bytes:
@marcofavorito
marcofavorito / combinations.js
Last active June 29, 2018 06:48 — forked from axelpale/combinations.js
JavaScript functions to calculate combinations of elements in Array.
/**
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
*
* <license>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
@marcofavorito
marcofavorito / tendermint_abci-example.md
Last active January 29, 2018 17:45
Some data from a Tendermint network of 4 nodes with the toy app `abci counter`
  • run the network. Genesis file:

      curl 'http://localhost:46606/genesis'
      {
        "jsonrpc": "2.0",
        "id": "",
        "result": {
          "genesis": {
            "genesis_time": "2018-01-29T18:29:56.578233278+01:00",
    

"chain_id": "chain-L2Cbtf",