BMC revision#2
Open
seokjunS wants to merge 1 commit into
Open
Conversation
seokjunS
commented
Jun 10, 2018
| if muniq != None: | ||
| sorted_list.append( muniq) | ||
|
|
||
| utils.my_logging("[Sorted_list]\n") |
Collaborator
Author
There was a problem hiding this comment.
utils.my_logging은 debug용도로 보여집니다. 필요 없는 부분이면 삭제 부탁드립니다.
|
|
||
|
|
||
| if length >= 1: | ||
| if len(sorted_list[0]) == 0 : |
Collaborator
Author
There was a problem hiding this comment.
위에서 (184 ~ 189줄) sorted_list 의 각 element가 0일때 모두 제거하는 코드가 있었습니다.
그렇다면, 해당 if문이 실행될 일이 없을 것 같은데 왜 들어갔는지 알수있을까요?
| next = sorted_list[1] if length >= 2 else ([None, None], False) | ||
|
|
||
| if curr[0][1] != next[0][1] and curr[1]: | ||
| utils.my_logging("\nCurr\n") |
Collaborator
Author
There was a problem hiding this comment.
위에서 언급했듯이 my_logging 제거 부탁드립니다.
| else : | ||
| t = 1 | ||
| is_unique = 0 | ||
| while t < len(sorted_list) : |
Collaborator
Author
There was a problem hiding this comment.
len(sorted_list) 대신 length를 쓸 수 있을것 같습니다.
| fw.write("%s\n" % s) | ||
| print(s) | ||
|
|
||
| def my_logging(s): |
seokjunS
commented
Jun 10, 2018
| del sorted_list[s] | ||
| else : | ||
| s = s + 1 | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
184 ~ 189 줄의 코드는 제가 이해하기로는
- sorted_list의 element를 iteration하면서
- element의 길이가 0이면 sorted_list에서 제거하는 코드입니다.
해당 코드는 위의 171 ~ 176줄의 코드와 합쳐질 수 있을거 같습니다.
methods = {"W_C2T": 0, "C_C2T": 1, "W_G2A": 2, "C_G2A": 3}
sorted_list = []
for _, i in methods.iteritems():
muniq = get_and_uniq( group[i], 1 ) # (value, is_uniq)
if muniq != None and len(muniq) > 0:
sorted_list.append( muniq)
손으로 짠 코드니 재확인 부탁드립니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.