{"id":10332,"date":"2018-12-07T09:00:07","date_gmt":"2018-12-07T14:00:07","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=10332"},"modified":"2018-12-05T15:09:54","modified_gmt":"2018-12-05T20:09:54","slug":"yankee-swap","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2018\/12\/07\/yankee-swap\/","title":{"rendered":"Yankee Swap"},"content":{"rendered":"<div xmlns:mwsh=\"http:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\n   <introduction><\/p>\n<p><a href=\"http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495\">Sean<\/a>&#8216;s pick this week is <a href=\"http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/65361\">Yankee Swap<\/a> by <a href=\"http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3968667\">Heather Gorr<\/a>.\n      <\/p>\n<p>   <\/introduction><\/p>\n<p>As the end of the year approaches, many of you will likely be summonsed to partake in Yankee Swaps with your coworkers.  This app can help you organize the chaos!\n   <\/p>\n<p>All you need to do is provide a folder with labeled mug shots of the participants and the app will do the rest.  If you need help labeling images, look at the <a href=\"https:\/\/www.mathworks.com\/help\/vision\/ref\/imagelabeler-app.html\"><tt>imageLabeler<\/tt><\/a> app!\n   <\/p>\n<p>Below, my colleague&#8217;s and my dogs will play.  I used a random seed of 56 for reproducibility and we&#8217;re on our way.<\/p>\n<p>Lexi starts off:<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys1.png\"> <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys2.png\"> <\/p>\n<p>Ranger is next; he steals the squeaky snake sending Lexi back to the pile.<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys3.png\"> <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys4.png\"> <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys5.png\"> <\/p>\n<p>Ember steals the bully stick and Lexi gets stuck with booties&#8230;<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys6.png\"> <\/p>\n<p>Lilly, after some tugging, steals the squeaky from Ranger who steals the bully stick from Ember where she goes back to the pile and pulls out a knuckle bone.\n   <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys7.png\"> <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys8.png\"> <\/p>\n<p>Kenai, being just 13 weeks old, wants whatever Ember who then opens a boring LED collar.<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys9.png\"> <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys10.png\"> <\/p>\n<p>Berber lucks out and starts the final round which sees three thefts, of just the edible treats.  Mya ends up stuck with a free bath which she kind of needs.\n   <\/p>\n<h3>MathWorks<a name=\"2\"><\/a><\/h3>\n<p>The additional rule we play with in MathWorks Application Engineering is that each gift can only be swapped three times before it&#8217;s safe.  That allows us engineers to further strategize how to secure the six pack instead of the MATLAB membrane socks.  Of course, Kenai really wants me to pick those.\n   <\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/membranesock.png\"> <\/p>\n<h3>Comments<a name=\"3\"><\/a><\/h3>\n<p>Have a great holiday season and new year!<\/p>\n<p>Give it a try and let us know what you think <a href=\"http:\/\/blogs.mathworks.com\/pick\/?p=10332#respond\">here<\/a> or leave a <a href=\"http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/65361#comments\">comment<\/a> for Heather.\n   <\/p>\n<p><script language=\"JavaScript\">\n<!--\n\n    function grabCode_9ad3380530f54a11a419fc3a72128563() {\n        \/\/ Remember the title so we can use it in the new page\n        title = document.title;\n\n        \/\/ Break up these strings so that their presence\n        \/\/ in the Javascript doesn't mess up the search for\n        \/\/ the MATLAB code.\n        t1='9ad3380530f54a11a419fc3a72128563 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 9ad3380530f54a11a419fc3a72128563';\n    \n        b=document.getElementsByTagName('body')[0];\n        i1=b.innerHTML.indexOf(t1)+t1.length;\n        i2=b.innerHTML.indexOf(t2);\n \n        code_string = b.innerHTML.substring(i1, i2);\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\n\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \n        \/\/ in the XML parser.\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\n        \/\/ doesn't go ahead and substitute the less-than character. \n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\n\n        author = 'Sean de Wolski';\n        copyright = 'Copyright 2018 The MathWorks, Inc.';\n\n        w = window.open();\n        d = w.document;\n        d.write('\n\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\n\n\\n');\n      \n      d.title = title + ' (MATLAB code)';\n      d.close();\n      }   \n      \n-->\n<\/script><\/p>\n<p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><a href=\"javascript:grabCode_9ad3380530f54a11a419fc3a72128563()\"><span style=\"font-size: x-small;        font-style: italic;\">Get<br \/>\n            the MATLAB code<br \/>\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\n<p>      Published with MATLAB&reg; R2018b<\/p>\n<\/div>\n<p><!--\n9ad3380530f54a11a419fc3a72128563 ##### SOURCE BEGIN #####\n%% Yankee Swap\n%\n% <http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495 Sean>'s pick this week is\n% <http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/65361 Yankee Swap> by\n% <http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3968667 Heather Gorr>.\n% \n\n%% \n%\n% As the end of the year approaches, many of you will likely be summonsed\n% to partake in Yankee Swaps with your coworkers.  This app can help you\n% organize the chaos!\n%\n% All you need to do is provide a folder with labeled mug shots of the\n% participants and the app will do the rest.  If you need help labeling\n% images, look at the\n% <https:\/\/www.mathworks.com\/help\/vision\/ref\/imagelabeler-app.html\n% |imageLabeler|> app!\n%\n% Below, my colleague's and my dogs will play.  I used a random seed of 56\n% for reproducibility and we're on our way.\n%\n% Lexi starts off:\n%\n% <<ys1.png>>\n%\n% <<ys2.png>>\n% \n% Ranger is next he steals the squeaky snake and sending Lexi back to the\n% pile.\n%\n% <<ys3.png>> \n%\n% <<ys4.png>>\n% \n%\n% <<ys5.png>> \n%\n% Ember steals the bully stick and Lexi gets stuck with booties...\n%\n% <<ys6.png>>\n%\n% Lilly, after some tugging, steals the squeaky from Ranger who steals the\n% bully stick from Ember where she goes back to the pile and pulls out a\n% knuckle bone.\n%\n% <<ys7.png>>\n%\n% <<ys8.png>>\n% \n% Kenai, being just 13 weeks old, wants whatever Ember who then opens a\n% boring LED collar.\n%\n% <<ys9.png>>\n% \n% <<ys10.png>>\n% \n% Berber lucks out and starts the final round which sees three thefts, of\n% just the edible treats.  Mya ends up stuck with a free bath which she\n% kind of needs.\n%\n\n\n%% MathWorks\n% The additional rule we play with in MathWorks Application Engineering is\n% that each gift can only be swapped three times before it's safe.  That\n% allows us engineers to further strategize how to secure the six pack\n% instead of the MATLAB membrane socks.  Of course, Kenai really wants me\n% to pick those.\n%\n% <<membranesock.png>>\n\n\n%% Comments\n% \n% Have a great holiday season and new year!\n% \n% Give it a try and let us know what you think\n% <http:\/\/blogs.mathworks.com\/pick\/?p=10332#respond here> or leave a\n% <http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/65361#comments\n% comment> for Heather.\n\n##### SOURCE END ##### 9ad3380530f54a11a419fc3a72128563\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"http:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainYankeeSwap\/ys1.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>Sean&#8216;s pick this week is Yankee Swap by Heather Gorr.<\/p>\n<p>As the end of the year approaches, many of you will likely be summonsed to partake in Yankee Swaps with your coworkers. &#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2018\/12\/07\/yankee-swap\/\">read more >><\/a><\/p>\n","protected":false},"author":87,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10332"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=10332"}],"version-history":[{"count":5,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10332\/revisions"}],"predecessor-version":[{"id":10344,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10332\/revisions\/10344"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=10332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=10332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=10332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}