Skip to content

Added 2 new algorythms (decrypt message, censor) #5883

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

Closed
wants to merge 24 commits into from
Closed

Added 2 new algorythms (decrypt message, censor) #5883

wants to merge 24 commits into from

Conversation

meg-1
Copy link
Contributor

@meg-1 meg-1 commented Dec 25, 2021

Describe your change:

Added 2 new algorythms (decrypt message, censor)

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@ghost ghost added the awaiting reviews This PR is ready to be reviewed label Dec 25, 2021
Copy link

@IdoErel IdoErel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments are too long.
Keep the comments short and concise.

The code is implementing what's already been implemented in python.

Kind regards,
IdoErel

@bayrsaixan
Copy link

bayrsaixan commented Dec 28, 2021 via email

@meg-1
Copy link
Contributor Author

meg-1 commented Jan 5, 2022

The code is implementing what's already been implemented in python.

Thank you a lot for the feedback! Quick question, you mean both algorithms have been implemented in Python already, right? Or just the censor algorithm?

Copy link
Contributor

@amaank404 amaank404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for trying but it seems that decrypt does not do any decryption but only removes the character provided to it and does not do any real world decryption. You might say that it does English deobfuscation but that is also false as well (in case you say so).

here is an example, both of them are equivalent, the latter being already inbuilt.

decrypt("o$ne", "$") == "o$ne".replace("$", "")

and for the censor function that is also achieved by the same replace.

censor("bad word", "bad") == "bad word".replace("bad", "***")

Okay, I get it that censor is still reasonable but decrypt is unnecessary.

@meg-1
Copy link
Contributor Author

meg-1 commented Jan 22, 2022

Thank you for trying but it seems that decrypt does not do any decryption but only removes the character provided to it and does not do any real world decryption. You might say that it does English deobfuscation but that is also false as well (in case you say so).

here is an example, both of them are equivalent, the latter being already inbuilt.

decrypt("o$ne", "$") == "o$ne".replace("$", "")

and for the censor function that is also achieved by the same replace.

censor("bad word", "bad") == "bad word".replace("bad", "***")

Okay, I get it that censor is still reasonable but decrypt is unnecessary.

Thank you so much for the feedback, it's greately appreciated. Would it be okay if I remove the "decrypt" function, and only set a pull request for the censor function? Or does the censor function not hold any value to the repository, and it's not neccessary to commit?

@amaank404
Copy link
Contributor

As I am not a maintainer, I can only advise yes but please consider mentioning to any of the maintainers. My advise does not help with the merge decision of any PR and is completely up to maintainer

@meg-1 meg-1 requested a review from Kush1101 as a code owner January 29, 2022 12:57
@ghost ghost added the require type hints https://docs.python.org/3/library/typing.html label Jan 29, 2022
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

@@ -0,0 +1,21 @@
def average_welford(values):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide return type hint for the function: average_welford. If the function does not return a value, please provide the type hint as: def function() -> None:

Please provide type hint for the parameter: values

@ghost ghost added the tests are failing Do not merge until tests pass label Jan 30, 2022
@@ -0,0 +1,21 @@
def average_welford(values):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def average_welford(values):
def average_welford(values) -> float:

@ghost ghost removed the require type hints https://docs.python.org/3/library/typing.html label Feb 9, 2022
@meg-1
Copy link
Contributor Author

meg-1 commented Mar 16, 2022

@Kush1101 , hello! could you please review this pull request??

This was referenced Mar 23, 2022
@poyea poyea mentioned this pull request Mar 24, 2022
14 tasks
@poyea
Copy link
Member

poyea commented Mar 24, 2022

Sometimes the CI is not running - just LMK if that's the case

@meg-1
Copy link
Contributor Author

meg-1 commented Mar 26, 2022

Sometimes the CI is not running - just LMK if that's the case

ty, i think that might have been the case. will definitely inform if it happens again!

@ghost ghost removed the tests are failing Do not merge until tests pass label Mar 29, 2022
@meg-1 meg-1 closed this Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants