Skip to content

Instantly share code, notes, and snippets.

View bnaul's full-sized avatar

Brett Naul bnaul

View GitHub Profile
y = [0.1 0.2 0.1 0.2 0.5 0.4 0.6 0.7 0.8]';
p = length(y);
a = 0.2; b = 0.6;
A = tril(toeplitz([-1 1 zeros(1,p-2)]));
cvx_begin
variable x(p, 1)
minimize norm(x - y)
subject to
A * x <= 0
x(1) >= a
import numpy as np
class Point:
def __init__(self,x,y):
self.x = x
self.y = y
def __repr__(self):
return "Point({}, {})".format(self.x, self.y)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import imp
from os.path import expanduser
import dask
import numpy as np
from cesium import featurize, time_series
imp.reload(dask.async)
execute_task_old = dask.async.execute_task
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.