Skip to content

Instantly share code, notes, and snippets.

Micah Smith micahjsmith

Block or report user

Report or block micahjsmith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@micahjsmith
micahjsmith / flac2mp3
Created Jun 29, 2019
convert flac to mp3
View flac2mp3
#!/usr/bin/env bash
# convert flac to mp3
# source: @Jake Plimack/@boehj https://apple.stackexchange.com/a/293421
# usage:
# find <dir> -name '*flac' -print0 | xargs -0 -P8 -n1 flac2mp3
for f in "$@"; do
[[ "$f" != *.flac ]] && continue
album="$(metaflac --show-tag=album "$f" | sed 's/[^=]*=//')"
@micahjsmith
micahjsmith / flac2mp3
Last active Aug 12, 2017
Convert FLAC to MP#
View flac2mp3
#!/usr/bin/env bash
# convert flac to mp3
# source: @Jake Plimack/@boehj https://apple.stackexchange.com/a/293421
# usage:
# find <dir> -name '*flac' -print0 | xargs -0 -P8 -n1 flac2mp3
for f in "$@"; do
[[ "$f" != *.flac ]] && continue
album="$(metaflac --show-tag=album "$f" | sed 's/[^=]*=//')"
View keybase.md

Keybase proof

I hereby claim:

  • I am micahjsmith on github.
  • I am micahjsmith (https://keybase.io/micahjsmith) on keybase.
  • I have a public key ASCRLRwIZZ66bvXnoSrxnTAEOmSbg-JC4eSqCHer1vYjQgo

To claim this, I am signing this object:

View Gadfly segfault after workspace()
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC)
_/ |\__'_|_|_|\__'_| |
|__/ | x86_64-apple-darwin15.6.0
View julia-0.5.0 test failure on OS X 10.11.6 output, using brew install -s
Exception running test linalg/arnoldi :
On worker 3:
LoadError: error compiling naupd: could not load library "libarpack"
dlopen(libarpack.dylib, 1): Library not loaded: /usr/local/opt/libgfortran/lib/libgfortran.3.dylib
Referenced from: /usr/local/opt/arpack-julia/lib/libarpack.dylib
Reason: image not found
in aupd_wrapper at ./linalg/arpack.jl:49
in #_eigs#62 at ./linalg/arnoldi.jl:268
in #_eigs at ./<missing>:0
in #eigs#55 at ./linalg/arnoldi.jl:78
View julia-0.5.0 test failure on OS X 10.11.6 output
[micahsmith@dhcp-18-111-75-65 ~ ]$ julia -e "Base.runtests()"
From worker 3: * linalg/qr in 66.47 seconds, maxrss 359.77 MB
From worker 3: * linalg/dense in 27.46 seconds, maxrss 390.65 MB
From worker 3: * linalg/matmul in 90.14 seconds, maxrss 479.67 MB
From worker 3: * linalg/schur in 4.09 seconds, maxrss 484.56 MB
From worker 3: * linalg/special in 1.46 seconds, maxrss 486.74 MB
From worker 2: * linalg/triangular in 199.84 seconds, maxrss 706.77 MB
From worker 3: * linalg/eigen in 16.87 seconds, maxrss 500.92 MB
From worker 3: * linalg/svd in 6.72 seconds, maxrss 503.23 MB
From worker 2: * linalg/bunchkaufman in 29.27 seconds, maxrss 740.05 MB
@micahjsmith
micahjsmith / varargparse.m
Last active Apr 13, 2016
Simple approach to parse MATLAB optional arguments provided as param-value pairs.
View varargparse.m
function [out] = varargparse(args, params, defaults)
%VARARGPARSE Parse varargin given expected parameters and defaults
%
% VARARGPARSE(ARGS, PARAMS, DEFAULTS) parses ARGS given expected parameters
% PARAMS and default values DEFAULTS. Param-value pairs that appear in ARGS
% but not in PARAMS cause errors. PARAMS and DEFAULTS are both cell arrays
% where a parameter in PARAMS has a default value in the same position in
% DEFAULTS.
%
% Due to the way MATLAB resolves variable names, if any of the names in PARAMS
@micahjsmith
micahjsmith / TestFirstLetterMethods.java
Last active Aug 29, 2015
Test various Java methods for extracting the first letter of a string, see http://stackoverflow.com/q/18201191/2514228
View TestFirstLetterMethods.java
public class TestFirstLetterMethods{
public static final int N_SIM = 1000;
public static void main(String[] args){
long method1 = 0;
long method2 = 0;
long method3 = 0;
for (int i=0; i<N_SIM; i++){
String example = "something";
You can’t perform that action at this time.