Git Product home page Git Product logo

avp_ops's Introduction

AVP Custom Operators

Credit to Ferdinand Jamitzky for the hack that makes this possible.

Operators:

Currently there are 194 operators. That is too many to list in great detail when I'd rather add more. Please read the code.

If you want to see the function for one and can't use an IDE to go to the code definition, you can use .help() on the operator and it will return its function, and for some it will return more help (which i am also slowly working on)


Operators defined with OpTwo take in two inputs input_one % operator % input_two and can use <<, >>, |, %, and @.

All operators can take in inputs as a function. Simply call Z.pwr([1, 2, 3], [4, 5, 6]) or N.types(["string", 1, 2, [54, 32, 10]]) to call it just as if you used it as an operator.

Example:

>>> [4, 5, 6, 8] | Z.pwr | [2, 4, 3, 2]
    [16, 625, 216, 64]

>>> 4 ** 2
    16

>>> 5 ** 4
    625

>>> 6 ** 3
    216

>>> 8 ** 2
    64

Operators defined with Op take in one input input % operator or operator % input and can use <<, >>, <, >, |, %, and @.

Example:

>>> [1, 2, 3, ["5", 5]] % N.types
    [<class 'int'>, <class 'int'>, <class 'int'>, <class 'list'>]
    
>>> type(1)
    <class 'int'>

>>> type(2)
    <class 'int'>

>>> type(3)
    <class 'int'>

>>> type(["5", 5])
    <class 'list'>
If you email me i may respond. If you have a bug report and want to email me, make a gihub issue first. Don't sign me up for spam or email me in a spammy way.

avp_ops's People

Contributors

alexpoulsen avatar

Watchers

 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.