Skip to content

Instantly share code, notes, and snippets.

Bartolomeo Stellato bstellato

Block or report user

Report or block bstellato

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bstellato
bstellato / MITaly privacy policy
Created Mar 11, 2019
mitaly_privacy_policy.html
View MITaly privacy policy
<h1>Privacy Policy</h1>
<p>Effective date: March 11, 2019</p>
<p>MITaly - Italian Association at MIT ("us", "we", or "our") operates the http://mitaly.mit.edu website (the "Service").</p>
<p>This page informs you of our policies regarding the collection, use, and disclosure of personal data when you use our Service and the choices you have associated with that data. Our Privacy Policy for MITaly - Italian Association at MIT is created with the help of the <a href="https://www.freeprivacypolicy.com/">Free Privacy Policy website</a>.</p>
@bstellato
bstellato / mosek_error_pr664.txt
Created Feb 7, 2019
Mosek error in CVXPY PR 664
View mosek_error_pr664.txt
ERROR: Test grad for partial minimization/maximization problems.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/sidereus/Dropbox/research/code/projects/cvxpy/cvxpy/tests/test_grad.py", line 692, in test_partial_problem
fix_prob.solve()
File "/Users/sidereus/Dropbox/research/code/projects/cvxpy/cvxpy/problems/problem.py", line 271, in solve
return solve_func(self, *args, **kwargs)
File "/Users/sidereus/Dropbox/research/code/projects/cvxpy/cvxpy/problems/problem.py", line 511, in _solve
self.unpack_results(solution, full_chain, inverse_data)
File "/Users/sidereus/Dropbox/research/code/projects/cvxpy/cvxpy/problems/problem.py", line 650, in unpack_results
View ecos_pr.txt
N = 8
FUNCTION: with_compile Used 100 times with solver ECOS
Solver time
MEDIAN 0.000482311
MEAN 0.000531244488888889
STDEV 0.0001849527009135786
CVXPY time
MEDIAN 0.03360658268151855
MEAN 0.041804371728830295
STDEV 0.02494174225767466
View ecos_master.txt
N = 8
FUNCTION: with_compile Used 100 times with solver ECOS
Solver time
MEDIAN 0.000491588
MEAN 0.000584584825
STDEV 0.00025277084914314066
CVXPY time
MEDIAN 0.03191720293206787
MEAN 0.03357378209356384
STDEV 0.005317177566723467
@bstellato
bstellato / test_cvxpy_params.py
Created Feb 6, 2019
Test CVXPY speed with and without parameters
View test_cvxpy_params.py
from __future__ import print_function
import time
import random
import cvxpy as cvx
import numpy as np
solver = "ECOS"
for N in [8, 800, 8000]:
@bstellato
bstellato / osqp_cla.md
Last active Jan 23, 2018
OSQP Contributor License Agreement
View osqp_cla.md

OSQP Contributor License Agreement

Adapted from https://www.apache.org/licenses/icla.pdf

Thank you for your interest in the OSQP project ("OSQP").

In order to clarify the intellectual property license granted with Contributions from any person or entity, OSQP must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for

@bstellato
bstellato / parallel_map.py
Last active Aug 30, 2017
Simple parallel map in python
View parallel_map.py
'''
Script to run function f in parallel taking multiple arguments
'''
from multiprocessing import Pool, cpu_count
import numpy as np
from itertools import repeat
import time
@bstellato
bstellato / mpl_latex.py
Created May 15, 2017
Matplotlib python helper function to generate latex plots
View mpl_latex.py
import matplotlib as mpl
mpl.use('pgf') # Export pgf figures
import matplotlib.pylab as plt
# Text width in pt
# -> Get this from LaTeX using \the\textwidth
text_width = 469.75
@bstellato
bstellato / paper.mplstyle
Created May 15, 2017
Matplotlib paper stylesheet
View paper.mplstyle
# Matplotlib paper stylesheet to be integrated with LaTeX
# To put in .matplotlib/stylelib/paper.mplstyle
pgf.texsystem: pdflatex
text.usetex: True
font.family: "serif"
font.serif: []
font.sans-serif: []
font.monospace: []
@bstellato
bstellato / random_mat_condition_number.py
Last active Jun 19, 2017
Generate matrix with predefined condition number
View random_mat_condition_number.py
# Construct random matrix P with specified condition number
#
# Bierlaire, M., Toint, P., and Tuyttens, D. (1991).
# On iterative algorithms for linear ls problems with bound constraints.
# Linear Algebra and Its Applications, 143, 111–143.
#
cond_P = 10**2 # Condition number
log_cond_P = np.log(cond_P)
exp_vec = np.arange(-log_cond_P/4., log_cond_P * (n + 1)/(4 * (n - 1)), log_cond_P/(2.*(n-1)))
You can’t perform that action at this time.