The following compares the output of several creative hash functions designed for human readability.
sha1's are merely used as arbitrary, longer, distributed input values.
input | 1 word output | 2 word output | 3 word output |
---|
#!/usr/bin/env ansible-playbook | |
--- | |
- name: Test behaviour of version test | |
hosts: localhost | |
gather_facts: false | |
tasks: | |
- name: Expected results, comparing a.b.c <-> x.y.z, or a.b <-> x.y | |
debug: | |
msg: | |
- '"1.0" is version("1.0", "==") -> {{ "1.0" is version("1.0", "==") }}' |
- hosts: localhost | |
gather_facts: false | |
vars: | |
regex: ^(\w{3}\s+\d+\s\d+:\d+:\d+)\s?:\s?(\w+)\s+:.*(?:\r?\n(?!.*COMMAND).*)*\r?\n.*?COMMAND=(.*(?:\r?\n(?!\w{3}\s+\d+\s\d+).*)*) | |
tasks: | |
- name: slurp file | |
slurp: | |
src: sudo.log | |
register: slurped |
Host rpi1 | |
HostName raspberrypi1.local | |
User pi | |
Host rpi2 | |
HostName raspberrypi2.local | |
User pi |
The following compares the output of several creative hash functions designed for human readability.
sha1's are merely used as arbitrary, longer, distributed input values.
input | 1 word output | 2 word output | 3 word output |
---|
from libc.string cimport memcpy | |
cpdef bytes noswap(): | |
cdef double pi = 3.14159 | |
cdef unsigned char buf[8] | |
memcpy(&buf, &pi, 8) | |
return buf[:8] | |
cpdef bytes swap(): | |
cdef double pi = 3.14159 |
python-pcre | |
re2 | |
regex | |
rure |
from cStringIO import StringIO | |
import sys | |
import ruamel.ordereddict | |
import ruamel.yaml | |
s = '''\ | |
foo: | |
bar: baz |
import re | |
import tokenize | |
import astroid | |
from pylint.checkers import BaseChecker, BaseTokenChecker | |
from pylint.interfaces import IAstroidChecker, ITokenChecker | |
FORMAT_PATT = re.compile(r'\$\{.*?}') |
<!doctype html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8"/> | |
<title>Testy test</title> | |
</head> | |
<body style="background: black;"> | |
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> |