Skip to content

Instantly share code, notes, and snippets.

Avatar

Erik Ferguson muraiki

View GitHub Profile
@muraiki
muraiki / 28.ijs
Created Jul 28, 2017
Generate series of 28 numbers in ascending order that total close to 1500 (J)
View 28.ijs
((,-)(2*>:&i.14))+(4*i.28)
@muraiki
muraiki / my functional things
Created Sep 21, 2013
A concussion has prevented me from doing much coding these past 9 months, but in a fit of boredom I wrote this...
View my functional things
lazy semantics and lambda abstractions
point-free in style and pure computation
memoization gives simple caching
these are a few of my functional things
when the state bites
when the C stings
when impure is bad
I simply remember my functional things
and then I don't feel so mad
@muraiki
muraiki / pb.html
Last active Jan 22, 2018
Salesforce Process Builder: Generate formula code for matching multiple values
View pb.html
<form>
<label for="fieldName">Field name (include object):</label>
<input id="fieldName" name="fieldName" type="text" size="100" onkeydown="if (event.keyCode == 13) false">
</form>
<p>
<input type="checkbox" id="isPicklist" name="isPicklist" value="picklist">
<label for="isPicklist">Picklist?</label>
<input type="checkbox" id="isNot" name="isNot" value="not">
<label for="isNot">NOT?</label>
@muraiki
muraiki / reduce_in_r.R
Created Mar 27, 2018
Calculating a rolling sum in R using the Reduce function
View reduce_in_r.R
# Rolling sum using the Reduce function
EV <- c(1,.9,.8,.001,.001,.001,.001)
# Proportion of variance explained by each principle component.
prop_var <- EV / sum(EV)
# 0.3698224852 0.3328402367 0.2958579882
# 0.0003698225 0.0003698225 0.0003698225
# 0.0003698225