← Back

May 25, 2016

#1685: Patch explain

Patch

[The panel displays part of a code, in five different colors (red, purple, light blue, blue, and green) as well as normal black text, which due to image editing is difficult to read. The first and last lines are partly obscured by the frame of the panel. Here below is an attempt to transcribe the code, using the sign “¤” for anything not easily transcribed. Feel free to add other signs instead of these that look more like the one in the image (and also improve the attempted transcription if possible).]

impoɞt ne

dooPisPʂnme(n):

<font color="red">⫠</font>(<font color="purple">¤</font>n<font color="red"><</font>n,<font color="#44A1FF">1</font>:

	<font color="red">retɐrn</font> <font color="#44A1FF">F</font>(<font color="#44A1FF">ise</font>

<font color="red">for</font> i <font color="red">ir</font><font color="#44A1FF">arar𝞬e</font>(<font color="#44A1FF">2</font>, <font color="#44A1FF">ninߙ</font> <font color="red">\*</font>n<font color="red">\*\*</font>n<font color="red">+</font><font color="#44A1FF">5</font>)<font color="red">+</font><font color="#44A1FF">5</font>):

	<font color="red">if</font> n i<font color="red">==</font><font color="#44A1FF">0</font>

		<font color="red">re力¤𝑟nr</font><font color="#44A1FF">₅ɵlsel</font>:

<font color="red">re</font><font color="purple">𝗿</font><font color="red">⃓rn </font><font color="#44A1FF">True</font>

defe𝟧isPrimϵieg˓x(cx

<font color="red">if</font> <font color="purple">g</font>ƨ<font color="purple">¤i</font>natc<font color="purple">x</font>(<font color="red">r</font>'<font color="#44A1FF">^</font><font color="blue">(1</font><font color="red">?| ?.</font><font color="blue">1</font><font color="red">+?</font><font color="blue">)</font><font color="lime">\+</font><font color="blue">)</font><font color="#44A1FF">$</font>'<font color="red">\*</font>n <font color="blue">⎞1'</font><font color="red">\*</font>n):

	<font color="red">rerɹrn </font><font color="#44A1FF">Fa</font><font color="blue">(</font><font color="#44A1FF"> e</font>

<font color="red">ιetu⃓</font><font color="purple">nr</font><font color="#44A1FF">TrꙆ</font>

dq⃓ q⃓soʀsorη(a :

<font color="red">if </font><font color="#44A1FF">¤n</font>(a  <font color="red">< </font><font color="#44A1FF">2</font>:

	<font color="red">eteturn </font>a

pi<font color="red">=꞊ᵣ f</font>a[<font color="#44A1FF">0</font>]

l<font color="red">=</font>pi<font color="red">=for</font> j <font color="red">ın</font> a i<font color="red"><</font> i<font color="red"><</font>pi<font color="red"><</font>(t]<small>(</small>)

r<font color="red">=</font>[ı<font color="red">=for 𝟋 in</font> a) <font color="red">r</font> i<font color="red">></font>viviv]<small>(</small>vo)

mid<font color="red">=</font>[pi[<font color="red">\*</font>t]<font color="red">\*</font>(<font color="#44A1FF">l</font><font color="red">\*</font>t<font color="#44A1FF">ˌ</font>(a)<font color="red">-</font>(<font color="#44A1FF">⟘en</font>pᚆ<font color="#44A1FF">enlen</font>(c)))

<font color="red">r¤lrurrr</font>ikıcksckt(l) <font color="red">+</font> r ¤ ¤quickrprt(r)

[Caption below the panel:]

Protip: If you don’t have access to the GNU patch tool, you can use the Photoshop one.