Skip to content

Instantly share code, notes, and snippets.

View mvernacc's full-sized avatar

Matthew Vernacchia mvernacc

View GitHub Profile
@mvernacc
mvernacc / latex_remove_blocks.py
Last active June 2, 2024 20:18
This script process a latex document to remove certain blocks, but keep the text within them.
r"""This script process a latex document to remove certain blocks,
but keep the text within them.
This is useful for preparing paper revisions for the AIAA journals,
which ask for both:
- a pdf of the revised paper with the revisions colored, and
- a "clean" latex file of the revised paper, without the coloring blocks.
Thus, the author can create a latex file with the revised passages wrapped in
`\textcolor{blue}{...}` blocks, and then run
"""Minimum working example to generate glp_add_cols issue with an integer linear program in CVXPY.
"""
import cvxpy as cp
import numpy as np
n = 4
x = cp.Variable(n, integer=True)
A = np.array(
"""Minimum working example to generate glp_add_cols issue with an integer linear program in CVXPY.
"""
import cvxpy as cp
import numpy as np
n = 4
x = cp.Variable(n, integer=True)
A = np.array(
@mvernacc
mvernacc / mwe.py
Last active March 26, 2019 15:30
Minimum working example of Issue 1390 from gpkit
"""Minimum working example of Issue 1390
See https://github.com/convexengineering/gpkit/issues/1390
"""
import traceback
from gpkit import Model, Variable, units, DimensionalityError
from gpkit.constraints.tight import Tight
class DummyModelRad(Model):
"""This one replicates the original error."""
@mvernacc
mvernacc / iaf-iac.cls
Created September 25, 2018 04:05
LaTeX class for International Astronautical Congress manuscripts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% iaf-iac.cls, v0.0, 2018-09-24
% Developed by Matt Vernacchia, [email protected]
%
% This class file enables authors to prepare papers
% according to the manuscript style requested by the
% International Astronautical Federation (IAF) for
% submissions to the International Astronautical
% Congress (IAC)
%