Skip to content

Instantly share code, notes, and snippets.

@ggarza
ggarza / Makefile
Last active July 17, 2018 13:20
A Makefile for Knitr
# Makefile for knitr
# optionally put all RNW files to be compiled to pdf here, separated by spaces
RNW_FILES= $(wildcard *.Rnw)
# location of Rscript
R_HOME?=/Library/Frameworks/R.framework/Resources
# these pdf's will be compiled from Rnw and Rmd files
PDFS= $(RNW_FILES:.Rnw=.pdf)
@ggarza
ggarza / pareto.R
Created December 11, 2012 21:43
An R script that creates a pareto diagram.
# tikz("./figures/pareto.tikz", width=6.0, height=3.50)
defects <- c(56, 45, 23, 12, 8, 6)
names(defects) <- c("Blem.", 'Scratch', 'Chip', 'Bend', 'Dent',
'Others')
defects_sort <- sort(defects, decreasing=TRUE)
# par(mar = c(5, 4, 4, 4) + 0.3)
par(mar = c(5, 4, 3, 4) + 0.3)
bp <- barplot(defects,
# panel.first=grid(ny=NULL, nx=NA, lty="dashed", col="black"),
ylim=c(0, sum(defects)* 1.05),
@ggarza
ggarza / gist:5389739
Created April 15, 2013 17:22
Output from 'HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install octave'
==> Downloading http://ftpmirror.gnu.org/octave/octave-3.6.4.tar.bz2
Already downloaded: /Library/Caches/Homebrew/octave-3.6.4.tar.bz2
tar xf /Library/Caches/Homebrew/octave-3.6.4.tar.bz2
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/octave/3.6.4 --with-blas=-Wl,-framework -Wl,Accelerate --with-umfpack=-lumfpack -lsuitesparseconfig --without-framework-carbon
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/octave/3.6.4 --with-blas=-Wl,-framework -Wl,Accelerate --with-umfpack=-lumfpack -lsuitesparseconfig --without-framework-carbon
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
@ggarza
ggarza / octave_verbose
Created April 15, 2013 19:36
Output from `HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install octave 2>&1 | tee ~/octave_verbose` after uninstalling and reinstalling suite-sparse
==> Downloading http://ftpmirror.gnu.org/octave/octave-3.6.4.tar.bz2
Already downloaded: /Library/Caches/Homebrew/octave-3.6.4.tar.bz2
tar xf /Library/Caches/Homebrew/octave-3.6.4.tar.bz2
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/octave/3.6.4 --with-blas=-Wl,-framework -Wl,Accelerate --with-umfpack=-lumfpack -lsuitesparseconfig --without-framework-carbon
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/octave/3.6.4 --with-blas=-Wl,-framework -Wl,Accelerate --with-umfpack=-lumfpack -lsuitesparseconfig --without-framework-carbon
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
@ggarza
ggarza / julia_verbose
Created August 8, 2013 01:43
Output from HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install --HEAD julia 2>&1 | tee ~/julia_verbose
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Cloning https://github.com/JuliaLang/julia.git
git --git-dir /Library/Caches/Homebrew/julia--git/.git status -s
Updating /Library/Caches/Homebrew/julia--git
git config remote.origin.url https://github.com/JuliaLang/julia.git
git config remote.origin.fetch +refs/heads/master:refs/remotes/origin/master
git fetch origin
git checkout -f master
Already on 'master'
@ggarza
ggarza / octave
Created December 29, 2013 19:45
Installing Octave from Homebrew
This file has been truncated, but you can view the full file.
/usr/bin/curl -f#LA Homebrew 0.9.5 (Ruby 1.8.7-358; Mac OS X 10.9.1) https://github.com/ambs/homebrew-science/raw/bbfa870474232ffbb9468a1d659d311f061b3a26/octave.rb -o /Library/Caches/Homebrew/Formula/octave.rb --silent
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Downloading http://ftpmirror.gnu.org/octave/octave-3.8.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/octave-3.8.0.tar.bz2
==> Verifying octave-3.8.0.tar.bz2 checksum
@ggarza
ggarza / julia_verbose
Created February 11, 2014 17:29
Output from 'HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew reinstall --HEAD julia 2>&1 | tee ~/julia_verbose'
==> Reinstalling julia --HEAD
rm /usr/local/bin/julia-readline
rm /usr/local/bin/julia-debug-readline
rm /usr/local/bin/julia-debug-basic
rm /usr/local/bin/julia-basic
rm /usr/local/bin/julia
rm /usr/local/etc/julia/juliarc.jl
rm /usr/local/include/julia
rm /usr/local/lib/julia
rm /usr/local/share/man/man1/julia.1
@ggarza
ggarza / make -d
Created March 29, 2014 00:37
Output from make -d
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `/Users/guillermo/Desktop/julia/Make.inc' (search path) (no ~ expansion)...
@ggarza
ggarza / Makefiles.diff
Created April 2, 2014 22:02
Patch for Homebrew Julia
diff --git c/Makefile w/Makefile
index edfe244..277025e 100644
--- c/Makefile
+++ w/Makefile
@@ -99,7 +99,7 @@ $(build_bindir)/stringpatch: $(build_bindir) contrib/stringpatch.c
JL_LIBS = julia julia-debug
# private libraries, that are installed in $(prefix)/lib/julia
-JL_PRIVATE_LIBS = random suitesparse_wrapper grisu
+JL_PRIVATE_LIBS = random suitesparse_wrapper grisu Rmath
@ggarza
ggarza / brew_config
Created April 3, 2014 01:15
openblas-julia and julia build logs
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 88f0fdf62804017c5d747fb9f5ed708f484f573b
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.9.2-x86_64
Xcode: 5.1
CLT: 5.1.0.0.1.1393561416
Clang: 5.1 build 503