Skip to content

Instantly share code, notes, and snippets.

@Auscitte
Auscitte / hw9_3.py
Last active September 29, 2021 21:17
Data for the Allocation of Interdiction problem
#Data for the Allocation of Interdiction problem (in Stephen Boyd's Convex Optimization course) generated with Matlab;
#I borrowed the list of edges from https://github.com/NoamGit/CVX101-HW-with-python/blob/master/HW10/hw10_script.py and
#used matlab to generate a and x_max.
import numpy as np
(n, m) = (10, 20)
B = m / 2.0
@Auscitte
Auscitte / minimax_fit.py
Created January 22, 2022 07:32
Solution for the Minimax Rational Fit to the Exponential problem
""" Solution for the "Minimax rational fit to the exponential" problem in Stephen Boyd's Convex Optimization
Compares a bisection-based implementation to that employing coordinate descent (iterative partial minimization).
:Copyright:
Copyright Ry Auscitte 2021. This script is distributed under MIT License.
:Authors:
Ry Auscitte
"""
@Auscitte
Auscitte / dbxupdate_matroska.py
Created February 10, 2023 10:21
Prints set-theoretic (loosly speaking) relations for a sequence of consecutive dbxupdate.bin files
""" Prints set-theoretic relations for a sequence of consecutive dbxupdate.bin files
Prepend file names with the release date in the yyyy-mm-dd format (you can name the files
in some other way, but make sure that sorting the files in a lexicographical order
correspendeds to sorting them by a release date)
dbxupdate_parser lives at https://github.com/Auscitte/sys-utils/blob/main/dbxupdate_parser.py
:Copyright:
Ry Auscitte 2023. This script is distributed under MIT License.