Skip to content

Commit

Permalink
refactor: remove unnecessary print statements (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
py-thok authored Oct 28, 2024
1 parent ed612c1 commit 5027c31
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion hinghwa-dict-backend/AudioCompare/Matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ def match(self):
else:
with open(os.path.join(os.getcwd(), "submit结果存储.pkl"), "rb") as f:
dir2_results = pickle.load(f)
print(len(dir2_results))
# Wait for pool to finish processing
# pool.close()
# pool.join()
Expand Down
1 change: 0 additions & 1 deletion hinghwa-dict-backend/AudioCompare/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def audio_matcher(args: Arg):
if filename not in a:
a[filename] = []
a[filename].append((os.path.split(match.file2)[-1], match.score))
# print(match)
for file1 in a.keys():
a[file1].sort(key=lambda x: x[1], reverse=True)
ans[file1] = a[file1][0][0] if a[file1][0][1] > 0 else None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def post(self, request):
record.quiz = quiz
record.contributor = contributor
record.timestamp = timezone.now()
print("test")
record.save()
return JsonResponse(quiz_record(record), status=200)

Expand Down
3 changes: 0 additions & 3 deletions hinghwa-dict-backend/user/view/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ def put(self, request, id):
user = get_user_by_id(id)
body = demjson3.decode(request.body)
info = body["user"]
print(info)
print(info["town"])
print(info["county"])
user_info_form = UserInfoForm(info)
if not user_info_form.is_valid:
raise ValueError
Expand Down
1 change: 0 additions & 1 deletion hinghwa-dict-backend/utils/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def get_request_user(request: request) -> User:
return AnonymousUser()
# get user
user = User.objects.get(id=info["id"])
print(user.username)
# exam username
if user.username != info["username"]:
return AnonymousUser()
Expand Down
2 changes: 0 additions & 2 deletions hinghwa-dict-backend/website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,6 @@ def test(request):
if ipa not in dic:
dic[ipa] = []
dic[ipa].append(music[start:end])
print(line[0])
sum = 0
for i in dic.values():
sum += len(i)
Expand All @@ -805,7 +804,6 @@ def test(request):
for i, music in zip(range(1, len(musics)), musics[1:]):
path = os.path.join(result, ipa + f"-{i}.mp3")
music.export(path, format="mp3")
print(idx)
return JsonResponse({}, status=200)
except Exception as e:
return JsonResponse({"msg": str(e)}, status=500)

0 comments on commit 5027c31

Please sign in to comment.