Skip to content

Instantly share code, notes, and snippets.

View Sharian's full-sized avatar

Marco Dennstädt Sharian

View GitHub Profile
npA = numpy.array(["""INPUT"""])
W = numpy.matmul(npA.transpose(), npA)
WC = cvx.Parameter(W.shape[0], W.shape[0])
WC.value = W
X = cvx.Semidef(W.shape[0])
objective = cvx.Minimize(cvx.trace(X * W))
constraints = [cvx.diag(X) == 1, X >> 0]
@Sharian
Sharian / gist:067d1f572d1a00655e5a
Last active August 29, 2015 14:16
Recursive Folder Deletion using NodeJS
FileSystemAdapter.deleteDirectory = function(path)
{
var deferred = Q.defer();
fs.readdir(path, function(err, files)
{
if(!err)
{
var ContentRemoved = [];
files.forEach(function(element)
{