diff --git a/bit_manipulation/single_bit_manipulation_operations.py b/bit_manipulation/single_bit_manipulation_operations.py index b43ff07b776f..02d77c4270cc 100644 --- a/bit_manipulation/single_bit_manipulation_operations.py +++ b/bit_manipulation/single_bit_manipulation_operations.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """Provide the functionality to manipulate a single bit.""" diff --git a/ciphers/bifid.py b/ciphers/bifid.py index a15b381640aa..3423b5d6b759 100644 --- a/ciphers/bifid.py +++ b/ciphers/bifid.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ The Bifid Cipher uses a Polybius Square to encipher a message in a way that makes it fairly difficult to decipher without knowing the secret. diff --git a/ciphers/decrypt_caesar_with_chi_squared.py b/ciphers/decrypt_caesar_with_chi_squared.py index 10832203e531..2edc8f249549 100644 --- a/ciphers/decrypt_caesar_with_chi_squared.py +++ b/ciphers/decrypt_caesar_with_chi_squared.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 from __future__ import annotations diff --git a/ciphers/morse_code.py b/ciphers/morse_code.py index 0370c26fe4a6..f036de369b3e 100644 --- a/ciphers/morse_code.py +++ b/ciphers/morse_code.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Python program to translate to and from Morse code. diff --git a/ciphers/polybius.py b/ciphers/polybius.py index d83badf4ac0a..1c117ba0ca52 100644 --- a/ciphers/polybius.py +++ b/ciphers/polybius.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ A Polybius Square is a table that allows someone to translate letters into numbers. diff --git a/data_structures/arrays/pairs_with_given_sum.py b/data_structures/arrays/pairs_with_given_sum.py index b27bd78e1e0f..6ea99679e4fc 100644 --- a/data_structures/arrays/pairs_with_given_sum.py +++ b/data_structures/arrays/pairs_with_given_sum.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Given an array of integers and an integer req_sum, find the number of pairs of array elements whose sum is equal to req_sum. diff --git a/data_structures/binary_tree/merge_two_binary_trees.py b/data_structures/binary_tree/merge_two_binary_trees.py index 6bbb30428704..2694823eae15 100644 --- a/data_structures/binary_tree/merge_two_binary_trees.py +++ b/data_structures/binary_tree/merge_two_binary_trees.py @@ -1,4 +1,3 @@ -#!/usr/local/bin/python3 """ Problem Description: Given two binary tree, return the merged tree. The rule for merging is that if two nodes overlap, then put the value sum of diff --git a/data_structures/hashing/double_hash.py b/data_structures/hashing/double_hash.py index 324282cbfd8d..c184b18a967c 100644 --- a/data_structures/hashing/double_hash.py +++ b/data_structures/hashing/double_hash.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ Double hashing is a collision resolving technique in Open Addressed Hash tables. Double hashing uses the idea of applying a second hash function to key when a collision diff --git a/data_structures/hashing/hash_table.py b/data_structures/hashing/hash_table.py index 7fe57068f6a3..9a84de8761d1 100644 --- a/data_structures/hashing/hash_table.py +++ b/data_structures/hashing/hash_table.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 from .number_theory.prime_numbers import next_prime diff --git a/data_structures/hashing/number_theory/prime_numbers.py b/data_structures/hashing/number_theory/prime_numbers.py index 2549a1477b2b..c2661b1f1288 100644 --- a/data_structures/hashing/number_theory/prime_numbers.py +++ b/data_structures/hashing/number_theory/prime_numbers.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ module to operations with prime numbers """ diff --git a/data_structures/hashing/quadratic_probing.py b/data_structures/hashing/quadratic_probing.py index 2f3401ec8918..56f9bc51d9bd 100644 --- a/data_structures/hashing/quadratic_probing.py +++ b/data_structures/hashing/quadratic_probing.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - from .hash_table import HashTable diff --git a/data_structures/heap/randomized_heap.py b/data_structures/heap/randomized_heap.py index 12888c1f4089..ed76f11cd9df 100644 --- a/data_structures/heap/randomized_heap.py +++ b/data_structures/heap/randomized_heap.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - from __future__ import annotations import random diff --git a/data_structures/heap/skew_heap.py b/data_structures/heap/skew_heap.py index 0839db711cb1..903be81a8fab 100644 --- a/data_structures/heap/skew_heap.py +++ b/data_structures/heap/skew_heap.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - from __future__ import annotations from collections.abc import Iterable, Iterator diff --git a/dynamic_programming/climbing_stairs.py b/dynamic_programming/climbing_stairs.py index d6273d025f08..1fc12e91baf1 100644 --- a/dynamic_programming/climbing_stairs.py +++ b/dynamic_programming/climbing_stairs.py @@ -1,6 +1,3 @@ -#!/usr/bin/env python3 - - def climb_stairs(number_of_steps: int) -> int: """ LeetCdoe No.70: Climbing Stairs diff --git a/dynamic_programming/fast_fibonacci.py b/dynamic_programming/fast_fibonacci.py index 9f956ca2f979..536f80950353 100644 --- a/dynamic_programming/fast_fibonacci.py +++ b/dynamic_programming/fast_fibonacci.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ This program calculates the nth Fibonacci number in O(log(n)). It's possible to calculate F(1_000_000) in less than a second. diff --git a/dynamic_programming/optimal_binary_search_tree.py b/dynamic_programming/optimal_binary_search_tree.py index b4f1181ac11c..550a8e95ea3a 100644 --- a/dynamic_programming/optimal_binary_search_tree.py +++ b/dynamic_programming/optimal_binary_search_tree.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - # This Python program implements an optimal binary search tree (abbreviated BST) # building dynamic programming algorithm that delivers O(n^2) performance. # diff --git a/graphs/breadth_first_search.py b/graphs/breadth_first_search.py index cab79be39ed3..5a83add8916c 100644 --- a/graphs/breadth_first_search.py +++ b/graphs/breadth_first_search.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - """Author: OMKAR PATHAK""" from __future__ import annotations diff --git a/graphs/depth_first_search_2.py b/graphs/depth_first_search_2.py index 8fe48b7f2b42..ba11ba0a3144 100644 --- a/graphs/depth_first_search_2.py +++ b/graphs/depth_first_search_2.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - """Author: OMKAR PATHAK""" diff --git a/graphs/graph_adjacency_list.py b/graphs/graph_adjacency_list.py index abc75311cd60..f0f03d0a0dd9 100644 --- a/graphs/graph_adjacency_list.py +++ b/graphs/graph_adjacency_list.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ Author: Vikram Nithyanandam diff --git a/graphs/graph_adjacency_matrix.py b/graphs/graph_adjacency_matrix.py index 059a6aa9ffb5..dea77313eb7a 100644 --- a/graphs/graph_adjacency_matrix.py +++ b/graphs/graph_adjacency_matrix.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ Author: Vikram Nithyanandam diff --git a/graphs/graph_list.py b/graphs/graph_list.py index 6563cbb76132..2b1bedf5a101 100644 --- a/graphs/graph_list.py +++ b/graphs/graph_list.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - # Author: OMKAR PATHAK, Nwachukwu Chidiebere # Use a Python dictionary to construct the graph. diff --git a/machine_learning/logistic_regression.py b/machine_learning/logistic_regression.py index 090af5382185..e7eed65929c0 100644 --- a/machine_learning/logistic_regression.py +++ b/machine_learning/logistic_regression.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - # Logistic Regression from scratch # In[62]: diff --git a/maths/entropy.py b/maths/entropy.py index 76fac4ee717d..d168e342a9f3 100644 --- a/maths/entropy.py +++ b/maths/entropy.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Implementation of entropy of information https://en.wikipedia.org/wiki/Entropy_(information_theory) diff --git a/neural_network/back_propagation_neural_network.py b/neural_network/back_propagation_neural_network.py index 6131a13e945e..e752e7519376 100644 --- a/neural_network/back_propagation_neural_network.py +++ b/neural_network/back_propagation_neural_network.py @@ -1,5 +1,3 @@ -#!/usr/bin/python - """ A Framework of Back Propagation Neural Network(BP) model diff --git a/other/davis_putnam_logemann_loveland.py b/other/davis_putnam_logemann_loveland.py index 3a76f3dfef08..3fc68b5f5591 100644 --- a/other/davis_putnam_logemann_loveland.py +++ b/other/davis_putnam_logemann_loveland.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Davis–Putnam–Logemann–Loveland (DPLL) algorithm is a complete, backtracking-based search algorithm for deciding the satisfiability of propositional logic formulae in diff --git a/other/doomsday.py b/other/doomsday.py index d8fe261156a1..00b0b9ff2b48 100644 --- a/other/doomsday.py +++ b/other/doomsday.py @@ -1,4 +1,3 @@ -#!/bin/python3 # Doomsday algorithm info: https://en.wikipedia.org/wiki/Doomsday_rule DOOMSDAY_LEAP = [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5] diff --git a/other/fischer_yates_shuffle.py b/other/fischer_yates_shuffle.py index 37e11479a4c9..c0067d7b9f40 100644 --- a/other/fischer_yates_shuffle.py +++ b/other/fischer_yates_shuffle.py @@ -1,4 +1,3 @@ -#!/usr/bin/python """ The Fisher–Yates shuffle is an algorithm for generating a random permutation of a finite sequence. diff --git a/pyproject.toml b/pyproject.toml index 65a0754d678c..9811f479ceff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,6 @@ lint.ignore = [ # `ruff rule S101` for a description of that rule "B905", # `zip()` without an explicit `strict=` parameter -- FIX ME "E741", # Ambiguous variable name 'l' -- FIX ME "EM101", # Exception must not use a string literal, assign to variable first - "EXE001", # Shebang is present but file is not executable" -- FIX ME "G004", # Logging statement uses f-string "INP001", # File `x/y/z.py` is part of an implicit namespace package. Add an `__init__.py`. -- FIX ME "PGH003", # Use specific rule codes when ignoring type issues -- FIX ME diff --git a/searches/binary_search.py b/searches/binary_search.py index 2e66b672d5b4..f61800fbd0e3 100644 --- a/searches/binary_search.py +++ b/searches/binary_search.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Pure Python implementations of binary search algorithms diff --git a/sorts/bucket_sort.py b/sorts/bucket_sort.py index 1c1320a58a7d..0db9ec872222 100644 --- a/sorts/bucket_sort.py +++ b/sorts/bucket_sort.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ Illustrate how to implement bucket sort algorithm. diff --git a/sorts/external_sort.py b/sorts/external_sort.py index e6b0d47f79f5..75707d18165f 100644 --- a/sorts/external_sort.py +++ b/sorts/external_sort.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # # Sort large text files in a minimum amount of memory # diff --git a/web_programming/fetch_github_info.py b/web_programming/fetch_github_info.py index 7a4985b68841..82be5c3c4b8c 100644 --- a/web_programming/fetch_github_info.py +++ b/web_programming/fetch_github_info.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ Created by sarathkaul on 14/11/19 Updated by lawric1 on 24/11/20 diff --git a/web_programming/giphy.py b/web_programming/giphy.py index a5c3f8f7493e..a9ad3e6044b4 100644 --- a/web_programming/giphy.py +++ b/web_programming/giphy.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 import requests giphy_api_key = "YOUR API KEY" diff --git a/web_programming/instagram_crawler.py b/web_programming/instagram_crawler.py index 0816cd181051..4ac29bb0c005 100644 --- a/web_programming/instagram_crawler.py +++ b/web_programming/instagram_crawler.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 from __future__ import annotations import json diff --git a/web_programming/world_covid19_stats.py b/web_programming/world_covid19_stats.py index ca81abdc4ce9..1b656d330611 100644 --- a/web_programming/world_covid19_stats.py +++ b/web_programming/world_covid19_stats.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Provide the current worldwide COVID-19 statistics. This data is being scrapped from 'https://www.worldometers.info/coronavirus/'.