Skip to content

Instantly share code, notes, and snippets.

View oscmansan's full-sized avatar
🎯
Focusing

Oscar Mañas oscmansan

🎯
Focusing
  • Zurich
View GitHub Profile
@oscmansan
oscmansan / check_fonts.py
Last active February 8, 2026 18:35
Fix PDF font embedding issues in thesis figures for submission to Papyrus @ UdeM. Requires pdffonts (poppler) and gs (ghostscript).
"""Check and fix PDF font embedding issues in thesis figures."""
import argparse
import shutil
import subprocess
from pathlib import Path
def check_pdf_fonts(pdf_path: str) -> list[str]:
"""
function [u] = sol_Laplace_Equation_Axb(f, dom2Inp, param)
%this code is not intended to be efficient.
[ni, nj] = size(f);
%We add the ghost boundaries (for the boundary conditions)
f_ext = zeros(ni+2, nj+2);
f_ext(2:end-1, 2:end-1) = f;
dom2Inp_ext = zeros(ni+2, nj+2);
dom2Inp_ext (2:end-1, 2:end-1) = dom2Inp;