Loading RunningInParallel.py +5 −0 Original line number Original line Diff line number Diff line '''Note: This does not work. I'm not too sure what happened, but I ran small tests and they seemed to be fine, but on the big one in created an n-1 number of identical files plus an empty one. Not sure what happened there.''' from ipyparallel import Client from ipyparallel import Client from WorkingPyDemo import * from WorkingPyDemo import * from time import time from time import time Loading WorkingPyDemo.py +1 −1 Original line number Original line Diff line number Diff line Loading @@ -524,7 +524,7 @@ if __name__ == "__main__": # list_dic = np.load("first_dic.npy", allow_pickle="TRUE") # list_dic = np.load("first_dic.npy", allow_pickle="TRUE") bins = [21,32,48] bins = [21,32,48] np.save("first_dict.npy", list_dic) np.save("first_dict.npy", list_dic) for i in range(0,3): for i in range(len(images)): image, new_error, diff = huffman(images[i], 4, False) image, new_error, diff = huffman(images[i], 4, False) encoded_string = encoder(new_error, list_dic, diff, bins) encoded_string = encoder(new_error, list_dic, diff, bins) Loading Loading
RunningInParallel.py +5 −0 Original line number Original line Diff line number Diff line '''Note: This does not work. I'm not too sure what happened, but I ran small tests and they seemed to be fine, but on the big one in created an n-1 number of identical files plus an empty one. Not sure what happened there.''' from ipyparallel import Client from ipyparallel import Client from WorkingPyDemo import * from WorkingPyDemo import * from time import time from time import time Loading
WorkingPyDemo.py +1 −1 Original line number Original line Diff line number Diff line Loading @@ -524,7 +524,7 @@ if __name__ == "__main__": # list_dic = np.load("first_dic.npy", allow_pickle="TRUE") # list_dic = np.load("first_dic.npy", allow_pickle="TRUE") bins = [21,32,48] bins = [21,32,48] np.save("first_dict.npy", list_dic) np.save("first_dict.npy", list_dic) for i in range(0,3): for i in range(len(images)): image, new_error, diff = huffman(images[i], 4, False) image, new_error, diff = huffman(images[i], 4, False) encoded_string = encoder(new_error, list_dic, diff, bins) encoded_string = encoder(new_error, list_dic, diff, bins) Loading