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
""" | |
Using Known Plain-text Attack (KPA) to break Vigenère's Cipher | |
Check the following link to know more about the Vigenère's Cipher, including how to use KPA to break the encryption. | |
https://www.commonlounge.com/vigeneres-cipher-b27ffb470c3a4d2b83378edee0a55dab/ | |
""" | |
import re | |
import string |
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
import os | |
import re | |
import numpy as np | |
import uuid | |
from scipy import misc | |
import numpy as np | |
from PIL import Image | |
import sys | |
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
import numpy as np | |
import re | |
import sys | |
''' | |
Read a PFM file into a Numpy array. Note that it will have | |
a shape of H x W, not W x H. Returns a tuple containing the | |
loaded image and the scale factor from the file. | |
''' | |
def read_pfm(file): |