Skip to content

Instantly share code, notes, and snippets.

View sorooshafiee's full-sized avatar

Soroosh Shafiee sorooshafiee

View GitHub Profile
x = sdpvar(n, n, 'full');
constraints = cell(m, 1);
ops = sdpsettings('solver', 'mosek', 'verbose', verbose);
optimize([constraints{:}], objective, ops);
https://rclone.org/
@sorooshafiee
sorooshafiee / Terminal
Last active February 12, 2023 17:09
CMU Proxy
export HTTPS_PROXY=http://proxy.cmu.edu:3128
curl -O https://packages.gurobi.com/10.0/gurobi10.0.0_linux64.tar.gz
tar xvfz gurobi10.0.0_linux64.tar.gz
~/gurobi1000/linux64/bin/grbgetkey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
conda create -n draft python=3.10
@sorooshafiee
sorooshafiee / knapsack.py
Created August 22, 2022 17:07 — forked from jhelgert/knapsack.py
[Python3] Finds all optimal feasible Solutions for the knapsack problem with Gurobi. Works similar for all binary integer programs.
#!/usr/bin/env python3
from gurobipy import *
def addBinaryCut(j):
B, NB = [], []
for i in range(n):
B.append(i) if (x[i].x == 1) else NB.append(i)
# Add binary cut to Model
@sorooshafiee
sorooshafiee / input.conf
Created April 14, 2020 21:22
MPV input file
# mpv keybindings
#
# Location of user-defined bindings: ~/.config/mpv/input.conf
#
# Lines starting with # are comments. Use SHARP to assign the # key.
# Copy this file and uncomment and edit the bindings you want to change.
#
# List of commands and further details: DOCS/man/input.rst
# List of special keys: --input-keylist
# Keybindings testing mode: mpv --input-test --force-window --idle
@sorooshafiee
sorooshafiee / alphaabbr.bst
Created April 8, 2020 07:14
alphaabbr.bst
% BibTeX `plain' family
% version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
% Copyright (C) 1985, all rights reserved.
% Copying of this file is authorized only if either
% (1) you make absolutely no changes to your copy, including name, or
% (2) if you do make changes, you name it something other than
% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
% This restriction helps ensure that all standard styles are identical.
@sorooshafiee
sorooshafiee / textudio
Last active October 4, 2021 20:15
Theme for Textudio
[General]
IniMode=true
[formats]
data\align-ampersand\bold=true
data\align-ampersand\fontFamily=
data\align-ampersand\foreground=#b5d1df
data\align-ampersand\italic=false
data\align-ampersand\overline=false
data\align-ampersand\pointSize=0
@sorooshafiee
sorooshafiee / cloudSettings
Last active October 22, 2020 01:24
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-13T11:50:53.801Z","extensionVersion":"v3.4.3"}