Git Product home page Git Product logo

hoon's Introduction

Install

pip install hoon

Use

import hoon
print hoon.hash(hoon.fread('README.md'))
# Print the sha1 for this file

Use notes:

Don't expect backwards compatibility in hoon, each version usually breaks everything with the previous. e.g.: function names

Documentation

hash(s, algorithm=sha1)

Like binhash() except the digest is returned as a string of double length, containing only hexadecimal digits.

algorithm parameter defaults to sha1.

opcodes(a, b)

Get a list of tuples describing how to turn a into b.

prettify(thing, indent=2)

Some humans like it this way

qmatch(a, b, ratio=1)

Fast test the similarity of two sequences by testing with real_quick_ratio() first.

qratio(a, b)

Return an upper bound on ratio() very quickly.

ratio(a, b)

Return a measure of the sequences' similarity.

request(url, data)

Makes a simple request. If no data it's a GET else it's a POST. Returns a string.

sequence_matcher(a=None, b=None, isjunk=None)

Short for the SequenceMatcher constructor. isjunk is moved to the right so it's not required when providing a and b parameters.

translate(s, old, new)

Translate each character in old to the character at the same positionin new

int_bytes(n)

Convert integer numbers to binary data.

Bugs & Co.

Found bugs or have a new feature that you want to add?

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.