High-Resolution Mandelbrot in Obfuscated Python
Here’s a followup to last month’s post about Penrose Tiling in Obfuscated Python.
The Mandelbrot set is a traditional favorite among authors of obfuscated code. You can find obfuscated code in C, Perl, Haskell, Python and many other languages. Nearly all examples render the Mandelbrot set as ASCII art.
The following Python script, on the other hand, begins as ASCII art:
255,
lambda
V ,B,c
:c and Y(V*V+B,B, c
-1)if(abs(V)<6)else
( 2+c-4*abs(V)**-0.4)/i
) ;v, x=1500,1000;C=range(v*x
);import struct;P=struct.pack;M,\
j ='
for X in j('BM'+P(M,v*x*3+26,26,12,v,x,1,24))or C:
i ,Y=_;j(P('BBB',*(lambda T:(T*80+T**9
*i-950*T **99,T*70-880*T**18+701*
T **9 ,T*i**(1-T**45*2)))(sum(
[ Y(0,(A%3/3.+X%v+(X/v+
A/3/3.-x/2)/1j)*2.5
/x -2.7,i)**2 for \
A in C
[:9]])
/9)
) )
The Mandelbrot set is a traditional favorite among authors of obfuscated code. You can find obfuscated code in C, Perl, Haskell, Python and many other languages. Nearly all examples render the Mandelbrot set as ASCII art.
The following Python script, on the other hand, begins as ASCII art:
CODE:
_ = (255,
lambda
V ,B,c
:c and Y(V*V+B,B, c
-1)if(abs(V)<6)else
( 2+c-4*abs(V)**-0.4)/i
) ;v, x=1500,1000;C=range(v*x
);import struct;P=struct.pack;M,\
j ='
i ,Y=_;j(P('BBB',*(lambda T:(T*80+T**9
*i-950*T **99,T*70-880*T**18+701*
T **9 ,T*i**(1-T**45*2)))(sum(
[ Y(0,(A%3/3.+X%v+(X/v+
A/3/3.-x/2)/1j)*2.5
/x -2.7,i)**2 for \
A in C
[:9]])
/9)
) )
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-733000/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Mandelbrot set 以parallel_for_實現Parallel
- JSnaughty: Recovering Clear, Natural Identifiers from Obfuscated JS NamesJSIDE
- Restormer Efficient Transformer for High-Resolution Image Restoration——2022CVPRRESTORM
- [基礎] Stable Diffusion, High-Resolution Image Synthesis with Latent Diffusion Models
- [論文閱讀] High-Resolution Image Synthesis with Latent Diffusion Models
- 論文翻譯:Real-Time High-Resolution Background Matting
- 【python】python安裝Python
- python ----python的安裝Python
- python:python的多程式Python
- python--- 之The program 'python' can be found in the following packages: * python-minimal * python3PythonPackage
- Python IDLE和Python的區別!Python入門教程Python
- python學習之初識pythonPython
- 【Python】python類的繼承Python繼承
- Python 序列化(Python IO)Python
- Python合集之Python函式Python函式
- pythonPython
- python _Python
- python教程(一)·python環境搭建Python
- 學習Python的日子 Python(6)Python
- [python] Python型別提示總結Python型別
- Python補充02 Python小技巧Python
- 小白自學Python(一) -- Python教程Python
- Python之將Python字串生成PDFPython字串
- Python 字串格式化(Python IO)Python字串格式化
- Python 檔案讀寫(Python IO)Python
- 『python入門:』 python的介紹Python
- 與 Python 之父聊天:更快的 Python!Python
- python(python中的super函式、)Python函式
- python中#!/usr/bin/python與#!/usr/bin/env python的區別Python
- Python入門:Python 2與Python3有什麼區別?Python
- 學習Python選擇Python2還是Python3呢?Python
- Python學習筆記|Python之程式Python筆記
- Python 筆記-2-1-Python 概述Python筆記
- Python 微服務開發--Python Microservices DevelopmentPython微服務ROSdev
- python SQL基礎與python互動PythonSQL
- 「Python」Convert map object to numpy array in python 3PythonObject
- 【Python】阿里雲python sdk快速入門Python阿里
- Python - opencv-python 獲取影片尺寸PythonOpenCV
- Python基礎篇-Python基礎01Python