Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Fix some antipatterns #654

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion Scripts/API/GitHubSizeChecker/Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def SizeChecker(username, repository):

if __name__ == "__main__":
choice = "y"
while choice.lower() == "y" or choice.lower() == "yes":
while choice.lower() in ["y", "yes"]:
username = input("Enter a GitHub username: ")
repository = input("Enter the repository name: ")
SizeChecker(username, repository)
Expand Down
30 changes: 16 additions & 14 deletions Scripts/Miscellaneous/Keylogger/keylogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@ def OnKeyPress(event):

# reduce load on CPU when special key is pressed
if (
event.Key == "Left"
or event.Key == "Right"
or event.Key == "Up"
or event.Key == "Tab"
or event.Key == "Down"
or event.Key == "space"
or event.Key == "Shift_R"
or event.Key == "Return"
or event.Key == "Shift_L"
or event.Key == "Super_L"
or event.Key == "Super_R"
or event.Key == "Control_R"
or event.Key == "Control_L"
or event.Key == "BackSpace"
event.Key in [
"Left",
"Right",
"Up",
"Tab",
"Down",
"space",
"Shift_R",
"Return",
"Shift_L",
"Super_L",
"Super_R",
"Control_R",
"Control_L",
"BackSpace"
]
):
sleep(1)

Expand Down
6 changes: 1 addition & 5 deletions Scripts/Web_Scrappers/GSoC-Scraper/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ def __lt__(self, other):


def language_filter(tech_stack_list):
for tech_stack in tech_stack_list:
if language in tech_stack:
return True
return False

return any((language in tech_stack) for tech_stack in tech_stack_list)

def check_previous():
for year in range(2016, 2020):
Expand Down
3 changes: 1 addition & 2 deletions Scripts/Web_Scrappers/linkedin_posts_scrapping/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
cond = True
time.sleep(2)
if (
driver.title == "LinkedIn Login, Sign in | LinkedIn"
or driver.title == "LinkedIn: Log In or Sign Up"
driver.title in ["LinkedIn Login, Sign in | LinkedIn", "LinkedIn: Log In or Sign Up"]
):
print("Invalid Username or Password")
print("The program will now exit")
Expand Down