Skip to content

Instantly share code, notes, and snippets.

View karanveerm's full-sized avatar

Karanveer Mohan karanveerm

  • San Francisco, CA
View GitHub Profile
@karanveerm
karanveerm / qcqp_convex.jl
Created November 16, 2014 04:01
QCQP problem using Convex.jl
## QCQP problem in a convex sub-domain
a = 77.5625
F = [ 351.0 26255.2 -6647.07 1282.81
26255.2 2.23819e6 -780203.0 80689.2
-6647.07 -780203.0 1.25858e6 151221.0
1282.81 80689.2 151221.0 979604.0]
V = [375.77,11564.5,18360.6,3891.82]
# unconstrained min
- #############################################################################
- # dcp.jl
- # This file handles the basic rules on interactions of mathematical expressions
- # to create new expressions.
- #
- # For example: negative of a concaveVexity expression is convexVexity, or multiplication
- # of two positive expressions continue to be positive.
- #
- # See: http://dcp.stanford.edu/rules or the original paper at
- # http://web.stanford.edu/~boyd/papers/disc_cvx_prog.html
src/Convex.jl
src/atoms
src/atoms/abs.jl
src/atoms/abs.jl.cov
Skipped src/atoms/abs.jl.cov
src/atoms/affine
src/atoms/affine/add_subtract.jl
src/atoms/affine/add_subtract.jl.cov
Skipped src/atoms/affine/add_subtract.jl.cov
src/atoms/affine/diag.jl
@karanveerm
karanveerm / error.scala
Last active January 11, 2016 01:53
java.lang.IllegalArgumentException: spark.sql.execution.id is already set
// Imports
import org.apache.spark.sql.hive.HiveContext
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.sql.SaveMode
import scala.concurrent.ExecutionContext.Implicits.global
import java.util.Properties
import scala.concurrent.Future
// Set up spark on local with 2 threads
val conf = new SparkConf().setMaster("local[2]").setAppName("app")