Skip to content

Instantly share code, notes, and snippets.

View viewClassTree
function viewClassTree(directory)
% View a class inheritence hierarchy. All classes residing in the directory
% or any subdirectory are discovered. Parents of these classes are also
% discovered as long as they are in the matlab search path.
% There are a few restrictions:
% (1) classes must be written using the new 2008a classdef syntax
% (2) classes must reside in their own @ directories.
% (3) requires the bioinformatics biograph class to display the tree.
% (4) works only on systems that support 'dir', i.e. windows.
%
@dgolden1
dgolden1 / matlab-alpha-bug
Last active Aug 29, 2015
Reproduce Matlab 2014b bug with alpha channel
View matlab-alpha-bug
function matlab_alpha_bug
% Reproduce a bug on Matlab 2014b
% The peppers image will be plotted correctly; coins will not
% Both are plotted correctly in 2014a
% Daniel Golden (dan, followed by cellscope, followed by dot com)
%% Setup
close all;
@dgolden1
dgolden1 / ubuntu_freenx_instructions.txt
Last active Aug 29, 2015 — forked from zachbrowne/instructions.txt
Install freenx on Ubuntu Server
View ubuntu_freenx_instructions.txt
This is a method to using your Ubuntu 12.04 server without the Unity desktop on a very fast remote desktop program. This is by far the best method to managing your Ubuntu server if you like GUI.
apt-get install ubuntu-desktop
#apt-get --yes purge unity unity-2d unity-2d-places unity-2d-panel unity-2d-spread
#apt-get --yes purge unity-asset-pool unity-services unity-lens-* unity-scope-*
#apt-get --yes purge liboverlay-scrollbar*
#apt-get --yes purge appmenu-gtk appmenu-gtk3 appmenu-qt
#apt-get --yes purge firefox-globalmenu thunderbird-globalmenu
#apt-get --yes purge unity-2d-common unity-common
#apt-get --yes purge libunity-misc4 libunity-core-5*
@dgolden1
dgolden1 / Makefile.config.osx
Created Oct 2, 2014
Caffe Makefile.config for OS X
View Makefile.config.osx
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# No GPU
CPU_ONLY := 1
# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# CUDA architecture setting: going with all of them (up to CUDA 5.5 compatible).
@dgolden1
dgolden1 / Makefile.diff
Created Oct 16, 2014
caffe Makefile XCode 6 patch vecLib -> Accelerate (against 5c4125da)
View Makefile.diff
From d98e6fb63e689166a9919c59eed0ec37aaf782d6 Mon Sep 17 00:00:00 2001
From: Daniel Golden <dgolden1@gmail.com>
Date: Thu, 16 Oct 2014 10:46:08 -0700
Subject: [PATCH] Use accelerate instead of vecLib on OS X
Fix for https://github.com/BVLC/caffe/issues/1212
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@dgolden1
dgolden1 / blah.csv
Created Oct 22, 2014
Matlab readtable bug example file
View blah.csv
number letter
88226 x
88226 y
88229
View test_random_rotation.m
function test_random_rotation
% Test random rotation logic for BVLC PR #1386
% https://github.com/BVLC/caffe/pull/1386
%
% This code is meant to mirror as closely as possible the image rotation code in Caffe's
% data_transformer.cpp
% Author: Daniel Golden
% Date: 2014-10-31
@dgolden1
dgolden1 / verify_parse_log_equal.m
Created Dec 9, 2014
Verify that old and new versions of parse_log.py give the same results
View verify_parse_log_equal.m
function verify_parse_log_equal(filename_old, filename_new)
% Verify that the old and new versions of the caffe parse_log.py output are the same
%% Setup
close all;
%% Read tables and homogenize variable names
t_old = readtable(filename_old, 'FileType', 'text', 'Delimiter', ',');
t_new = readtable(filename_new, 'FileType', 'text', 'Delimiter', ',');
@dgolden1
dgolden1 / no_job_control.md
Last active Aug 29, 2015
no job control bug
View no_job_control.md

See http://stackoverflow.com/questions/27805096/wget-and-bash-error-bash-line-0-fg-no-job-control

Command:

export PS4='+($?) $BASH_SOURCE:$FUNCNAME:$LINENO:'
echo "wget --no-check-certificate --no-verbose -O a-very-long-folder-de090952623b4865c2c34bd6330f8a423ed05ed8de090952623b4865c2c34bd6330f8a423ed05ed8de090952623b4865c2c34bd6330f8a423ed05ed8/blah.jpg http://d4u3lqifjlxra.cloudfront.net/uploads/example/file/48/accordion.jpg" | xargs -J % bash -x -c %

Output: