This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = 632, y = 391, rule = B3/S23 | |
265b2o$265bo$257b2o3b2obo$256bo3bo3bo$240b2o13bo$240b2o13bo3bo2bo$231b | |
2o3bo6b2o10bo5bo$231bobo3bo5b3o10bo3bo4b2o12b2o$232b5o6b2o12b2o6bo13b | |
2o$233b3o4b2o9bobo9bobo$240b2o10b2o9b2o$252bo24bo$259b2o17bo$258bobo | |
17bo$260bo2$276b2o3b2o51b2o$279bo54bo$248bo27bo5bo40b2o7bobo$248b2o5b | |
2o20b2ob2o41bobo6b2o$247bobo5b2o21bobo30bo12b3o$279bo28b4o3b2o8b3o$ | |
279bo20b2o5b4o3b2o8b3o$300b2o5bo2bo3b2obob2o2bobo8b2o12b2o$307b4o4bobo | |
b2o2b2o9bo13b2o$308b4o3bob2o13bobo$240b2o69bo20b2o$241b2o$240bo34bobo$ | |
275b2o70b3o$276bo3b3o39b2o2b2o19b3o$266b2o11bo3bo37bo3b2o19bo3bo$266b | |
2o10bo5bo37b2obo77b2o$233bo44b2obob2o60b2o3b2o51bo$233b2o159b2o5bobo$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' Detect if a list is a circular permutation of a given list | |
Written by PM 2Ring 2017.11.01 | |
''' | |
from random import seed, randrange | |
seed(42) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
''' Draw an Apollonian gasket. Non symmetrical version. | |
Recursively solves Descartes Theorem to find the circles tangent | |
to 3 circles that are tangent to each other. | |
Written by PM 2Ring 2008.09.14 | |
''' | |
import sys, colorsys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' Find combinations of integers from 3 lists that sum to the items in a target list | |
https://gist.github.com/PM2Ring/f051ab09f9074ab5a378fa30f4141352 | |
Written by PM 2Ring 2017.10.15 | |
''' | |
from itertools import product |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
''' Test speeds of performing XOR on two bytes strings of equal length | |
Typical results on a 32bit 2GHz machine running Python 3.6.0 on Linux | |
Size: 2 Loops: 65536 | |
Verify True | |
xor_bytes_I : [0.36799076000170317, 0.3949565820003045, 0.40133740400051465] | |
xor_bytes_BLC : [0.41839819899905706, 0.4583157610031776, 0.4664555540002766] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' AES ECB | |
Call the AES_set_encrypt_key, AES_set_decrypt_key, and | |
AES_ecb_encrypt functions from the OpenSSL library | |
Uses info from /usr/include/openssl/aes.h | |
Also see https://boringssl.googlesource.com/boringssl/+/2490/include/openssl/aes.h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' sha1_demo | |
An implementation of SHA-1 in pure Python 3 | |
Built from the pseudocode at | |
https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode | |
Written by PM 2Ring 2017.10.01 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' Testing a Bloom filter implementation | |
See https://en.wikipedia.org/wiki/Bloom_filter | |
Written by PM 2Ring 2017.09.29 | |
''' | |
from random import seed, randrange |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
''' iso_ellipse. An ellipse that touches an isoceles triangle at the | |
midpoint of its base and at a given distance on the sides. | |
The apex of the triangle is at the origin, with the triangle's axis | |
on the +X axis. The slopes of the equal sides are m and -m, | |
the "height" is V, so the other 2 vertices are at (V, mV) and (V, -mV). | |
We want an ellipse that's tangential to the triangle at (X, Y) and (X, -Y) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.