This file contains 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
gl3lab_run'' | |
get_pixels 10 10 |
This file contains 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
NB. Mike Day | |
NB. 6/25/15 | |
load'viewmat' | |
'BLACK BLUE GREEN CYAN RED MAGENTA YELLOW WHITE'=:#:i.8 | |
msc=:mysquarecolours =: 3 : 0 | |
: |
This file contains 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
; switch(cnt){ case 0: r = fp(); break; case 1: r = fp(d[0]); break; case 2: r = fp(d[0], d[1]); break; case 3: r = fp(d[0], d[1], d[2]); break; case 4: r = fp(d[0], d[1], d[2], d[3]); break; case 5: r = fp(d[0], d[1], d[2], d[3], d[4]); break; case 6: r = fp(d[0], d[1], d[2], d[3], d[4], d[5]); break; case 7: r = fp(d[0], d[1], d[2], d[3], d[4], d[5], d[6]); break; case 8: r = fp(d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7]); break; case 9: r = fp(d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8]); break; case 10: r = fp(d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8], d[9]); break; case 11: r = fp(d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8], d[9], d[10]); break; case 12: r = fp(d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8], d[9], d[10],d[11]); break; case 13: r = fp(d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8], d[9], d[10],d[11],d[12]); break; case 14: r = fp(d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8], d[9], d[10],d[11],d[12],d[13]); break; case 15: r = fp(d[0], d |
This file contains 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
a:10:{s:14:"cooked_version";s:5:"1.4.1";s:16:"difficulty_level";s:1:"0";s:9:"prep_time";s:1:"5";s:9:"cook_time";s:0:"";s:7:"content";s:941:"<div class="recipe-content margin-40-bottom">\r\n<div class="image-container">[cooked-image]</div>\r\n<div class="recipe-meta-container clearfix">[cooked-info left="servings,prep_time,cook_time,total_time"]</div>\r\n[cooked-info left="author,difficulty" right="print,fullscreen"]\r\n<div class="recipe-summary margin-8-bottom">\r\n<div class="margin-0-auto">[cooked-excerpt]</div>\r\n</div>\r\n<div class="clearfix recipe-ingredients-instructions">\r\n<div class="sidebar padded-mobile padding-8 grid-item grid-7-of-16">\r\n<div class="partial recipe-ingredients">\r\n<h2>Ingredients</h2>\r\n<p>[cooked-ingredients]</p>\r\n</div>\r\n<div class="partial recipe-ingredients">[cooked-nutrition]</div>\r\n</div>\r\n<div class="recipe-steps padded-mobile padding-8-top float-left grid-item grid-9-of-16">\r\n<div class="recipe-instructions margin-0-auto">\r\n<h2 class="margin-0-auto">How |
This file contains 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
def q: sub("\\\\";"\\\\";"g")|sub("'"; "\\'"; "g")|sub("^";"'")|sub("$";"'"); | |
def slength: sub("\\\\";".";"g")|length; | |
def towp: | |
if "null"==type then "N;" | |
elif "boolean"==type then if . then "b:1;" else "b:0;" end | |
elif "number"==type then if .==(.|floor) and .<9e15 then "i:"+(.|tostring)+";" else "d:"+(.|tostring)+";" end | |
elif "string"==type then "s:"+(.|slength|tostring)+":\""+.+"\";" | |
else "a:"+(.|length|tostring)+":{"+(.|[to_entries|map(to_entries)[]|map(.value|towp)|add]|add)+"}" |
This file contains 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
/* | |
* testing involving real time is an integration test - high value, high cost | |
* these next two routines represent that interface | |
*/ | |
const msDeadline= ms=> { | |
console.log('msDeadline',ms); | |
const deadline= ms+new Date().getTime(); | |
return ()=>deadline < new Date().getTime(); | |
}; |
This file contains 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
/* | |
* testing involving real time is an integration test - high value, high cost | |
* these next two routines represent that interface | |
*/ | |
const msDeadline= ms=> { | |
console.log('msDeadline',ms); | |
const deadline= ms+new Date().getTime(); | |
return ()=>deadline < new Date().getTime(); | |
}; |
This file contains 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
641 821763 2052486 3283209 4513932 5744655 6968330 7384979 | |
4101780 8616342 9847065 11062407 11470084 11889288 12307231 6563232 | |
10261138 13129634 12307854 14763522 5332517 10665633 15590439 16812177 | |
3699242 17641001 18449285 9041326 19280688 19692171 9434927 1242263 | |
8218925 20507564 20912668 13950760 14357798 21331876 2871064 2472986 | |
6164515 20077453 17232027 16007731 16409012 4938930 12706576 15187243 | |
18048669 18872369 1640341 13528339 21744054 22971575 23383093 23793336 | |
24203577 24613818 25024059 25434300 25844541 26254782 26665023 27075264 | |
27485505 27895746 28305987 28716228 29126469 29536710 29946951 30357192 | |
30767433 31177674 31587915 31998156 32408397 32818638 33228879 33639120 |
This file contains 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
cocurrent'zip0' | |
NB. read from "single disk store only" zip files (zip64 standard) | |
rd=: 1!:11 NB. indexed file read | |
lend=: [:<.p.&256@(a.&i.)S:0 NB. numbers from little endian representation | |
plend=: {{ | |
struct1=. (e.~ i.@{:) +/\0,m | |
struct1 {{ | |
nums=. lend m <;.1 (#m) {.y |
This file contains 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
sample=: {{)n | |
[D] | |
[N] [C] | |
[Z] [M] [P] | |
1 2 3 | |
move 1 from 2 to 1 | |
move 3 from 1 to 3 | |
move 2 from 2 to 1 | |
move 1 from 1 to 2 |