Skip to content

Instantly share code, notes, and snippets.

[00:00.000 --> 00:05.440] And if you beat up somebody enough, it does stop up his or her love springs.
[00:05.440 --> 00:08.240] They become a being who is incapable of love.
[00:08.240 --> 00:14.000] I wrote a sonnet once,
[00:14.000 --> 00:32.200] The man, when all is said, what fallen man calls sin is but another name for love locked in.
[00:34.960 --> 00:41.480] Here speaks the nature of the damage done that man knew not how it and he are one.
[00:41.480 --> 00:51.080] Thus outlawed from the secret of the earth, entrusted in his being at his birth,
[00:51.080 --> 01:01.880] His sin a code, its key a turn of fate, man struck, struck man, ere woman let him mate.
[01:01.880 --> 01:11.460] But codes made up by man, by man are broken, and names will man to man deny the call.
[01:11.460 --> 01:14.640] And something, something lost it there.
[01:16.520 --> 01:17.500] Something token.
@Epivalent
Epivalent / cform_order_twin_spigot.py
Created February 28, 2026 11:31
Pratt Clifford Zeta Golomb spigot
#!/usr/bin/env python3
from __future__ import annotations
import argparse
import json
from functools import lru_cache
from typing import Dict, List, Tuple
import mpmath as mp
import sympy as sp
#!/usr/bin/env python3
"""TopCVP_beta CLI
This script packages the current working construction (paper-faithful):
Primitives (all are *string* lambda terms built via plc_suite.terms):
- fetch_{i,n} (paper), with NOT-substitution implemented by swapping CSTT/CSTF
*only* at the (t==n+1 and j==i) app-slot inside the fetch constructor.
- and'_n (paper)
- OR derived purely by De Morgan using NOT-substitution + and'
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# THRML unified sampler (clean rewrite)
# - Perfect matching on planar cubic bridgeless graphs via 2-face-coloring + NAE vertex constraints.
# - Face K-coloring (default K=4) on the dual graph via Potts (penalize equal colors on adjacent faces).
# Supports two input modes:
# (1) Lambda term -> primal rotation system -> dual faces, Tutte embedding for plotting
# (2) Adjacency matrix (0/1 square text file) of the dual graph for direct face K-coloring
# Includes:
# * Block Gibbs with optional block partition via greedy vertex-coloring (--block-coloring)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Epivalent
Epivalent / d-list-col.ipynb
Last active March 20, 2025 10:52
WiP implementation of Nick Gravin's linear time graph d-list-colouring algorithm.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Epivalent
Epivalent / ngravin-d-list-col-impl-WiP.ipynb
Created March 20, 2025 10:42
WiP implementation of Nick Gravin's linear-time graph d-list colouring algorithm.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Epivalent
Epivalent / gist:7cf7647e8a52d6d8ca58106d276fa648
Last active March 20, 2025 10:38
ngravin-d-list-colouring-WiP.ipynb
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from sage.all import Graph, matrix, ZZ
import unittest
# ============================================================
# Data Representation and Helper Functions
# ============================================================

If you are encountering the "error: externally-managed-environment" when trying to install or upgrade packages using pip, it means that your Python environment is being managed externally and you do not have permission to modify it. In this case, you will need to either gain the necessary permissions or use a virtual environment.

Here are two possible solutions:

  1. Gain necessary permissions:
    • Run the pip command with administrative privileges by using sudo:
      sudo pip3 install package_name
      

To make the Python environment not externally managed on Debian 12, you can follow these steps:

  1. Update your system's package list:

    sudo apt update
    
  2. Install pip3 (if not already installed):

sudo apt install python3-pip