Skip to content

Instantly share code, notes, and snippets.

View tkelman's full-sized avatar

Tony Kelman tkelman

View GitHub Profile
@tkelman
tkelman / psopt.rb
Last active August 29, 2015 13:56 — forked from anonymous/psopt.rb
require 'formula'
class Psopt302Patch < Formula
homepage 'https://code.google.com/p/psopt/'
url 'http://psopt.googlecode.com/files/patch_3.02.zip'
sha1 'fd04038126dcfe4e1e9d95a26c7795423ac73276'
end
class Psopt < Formula
homepage 'https://code.google.com/p/psopt/'
@tkelman
tkelman / lusol.rb
Last active August 29, 2015 13:56 — forked from anonymous/lusol.rb
require "formula"
class Lusol < Formula
homepage 'http://www.stanford.edu/group/SOL/software/lusol.html'
url 'http://sourceforge.net/projects/lpsolve/files/LUSOL/2.2.1.0/LUSOL2.2.1.0.zip/download'
sha1 '9e12a0c774479a66146cf1de6936732d21c77087'
def patches
# fixes undefined symbols for max and _strupr
DATA
Cygwin Configuration Diagnostics
Current System Time: Sun Feb 09 00:50:34 2014
Windows 7 Home Premium Ver 6.1 Build 7601 Service Pack 1
Running under WOW64 on AMD64
Path: C:\cygwin\usr\local\bin
C:\cygwin\bin
@tkelman
tkelman / dmtest.cxx
Last active August 29, 2015 13:56 — forked from anonymous/dmtest.cxx
class A
{
public:
A (const A &);
~A ();
};
A::A (const A &)
{
}
using Calculus
# make derivative-rules Dict with Function keys and anonymous-function output
deriv_dict = Dict{Function, Function}()
for (funsym, exp) in Calculus.derivative_rules
@eval deriv_dict[$(funsym)] =
let xp = 1
x -> $exp
end
end
@tkelman
tkelman / spmm.jl
Last active August 29, 2015 13:56
function spmm{Tv,Ti}(Ain::SparseMatrixCSC{Tv,Ti}, Bin::SparseMatrixCSC{Tv,Ti})
A = Bin.'
B = Ain.'
mA, nA = size(A)
mB, nB = size(B)
nA==mB || throw(DimensionMismatch(""))
colptrA = A.colptr; rowvalA = A.rowval; nzvalA = A.nzval
colptrB = B.colptr; rowvalB = B.rowval; nzvalB = B.nzval
colptrC = Array(Ti, nB+1)
CC src/jltypes.o
CC src/gf.o
CC src/builtins.o
CC src/support/hashing.o
CC src/support/timefuncs.o
CC src/support/ptrhash.o
CC src/support/operators.o
CC src/module.o
CC src/codegen.o
CC src/support/utf8.o
make[3]: Entering directory `/home/tkelman/Julia/julia/src/support'
gcc44 -O3 -falign-functions -momit-leaf-frame-pointer -Wall -Wno-strict-aliasing -std=gnu99 -pipe -fPIC -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -DJL_SYSTEM_IMAGE_PATH="../lib/julia/sys.ji" -I/home/tkelman/Julia/julia/deps/libuv/include -fvisibility=hidden -DLIBRARY_EXPORTS -DNDEBUG -c strtod.c -o strtod.o
strtod.c:11: error: expected declaration specifiers or â...â before âlocale_tâ
strtod.c:12: error: expected declaration specifiers or â...â before âlocale_tâ
strtod.c:17: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âc_localeâ
strtod.c:19: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âget_c_localeâ
strtod.c: In function âstrtod_câ:
strtod.c:31: warning: implicit declaration of function âget_c_localeâ
strtod.c:31: error: too many arguments to function âstrtod_lâ
strtod.c: In function âstrtof_câ:
Microsoft (R) Windows Debugger Version 6.11.0001.404 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: D:\code\msys64\home\Tony\julia\usr\bin\julia-readline.exe --build D:/code/msys64/home/Tony/julia/usr/lib/julia/sys0 sysimg.jl
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *
Microsoft (R) Windows Debugger Version 6.11.0001.404 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: D:\code\msys64\home\Tony\julia\usr\bin\julia-readline.exe --build D:/code/msys64/home/Tony/julia/usr/lib/julia/sys0 sysimg.jl
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *