Skip to content

Instantly share code, notes, and snippets.


Matt Bauman mbauman

View GitHub Profile
View Reserved macros
$ ack --type=julia '@(begin|while|if|for|try|return|break|continue|function|macro|quote|let|local|global|const|do|struct|end|else|catch|finally|true|false)\b' ALL_PACKAGES/
575:@struct ModelRunner{Model<:DiscreteModel,ShowProgress} begin
11:@struct Circuit begin
8:@struct ParametricNonLinEq{F_eval<:Function,F_setp<:Function,F_calcjp<:Function,Scratch} begin
View methodswith(Function).jl
julia> VERSION
julia> methodswith(Function)
[1] guardsrand(f::Function) in Test at /Users/mbauman/Code/julia-0.6/usr/share/julia/site/v0.7/Test/src/Test.jl:1429
[2] guardsrand(f::Function, r::AbstractRNG) in Test at /Users/mbauman/Code/julia-0.6/usr/share/julia/site/v0.7/Test/src/Test.jl:1429
[3] guardsrand(f::Function, seed::Integer) in Test at /Users/mbauman/Code/julia-0.6/usr/share/julia/site/v0.7/Test/src/Test.jl:1439
[4] !(f::Function) in Base at operators.jl:975
[5] all(f::Function, A::AbstractArray, region) in Base at reducedim.jl:619
[6] all!(f::Function, r::AbstractArray, A::AbstractArray) in Base at reducedim.jl:615
View slicedim.ack
$ ack -C 5 '\bslicedim\b'
13-# imag
14-# +
15-# *
16-# /
17-# \
18:# slicedim
19-# flipdim
20-# circshift
View gist:17022cfb09db056d1feac8dd90a2e44c
"name": "mycsv",
"title": "Mycsv",
"resources": [
"name": "etp_participant_data",
"title": "Etp Participant Data",
"schema": {
"fields": [
View depwarns.txt
This file has been truncated, but you can view the full file.
JULIA test/all
WARNING: general linear indexing is deprecated; use reshape(A, Val{1}) before indexing
!atcaller!> in *(::UpperTriangular{Float32,Array{Float32,2}}, ::Array{BigFloat,1}) at triangular.jl:1559 in /Users/mbauman/Code/julia-0.6/test/linalg/triangular.jl at 17
[1] depwarn(::String, ::Tuple{Symbol,Symbol,Symbol}) at ./deprecated.jl:64
[2] _to_linear_index(::Array{BigFloat,1}, ::Int64, ::Int64, ::Vararg{Int64,N}) at ./abstractarray.jl:850
[3] _getindex at ./abstractarray.jl:837 [inlined]
[4] getindex at ./multidimensional.jl:184 [inlined]
[5] A_mul_B!(::UpperTriangular{BigFloat,Array{BigFloat,2}}, ::Array{BigFloat,1}) at ./linalg/triangular.jl:582
mbauman / argPrecedence.m
Created Oct 8, 2013
Simple Matlab utility to test and return the relative precedence of the given arguments. Inspired by Matt J's answer to the Matlab Answers question "How can I determine if one class is superior or inferior to another?" (
View argPrecedence.m
function [priority,classes] = argPrecedence(varargin)
% argPrecedence Return the relative class priority of the arguments
% Returns an array the same size as the argument list with each argument's
% relative priority level, with 1 as the highest.
% Optionally returns a second output of class names, with the unique classes
% of the argument list arranged in priority order.
% Note that the priority is dependent both on argument position and class.
View postKeyEvent
function postKeyEvent
import java.awt.event.KeyEvent
import java.util.Calendar
import java.lang.reflect.*
cmdwin = handle(com.mathworks.mde.desk.MLDesktop.getInstance.getClient('Command Window').getComponent(0).getComponent(0).getComponent(0),'CallbackProperties');
cal = Calendar.getInstance();
tnow = cal.getTime().getTime();
View gist:959440
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index df4c0da..d6f170c 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -822,6 +822,7 @@ copy_data_segment (struct load_command *lc)
else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
|| strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
+ || strncmp (sectp->sectname, "__got", 16) == 0
|| strncmp (sectp->sectname, "__la_sym_ptr2", 16) == 0
mbauman / gist:770529
Created Jan 8, 2011
Reduce the zoom increment in WebKit
View gist:770529
Index: WebKit/mac/WebView/
--- WebKit/mac/WebView/ (revision 75189)
+++ WebKit/mac/WebView/ (working copy)
@@ -3458,7 +3458,7 @@
#define MinimumZoomMultiplier 0.5f
#define MaximumZoomMultiplier 3.0f
-#define ZoomMultiplierRatio 1.2f
+#define ZoomMultiplierRatio 1.06265857f
View Added category dependency
// XPathQuery.m
// Created by Matt Gallagher on 4/08/08.
// Modified by Matt Bauman on 12/01/09 to ignore attributes and simplify the
// created data structure (depends upon the NSDictionary Category method
// - (void)addObject:forKey: below).
// Copyright 2008 Matt Gallagher. All rights reserved.
// Permission is given to use this source code file, free of charge, in any
You can’t perform that action at this time.