This file contains 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
import math | |
import numpy as np | |
from PIL import Image | |
np.set_printoptions(linewidth = 180, edgeitems=10, suppress = True) | |
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in range(length): | |
r = base*r + n % base |
This file contains 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
# | |
# Manifestation of Permuted Diagonal Line generator (modulo 2) | |
# | |
import numpy as np | |
from PIL import Image | |
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in range(length): |
This file contains 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
import math | |
import numpy as np | |
from PIL import Image | |
np.set_printoptions(linewidth = 180, edgeitems=10, suppress = True) | |
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in range(length): | |
r = base*r + n % base |
This file contains 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
import numpy as np | |
from PIL import Image | |
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in range(length): | |
r = base*r + n % base | |
n /= base | |
return r |
This file contains 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
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in xrange(length): | |
r = base*r + n % base | |
n /= base | |
return r | |
assert digital_reverse(123, 3, 10) == 321 | |
assert digital_reverse(54321, 5, 10) == 12345 | |
assert digital_reverse(0x123, 3, 16) == 0x321 |
This file contains 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
# | |
# Manifestation of Permuted Diagonal Line generator | |
# | |
import numpy as np | |
from PIL import Image | |
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in range(length): | |
r = base*r + n % base |
This file contains 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
import numpy as np | |
from PIL import Image | |
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in range(length): | |
r = base*r + n % base | |
n /= base | |
return r |
This file contains 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
# -*- coding: utf-8 -*- | |
# Copyright (C) 2012, Almar Klein, Ant1, Marius van Voorden | |
# | |
# This code is subject to the (new) BSD license: | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright |
This file contains 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
import numpy as np | |
from PIL import Image | |
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in range(length): | |
r = base*r + n % base | |
n /= base | |
return r |
This file contains 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
import numpy as np | |
from PIL import Image | |
def digital_reverse(n, length, base): | |
r = 0 | |
for _ in range(length): | |
r = base*r + n % base | |
n /= base | |
return r |
OlderNewer