# coding: utf-8 # # Table of Contents #

1  Obfuscated code or piece of art?
1.1  Mandelbrot set
1.2  Penrose patterns
1.3  Bitcoin address & private key generator
# # Obfuscated code or piece of art? # # This short notebooks shows a few examples of Python code, designed to draw something, and shaped as what they will draw... # ## Mandelbrot set # # This nice little code will write a visualization of the [Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set), on the domain $[-3, 3] \times [-3i, 3i]$, for $1500 \times 1500$ points, as a Bitmap (written manually in binary). # In[2]: get_ipython().run_cell_magic('time', '', "b_ = (\n 255,\n lambda\n V ,B,c\n :c and Y(V*V+B,B, c\n -1)if(abs(V)<6)else\n ( 2+c-4*abs(V)**-0.4)/i\n ) ;v, x=1500,1000;C=range(v*x\n );import struct;P=struct.pack;M,\\\n j ='0@""; U$:J(k.a2b_base\n 64(W));f=J(os.urando m(64)) %(H-U("AUVRIxl\nQt1/EQC2hcy/JvsA="))+ 1;M$Q,R,G :((W*W-Q-G)%P,\n(W*(G+2*Q-W*W)-R)%P) ;P=H-2** 32-977;V$Q=P,L=\n1,O=0:V(Q%W,W,O-Q/W* L,L)if(W@O%P;S,\nT=A(f,U("eb5mfvncu6 xVoGKVzocLBwKb/Nst\nzijZWfKBWxb4F5g="), U("SDra dyajxGVdpPv8DhEI\nqP0XtEimhVQZnEfQj/ sQ1Lg="), 0,0);F$:"1"+F(W\n [1:])if(W[:1 ]=="\\0"@"" .join(map(B,C(\n J(W))));K$: F(W +Y(Y(W))[:4]);\n X.update(Y("\\4"+ I(S)+I(T)));B$\n :re.sub("[0OIl _]| [^\\\\w]","","".jo\n in(map(chr,ra nge (123))))[W];print"Addre\n ss:",K("\\0"+X.dig est())+"\\nPrivkey:",K(\n "\\x80"+I(f))""";exec(reduce(lambda W,X:\n W.replace(*X),zip(" \\n&$@",["","",\n " ","=lambda W,",")else "])\n ,"A$G,J,S,T:"+_))') # ---- # # Disclaimer: I am *not* the author of these small examples! # # > That's it for today!