Folks and collectives within the clojure community who have extraordinary output and large collections of high quality libraries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: snippet -*- | |
| # name: hugsql-create-table | |
| # key: create-table | |
| # -- | |
| -- :name create-$1-table | |
| -- :command :execute | |
| -- :return :raw | |
| create table if not exists $1 ( | |
| $2 | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"name": "Test Board!", | |
| "sounds": {"drip": "//tQZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAfAAAmFAAFBQUSEhIdHR0oKCgyMjIyPDw8R0dHUVFRXV1dXWdnZ3FxcXp6eoODg4yMjIyVlZWenp6mpqaurq6utra2vr6+xcXFzMzM19fX193d3eTk5Onp6ezs7Oz39/f5+fn5+fn5+fkAAAAsTEFNRTMuODIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/7EGQAD/AAAGkHAAAAAAANIOAAAAAAAaQUAAAAAAA0goAAAPGYC9fgM4NgjwucE4eKTCyP8TmBgDbT/GgFzAsgiH/i5w+MUuJ3LH/5oSZFDRAj//8cYsgnDQg5fL///4zBORzDSxmb//uQZCIAA3yGRIZCAABucQiAyMAADXTtOljFgAGwpWbXFmAA///+iTZuhkXJ83L5f/////K5FC4aLN3dM3NDM3NP/////////MC4aF83c38AsBkTwxgGW/EpjJ+IAEf+RMnhWn+MgT5Nlf/yqOeVz5Mf/mhfJs3lD//IgOA64yBDyJ///h8goAcAzZFyfUQAiH///m6zc0MCcIOXzdMz/////NycRTdBAvv5FCc/////////zQn1Msvm5cabpgoAAQgltQkH4X3MIiyWTHm9UWhxWS0CQiUforaOkuZqST1DhKHcPzV7PxNRHTmuXYfhnuf6zfo9Nsi2u2bDj84anikilhnsq+732/39LnUkIhpsrLhEy6cKFDqT2DJRZ0fb/DAUVvYpkF5WkAAVkCgbbSVBnRuJc1+YPYyXOfM2tWt3ucvMiHyEYfxGdzpjHet+fx4bH9w+s7W+PZ+YpGwQaFTSH7ayDRn+1hpxPXaA6naoxvnh8xv/8efbZ/r9TE4ofUX/LCNxoyGEmlOoUkIO//q//ygXQgAAmH+DGdFgfElv//uQZAW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn randw-nth | |
| "As rand-nth but takes weight-fn applied to col to weight selection e.g. | |
| (randw-nth [{:type :a :weight 3} | |
| {:type :b :weight 1}] | |
| :weight) | |
| ; => {:type :a :weight 3} is chosen 3/4 times" | |
| [col weight-fn] | |
| (let [weights (reductions + (map weight-fn col)) | |
| choices (map vector col weights) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn partial-nth | |
| "Takes a function f and position pos with one fewer than required args and | |
| returns a fn that takes one argument which will be applied at pos (where pos | |
| is 0 indexed ordinal position)" | |
| [f pos & args] | |
| (fn [x] | |
| (let [[before after] (split-at pos args)] | |
| (apply f (concat before [x] after))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Script |
NewerOlder