Source: http://taint.org/2020/07/13/235801a.html
European standard EN45554 ‘details ”general methods for the assessment of the ability to repair, reuse and upgrade energy-related products.” In plain English, it’s a standard for measuring how easy it is to repair stuff. It’s also a huge milestone for the fight for fair repair.’
Turns out PHP standard crc32
method is non-standard (while crc32b
is).
Here is how to implement it in Python:
def php_crc32(a):
'''
References:
- https://www.php.net/manual/en/function.hash-file.php#104836
- https://stackoverflow.com/a/50843127/636849
'''
crc = 0xffffffff
for x in a:
crc ^= x << 24;
for k in range(8):
crc = (crc << 1) ^ 0x04c11db7 if crc & 0x80000000 else crc << 1
crc = ~crc
crc &= 0xffffffff
# Convert from big endian to little endian:
return int.from_bytes(crc.to_bytes(4, 'big'), 'little')
how fast is qsort when it comes to sorting integers and can we do better?
SOURCE: http://taint.org
an entertaining dive down a low-level performance-optimization rabbit hole, diving into radix sort on an array of integers in particular
IPTC = International Press Telecommunications Council, defines the open standards of the News Media, founded in 1965 and based in London
Alt (XML) : NewsML-G2 https://iptc.org/standards/newsml-g2/