-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Pcc03 #849
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
Pcc03 #849
Conversation
|
|
||
| ### Can I help you out with code reviewing? | ||
| We are still getting a pretty manageable number of PRs to be able to merge them all in ourselves, but we do want to give each PR a bit more of a code review. As we're pretty busy we want to turn this into a *community effort*. So if you want to help out merging PRs into our challenges branch, become a moderator (and mentor!), you can volunteer [on Slack](https://join.slack.com/t/pybites/shared_invite/enQtNDAxODc0MjEyODM2LTNiZjljNTI2NGJiNWI0MTRkNjY4YzQ1ZWU4MmQzNWQyN2Q4ZTQzMTk0NzkyZTRmMThlNmQzYTk5Y2Y5ZDM4NDU). | ||
| We are still getting a pretty manageable number of PRs to be able to merge them all in ourselves, but we do want to give each PR a bit more of a code review. As we're pretty busy we want to turn this into a *community effort*. So if you want to help out merging PRs into our challenges branch, become a moderator (and mentor!), you can volunteer [on Slack](https://pybit.es/community/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch, thanks!
| Hint 2: use SequenceMatcher (imported) to calculate the similarity ratio | ||
| Bonus: for performance gain compare the first char of each tag in pair and continue if not the same""" | ||
| result = {} | ||
| result = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double variable
| with open("rss.xml", "r") as f: | ||
| for line in f: | ||
| line = line.replace("-", " ").lower() | ||
| tags = TAG_HTML.findall(line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this override tags in each loop?
you can do it once, no loop: TAG_HTML.findall(f.read().lower())
| singular = x | ||
| if x[0] == y[0] and x != y: | ||
| ratio = SequenceMatcher(None, x, y).ratio() | ||
| if x.endswith("s"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this was required?
ATTENTION: before clicking "Create Pull Request" please submit some meta data, thanks!
Difficulty level (1-10): [5]
Estimated time spent (hours): [3]
Completed (yes/no): [yes]
I stretched my coding skills (if yes what did you learn?): []
Other feedback (what can we improve?): []