Skip to content

Instantly share code, notes, and snippets.

View bgrenet's full-sized avatar

Bruno Grenet bgrenet

View GitHub Profile
@bgrenet
bgrenet / UTM_Hopcroft_Ullman1969.yaml
Last active January 21, 2026 14:38
Universal Turing Machines
name: UTM_Hopcroft_Ullman_1969
source code: |-
# Source: J. E. Hopcroft and J. D. Ullman, Formal languages and their relation to automata. Addison-Wesley, 1969.
# - Figure 7.4 pp 105 - 107
# - Input is Figure 7.2 p 103
#
# Alphabet:
# - non-marked symbols ("upper track" is B): 0, 1, c, L, R, ' ' (blank)
# - marked symbols ("upper track" is m): O (for m0), I (for m1), C (for mc), ' ' (for m' ')
#
@bgrenet
bgrenet / ecrit01.yaml
Created January 5, 2026 09:12
Exemples cours 1
name: écrit01
source code: |
input: ''
blank: ' '
start state: q0
table:
q0:
' ': {write: 0, R: q1}
q1:
' ': {write: 1, R: q0}
@bgrenet
bgrenet / xopp2pdf.py
Created November 9, 2023 20:35
Export xournal++ file to pdf, preserving bookmarks, pdf links, etc.
#!/usr/bin/env python3
import gzip
import xml.etree.ElementTree as ET
import subprocess
import argparse
import sys
import pathlib
import tempfile
@bgrenet
bgrenet / md2ipynb.py
Created February 2, 2017 15:00
(Extremely basic) Python script to create jupyter notebooks from markdown
#! /usr/bin/env python3
############################################################################
# #
# (Extremely basic) Python script to create jupyter notebook from markdown #
# Bruno Grenet, 02.02.2017 #
# License: Public Domain #
# #
############################################################################