Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation and printing #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.pyc
*.py~
*.py~
data/*
logs/*
system/*
10 changes: 5 additions & 5 deletions download_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def download_audio_method(line,csv_file):
end_seconds = line.split(",")[2];
audio_duration = float(end_seconds) - float(start_seconds)
#positive_labels = ','.join(line.split(",")[3:]);
print "Query -> " + query_id
print("Query -> " + query_id)
#print "start_time -> " + start_seconds
#print "end_time -> " + end_seconds
#print "positive_labels -> " + positive_labels
Expand Down Expand Up @@ -74,7 +74,7 @@ def download_audio_method(line,csv_file):
ex1 = ""
except Exception as ex:
ex1 = str(ex) + ',' + str(query_id)
print "Error is ---> " + str(ex)
print("Error is ---> " + str(ex))
return ex1

#Download audio - Reads 3 lines of input csv file at a time and passes them to multi_run wrapper which calls download_audio_method to download the file based on id.
Expand All @@ -92,13 +92,13 @@ def download_audio(csv_file,timestamp):
next_line = (next_line,csv_file)
lines_list.append(next_line)
except:
print "end of file"
print("end of file")
try:
next_line = segments_info_file.next()
next_line = (next_line,csv_file)
lines_list.append(next_line)
except:
print "end of file"
print("end of file")
#print lines_list
P = multiprocessing.Pool(3)

Expand All @@ -112,7 +112,7 @@ def download_audio(csv_file,timestamp):

if __name__ == "__main__":
if len(sys.argv) !=2:
print 'takes arg1 as csv file to downloaded'
print('takes arg1 as csv file to downloaded')
else:

ts = time.time()
Expand Down
2 changes: 1 addition & 1 deletion evaluation/Models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def readLabels(self):
# print str(key) + ":" + str(self.labelsDict[key])

except Exception as ex:
print "Fileformat of the file " + str(self.filepath) + " is invalid."
print("Fileformat of the file " + str(self.filepath) + " is invalid.")
raise ex

def validatePredictedDS(self, predictedDS):
Expand Down
Loading