Inane Observations $ sudo fix_it
  • A modern theme for cgit

    16 May 2025 | git linux c python | Comment

    cgit is a lightweight web frontend for git repositories. As opposed to modern git forges such as GitLab, Gitea and Forgejo, cgit provides view-only access, and does not have attached bells and whistles such as issue tracking or pull requests. This allows cgit to be… »

  • htmlcc: Statically compiled HTML templates for C

    15 May 2025 | c html python | Comment

    This article presents htmlcc, an HTML templating engine for C utilising static compilation.

    Motivation

    Web applications are not commonly written in C; one notable counterexample is cgit, a web frontend for git repositories. HTML output in cgit is implemented from scratch, using bespoke… »

  • Foreground segmentation with JBIG2 for improved PDF compression: pdf-segmented

    09 May 2025 | graphics linux python pdf | Comment

    Motivation

    JBIG2 is an efficient image compression format for bi-level (bi-tonal) images, which is supported by the PDF file format and common PDF viewers. To date, tooling for producing documents using JBIG2 (particularly open source tooling) has been limited; I have previously presented file-jbig2pdf,… »

  • GIMP 3.0 plug-in for exporting JBIG2-encoded PDF files

    09 November 2024 | gimp graphics linux python pdf | Comment

    JBIG2 is an efficient image compression format for bi-level (bi-tonal) images, which is supported by the PDF file format and common PDF viewers, but which lacks widely available tooling for its generation. GIMP is an open-source image editing suite, which has the capacity to output… »

  • Python re-implementation of Cryptomator encryption scheme

    01 June 2024 | cryptography encryption python | Comment

    Cryptomator is an open-source file-based encryption system. Encrypted data is stored as files which can be easily uploaded to arbitrary cloud storage services, and there is a one-to-one relationship between plaintext and encrypted files. In order to increase privacy, filenames are encrypted and there is… »

  • SciPy distribution for the odds ratio of independent beta variables

    07 October 2022 | mathematics statistics python | Comment

    In biostatistics, a common effect measure when considering dichotomous exposures and outcomes is the odds ratio. With two proportions $π_0$ and $π_1$, the odds ratio is $ψ = \frac{π_1 / (1 - π_1)}{π_0 / (1 - π_0)}$, as compared to the risk ratio,… »

  • Directly computing HDIs from PDFs in SciPy

    06 October 2022 | mathematics statistics python | Comment

    In Bayesian inference, it is often desired to calculate credible intervals for model parameters. The 2 common choices are the highest posterior density interval (HPD/HDI), and the equal-tailed interval. In many cases, the posterior density must be estimated by simulation, but in some cases the… »

  • Beta ratio distribution for SciPy

    05 October 2022 | mathematics statistics programming python | Comment

    The quotient of 2 independent beta-distributed random variables has a known distribution, but its closed-form expression is a little hairy [1, 2]. One Python implementation of this distribution is available from Julian Saffer [3], but it suffers from some numerical issues… »

  • Home
  • Git (Archives: GitLab, GitHub)
  • Research
  • Music
  • Posts
    • May 2025 (3)
    • December 2024 (2)
    • November 2024 (2)
    • September 2024 (2)
    • August 2024 (1)
    • More…
  • Tags
    • medicine (25)
    • copyright (20)
    • opentally (20)
    • drm (19)
    • encryption (12)
    • monash (12)
    • mathematics (11)
    • statistics (10)
    • proportional representation (8)
    • python (8)
    • victoria (8)
    • law (7)
    • meeting procedure (7)
    • ptv (7)
    • public transport (7)
    • rust (7)
    • defective by design (6)
    • digital rights management (6)
    • creative commons (4)
    • webassembly (4)
    • metro trains (3)
    • paediatrics (3)
    • politics (3)
    • 2fa (2)
    • c (2)
    • graphics (2)
    • mfa (2)
    • pdf (2)
    • victorian electoral commission (2)
    • android (5)
    • security (18)
    • cryptography (12)
    • programming (12)
    • voting systems (8)
    • med in review (11)
    • music (10)
    • parliamentary procedure (7)
    • totp (2)
    • reverse engineering (20)
    • obfuscation (12)
    • single transferable vote (19)
    • ebook (16)
    • elections (12)
    • java (6)
    • linux (33)
  • Lee Yingtong Li
  • blog@yingtongli.me
  • My CV · CV of Failures
@RunasSudo

Most material on this website is available under an open licence. See https://yingtongli.me/blog/copyright.html for details.