Skip to content

Instantly share code, notes, and snippets.

@anglyan
anglyan / cpp_deps.py
Created April 29, 2022 05:22
Simple code to automatically extract dependencies from C/C++ files and generate Make target rules
"""
Simple code to automatically extract dependencies from C/C++ files and
generate Make target rules
"""
def get_deps(filename):
dep_set = set()
with open(filename, 'r') as f:
for line in f:
tokens = line.strip().split()
@anglyan
anglyan / spice2csv.py
Created July 31, 2021 20:06
Simple script to convert printed output from traditional SPICE simulators into a single csv file / dataframe
"""
Simple script to convert printed output from traditional
SPICE simulators into a single csv file / dataframe.
Usage
-----
python spice2csv.py output.prn
Use:
@anglyan
anglyan / ppbeamer.py
Created May 27, 2016 03:44
python + beamer: reads a list of files and descriptions and compiles a latex presentation using beamer. Details at: http://www.ayanguasgil.net/python/beamer.html
import csv
header = r"""
\documentclass[mathserif]{beamer}
\usetheme{default}
\begin{document}
"""
footer = r"""
\end{document}