Skip to content

Instantly share code, notes, and snippets.

View MarcoPolo's full-sized avatar
🌠
Gradatim

Marco Munizaga MarcoPolo

🌠
Gradatim
View GitHub Profile
@MarcoPolo
MarcoPolo / Stat.js
Created February 3, 2014 01:47
Simple Javascript Statistics
View Stat.js
//
// +-------------------------------------------------+
// | Statistics.js!! |
// |-------------------------------------------------|
// | error fn -> a pretty good approximator |
// | cdf to find the percentile from zScore |
// | p value calculator |
// | |
// +-------------------------------------------------+
//
View gist:8797322
syms omega phi A t
v = A*cos(omega*t+phi);
v1 = subs(v, {A,omega,phi}, {100,120*pi,0});
tn = (0:0.01:1)/60;
subs(v1,t,tn)
%%
% *Part 4*
%
syms wt t ak k
View gist:9238764
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
View gist:9516989
;; User keymap
;; -----------------------------
;; Keymaps are stored as a set of diffs that are merged together together
;; to create the final set of keys. You can modify these diffs to either add
;; or subtract bindings.
;;
;; Like behaviors, keys are bound by tag. When objects with those tags are active
;; the key bindings are live. Keys can be bound to any number of Light Table commands,
;; allowing you the flexibility to execute multiple operations together. To see a list
;; of all the commands you can execute, start typing a word related to the thing you
View gist:9516997
;; User behaviors
;; -----------------------------
;; Behaviors are stored as a set of diffs that are merged together
;; to create the final set of functionality that makes up Light Table. You can
;; modify these diffs to either add or subtract functionality.
;;
;; Behaviors are added to tags, objects with those tags then automatically gain
;; whatever logic the behavior imparts. To see a list of user-level behaviors,
;; start typing a word related to the functionality you want in between the square
;; brackets (e.g. "theme").
@MarcoPolo
MarcoPolo / gist:9636822
Created March 19, 2014 07:11
How to find the smallest number in a set of facts
View gist:9636822
(assert
(foo 3)
(foo 4)
(foo 6)
(foo 9)
(foo 2)
(foo 5))
(defrule init-lowest
(not (lowest-foo ?))
View projectpart1.clp
(deffacts cities
(city-list tallahassee lake-city gainesville jacksonville st-augustine ocala orlando tampa west-palm ft-myers miami key-west)
(city name tallahassee neighbors lake-city 2)
(city name lake-city neighbors tallahassee 2 jacksonville 1 gainesville 1)
(city name gainesville neighbors lake-city 1 ocala 1 st-augustine 1)
(city name jacksonville neighbors lake-city 1 st-augustine 1)
(city name st-augustine neighbors jacksonville 1 gainesville 1 orlando 2 west-palm 3)
(city name ocala neighbors gainesville 1 orlando 1 tampa 2)
(city name orlando neighbors ocala 1 st-augustine 2 tampa 1 west-palm 3)
(city name tampa neighbors ft-myers 2 orlando 1 ocala 2)
View gist:10933024
(defn play-time-travel [entities]
(doseq [e entities
:let [actions (:actions @e)
prev-actions (:prev-actions @e)]]
(when (and (actions :travel-back)
(not (prev-actions :travel-back)))
;;play sound
)
(swap! e assoc :prev-actions actions)
@MarcoPolo
MarcoPolo / gist:11103741
Last active August 29, 2015 14:00
Training data
View gist:11103741
{"like":["1xx4ki_380.jpg","1xx4ki_391.jpg","1xx4ki_160.jpg","1xx4ki_150.jpg","1xx4ki_271.jpg","1xx4ki_161.jpg","1xx4ki_194.jpg","1xz78t_141.jpg","1xx4ki_360.jpg","1xx4ki_151.jpg","1xx4ki_272.jpg","1xx4ki_393.jpg","1xx4ki_162.jpg","1xx4ki_283.jpg","1xx4ki_294.jpg","1xx4ki_195.jpg","1xz78t_120.jpg","1xz78t_131.jpg","1xz78t_142.jpg","1xx4ki_350.jpg","1xx4ki_361.jpg","1xx4ki_262.jpg","1xx4ki_152.jpg","1xx4ki_394.jpg","1xx4ki_284.jpg","1xx4ki_185.jpg","1xx4ki_196.jpg","1xz78t_143.jpg","1xx4ki_450.jpg","1xx4ki_120.jpg","1xx4ki_362.jpg","1xx4ki_373.jpg","1xx4ki_263.jpg","1xx4ki_153.jpg","1xx4ki_285.jpg","1xz78t_0.jpg","1xx4ki_175.jpg","1xx4ki_296.jpg","1xz78t_110.jpg","1xz78t_121.jpg","1xz78t_132.jpg","1xx4ki_451.jpg","1xx4ki_341.jpg","1xx4ki_352.jpg","1xx4ki_363.jpg","1xx4ki_253.jpg","1xx4ki_396.jpg","1xx4ki_286.jpg","1xz78t_1.jpg","1xx4ki_297.jpg","1xz78t_122.jpg","1xz78t_133.jpg","1xx4ki_210.jpg","1xx4ki_331.jpg","1xx4ki_100.jpg","1xx4ki_221.jpg","1xx4ki_342.jpg","1xx4ki_111.jpg","1xx4ki_353.jpg","1xx4ki_364.jpg"
View gist:ab4113d4b3e8de4d4494
### Keybase proof
I hereby claim:
* I am marcopolo on github.
* I am marcopolo (https://keybase.io/marcopolo) on keybase.
* I have a public key whose fingerprint is D308 20E9 C435 0FF7 11AB B8F0 F5D5 EDF3 AAA6 0570
To claim this, I am signing this object: