From 4d27925b878306c25e759d5396fa4e69f8754a37 Mon Sep 17 00:00:00 2001 From: lkrsnik Date: Fri, 30 Jun 2017 13:18:48 +0200 Subject: [PATCH] Changed to python3 --- .idea/workspace.xml | 17 +++++++++-------- __init__.py | 0 prepare_data.py | 9 ++++----- 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 __init__.py diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8c2f2a9..7ab9a7b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -34,8 +34,8 @@ - - + + @@ -134,6 +134,7 @@ h5f generate_inputs split_number + StringIO @@ -153,10 +154,10 @@ - @@ -173,8 +174,8 @@ - + @@ -482,7 +483,7 @@ - + @@ -1009,8 +1010,8 @@ - - + + diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/prepare_data.py b/prepare_data.py index c21a2f0..d0ce037 100644 --- a/prepare_data.py +++ b/prepare_data.py @@ -6,7 +6,6 @@ import numpy as np import h5py import gc import math -import StringIO import copy def save_inputs(file_name, X, y): @@ -131,9 +130,9 @@ def create_dict(): dictionary.append(c) if num_vowels > max_num_vowels: max_num_vowels = num_vowels - except Exception, e: - print line - 1 - print el + except Exception: + print(line - 1) + print(el) break line += 1 dictionary = sorted(dictionary) @@ -394,7 +393,7 @@ def generate_X_and_y_RAM_efficient(name, split_number): current_part_generation += 1 num_all_vowels += 1 if i%10000 == 0: - print i + print(i) # text_file.write("Purchase Amount: %s" % TotalAmount) j = 0 # X.append(word)