Commit 00cfa297 authored by Bryce Hepner's avatar Bryce Hepner

turns out apparently doesn't work

parent 18e8282a
......@@ -9,7 +9,7 @@ def initialize():
"""
client = Client() # Only works if a cluster is running.
dview = client[:]
dview.execute("from WorkingPyDemo import *") #neede d for others
dview.execute("from WorkingPyDemo import *") #needed for others
dview.block = True
return dview
if __name__ == "__main__":
......@@ -24,7 +24,7 @@ if __name__ == "__main__":
"""
Takes in the filename and writes the compressed image
"""
newnamesforlater = []
list_dic = np.load("first_dic.npy", allow_pickle=True)
bins = [21,32,48]
image, new_error, diff = huffman(filename, 4, False)
......@@ -34,7 +34,6 @@ if __name__ == "__main__":
newname = filename[:-5]
else:
newname = filename[:-4]
newnamesforlater.append(newname + "_Compressed.txt")
with open(newname + "_Compressed.txt", 'wb') as f:
f.write(inletters)
def decode_an_image(filename):
......@@ -47,6 +46,6 @@ if __name__ == "__main__":
newname = filename[:-4]
encoded_string2 = bytes_to_bitstring(read_from_file(newname + "_Compressed.txt"))
reconstruct_image = decoder(encoded_string2, list_dic, bins, False)
dview.map_sync(save_an_image, images[160:200])
dview.map_sync(save_an_image, images[0])
# dview.map_sync(decode_an_image, images[0:6])
print(time() - starttime)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment