Skip to content

Instantly share code, notes, and snippets.

View chtlp's full-sized avatar

Linpeng Tang chtlp

View GitHub Profile
@chtlp
chtlp / Makefile.config
Created September 12, 2016 21:33
caffe makefile config: cpu only, use anaconda python3
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
# USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
CPU_ONLY := 1
# uncomment to disable IO dependencies and corresponding data layers
@chtlp
chtlp / gist:8a22517027a560d8a694
Last active August 29, 2015 14:05
openblas-e7
This file has been truncated, but you can view the full file.
make
make[1]: Entering directory `/memex/linpengt/Programs/OpenBLAS/interface'
gcc -O2 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=80 -DASMNAME=saxpy -DASMFNAME=saxpy_ -DNAME=saxpy_ -DCNAME=saxpy -DCHAR_NAME=\"saxpy_\" -DCHAR_CNAME=\"saxpy\" -DNO_AFFINITY -I.. -I. -UDOUBLE -UCOMPLEX -c axpy.c -o saxpy.o
gcc -O2 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=80 -DASMNAME=sswap -DASMFNAME=sswap_ -DNAME=sswap_ -DCNAME=sswap -DCHAR_NAME=\"sswap_\" -DCHAR_CNAME=\"sswap\" -DNO_AFFINITY -I.. -I. -UDOUBLE -UCOMPLEX -c swap.c -o sswap.o
gcc -O2 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=80 -DASMNAME=scopy -DASMFNAME=scopy_ -DNAME=scopy_ -DCNAME=scopy -DCHAR_NAME=\"scopy_\" -DCHAR_CNAME=\"scopy\" -DNO_AFFINITY -I.. -I. -UDOUBLE -UCOMPLEX -c copy.c -o scopy.o
gcc -O2 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=80 -DASMNAME=sscal -DASMFNAME=sscal_ -DNAME=sscal_ -DCNAME=sscal -DCHAR_
@chtlp
chtlp / gist:cdb72dc95a5da4d3a22a
Created August 27, 2014 00:34
julia-v0.3.0/deps/openblas-v0.2.10/lapack-netlib/TESTING/MATGEN/Makefile
include ../../make.inc
#######################################################################
# This is the makefile to create a library of the test matrix
# generators used in LAPACK. The files are organized as follows:
#
# SCATGEN -- Auxiliary routines called from both REAL and COMPLEX
# DZATGEN -- Auxiliary routines called from both DOUBLE PRECISION
# and COMPLEX*16
# SMATGEN -- Single precision real matrix generation routines
@chtlp
chtlp / gist:2df130727ba1d5569742
Created August 26, 2014 20:41
debugging-julia-compilation-claggge
This file has been truncated, but you can view the full file.
linpengt@fat:~/Programs/julia-v0.3.0$ make -C deps distclean-openblas
Warning: git information unavailable; versioning information limited
which: no patchelf in (/opt/centos/devtoolset-1.1/root/usr/bin:/memex/linpengt/.linuxbrew/bin:/memex/linpengt/anaconda/bin:/memex/linpengt/Programs/:/opt/intel/bin/:/data/software/MATLAB/R2012a/bin:/data/software/MATLAB/R2012a/bin/glnxa64:/usr/local/bin:/usr/bin:/bin)
make: Entering directory `/memex/linpengt/Programs/julia-v0.3.0/deps'
rm -rf openblas-v0.2.10.tar.gz openblas-v0.2.10
make: Leaving directory `/memex/linpengt/Programs/julia-v0.3.0/deps'
linpengt@fat:~/Programs/julia-v0.3.0$ linpengt@fat:~/Programs/julia-v0.3.0$ linpengt@fat:~/Programs/julia-v0.3.0$ linpengt@fat:~/Programs/julia-v0.3.0$ linpengt@fat:~/Programs/julia-v0.3.0$ linpengt@fat:~/Programs/julia-v0.3.0$ make -C deps install-openblas
Warning: git information unavailable; versioning information limited
which: no patchelf in (/opt/centos/devtoolset-1.1/root/usr/bin:/memex/linpengt/.linuxbrew/bin:/memex/l
// g++ simple.cpp -shared -o libsimple.dylib
#include <stdio.h>
class Simple {
int id_;
public:
Simple(int id);
~Simple();
@chtlp
chtlp / fun.cpp
Created August 8, 2014 06:54 — forked from kizzx2/fun.cpp
// fun.cpp
extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
}
#include <iostream>
@chtlp
chtlp / inferior-ensime-server
Last active August 29, 2015 14:03
ensime-server debug
java -Xbootclasspath/a:scala-library.jar:scala-reflect.jar:scala-compiler.jar:scala-actors.jar -classpath lib/asm-3.3.jar:lib/asm-commons-3.3.jar:lib/asm-tree-3.3.jar:lib/asm-util-3.3.jar:lib/critbit-0.0.4.jar:lib/ensime_2.10-0.9.8.9.jar:lib/json-simple-1.1.jar:lib/lucene-core-3.5.0.jar:lib/org.eclipse.jdt.core-3.6.0.v_A58.jar:lib/org.scala-refactoring_2.10.0-SNAPSHOT-0.6.1-20130201.063851-55.jar:lib/scala-actors-2.10.0.jar:lib/scala-compiler.jar:lib/scala-library.jar:lib/scala-reflect-2.10.0.jar:lib/scalariform_2.10-0.1.4-SNAPSHOT.jar:/lib/tools.jar -Dhttp.proxyHost=172.31.255.99 -Dhttp.proxyPort=8080 -Xms256M -Xmx1512M -XX:PermSize=128m -Xss1M -Dfile.encoding=UTF-8 org.ensime.server.Server /tmp/ensime_port.25462
Starting up Ensime...
Environment:
OS : Linux
Java : Java HotSpot(TM) 64-Bit Server VM 20.4-b02, Java(TM) SE Runtime Environment 1.6.0_29-b11
Scala : version 2.10.0
Ensime : 0.9.8.9
Project waiting for init...
Server listening on 40557..
Wrote port 40557 to /tmp/ensime_port.25462.
@chtlp
chtlp / sbt-run
Created July 2, 2014 00:48
a shortcut to run a specific class in sbt
#! /usr/bin/python
import os, sys
if __name__ == '__main__':
args = ' '.join(sys.argv[1:])
cmd = '''
java -Dhttp.proxyHost=172.31.255.99 -Dhttp.proxyPort=8080 -Xms1024m -Xmx40960m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=128m -jar /usr/share/sbt/bin/sbt-launch.jar 'run-main %s'
'''.strip() % args
print cmd
os.system(cmd)
import scala.util.continuations._
class Generator[A] extends Iterator[A] with (A => Unit @ suspendable) {
private var a: Option[A] = None
private var k: Option[Unit => Unit] = None
def next = {
val a0 = a.get
val k0 = k.get
a = None
@chtlp
chtlp / wscript
Created June 25, 2014 20:46 — forked from jsimmons/wscript
#! /usr/bin/env python
# encoding: utf-8
# Joshua Simmons 2010
def configure(conf):
pass
def build(bld):
pong = bld(
features = 'c cprogram',