All Algorithms implemented in Python
1106 matches across 16 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | searches/interpolation_search.py | 7 | Searches for an item in a sorted collection by interpolation search algorithm. Args: sorted_collection |
| HIGH | searches/interpolation_search.py | 79 | Pure implementation of interpolation search algorithm in Python by recursion Be careful collection must be ascending |
| HIGH | data_structures/binary_tree/floor_and_ceiling.py | 37 | Find the floor and ceiling values for a given key in a Binary Search Tree (BST). Args: root: The root |
| HIGH | data_structures/linked_list/is_palindrome.py | 13 | Check if a linked list is a palindrome. Args: head: The head of the linked list. Returns: |
| HIGH | data_structures/linked_list/is_palindrome.py | 69 | Check if a linked list is a palindrome using a stack. Args: head (ListNode): The head of the linked li |
| HIGH | data_structures/linked_list/is_palindrome.py | 125 | Check if a linked list is a palindrome using a dictionary. Args: head (ListNode): The head of the link |
| HIGH | data_structures/linked_list/circular_linked_list.py | 108 | Delete and return the data of the node at the nth pos in Circular Linked List. Args: index |
| HIGH | data_structures/linked_list/swap_nodes.py | 44 | Add a new node with the given data to the beginning of the Linked List. Args: new_data (An |
| HIGH | data_structures/linked_list/swap_nodes.py | 68 | Swap the positions of two nodes in the Linked List based on their data values. Args: node_ |
| HIGH | data_structures/arrays/median_two_array.py | 7 | Find the median of two arrays. Args: nums1: The first array. nums2: The second array. Ret |
| HIGH | data_structures/arrays/kth_largest_element.py | 9 | Partitions list based on the pivot element. This function rearranges the elements in the input list 'elements' |
| HIGH | data_structures/arrays/kth_largest_element.py | 45 | Finds the kth largest element in a list. Should deliver similar results to: ```python def kth_largest_e |
| HIGH | data_structures/arrays/find_triplets_with_0_sum.py | 5 | Given a list of integers, return elements a, b, c such that a + b + c = 0. Args: nums: list of integers |
| HIGH | data_structures/arrays/find_triplets_with_0_sum.py | 28 | Function for finding the triplets with a given sum in the array using hashing. Given a list of integers, retur |
| HIGH | data_structures/arrays/rotate_array.py | 2 | Rotates a list to the right by steps positions. Parameters: arr (List[int]): The list of integers to rotat |
| HIGH | data_structures/arrays/rotate_array.py | 33 | Reverses a portion of the list in place from index start to end. Parameters: start (int): Star |
| HIGH | data_structures/arrays/equilibrium_index_in_array.py | 24 | Find the equilibrium index of an array. Args: arr (list[int]): The input array of integers. Retur |
| HIGH | data_structures/arrays/index_2d_array_in_1d.py | 63 | Retrieves the value of the one-dimensional index from a two-dimensional array. Args: array: A 2D array |
| HIGH | data_structures/arrays/product_sum.py | 24 | Recursively calculates the product sum of an array. The product sum of an array is defined as the sum of its e |
| HIGH | data_structures/arrays/product_sum.py | 68 | Calculates the product sum of an array. Args: array (List[Union[int, List]]): The array of integers an |
| HIGH | strings/strip.py | 2 | Remove leading and trailing characters (whitespace by default) from a string. Args: user_string (str): |
| HIGH | computer_vision/haralick_descriptors.py | 28 | Normalizes image in Numpy 2D array format, between ranges 0-cap, as to fit uint8 type. Args: image |
| HIGH | computer_vision/haralick_descriptors.py | 53 | Normalizes a 1D array, between ranges 0-cap. Args: array: List containing values to be normalized between c |
| HIGH | computer_vision/haralick_descriptors.py | 107 | Simple image transformation using one of two available filter functions: Erosion and Dilation. Args: |
| HIGH | scheduling/job_sequencing_with_deadline.py | 2 | Function to find the maximum profit by doing jobs in a given time frame Args: jobs [list]: A list of t |
| HIGH | machine_learning/loss_functions.py | 442 | Calculate the Mean Absolute Percentage Error between y_true and y_pred. Mean Absolute Percentage Error calcula |
| HIGH | machine_learning/loss_functions.py | 577 | Calculate the Smooth L1 Loss between y_true and y_pred. The Smooth L1 Loss is less sensitive to outliers than |
| HIGH | machine_learning/mfcc.py | 77 | Calculate Mel Frequency Cepstral Coefficients (MFCCs) from an audio signal. Args: audio: The input aud |
| HIGH | machine_learning/mfcc.py | 153 | Normalize an audio signal by scaling it to have values between -1 and 1. Args: audio: The input audio |
| HIGH | machine_learning/mfcc.py | 180 | Split an audio signal into overlapping frames. Args: audio: The input audio signal. sample_rat |
| HIGH | machine_learning/mfcc.py | 219 | Calculate the Fast Fourier Transform (FFT) of windowed audio data. Args: audio_windowed: The windowed |
| HIGH | machine_learning/mfcc.py | 255 | Calculate the power of the audio signal from its FFT. Args: audio_fft: The FFT of the audio signal. |
| HIGH | machine_learning/mfcc.py | 275 | Convert a frequency in Hertz to the mel scale. Args: freq: The frequency in Hertz. Returns: |
| HIGH | machine_learning/mfcc.py | 293 | Convert a frequency in the mel scale to Hertz. Args: mels: The frequency in mel scale. Returns: |
| HIGH | machine_learning/mfcc.py | 313 | Create a Mel-spaced filter bank for audio processing. Args: sample_rate: The sample rate of the audio. |
| HIGH | machine_learning/mfcc.py | 352 | Generate filters for audio processing. Args: filter_points: A list of filter points. ftt_size: |
| HIGH | machine_learning/mfcc.py | 390 | Calculate the filter points and frequencies for mel frequency filters. Args: sample_rate: The sample r |
| HIGH | machine_learning/mfcc.py | 431 | Compute the Discrete Cosine Transform (DCT) basis matrix. Args: dct_filter_num: The number of DCT filt |
| HIGH | other/sliding_window_maximum.py | 5 | Return a list containing the maximum of each sliding window of size window_size. This implementation uses a mo |
| HIGH | dynamic_programming/matrix_chain_multiplication.py | 55 | Find the minimum number of multiplcations required to multiply the chain of matrices Args: `arr`: The |
| HIGH | dynamic_programming/narcissistic_number.py | 28 | Find all narcissistic numbers up to the given limit using dynamic programming. This function uses memoization |
| HIGH | dynamic_programming/iterating_through_submasks.py | 13 | Args: mask : number which shows mask ( always integer > 0, zero does not have any submasks ) |
| HIGH | dynamic_programming/climbing_stairs.py | 5 | LeetCdoe No.70: Climbing Stairs Distinct ways to climb a number_of_steps staircase where each time you can eith |
| HIGH | neural_network/input_data.py | 48 | Extract the images into a 4D uint8 numpy array [index, y, x, depth]. Args: f: A file object that can be passe |
| HIGH | neural_network/input_data.py | 87 | Extract the labels into a 1D uint8 numpy array [index]. Args: f: A file object that can be passed into a gzip |
| HIGH | …rk/activation_functions/leaky_rectified_linear_unit.py | 13 | Implements the LeakyReLU activation function. Parameters: vector (np.ndarray): The input a |
| HIGH | …ork/activation_functions/gaussian_error_linear_unit.py | 29 | Implements the Gaussian Error Linear Unit (GELU) function Parameters: vector (np.ndarray): A numpy ar |
| HIGH | neural_network/activation_functions/mish.py | 15 | Implements the Mish activation function. Parameters: vector (np.ndarray): The input array |
| HIGH | neural_network/activation_functions/swish.py | 34 | Implements the Sigmoid Linear Unit (SiLU) or swish function Parameters: vector (np.ndarray): A numpy |
| HIGH | neural_network/activation_functions/swish.py | 54 | Parameters: vector (np.ndarray): A numpy array consisting of real values trainable_parameter: Use |
| HIGH | neural_network/activation_functions/squareplus.py | 13 | Implements the SquarePlus activation function. Parameters: vector (np.ndarray): The input array for th |
| HIGH | neural_network/activation_functions/softplus.py | 13 | Implements the Softplus activation function. Parameters: vector (np.ndarray): The input array for the |
| HIGH | ciphers/diffie.py | 5 | Find a primitive root modulo modulus, if one exists. Args: modulus : The modulus for which to find a p |
| HIGH | maths/binary_multiplication.py | 24 | Multiply 'a' and 'b' using bitwise multiplication. Parameters: a (int): The first number. b (int): The |
| HIGH | maths/binary_multiplication.py | 62 | Calculate (a * b) % c using binary multiplication and modular arithmetic. Parameters: a (int): The first n |
| HIGH | maths/tanh.py | 17 | Implements the tanh function Parameters: vector: np.ndarray Returns: |
| HIGH | maths/perfect_number.py | 16 | Check if a number is a perfect number. A perfect number is a positive integer that is equal to the sum of its |
| HIGH | maths/josephus_problem.py | 19 | Solve the Josephus problem for num_people and a step_size recursively. Args: num_people: A positive in |
| HIGH | maths/josephus_problem.py | 81 | Find the winner of the Josephus problem for num_people and a step_size. Args: num_people (int): Number |
| HIGH | maths/josephus_problem.py | 101 | Solve the Josephus problem for num_people and a step_size iteratively. Args: num_people (int): The num |
| 32 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | data_structures/stacks/dijkstras_two_stack_algorithm.py | 61 | operand_stack.push(int(i)) |
| HIGH | data_structures/stacks/dijkstras_two_stack_algorithm.py | 64 | operator_stack.push(i) |
| HIGH | data_structures/stacks/dijkstras_two_stack_algorithm.py | 75 | operand_stack.push(total) |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 28 | >>> stack.push(5) |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 29 | >>> stack.push(9) |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 30 | >>> stack.push('python') |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 35 | >>> stack.push('algorithms') |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 62 | >>> stack.push("c") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 63 | >>> stack.push("b") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 64 | >>> stack.push("a") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 75 | >>> stack.push("c") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 76 | >>> stack.push("b") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 77 | >>> stack.push("a") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 88 | >>> stack.push(1) |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 97 | >>> stack.push("Python") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 98 | >>> stack.push("Java") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 99 | >>> stack.push("C") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 115 | >>> stack.push("c") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 116 | >>> stack.push("b") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 117 | >>> stack.push("a") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 135 | >>> stack.push("Java") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 136 | >>> stack.push("C") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 137 | >>> stack.push("Python") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 150 | >>> stack.push("Java") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 151 | >>> stack.push("C") |
| HIGH | data_structures/stacks/stack_with_singly_linked_list.py | 152 | >>> stack.push("Python") |
| HIGH | data_structures/stacks/stack_with_doubly_linked_list.py | 26 | ... stack.push(i) |
| HIGH | data_structures/stacks/stack_with_doubly_linked_list.py | 100 | stack.push(4) |
| HIGH | data_structures/stacks/stack_with_doubly_linked_list.py | 103 | stack.push(5) |
| HIGH | data_structures/stacks/stack_with_doubly_linked_list.py | 106 | stack.push(6) |
| HIGH | data_structures/stacks/stack_with_doubly_linked_list.py | 109 | stack.push(7) |
| HIGH | data_structures/stacks/balanced_parentheses.py | 21 | stack.push(bracket) |
| HIGH | data_structures/stacks/stack.py | 40 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 41 | >>> S.push(20) |
| HIGH | data_structures/stacks/stack.py | 46 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 47 | >>> S.push(20) |
| HIGH | data_structures/stacks/stack.py | 62 | >>> S.push(-5) |
| HIGH | data_structures/stacks/stack.py | 63 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 81 | >>> S.push(-5) |
| HIGH | data_structures/stacks/stack.py | 82 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 104 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 117 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 132 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 137 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 138 | >>> S.push(20) |
| HIGH | data_structures/stacks/stack.py | 149 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 154 | >>> S.push(10) |
| HIGH | data_structures/stacks/stack.py | 185 | stack.push(i) |
| HIGH | data_structures/stacks/stack.py | 194 | stack.push(100) |
| HIGH | data_structures/stacks/stack.py | 198 | stack.push(200) |
| HIGH | data_structures/stacks/infix_to_postfix_conversion.py | 74 | stack.push(char) |
| HIGH | data_structures/stacks/infix_to_postfix_conversion.py | 82 | stack.push(char) |
| HIGH | data_structures/stacks/infix_to_postfix_conversion.py | 89 | stack.push(char) |
| HIGH | data_structures/stacks/infix_to_postfix_conversion.py | 96 | stack.push(char) |
| HIGH | data_structures/stacks/stack_using_two_queues.py | 13 | >>> stack.push(1) |
| HIGH | data_structures/stacks/stack_using_two_queues.py | 14 | >>> stack.push(2) |
| HIGH | data_structures/stacks/stack_using_two_queues.py | 15 | >>> stack.push(3) |
| HIGH | data_structures/stacks/stack_using_two_queues.py | 67 | stack.push(element) |
| HIGH | data_structures/binary_tree/avl_tree.py | 301 | q.push(self.root) |
| HIGH | data_structures/binary_tree/avl_tree.py | 312 | q.push(None) |
| 51 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | data_structures/hashing/number_theory/prime_numbers.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. >>> i |
| HIGH | project_euler/problem_037/sol1.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. >>> i |
| HIGH | project_euler/problem_041/sol1.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. >>> i |
| HIGH | project_euler/problem_046/sol1.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. >>> i |
| HIGH | project_euler/problem_049/sol1.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. >>> i |
| HIGH | project_euler/problem_058/sol1.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. >>> i |
| HIGH | project_euler/problem_007/sol3.py | 0 | project euler problem 7: https://projecteuler.net/problem=7 10001st prime by listing the first six prime numbers: 2, 3, |
| HIGH | project_euler/problem_007/sol2.py | 0 | project euler problem 7: https://projecteuler.net/problem=7 10001st prime by listing the first six prime numbers: 2, 3, |
| HIGH | project_euler/problem_007/sol1.py | 0 | project euler problem 7: https://projecteuler.net/problem=7 10001st prime by listing the first six prime numbers: 2, 3, |
| HIGH | project_euler/problem_007/sol3.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. retur |
| HIGH | project_euler/problem_007/sol2.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. retur |
| HIGH | project_euler/problem_007/sol1.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. retur |
| HIGH | project_euler/problem_003/sol1.py | 0 | checks to see if a number is a prime in o(sqrt(n)). a number is prime if it has exactly two factors: 1 and itself. retur |
| HIGH | project_euler/problem_009/sol3.py | 0 | project euler problem 9: https://projecteuler.net/problem=9 special pythagorean triplet a pythagorean triplet is a set o |
| HIGH | project_euler/problem_009/sol2.py | 0 | project euler problem 9: https://projecteuler.net/problem=9 special pythagorean triplet a pythagorean triplet is a set o |
| HIGH | project_euler/problem_009/sol1.py | 0 | project euler problem 9: https://projecteuler.net/problem=9 special pythagorean triplet a pythagorean triplet is a set o |
| HIGH | project_euler/problem_008/sol3.py | 0 | project euler problem 8: https://projecteuler.net/problem=8 largest product in a series the four adjacent digits in the |
| HIGH | project_euler/problem_008/sol2.py | 0 | project euler problem 8: https://projecteuler.net/problem=8 largest product in a series the four adjacent digits in the |
| HIGH | project_euler/problem_008/sol1.py | 0 | project euler problem 8: https://projecteuler.net/problem=8 largest product in a series the four adjacent digits in the |
| HIGH | project_euler/problem_006/sol3.py | 0 | project euler problem 6: https://projecteuler.net/problem=6 sum square difference the sum of the squares of the first te |
| HIGH | project_euler/problem_006/sol2.py | 0 | project euler problem 6: https://projecteuler.net/problem=6 sum square difference the sum of the squares of the first te |
| HIGH | project_euler/problem_006/sol1.py | 0 | project euler problem 6: https://projecteuler.net/problem=6 sum square difference the sum of the squares of the first te |
| HIGH | project_euler/problem_006/sol4.py | 0 | project euler problem 6: https://projecteuler.net/problem=6 sum square difference the sum of the squares of the first te |
| HIGH | project_euler/problem_006/sol3.py | 0 | returns the difference between the sum of the squares of the first n natural numbers and the square of the sum. >>> solu |
| HIGH | project_euler/problem_006/sol2.py | 0 | returns the difference between the sum of the squares of the first n natural numbers and the square of the sum. >>> solu |
| HIGH | project_euler/problem_006/sol1.py | 0 | returns the difference between the sum of the squares of the first n natural numbers and the square of the sum. >>> solu |
| HIGH | project_euler/problem_006/sol4.py | 0 | returns the difference between the sum of the squares of the first n natural numbers and the square of the sum. >>> solu |
| HIGH | project_euler/problem_001/sol7.py | 0 | project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo |
| HIGH | project_euler/problem_001/sol3.py | 0 | project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo |
| HIGH | project_euler/problem_001/sol2.py | 0 | project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo |
| HIGH | project_euler/problem_001/sol6.py | 0 | project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo |
| HIGH | project_euler/problem_001/sol1.py | 0 | project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo |
| HIGH | project_euler/problem_001/sol5.py | 0 | project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo |
| HIGH | project_euler/problem_001/sol4.py | 0 | project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo |
| HIGH | project_euler/problem_001/sol7.py | 0 | returns the sum of all the multiples of 3 or 5 below n. >>> solution(3) 0 >>> solution(4) 3 >>> solution(10) 23 >>> solu |
| HIGH | project_euler/problem_001/sol2.py | 0 | returns the sum of all the multiples of 3 or 5 below n. >>> solution(3) 0 >>> solution(4) 3 >>> solution(10) 23 >>> solu |
| HIGH | project_euler/problem_001/sol6.py | 0 | returns the sum of all the multiples of 3 or 5 below n. >>> solution(3) 0 >>> solution(4) 3 >>> solution(10) 23 >>> solu |
| HIGH | project_euler/problem_001/sol4.py | 0 | returns the sum of all the multiples of 3 or 5 below n. >>> solution(3) 0 >>> solution(4) 3 >>> solution(10) 23 >>> solu |
| HIGH | project_euler/problem_025/sol3.py | 0 | the fibonacci sequence is defined by the recurrence relation: fn = fn-1 + fn-2, where f1 = 1 and f2 = 1. hence the first |
| HIGH | project_euler/problem_025/sol2.py | 0 | the fibonacci sequence is defined by the recurrence relation: fn = fn-1 + fn-2, where f1 = 1 and f2 = 1. hence the first |
| HIGH | project_euler/problem_025/sol1.py | 0 | the fibonacci sequence is defined by the recurrence relation: fn = fn-1 + fn-2, where f1 = 1 and f2 = 1. hence the first |
| HIGH | project_euler/problem_025/sol3.py | 0 | returns the index of the first term in the fibonacci sequence to contain n digits. >>> solution(1000) 4782 >>> solution( |
| HIGH | project_euler/problem_025/sol2.py | 0 | returns the index of the first term in the fibonacci sequence to contain n digits. >>> solution(1000) 4782 >>> solution( |
| HIGH | project_euler/problem_025/sol1.py | 0 | returns the index of the first term in the fibonacci sequence to contain n digits. >>> solution(1000) 4782 >>> solution( |
| HIGH | project_euler/problem_003/sol3.py | 0 | project euler problem 3: https://projecteuler.net/problem=3 largest prime factor the prime factors of 13195 are 5, 7, 13 |
| HIGH | project_euler/problem_003/sol2.py | 0 | project euler problem 3: https://projecteuler.net/problem=3 largest prime factor the prime factors of 13195 are 5, 7, 13 |
| HIGH | project_euler/problem_003/sol1.py | 0 | project euler problem 3: https://projecteuler.net/problem=3 largest prime factor the prime factors of 13195 are 5, 7, 13 |
| HIGH | project_euler/problem_003/sol3.py | 0 | returns the largest prime factor of a given number n. >>> solution(13195) 29 >>> solution(10) 5 >>> solution(17) 17 >>> |
| HIGH | project_euler/problem_003/sol2.py | 0 | returns the largest prime factor of a given number n. >>> solution(13195) 29 >>> solution(10) 5 >>> solution(17) 17 >>> |
| HIGH | project_euler/problem_003/sol1.py | 0 | returns the largest prime factor of a given number n. >>> solution(13195) 29 >>> solution(10) 5 >>> solution(17) 17 >>> |
| HIGH | project_euler/problem_002/sol3.py | 0 | project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen |
| HIGH | project_euler/problem_002/sol2.py | 0 | project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen |
| HIGH | project_euler/problem_002/sol1.py | 0 | project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen |
| HIGH | project_euler/problem_002/sol5.py | 0 | project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen |
| HIGH | project_euler/problem_002/sol4.py | 0 | project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen |
| HIGH | project_euler/problem_002/sol3.py | 0 | returns the sum of all even fibonacci sequence elements that are lower or equal to n. >>> solution(10) 10 >>> solution(1 |
| HIGH | project_euler/problem_002/sol2.py | 0 | returns the sum of all even fibonacci sequence elements that are lower or equal to n. >>> solution(10) 10 >>> solution(1 |
| HIGH | project_euler/problem_002/sol1.py | 0 | returns the sum of all even fibonacci sequence elements that are lower or equal to n. >>> solution(10) 10 >>> solution(1 |
| HIGH | project_euler/problem_002/sol5.py | 0 | returns the sum of all even fibonacci sequence elements that are lower or equal to n. >>> solution(10) 10 >>> solution(1 |
| HIGH | project_euler/problem_020/sol3.py | 0 | problem 20: https://projecteuler.net/problem=20 n! means n x (n - 1) x ... x 3 x 2 x 1 for example, 10! = 10 x 9 x ... x |
| 15 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | searches/simple_binary_search.py | 11 | |
| LOW | searches/double_linear_search.py | 1 | |
| LOW | searches/exponential_search.py | 16 | |
| LOW | searches/ternary_search.py | 10 | |
| LOW | searches/binary_tree_traversal.py | 5 | |
| LOW | data_structures/kd_tree/kd_node.py | 9 | |
| LOW | data_structures/stacks/next_greater_element.py | 1 | |
| LOW | data_structures/stacks/stack_with_singly_linked_list.py | 3 | |
| LOW | data_structures/stacks/stack_with_doubly_linked_list.py | 4 | |
| LOW | data_structures/stacks/stack.py | 1 | |
| LOW | data_structures/stacks/stack_using_two_queues.py | 1 | |
| LOW | …ctures/binary_tree/flatten_binarytree_to_linkedlist.py | 14 | |
| LOW | data_structures/binary_tree/wavelet_tree.py | 11 | |
| LOW | data_structures/binary_tree/merge_two_binary_trees.py | 9 | |
| LOW | data_structures/binary_tree/avl_tree.py | 9 | |
| LOW | data_structures/binary_tree/treap.py | 1 | |
| LOW | …a_structures/binary_tree/non_recursive_segment_tree.py | 39 | |
| LOW | data_structures/binary_tree/mirror_binary_tree.py | 7 | |
| LOW | data_structures/binary_tree/is_sum_tree.py | 7 | |
| LOW | data_structures/binary_tree/binary_search_tree.py | 92 | |
| LOW | data_structures/binary_tree/binary_tree_traversals.py | 1 | |
| LOW | data_structures/binary_tree/red_black_tree.py | 1 | |
| LOW | data_structures/binary_tree/floor_and_ceiling.py | 13 | |
| LOW | data_structures/binary_tree/binary_tree_path_sum.py | 10 | |
| LOW | data_structures/binary_tree/symmetric_tree.py | 8 | |
| LOW | …ta_structures/binary_tree/diff_views_of_binary_tree.py | 9 | |
| LOW | data_structures/binary_tree/distribute_coins.py | 40 | |
| LOW | data_structures/binary_tree/basic_binary_tree.py | 1 | |
| LOW | data_structures/binary_tree/lowest_common_ancestor.py | 4 | |
| LOW | data_structures/binary_tree/diameter_of_binary_tree.py | 6 | |
| LOW | data_structures/binary_tree/lazy_segment_tree.py | 1 | |
| LOW | …tures/binary_tree/serialize_deserialize_binary_tree.py | 1 | |
| LOW | …structures/binary_tree/binary_search_tree_recursive.py | 11 | |
| LOW | data_structures/binary_tree/maximum_sum_bst.py | 1 | |
| LOW | data_structures/binary_tree/binary_tree_node_sum.py | 11 | |
| LOW | data_structures/binary_tree/is_sorted.py | 17 | |
| LOW | data_structures/linked_list/merge_two_lists.py | 5 | |
| LOW | data_structures/linked_list/is_palindrome.py | 1 | |
| LOW | data_structures/linked_list/__init__.py | 9 | |
| LOW | …tructures/linked_list/middle_element_of_linked_list.py | 1 | |
| LOW | data_structures/linked_list/rotate_to_the_right.py | 1 | |
| LOW | data_structures/linked_list/skip_list.py | 6 | |
| LOW | data_structures/linked_list/circular_linked_list.py | 1 | |
| LOW | data_structures/linked_list/swap_nodes.py | 1 | |
| LOW | data_structures/linked_list/reverse_k_group.py | 1 | |
| LOW | data_structures/linked_list/print_reverse.py | 1 | |
| LOW | data_structures/linked_list/has_loop.py | 1 | |
| LOW | data_structures/linked_list/singly_linked_list.py | 1 | |
| LOW | data_structures/heap/heap.py | 1 | |
| LOW | data_structures/heap/skew_heap.py | 3 | |
| LOW | data_structures/heap/randomized_heap.py | 3 | |
| LOW | data_structures/queues/linked_queue.py | 3 | |
| LOW | data_structures/queues/double_ended_queue.py | 5 | |
| LOW | data_structures/queues/circular_queue_linked_list.py | 4 | |
| LOW | data_structures/suffix_tree/suffix_tree_node.py | 9 | |
| LOW | hashes/luhn.py | 3 | |
| LOW | strings/anagrams.py | 1 | |
| LOW | strings/autocomplete_using_trie.py | 1 | |
| LOW | strings/knuth_morris_pratt.py | 1 | |
| LOW | strings/aho_corasick.py | 1 | |
| 189 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | searches/binary_search.py | 245 | def binary_search_with_duplicates(sorted_collection: list[int], item: int) -> list[int]: |
| LOW | searches/binary_search.py | 320 | def binary_search_by_recursion( |
| LOW | searches/exponential_search.py | 19 | def binary_search_by_recursion( |
| LOW | searches/interpolation_search.py | 76 | def interpolation_search_by_recursion( |
| LOW | data_structures/kd_tree/tests/test_kdtree.py | 61 | def test_nearest_neighbour_search(): |
| LOW | data_structures/stacks/next_greater_element.py | 7 | def next_greatest_element_slow(arr: list[float]) -> list[float]: |
| LOW | data_structures/stacks/next_greater_element.py | 40 | def next_greatest_element_fast(arr: list[float]) -> list[float]: |
| LOW | data_structures/stacks/dijkstras_two_stack_algorithm.py | 40 | def dijkstras_two_stack_algorithm(equation: str) -> int: |
| LOW | data_structures/binary_tree/binary_tree_traversals.py | 119 | def get_nodes_from_left_to_right(root: Node | None, level: int) -> Generator[int]: |
| LOW | data_structures/binary_tree/binary_tree_traversals.py | 141 | def get_nodes_from_right_to_left(root: Node | None, level: int) -> Generator[int]: |
| LOW | …ta_structures/binary_tree/diff_views_of_binary_tree.py | 30 | def binary_tree_right_side_view(root: TreeNode) -> list[int]: |
| LOW | …ta_structures/binary_tree/diff_views_of_binary_tree.py | 70 | def binary_tree_left_side_view(root: TreeNode) -> list[int]: |
| LOW | …ta_structures/binary_tree/diff_views_of_binary_tree.py | 110 | def binary_tree_top_side_view(root: TreeNode) -> list[int]: |
| LOW | …ta_structures/binary_tree/diff_views_of_binary_tree.py | 159 | def binary_tree_bottom_side_view(root: TreeNode) -> list[int]: |
| LOW | …structures/binary_tree/binary_search_tree_recursive.py | 546 | def binary_search_tree_example() -> None: |
| LOW | data_structures/linked_list/skip_list.py | 269 | def test_insert_overrides_existing_value(): |
| LOW | data_structures/linked_list/skip_list.py | 297 | def test_searching_empty_list_returns_none(): |
| LOW | data_structures/linked_list/skip_list.py | 318 | def test_deleting_item_from_empty_list_do_nothing(): |
| LOW | data_structures/linked_list/skip_list.py | 325 | def test_deleted_items_are_not_founded_by_find_method(): |
| LOW | data_structures/linked_list/skip_list.py | 340 | def test_delete_removes_only_given_key(): |
| LOW | data_structures/linked_list/skip_list.py | 373 | def test_delete_doesnt_leave_dead_nodes(): |
| LOW | data_structures/linked_list/skip_list.py | 391 | def test_iter_always_yields_sorted_values(): |
| LOW | data_structures/linked_list/circular_linked_list.py | 151 | def test_circular_linked_list() -> None: |
| LOW | data_structures/hashing/tests/test_hash_map.py | 77 | def test_hash_map_is_the_same_as_dict(operations): |
| LOW | data_structures/hashing/tests/test_hash_map.py | 90 | def test_no_new_methods_was_added_to_api(): |
| LOW | data_structures/arrays/median_two_array.py | 6 | def find_median_sorted_arrays(nums1: list[int], nums2: list[int]) -> float: |
| LOW | data_structures/queues/circular_queue_linked_list.py | 142 | def check_can_perform_operation(self) -> None: |
| LOW | data_structures/suffix_tree/tests/test_suffix_tree.py | 20 | def test_search_existing_patterns(self) -> None: |
| LOW | data_structures/suffix_tree/tests/test_suffix_tree.py | 29 | def test_search_non_existing_patterns(self) -> None: |
| LOW | data_structures/suffix_tree/tests/test_suffix_tree.py | 38 | def test_search_empty_pattern(self) -> None: |
| LOW | strings/damerau_levenshtein_distance.py | 11 | def damerau_levenshtein_distance(first_string: str, second_string: str) -> int: |
| LOW | strings/can_string_be_rearranged_as_palindrome.py | 11 | def can_string_be_rearranged_as_palindrome_counter( |
| LOW | strings/can_string_be_rearranged_as_palindrome.py | 29 | def can_string_be_rearranged_as_palindrome(input_str: str = "") -> bool: |
| LOW | strings/is_srilankan_phone_number.py | 4 | def is_sri_lankan_phone_number(phone: str) -> bool: |
| LOW | strings/alternative_string_arrange.py | 1 | def alternative_string_arrange(first_str: str, second_str: str) -> str: |
| LOW | strings/levenshtein_distance.py | 54 | def levenshtein_distance_optimized(first_word: str, second_word: str) -> int: |
| LOW | strings/levenshtein_distance.py | 99 | def benchmark_levenshtein_distance(func: Callable) -> None: |
| LOW | strings/credit_card_validator.py | 55 | def validate_credit_card_number(credit_card_number: str) -> bool: |
| LOW | bit_manipulation/find_previous_power_of_two.py | 1 | def find_previous_power_of_two(number: int) -> int: |
| LOW | bit_manipulation/bitwise_addition_recursive.py | 7 | def bitwise_addition_recursive(number: int, other_number: int) -> int: |
| LOW | bit_manipulation/count_number_of_one_bits.py | 4 | def get_set_bits_count_using_brian_kernighans_algorithm(number: int) -> int: |
| LOW | bit_manipulation/count_number_of_one_bits.py | 33 | def get_set_bits_count_using_modulo_operator(number: int) -> int: |
| LOW | bit_manipulation/gray_code_sequence.py | 50 | def gray_code_sequence_string(bit_count: int) -> list: |
| LOW | bit_manipulation/binary_count_trailing_zeros.py | 4 | def binary_count_trailing_zeros(a: int) -> int: |
| LOW | bit_manipulation/largest_pow_of_two_le_num.py | 22 | def largest_pow_of_two_le_num(number: int) -> int: |
| LOW | bit_manipulation/index_of_rightmost_set_bit.py | 4 | def get_index_of_rightmost_set_bit(number: int) -> int: |
| LOW | bit_manipulation/highest_set_bit.py | 1 | def get_highest_set_bit_position(number: int) -> int: |
| LOW | data_compression/peak_signal_to_noise_ratio.py | 17 | def peak_signal_to_noise_ratio(original: float, contrast: float) -> float: |
| LOW | project_euler/problem_203/sol1.py | 34 | def get_pascal_triangle_unique_coefficients(depth: int) -> set[int]: |
| LOW | project_euler/problem_054/test_poker_hand.py | 161 | def test_hand_is_five_high_straight(hand, expected, card_values): |
| LOW | project_euler/problem_054/test_poker_hand.py | 196 | def test_custom_sort_five_high_straight(): |
| LOW | project_euler/problem_054/test_poker_hand.py | 203 | def test_multiple_calls_five_high_straight(): |
| LOW | project_euler/problem_205/sol1.py | 17 | def total_frequency_distribution(sides_number: int, dice_number: int) -> list[int]: |
| LOW | project_euler/problem_064/sol1.py | 19 | def continuous_fraction_period(n: int) -> int: |
| LOW | project_euler/problem_187/sol1.py | 17 | def slow_calculate_prime_numbers(max_number: int) -> list[int]: |
| LOW | project_euler/problem_587/sol1.py | 32 | def circle_bottom_arc_integral(point: float) -> float: |
| LOW | project_euler/problem_012/sol2.py | 26 | def triangle_number_generator(): |
| LOW | financial/straight_line_depreciation.py | 32 | def straight_line_depreciation( |
| LOW | financial/exponential_moving_average.py | 15 | def exponential_moving_average( |
| LOW | financial/equated_monthly_installments.py | 11 | def equated_monthly_installments( |
| 184 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | searches/simulated_annealing.py | 9 | |
| LOW | searches/hill_climbing.py | 86 | |
| LOW | searches/ternary_search.py | 62 | |
| LOW | searches/ternary_search.py | 112 | |
| LOW | searches/tabu_search.py | 127 | |
| LOW | searches/tabu_search.py | 188 | |
| LOW | searches/interpolation_search.py | 6 | |
| LOW | searches/fibonacci_search.py | 58 | |
| LOW | searches/median_of_medians.py | 61 | |
| LOW | data_structures/stacks/next_greater_element.py | 71 | |
| LOW | data_structures/stacks/dijkstras_two_stack_algorithm.py | 40 | |
| LOW | data_structures/stacks/infix_to_prefix_conversion.py | 18 | |
| LOW | data_structures/stacks/infix_to_postfix_conversion.py | 45 | |
| LOW | data_structures/binary_tree/avl_tree.py | 198 | |
| LOW | data_structures/binary_tree/avl_tree.py | 296 | |
| LOW | data_structures/binary_tree/binary_search_tree.py | 170 | |
| LOW | data_structures/binary_tree/red_black_tree.py | 112 | |
| LOW | data_structures/binary_tree/red_black_tree.py | 150 | |
| LOW | data_structures/binary_tree/red_black_tree.py | 367 | |
| LOW | data_structures/binary_tree/red_black_tree.py | 384 | |
| LOW | data_structures/linked_list/is_palindrome.py | 124 | |
| LOW | data_structures/linked_list/skip_list.py | 163 | |
| LOW | data_structures/linked_list/doubly_linked_list.py | 62 | |
| LOW | data_structures/linked_list/doubly_linked_list.py | 114 | |
| LOW | data_structures/trie/radix_tree.py | 50 | |
| LOW | data_structures/trie/radix_tree.py | 131 | |
| LOW | data_structures/arrays/find_triplets_with_0_sum.py | 27 | |
| LOW | hashes/sha1.py | 88 | |
| LOW | hashes/hamming_code.py | 71 | |
| LOW | hashes/hamming_code.py | 147 | |
| LOW | hashes/md5.py | 297 | |
| LOW | strings/camel_case_to_snake_case.py | 1 | |
| LOW | strings/wildcard_pattern_matching.py | 10 | |
| LOW | strings/aho_corasick.py | 67 | |
| LOW | project_euler/problem_009/sol1.py | 20 | |
| LOW | project_euler/problem_054/sol1.py | 141 | |
| LOW | project_euler/problem_054/sol1.py | 187 | |
| LOW | project_euler/problem_054/sol1.py | 279 | |
| LOW | project_euler/problem_039/sol1.py | 17 | |
| LOW | project_euler/problem_180/sol1.py | 88 | |
| LOW | project_euler/problem_135/sol1.py | 23 | |
| LOW | project_euler/problem_551/sol1.py | 20 | |
| LOW | project_euler/problem_049/sol1.py | 95 | |
| LOW | project_euler/problem_004/sol1.py | 16 | |
| LOW | project_euler/problem_027/sol1.py | 62 | |
| LOW | project_euler/problem_087/sol1.py | 18 | |
| LOW | project_euler/problem_017/sol1.py | 19 | |
| LOW | project_euler/problem_026/sol1.py | 27 | |
| LOW | project_euler/problem_019/sol1.py | 24 | |
| LOW | computer_vision/flip_augmentation.py | 78 | |
| LOW | computer_vision/mosaic_augmentation.py | 87 | |
| LOW | scheduling/round_robin.py | 12 | |
| LOW | scheduling/non_preemptive_shortest_job_first.py | 13 | |
| LOW | conversions/rgb_hsv_conversion.py | 15 | |
| LOW | electronics/electric_power.py | 12 | |
| LOW | electronics/electric_conductivity.py | 6 | |
| LOW | electronics/coulombs_law.py | 8 | |
| LOW | electronics/builtin_voltage.py | 8 | |
| LOW | electronics/carrier_concentration.py | 8 | |
| LOW | electronics/resistor_color_code.py | 260 | |
| 102 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | data_structures/kd_tree/example/example_usage.py | 38 | # Print the results |
| LOW | data_structures/kd_tree/tests/test_kdtree.py | 47 | # Check if root node is not None |
| LOW | data_structures/kd_tree/tests/test_kdtree.py | 50 | # Check if root has correct dimensions |
| LOW | data_structures/linked_list/rotate_to_the_right.py | 97 | # Check if the list is empty or has only one element |
| LOW | data_structures/linked_list/from_sequence.py | 53 | # Loop through elements from position 1 |
| LOW | data_structures/linked_list/singly_linked_list.py | 437 | # Check if it's empty or not |
| LOW | data_structures/arrays/find_triplets_with_0_sum.py | 69 | # Verify if the desired value exists in the set. |
| LOW | strings/can_string_be_rearranged_as_palindrome.py | 7 | # Check if characters of the given string can be rearranged to form a palindrome. |
| LOW | linear_programming/simplex.py | 49 | # Check if RHS is negative |
| LOW | computer_vision/intensity_based_segmentation.py | 49 | # Display the results |
| LOW | scheduling/shortest_job_first.py | 71 | # Increment time |
| LOW | genetic_algorithm/basic_string.py | 122 | # Verify if N_POPULATION is bigger than N_SELECTED |
| LOW | genetic_algorithm/basic_string.py | 161 | # Check if there is a matching evolution. |
| LOW | genetic_algorithm/basic_string.py | 189 | # Check if the population has already reached the maximum value and if so, |
| LOW | machine_learning/gradient_boosting_classifier.py | 43 | >>> # Check if the model is trained |
| LOW | machine_learning/gradient_boosting_classifier.py | 73 | >>> # Check if the predictions have the correct shape |
| LOW | machine_learning/gradient_boosting_classifier.py | 99 | >>> # Check if residuals have the correct shape |
| LOW | machine_learning/dimensionality_reduction.py | 106 | # Check if the features have been loaded |
| LOW | machine_learning/dimensionality_reduction.py | 142 | # Check if the dimension desired is less than the number of classes |
| LOW | machine_learning/dimensionality_reduction.py | 145 | # Check if features have been already loaded |
| LOW | machine_learning/sequential_minimum_optimization.py | 161 | # Check if alpha violates the KKT condition |
| LOW | backtracking/rat_in_maze.py | 123 | # Check if source and destination coordinates are Invalid. |
| LOW | backtracking/n_queens.py | 48 | # Check if there is any queen in the same upper column, |
| LOW | other/word_search.py | 85 | # Check if there is space for the word above the row |
| LOW | other/word_search.py | 91 | # Check if there is space to the right of the word as well as above |
| LOW | other/word_search.py | 95 | # Check if there are existing letters |
| LOW | other/word_search.py | 155 | # Check if there is space for the word below the row |
| LOW | other/word_search.py | 161 | # Check if there is space to the right of the word as well as below |
| LOW | other/word_search.py | 165 | # Check if there are existing letters |
| LOW | other/word_search.py | 225 | # Check if there is space for the word below the row |
| LOW | other/word_search.py | 231 | # Check if there is space to the left of the word as well as below |
| LOW | other/word_search.py | 235 | # Check if there are existing letters |
| LOW | other/word_search.py | 295 | # Check if there is space for the word above the row |
| LOW | other/word_search.py | 301 | # Check if there is space to the left of the word as well as above |
| LOW | other/word_search.py | 305 | # Check if there are existing letters |
| LOW | other/word_search.py | 53 | # Check if there is space above the row to fit in the word |
| LOW | other/word_search.py | 125 | # Check if there is space to the right of the word |
| LOW | other/word_search.py | 129 | # Check if there are existing letters |
| LOW | other/word_search.py | 193 | # Check if there is space below the row to fit in the word |
| LOW | other/word_search.py | 265 | # Check if there is space to the left of the word |
| LOW | other/word_search.py | 269 | # Check if there are existing letters |
| LOW | dynamic_programming/largest_divisible_subset.py | 37 | # Iterate through the array |
| LOW | dynamic_programming/k_means_clustering_tensorflow.py | 138 | # Assign value to appropriate variable |
| LOW | dynamic_programming/narcissistic_number.py | 84 | # Check if narcissistic |
| LOW | neural_network/two_hidden_layers_neural_network.py | 289 | # Set give_loss to True if you want to see loss in every iteration. |
| LOW | ciphers/base64_cipher.py | 106 | # Check if the encoded string contains non base64 characters |
| LOW | scripts/close_pull_requests_with_require_type_hints.sh | 12 | # Check if the "require type hints" label is present |
| LOW | …/close_pull_requests_with_require_descriptive_names.sh | 12 | # Check if the "require descriptive names" label is present |
| LOW | scripts/close_pull_requests_with_require_tests.sh | 12 | # Check if the "require_tests" label is present |
| LOW | scripts/close_pull_requests_with_awaiting_changes.sh | 12 | # Check if the "awaiting changes" label is present |
| LOW | scripts/close_pull_requests_with_failing_tests.sh | 12 | # Check if the "tests are failing" label is present |
| LOW | maths/line_length.py | 48 | # Increment step |
| LOW | maths/area_under_curve.py | 45 | # Increment step |
| LOW | maths/numerical_analysis/bisection_2.py | 46 | # Check if middle point is root |
| LOW | maths/numerical_analysis/numerical_integration.py | 49 | # Increment step |
| LOW | greedy_methods/minimum_coin_change.py | 98 | # Print result |
| LOW | graphs/bidirectional_search.py | 34 | # Check if this creates an intersection |
| LOW | graphs/bidirectional_search.py | 95 | # Check if start and goal are in the graph |
| LOW | graphs/minimum_spanning_tree_prims2.py | 98 | # Check if the priority queue is empty |
| LOW | graphs/dijkstra_algorithm.py | 246 | # Check if u already in graph |
| 16 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | data_structures/stacks/stock_span_problem.py | 34 | # Create a stack and push index of fist element to it |
| MEDIUM | data_structures/stacks/postfix_evaluation.py | 191 | # Create a loop so that the user can evaluate postfix expressions multiple times |
| MEDIUM | data_structures/linked_list/floyds_cycle_detection.py | 107 | # Create a cycle in the linked list |
| MEDIUM | data_structures/linked_list/floyds_cycle_detection.py | 139 | # Create a cycle in the linked list |
| MEDIUM | strings/damerau_levenshtein_distance.py | 36 | # Create a dynamic programming matrix to store the distances |
| MEDIUM | strings/word_occurrence.py | 18 | # Creating a dictionary containing count of each word |
| MEDIUM | data_compression/lz77.py | 217 | # Initialize compressor class |
| MEDIUM | project_euler/problem_054/sol1.py | 186 | # This function is not part of the problem, I did it just for fun |
| MEDIUM | computer_vision/intensity_based_segmentation.py | 3 | # Importing necessary libraries |
| MEDIUM | computer_vision/horn_schunck.py | 42 | # Create a grid of all pixel coordinates and subtract the flow to get the |
| MEDIUM | scheduling/job_sequencing_with_deadline.py | 24 | # Create a list of size equal to the maximum deadline |
| MEDIUM | conversions/prefix_conversions_string.py | 16 | # Create a generic variable that can be 'Enum', or any subclass. |
| MEDIUM | file_transfer/send_file.py | 5 | sock = socket.socket() # Create a socket object |
| MEDIUM | knapsack/greedy_knapsack.py | 46 | # Creating a copy of the list and sorting profit/weight in ascending order |
| MEDIUM | machine_learning/xgboost_classifier.py | 59 | # Create an XGBoost Classifier from the training data |
| MEDIUM | dynamic_programming/k_means_clustering_tensorflow.py | 89 | # Initialize all variables |
| MEDIUM | dynamic_programming/longest_increasing_subsequence.py | 19 | def longest_subsequence(array: list[int]) -> list[int]: # This function is recursive |
| MEDIUM | …ital_image_processing/test_digital_image_processing.py | 125 | # Create a numpy array as the same height and width of read image |
| MEDIUM | …gital_image_processing/filters/local_binary_pattern.py | 69 | # Create a numpy array as the same height and width of read image |
| MEDIUM | ciphers/simple_keyword_cypher.py | 27 | # Create a list of the letters in the alphabet |
| MEDIUM | ciphers/fractionated_morse_cipher.py | 75 | # Create a reverse dictionary for Morse code |
| MEDIUM | geometry/tests/test_graham_scan.py | 222 | # Create a circle of points |
| MEDIUM | cellular_automata/one_dimensional.py | 11 | # Define the first generation of cells |
| MEDIUM | cellular_automata/one_dimensional.py | 38 | # Define a new cell and add it to the new generation |
| MEDIUM | cellular_automata/one_dimensional.py | 55 | # Create the output image |
| MEDIUM | cellular_automata/nagel_schrekenberg.py | 47 | highway = [[-1] * number_of_cells] # Create a highway without any car |
| MEDIUM | physics/casimir_effect.py | 42 | # Define the Reduced Planck Constant ℏ (H bar), speed of light C, value of |
| MEDIUM | physics/newtons_law_of_gravitation.py | 24 | # Define the Gravitational Constant G and the function |
| MEDIUM | web_programming/current_weather.py | 14 | # Define the URL for the APIs with placeholders |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | hashes/hamming_code.py | 234 | # --------------------------------------------------------------------- |
| MEDIUM | neural_network/input_data.py | 14 | # ============================================================================== |
| MEDIUM | maths/primelib.py | 92 | # ------------------------------------------ |
| MEDIUM | maths/primelib.py | 138 | # -------------------------------- |
| MEDIUM | maths/primelib.py | 176 | # ----------------------------------------- |
| MEDIUM | maths/primelib.py | 232 | # ----------------------------------------- |
| MEDIUM | maths/primelib.py | 274 | # ---------------------------------------------- |
| MEDIUM | maths/primelib.py | 316 | # ---------------------- |
| MEDIUM | maths/primelib.py | 345 | # ------------------------ |
| MEDIUM | maths/primelib.py | 374 | # ------------------------ |
| MEDIUM | maths/primelib.py | 444 | # ---------------------------------------------- |
| MEDIUM | maths/primelib.py | 535 | # ---------------------------------- |
| MEDIUM | maths/primelib.py | 584 | # --------------------------------------------------- |
| MEDIUM | maths/primelib.py | 648 | # ---------------------------------------------------- |
| MEDIUM | maths/primelib.py | 685 | # ---------------------------------------------------- |
| MEDIUM | maths/primelib.py | 725 | # ------------------------------------------------------------ |
| MEDIUM | maths/primelib.py | 764 | # ----------------------------------------------------------------- |
| MEDIUM | maths/primelib.py | 797 | # ------------------------------------------------------------------- |
| MEDIUM | geometry/ramer_douglas_peucker.py | 138 | # --------------------------------------------------------------------------- |
| MEDIUM | geometry/ramer_douglas_peucker.py | 146 | # --------------------------------------------------------------------------- |
| MEDIUM | quantum/quantum_entanglement.py.DISABLED.txt | 21 | # q_1: ─────┤ X ├─╫─┤M├ |
| MEDIUM | quantum/quantum_entanglement.py.DISABLED.txt | 23 | # c: 2/═══════════╩══╩═ |
| MEDIUM | quantum/quantum_teleportation.py.DISABLED.txt | 24 | # ┌─────────────────┐ ┌───┐ |
| MEDIUM | quantum/quantum_teleportation.py.DISABLED.txt | 25 | #qr_0: ┤ U(π/2,π/2,π/2) ├───────■──┤ H ├─■───────── |
| MEDIUM | quantum/quantum_teleportation.py.DISABLED.txt | 26 | # └──────┬───┬──────┘ ┌─┴─┐└───┘ │ |
| MEDIUM | quantum/quantum_teleportation.py.DISABLED.txt | 27 | #qr_1: ───────┤ H ├─────────■──┤ X ├──────┼───■───── |
| MEDIUM | quantum/quantum_teleportation.py.DISABLED.txt | 29 | #qr_2: ───────────────────┤ X ├───────────■─┤ X ├┤M├ |
| MEDIUM | quantum/quantum_teleportation.py.DISABLED.txt | 31 | #cr: 1/═══════════════════════════════════════════╩═ |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | project_euler/problem_054/sol1.py | 161 | 'Tie' |
| LOW | project_euler/problem_054/sol1.py | 281 | # 7: Four of a kind |
| LOW | project_euler/problem_191/sol1.py | 61 | # First, check if the combination is already in the cache, and |
| LOW | genetic_algorithm/basic_string.py | 141 | while True: |
| LOW | backtracking/n_queens_math.py | 101 | # If row is equal to the size of the board it means there are a queen in each row in |
| LOW | fractals/mandelbrot.py | 141 | # img = get_image(figure_center_x = -0.6, figure_center_y = -0.4, |
| LOW | dynamic_programming/optimal_binary_search_tree.py | 1 | #!/usr/bin/env python3 |
| LOW | dynamic_programming/k_means_clustering_tensorflow.py | 81 | ##INITIALIZING STATE VARIABLES |
| LOW | neural_network/input_data.py | 1 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved. |
| LOW | digital_image_processing/index_calculation.py | 41 | Wavelength Range 520 nm to 560 nm |
| LOW | digital_image_processing/index_calculation.py | 61 | #"CIgreen" -- green, nir |
| LOW | ciphers/xor_cipher.py | 241 | from doctest import testmod |
| LOW | ciphers/xor_cipher.py | 261 | # print("encrypt successful") |
| LOW | maths/pollard_rho.py | 41 | # Because of the relationship between ``f(f(x))`` and ``f(x)``, this |
| LOW | maths/pollard_rho.py | 101 | else: |
| LOW | maths/entropy.py | 121 | # "of message cottage windows do besides against uncivil. Delightful " |
| LOW | graphs/matching_min_vertex_cover.py | 61 | # graph = {0: [1, 3], 1: [0, 3], 2: [0, 3, 4], 3: [0, 1, 2], 4: [2, 3]} |
| LOW | graphs/dijkstra_algorithm.py | 461 | |
| LOW | graphs/dijkstra_algorithm.py | 481 | # Node 8 has distance: 14 |
| LOW | graphs/graph_list.py | 101 | # if only source vertex is present in adjacency list, add destination vertex |
| LOW | graphs/graph_list.py | 121 | self.adj_list[source_vertex] = [destination_vertex] |
| LOW | graphs/graphs_floyd_warshall.py | 81 | # Enter number of edges: 2 |
| LOW | graphs/graphs_floyd_warshall.py | 101 | # INF 0 2 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | file_transfer/tests/test_send_file.py | 26 | file.return_value.__enter__.return_value.read.assert_called() |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | dynamic_programming/floyd_warshall.py | 66 | # Example usage |
| LOW | ciphers/vernam_cipher.py | 34 | # Example usage |
| LOW | maths/spearman_rank_correlation_coefficient.py | 75 | # Example usage: |
| LOW | geometry/graham_scan.py | 230 | # Example usage |
| LOW | geometry/jarvis_march.py | 184 | # Example usage |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | data_structures/hashing/tests/test_hash_map.py | 23 | except Exception as e: |
| MEDIUM | data_structures/hashing/tests/test_hash_map.py | 20 | def _run_operation(obj, fun, *args): |
| LOW | hashes/enigma_machine.py | 49 | except Exception as error: |
| MEDIUM | machine_learning/decision_tree.py | 41 | print("Error: Input labels must be one dimensional") |
| LOW | physics/newtons_second_law_of_motion.py | 77 | except Exception: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | data_structures/stacks/stack.py | 17 | """A stack is an abstract data type that serves as a collection of |
| LOW | strings/text_justification.py | 62 | # just add the last word to the sentence |
| LOW | ciphers/mono_alphabetic_ciphers.py | 26 | # symbol is not in LETTERS, just add it |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | searches/hill_climbing.py | 28 | >>> def test_function(x, y): |
| LOW | graphs/multi_heuristic_astar.py | 81 | def do_something(back_pointer, goal, start): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | hashes/elf.py | 5 | >>> elf_hash('lorem ipsum') |