<snapdata remixID="7445217"><project name="style transfer" app="Snap! 7, https://snap.berkeley.edu" version="2"><notes>This will take a picture using your camera and then display it in 8 different artistic styles.&#xD;&#xD;Runs best in Chrome.&#xD;&#xD;Please send questions, suggestions, and bug reports to toontalk@gmail.com</notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAABGhJREFUeF7t2L9L1X8cxfHX515Ra0pBmi4XTSjBTLtol8IhhUoksYjaWlpb+hda2iKI1tqDpohoCZtKoskLUQY1dTP6sRgJIp9myeAFh4PXeDa/X+feHvfJN/gWZVmWwZ//VqAoiqKT/3IFAXbyz6N/NwLUDVkQBAhQwONUFyBA3ZAFQYAABTxOdQEC1A1ZEAQIUMDjVBcgQN2QBUGAAAU8TnUBAtQNWRAECFDA41QXIEDdkAVBgAAFPE51AQLUDVkQBAhQwONUFyBA3ZAFQYAABTxOdQEC1A1ZEAQIUMDjVBcgQN2QBUGAAAU8TnUBAtQNWRAECFDA41QXIEDdkAVBgAAFPE51AQLUDVkQBAhQwONUFyBA3ZAFQYAABTxOdQEC1A1ZEAQIUMDjVBcgQN2QBUGAAAU8TnUBAtQNWRAECFDA41QXIEDdkAVBgAAFPE51AQLUDVkQBAhQwONUFyBA3ZAFQYAABTxOdQEC1A1ZEAQIUMDjVBcgQN2QBUGAAAU8TnUBAtQNWRAECFDA41QXIEDdkAVBgAAFPE51AQLUDVkQBAhQwONUFyBA3ZAFQYAABTxOdQEC1A1ZEAQIUMDjVBcgQN3wr4V2ux3Xbt2N0enZaHStx4X5ueju7jZ80t6fJEDTb7iy0oqJ+0uxVTsSxY92jJc/4/zoYMwNDkSz2TR96t6bJUDjb/b85XLMPvsUcWBg26cUb5fjYmMkGtX1uDxzKgbr9ahUKsZv0rnTBGj+be48fBw3PlYievbt/Em/16P/87tYGDsUJ/u64tyJiajVauZv1TnzBGj+Le49ehLXV8uI3v07f9LGr+j7shrzI/WYHuiNs43RqNfr5m/VOfMEaPwtll69jtNPP0T0Hdz+T/D7N7EwNhxTPRtxaXoyhoeG+CfY+Dso00VZlqUysFu3rVYrjj94EZu1kYjv7Rjb/BqL44fjTL0/mlOTUa1Wd+urddTn8l9Aw8+xtrYWV2/ejqMzc3Fs61tcWVzgf8P8w5kADQEymRcgwLwVLw0CBGhAZTIvQIB5K14aBAjQgMpkXoAA81a8NAgQoAGVybwAAeateGkQIEADKpN5AQLMW/HSIECABlQm8wIEmLfipUGAAA2oTOYFCDBvxUuDAAEaUJnMCxBg3oqXBgECNKAymRcgwLwVLw0CBGhAZTIvQIB5K14aBAjQgMpkXoAA81a8NAgQoAGVybwAAeateGkQIEADKpN5AQLMW/HSIECABlQm8wIEmLfipUGAAA2oTOYFCDBvxUuDAAEaUJnMCxBg3oqXBgECNKAymRcgwLwVLw0CBGhAZTIvQIB5K14aBAjQgMpkXoAA81a8NAgQoAGVybwAAeateGkQIEADKpN5AQLMW/HSIECABlQm8wIEmLfipUGAAA2oTOYFCDBvxUuDAAEaUJnMCxBg3oqXBgECNKAymRcgwLwVLw0CBGhAZTIvQIB5K14aBAjQgMpkXoAA81a8NAgQoAGVybwAAeateGkQ6PQA/wD5QyqXeHUgLQAAAABJRU5ErkJggg==</thumbnail><scenes select="1"><scene name="style transfer"><notes>This will take a picture using your camera and then display it in 8 different artistic styles.&#xD;&#xD;Runs best in Chrome.&#xD;&#xD;Please send questions, suggestions, and bug reports to toontalk@gmail.com</notes><hidden></hidden><headers></headers><code></code><blocks><block-definition s="fade in for %&apos;fade in duration&apos; seconds $nl and fade out for %&apos;fade out duration&apos; $nl $nl pausing for %&apos;pause duration&apos; seconds $nl using costumes %&apos;costumes&apos; display labels %&apos;labels&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%n">3</input><input type="%n">1</input><input type="%n">2</input><input type="%l"></input><input type="%l"></input></inputs><script><custom-block s="let %upvar be %s"><l>clone</l><block s="newClone"><l><option>myself</option></l></block></custom-block><block s="doTellTo"><block var="clone"/><block s="reifyScript"><script><custom-block s="%upvar for each %upvar of %l %cs"><l>#</l><l>costume</l><block var="costumes"/><script><block s="setEffect"><l><option>ghost</option></l><l>100</l></block><block s="doSwitchToCostume"><block var="costume"/></block><block s="show"></block><block s="goToLayer"><l><option>front</option></l></block><block s="setScale"><l>100</l></block><block s="doIf"><block s="reportIsA"><block var="labels"/><l><option>list</option></l></block><script><block s="doThink"><block s="reportListItem"><block var="#"/><block var="labels"/></block></block></script></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>100</l><l>0</l><script><block s="setEffect"><l><option>ghost</option></l><block var="i"/></block><block s="doWait"><block s="reportQuotient"><block var="fade in duration"/><l>100</l></block></block></script></custom-block><block s="doWait"><block var="pause duration"/></block><custom-block s="for %upvar = %n to %n %cs"><l>i</l><l>0</l><l>100</l><script><block s="setEffect"><l><option>ghost</option></l><block var="i"/></block><block s="doWait"><block s="reportQuotient"><block var="fade out duration"/><l>100</l></block></block></script></custom-block></script></custom-block><block s="removeClone"></block></script><list></list></block><list></list></block></script></block-definition><block-definition s="%&apos;#&apos; for each %&apos;item&apos; of %&apos;data&apos; %&apos;action&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%upvar"></input><input type="%l"></input><input type="%cs"></input></inputs><script><block s="doSetVar"><l>#</l><l>1</l></block><block s="doUntil"><custom-block s="empty? %l"><block var="data"/></custom-block><script><block s="doSetVar"><l>item</l><block s="reportListItem"><l>1</l><block var="data"/></block></block><block s="doRun"><block var="action"/><list><block s="reportListItem"><l>1</l><block var="data"/></block></list></block><block s="doSetVar"><l>data</l><block s="reportCDR"><block var="data"/></block></block><block s="doChangeVar"><l>#</l><l>1</l></block></script></block></script></block-definition><block-definition s="empty? %&apos;data&apos;" type="predicate" category="lists"><header></header><code></code><translations>de:ist _ leer?&#xD;</translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block var="data"/><block s="reportNewList"><list></list></block></block></block></script></block-definition><block-definition s="for %&apos;i&apos; = %&apos;start&apos; to %&apos;end&apos; %&apos;action&apos;" type="command" category="control"><header></header><code></code><translations>de:für _ = _ bis _ _&#xD;</translations><inputs><input type="%upvar"></input><input type="%n">1</input><input type="%n">10</input><input type="%cs"></input></inputs><script><block s="doDeclareVariables"><list><l>step</l><l>tester</l></list></block><block s="doIfElse"><block s="reportGreaterThan"><block var="start"/><block var="end"/></block><script><block s="doSetVar"><l>step</l><l>-1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportLessThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script><script><block s="doSetVar"><l>step</l><l>1</l></block><block s="doSetVar"><l>tester</l><block s="reifyReporter"><autolambda><block s="reportGreaterThan"><block var="i"/><block var="end"/></block></autolambda><list></list></block></block></script></block><block s="doSetVar"><l>i</l><block var="start"/></block><block s="doUntil"><block s="evaluate"><block var="tester"/><list></list></block><script><block s="doRun"><block var="action"/><list></list></block><block s="doChangeVar"><l>i</l><block var="step"/></block></script></block></script></block-definition><block-definition s="costume from camera" type="reporter" category="looks"><comment x="0" y="0" w="207.14285714285717" collapsed="true">Reports a costume using the camera.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWaitUntil"><custom-block s="camera is ready"></custom-block></block><block s="doReport"><custom-block s="call eCraft2Learn reporter %txt with %mult%s"><l>costume_from_camera</l><list></list></custom-block></block></script></block-definition><block-definition s="current costume" type="reporter" category="sensing"><comment x="0" y="0" w="178" collapsed="false">reports the sprite&apos;s actual current costume, which may or may not be part of its wardrobe e.g. if it is a copy</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list></list><l>return this.costume;</l></block><list></list></block></block></script></block-definition><block-definition s="Create costume in style %&apos;Which style&apos; from %&apos;costume&apos; $nl then %&apos;receive new costume&apos;" type="command" category="looks"><comment x="0" y="0" w="224.2857142857143" collapsed="false">Applies the selected style to the indicated custome number and adds the new costume this sprite.</comment><header></header><code></code><translations></translations><inputs><input type="%txt" readonly="true"><options>Katsushika Hokusai&apos;s Wave&#xD;Francis Picabia&apos;s Udnie&#xD;Pablo Picasso&apos;s La Muse&#xD;Mathura Style&#xD;Leonid Afremov&apos;s Rain Princess&#xD;Edvard Munch&apos;s Scream&#xD;Théodore Géricault&apos;s Raft of the Medusa</options></input><input type="%obj">1</input><input type="%cs"></input></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>create_costume_with_style</l><list><block var="Which style"/><block var="costume"/><block var="receive new costume"/></list></custom-block></script></block-definition><block-definition s="Create costumes in %&apos;styles&apos; from %&apos;costume&apos;" type="command" category="looks"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%obj"></input></inputs><script><block s="doIf"><block s="reportNot"><custom-block s="empty? %l"><block var="styles"/></custom-block></block><script><custom-block s="Create costume in style %txt from %obj %br then %cs"><block s="reportListItem"><l>1</l><block var="styles"/></block><block var="costume"/><script><block s="doAddToList"><l></l><block var="styled costumes"/></block><block s="bubble"><block s="reportDifference"><block s="reportListAttribute"><l><option>length</option></l><block var="styles"/></block><l>1</l></block></block><custom-block s="Create costumes in %l from %obj"><block s="reportCDR"><block var="styles"/></block><block var="costume"/></custom-block></script></custom-block></script></block></script></block-definition><block-definition s="Open this in a new tab" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>re_open_full_window</l><list></list></custom-block></script></block-definition><block-definition s="camera is ready" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="let %upvar be %s"><l>camera ready</l><block s="reportBoolean"><l><bool>false</bool></l></block></custom-block><custom-block s="Setup camera %n %n then when ready %cs"><block s="reportAttributeOf"><l><option>width</option></l><l>Stage</l></block><block s="reportAttributeOf"><l><option>height</option></l><l>Stage</l></block><script><block s="doSetVar"><l>camera ready</l><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></custom-block><block s="doWaitUntil"><block var="camera ready"/></block><block s="doWait"><l>1</l><comment w="329.28571428571433" collapsed="true">Wait a bit more because otherwise a black image is captured.</comment></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script></block-definition><block-definition s="Setup camera %&apos;width&apos; %&apos;height&apos; then when ready %&apos;do when camera is ready&apos;" type="command" category="other"><comment x="0" y="0" w="314" collapsed="true">Specifies the resolution of the image sent for recogntion.</comment><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%cs"></input></inputs><script><custom-block s="run eCraft2Learn command %txt with %mult%s"><l>setup_camera</l><list><block var="width"/><block var="height"/><block var="do when camera is ready"/></list></custom-block></script></block-definition><block-definition s="let %&apos;var&apos; be %&apos;value&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>var</l><block var="value"/></block></script></block-definition><block-definition s="load eCraft2Learn" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>https://ecraft2learn.github.io/ai/ecraft2learn.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>https://ecraft2learn.github.io/ai/js/ecraft2learn_snap_extension.js</l></list></block></script></block-definition><block-definition s="call eCraft2Learn reporter %&apos;reporter name&apos; with %&apos;inputs&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%mult%s"></input></inputs><script><custom-block s="load eCraft2Learn"></custom-block><block s="doReport"><block s="reportApplyExtension"><l>e2l_call(reporter_name, parameters)</l><list><block var="reporter name"/><block var="inputs"/></list></block></block></script></block-definition><block-definition s="run eCraft2Learn command %&apos;command name&apos; with %&apos;inputs&apos;" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%mult%s"></input></inputs><script><custom-block s="load eCraft2Learn"></custom-block><block s="doApplyExtension"><l>e2l_run(command_name, parameters)</l><list><block var="command name"/><block var="inputs"/></list></block></script></block-definition></blocks><stage name="Stage" width="252" height="252" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="true" hyperops="true" codify="false" inheritance="true" sublistIDs="false" id="335"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAD8CAYAAABTq8lnAAAAAXNSR0IArs4c6QAABg9JREFUeF7t0wEBAAAIwjDpX9ognw0YsnMECGQElkkqKAECZ/CegEBIwOBDZYtKwOD9AIGQgMGHyhaVgMH7AQIhAYMPlS0qAYP3AwRCAgYfKltUAgbvBwiEBAw+VLaoBAzeDxAICRh8qGxRCRi8HyAQEjD4UNmiEjB4P0AgJGDwobJFJWDwfoBASMDgQ2WLSsDg/QCBkIDBh8oWlYDB+wECIQGDD5UtKgGD9wMEQgIGHypbVAIG7wcIhAQMPlS2qAQM3g8QCAkYfKhsUQkYvB8gEBIw+FDZohIweD9AICRg8KGyRSVg8H6AQEjA4ENli0rA4P0AgZCAwYfKFpWAwfsBAiEBgw+VLSoBg/cDBEICBh8qW1QCBu8HCIQEDD5UtqgEDN4PEAgJGHyobFEJGLwfIBASMPhQ2aISMHg/QCAkYPChskUlYPB+gEBIwOBDZYtKwOD9AIGQgMGHyhaVgMH7AQIhAYMPlS0qAYP3AwRCAgYfKltUAgbvBwiEBAw+VLaoBAzeDxAICRh8qGxRCRi8HyAQEjD4UNmiEjB4P0AgJGDwobJFJWDwfoBASMDgQ2WLSsDg/QCBkIDBh8oWlYDB+wECIQGDD5UtKgGD9wMEQgIGHypbVAIG7wcIhAQMPlS2qAQM3g8QCAkYfKhsUQkYvB8gEBIw+FDZohIweD9AICRg8KGyRSVg8H6AQEjA4ENli0rA4P0AgZCAwYfKFpWAwfsBAiEBgw+VLSoBg/cDBEICBh8qW1QCBu8HCIQEDD5UtqgEDN4PEAgJGHyobFEJGLwfIBASMPhQ2aISMHg/QCAkYPChskUlYPB+gEBIwOBDZYtKwOD9AIGQgMGHyhaVgMH7AQIhAYMPlS0qAYP3AwRC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4PEAgJGHyobFEJGLwfIBASMPhQ2aISMHg/QCAkYPChskUlYPB+gEBIwOBDZYtKwOD9AIGQgMGHyhaVgMH7AQIhAYMPlS0qAYP3AwRCAgYfKltUAgbvBwiEBAw+VLaoBB7KVAD9H0Po4wAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="336"></list></costumes><sounds><list struct="atomic" id="337"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="0" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="0,143.41199999999995,188.7,1" pen="tip" id="342"><costumes><list struct="atomic" id="343"></list></costumes><sounds><list struct="atomic" id="344"></list></sounds><blocks></blocks><variables></variables><scripts><script x="30.000000000000004" y="7.142857142857143"><block s="receiveGo"></block><custom-block s="let %upvar be %s"><l>styles</l><block s="reportNewList"><list><l>Katsushika Hokusai&apos;s Wave</l><l>Francis Picabia&apos;s Udnie</l><l>Pablo Picasso&apos;s La Muse</l><l>Mathura Style</l><l>Leonid Afremov&apos;s Rain Princess</l><l>Edvard Munch&apos;s Scream</l><l>Théodore Géricault&apos;s Raft of the Medusa</l><l>Roberto Matta</l></list></block></custom-block><block s="doIf"><block s="reportNotEquals"><block s="reportListAttribute"><l><option>length</option></l><block var="styles"/></block><block s="reportListAttribute"><l><option>length</option></l><block var="styled costumes"/></block></block><script><block s="bubble"><l>Smile for the camera! Then wait while I make "paintings" based on your photo. It can take several seconds to start.</l></block><block s="doSetVar"><l>photo</l><custom-block s="costume from camera"></custom-block></block><block s="doSwitchToCostume"><block var="photo"/></block><custom-block s="Create costumes in %l from %obj"><block var="styles"/><block var="photo"/></custom-block></script></block><block s="doWaitUntil"><block s="reportEquals"><block s="reportListAttribute"><l><option>length</option></l><block var="styles"/></block><block s="reportListAttribute"><l><option>length</option></l><block var="styled costumes"/></block></block></block><block s="bubble"><l></l></block><block s="doSwitchToCostume"><block var="photo"/></block><custom-block s="fade in for %n seconds %br and fade out for %n %br %br pausing for %n seconds %br using costumes %l display labels %l"><l>3</l><l>1</l><l>2</l><block var="styled costumes"/><block var="styles"/></custom-block></script><script x="36.28571428571428" y="638.285714285712"><custom-block s="Open this in a new tab"></custom-block></script><script x="34.71428571428573" y="580.285714285712"><custom-block s="current costume"><comment w="285" collapsed="false">You can use the sprite&apos;s current costume instead of a photo if you replace the photo above with this.</comment></custom-block></script><script x="31.42857142857141" y="536.2857142857144"><block var="styled costumes"/></script><script x="28.57142857142855" y="410.1428571428573"><block s="receiveKey"><l><option>r</option></l><list></list></block><block s="doSetVar"><l>styled costumes</l><block s="reportNewList"><list></list></block><comment w="201.42857142857144" collapsed="true">Click this to reset and start again.</comment></block><block s="doSetVar"><l>photo</l><l></l></block><block s="doSwitchToCostume"><l></l></block></script></scripts></sprite><watcher s="getCostumeIdx" style="normal" x="47.14074074073983" y="781.5935003377763" color="143,86,227" hidden="true"/><watcher var="photo" style="normal" x="47.14074074073983" y="1516.0462599348139" color="243,118,29" hidden="true"/><watcher var="styled costumes" style="normal" x="10" y="10" color="243,118,29" extX="112" extY="98" hidden="true"/></sprites></stage><variables><variable name="styled costumes"><list struct="atomic" id="429"></list></variable><variable name="photo"><l></l></variable></variables></scene></scenes></project><media name="style transfer" app="Snap! 7, https://snap.berkeley.edu" version="2"></media></snapdata>