Giter VIP home page Giter VIP logo

serpent's Introduction

Serpent

Transforms your python code into a serpent and sword!

###Technical

  • Runs on mac and most verisons of linux
  • Tested on python 2.7 but may work with 3.x

###Example

The file below would compile and run if I didn't truncate the sword to fit on the page. (lawl)

#!/usr/bin/python
import serpent

"""
                              ___
                             { _ }
                              |/|
                             {___}
                              |_|
                              |/|
                    .         |/|         .
                    (\________|w|________/)
                    ( ___________________ )
                     v       | | |       v
                             | | |
                             | | |
                             | | |
                             | | |PO0.HN7
                             | | |   *   TO0
                            z| | |TP0.ON4
                           PY0 | |z
                          PY0| | |
                            PY0| |
                             |PY0|
                             | |PY0
                             | | OP0
                             | | |PY0
                            z| | |PY0
                           PY0 | |z
                          PY0| | |
                            PY0| |
                             |PY0|
                             | |PY0
                             | | HN3
                             | | |PT6
                            z| | |PH0
                           PY0 | |z
                          PY0| | |
                            PN3| |
                             |PT0|
                             | |PY0
                             | | NY2
                            z| | |PY0
                          YO1| | |z
                            OH4| |
                             |HO2|
                             | |PO3
                             | | PY0
                             | | |PY0
                            z| | |PY0
                           PY0 | |z
                          PY0| | |
                            PY0| |
                             |PY0|
                             | |OP0
                             | | HP0
                             | | |YN0
                            z| | |PT0
                             z | |
                             z | |
                             | | |
                             | | |
                              \|/
                               v
                               
Your sword will be muuccccccchhhh longer than this. I'm working on it
"""

###How to use

  • Just import serpent.py at the top of your file
import serpent
  • Then write some code
#!/usr/bin/python
import serpent

print "hello world"
  • Compile your file
python some.file.py
  • Open the newly generated serpent file that's extrememly freaking long and totally wasting space but who cares it's a kickass snake wrapped around a kickass sword!!

Compile that wild file, child.

python some.file.ss.py

##Something to note:

The purpose of this file is not to compress your code. In fact this will make your files larger. much, much larger. This is simply intended to amuse you.

##How does this work?

See this blog post for an explanation

serpent's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.