Repository Analysis

TheAlgorithms/Python

All Algorithms implemented in Python

12.4 Low AI signal View on GitHub
12.4
Adjusted Score
12.4
Raw Score
100%
Time Factor
2026-05-22
Last Push
221,469
Stars
Python
Language
183,008
Lines of Code
1481
Files
1106
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 278MEDIUM 60LOW 767

Pattern Findings

1106 matches across 16 categories. Click a row to expand file-level details.

Docstring Block Structure92 hits · 460 pts
SeverityFileLineSnippet
HIGHsearches/interpolation_search.py7 Searches for an item in a sorted collection by interpolation search algorithm. Args: sorted_collection
HIGHsearches/interpolation_search.py79Pure implementation of interpolation search algorithm in Python by recursion Be careful collection must be ascending
HIGHdata_structures/binary_tree/floor_and_ceiling.py37 Find the floor and ceiling values for a given key in a Binary Search Tree (BST). Args: root: The root
HIGHdata_structures/linked_list/is_palindrome.py13 Check if a linked list is a palindrome. Args: head: The head of the linked list. Returns:
HIGHdata_structures/linked_list/is_palindrome.py69 Check if a linked list is a palindrome using a stack. Args: head (ListNode): The head of the linked li
HIGHdata_structures/linked_list/is_palindrome.py125 Check if a linked list is a palindrome using a dictionary. Args: head (ListNode): The head of the link
HIGHdata_structures/linked_list/circular_linked_list.py108 Delete and return the data of the node at the nth pos in Circular Linked List. Args: index
HIGHdata_structures/linked_list/swap_nodes.py44 Add a new node with the given data to the beginning of the Linked List. Args: new_data (An
HIGHdata_structures/linked_list/swap_nodes.py68 Swap the positions of two nodes in the Linked List based on their data values. Args: node_
HIGHdata_structures/arrays/median_two_array.py7 Find the median of two arrays. Args: nums1: The first array. nums2: The second array. Ret
HIGHdata_structures/arrays/kth_largest_element.py9 Partitions list based on the pivot element. This function rearranges the elements in the input list 'elements'
HIGHdata_structures/arrays/kth_largest_element.py45 Finds the kth largest element in a list. Should deliver similar results to: ```python def kth_largest_e
HIGHdata_structures/arrays/find_triplets_with_0_sum.py5 Given a list of integers, return elements a, b, c such that a + b + c = 0. Args: nums: list of integers
HIGHdata_structures/arrays/find_triplets_with_0_sum.py28 Function for finding the triplets with a given sum in the array using hashing. Given a list of integers, retur
HIGHdata_structures/arrays/rotate_array.py2 Rotates a list to the right by steps positions. Parameters: arr (List[int]): The list of integers to rotat
HIGHdata_structures/arrays/rotate_array.py33 Reverses a portion of the list in place from index start to end. Parameters: start (int): Star
HIGHdata_structures/arrays/equilibrium_index_in_array.py24 Find the equilibrium index of an array. Args: arr (list[int]): The input array of integers. Retur
HIGHdata_structures/arrays/index_2d_array_in_1d.py63 Retrieves the value of the one-dimensional index from a two-dimensional array. Args: array: A 2D array
HIGHdata_structures/arrays/product_sum.py24 Recursively calculates the product sum of an array. The product sum of an array is defined as the sum of its e
HIGHdata_structures/arrays/product_sum.py68 Calculates the product sum of an array. Args: array (List[Union[int, List]]): The array of integers an
HIGHstrings/strip.py2 Remove leading and trailing characters (whitespace by default) from a string. Args: user_string (str):
HIGHcomputer_vision/haralick_descriptors.py28 Normalizes image in Numpy 2D array format, between ranges 0-cap, as to fit uint8 type. Args: image
HIGHcomputer_vision/haralick_descriptors.py53Normalizes a 1D array, between ranges 0-cap. Args: array: List containing values to be normalized between c
HIGHcomputer_vision/haralick_descriptors.py107 Simple image transformation using one of two available filter functions: Erosion and Dilation. Args:
HIGHscheduling/job_sequencing_with_deadline.py2 Function to find the maximum profit by doing jobs in a given time frame Args: jobs [list]: A list of t
HIGHmachine_learning/loss_functions.py442 Calculate the Mean Absolute Percentage Error between y_true and y_pred. Mean Absolute Percentage Error calcula
HIGHmachine_learning/loss_functions.py577 Calculate the Smooth L1 Loss between y_true and y_pred. The Smooth L1 Loss is less sensitive to outliers than
HIGHmachine_learning/mfcc.py77 Calculate Mel Frequency Cepstral Coefficients (MFCCs) from an audio signal. Args: audio: The input aud
HIGHmachine_learning/mfcc.py153 Normalize an audio signal by scaling it to have values between -1 and 1. Args: audio: The input audio
HIGHmachine_learning/mfcc.py180 Split an audio signal into overlapping frames. Args: audio: The input audio signal. sample_rat
HIGHmachine_learning/mfcc.py219 Calculate the Fast Fourier Transform (FFT) of windowed audio data. Args: audio_windowed: The windowed
HIGHmachine_learning/mfcc.py255 Calculate the power of the audio signal from its FFT. Args: audio_fft: The FFT of the audio signal.
HIGHmachine_learning/mfcc.py275 Convert a frequency in Hertz to the mel scale. Args: freq: The frequency in Hertz. Returns:
HIGHmachine_learning/mfcc.py293 Convert a frequency in the mel scale to Hertz. Args: mels: The frequency in mel scale. Returns:
HIGHmachine_learning/mfcc.py313 Create a Mel-spaced filter bank for audio processing. Args: sample_rate: The sample rate of the audio.
HIGHmachine_learning/mfcc.py352 Generate filters for audio processing. Args: filter_points: A list of filter points. ftt_size:
HIGHmachine_learning/mfcc.py390 Calculate the filter points and frequencies for mel frequency filters. Args: sample_rate: The sample r
HIGHmachine_learning/mfcc.py431 Compute the Discrete Cosine Transform (DCT) basis matrix. Args: dct_filter_num: The number of DCT filt
HIGHother/sliding_window_maximum.py5 Return a list containing the maximum of each sliding window of size window_size. This implementation uses a mo
HIGHdynamic_programming/matrix_chain_multiplication.py55 Find the minimum number of multiplcations required to multiply the chain of matrices Args: `arr`: The
HIGHdynamic_programming/narcissistic_number.py28 Find all narcissistic numbers up to the given limit using dynamic programming. This function uses memoization
HIGHdynamic_programming/iterating_through_submasks.py13 Args: mask : number which shows mask ( always integer > 0, zero does not have any submasks )
HIGHdynamic_programming/climbing_stairs.py5 LeetCdoe No.70: Climbing Stairs Distinct ways to climb a number_of_steps staircase where each time you can eith
HIGHneural_network/input_data.py48Extract the images into a 4D uint8 numpy array [index, y, x, depth]. Args: f: A file object that can be passe
HIGHneural_network/input_data.py87Extract 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.py13 Implements the LeakyReLU activation function. Parameters: vector (np.ndarray): The input a
HIGH…ork/activation_functions/gaussian_error_linear_unit.py29 Implements the Gaussian Error Linear Unit (GELU) function Parameters: vector (np.ndarray): A numpy ar
HIGHneural_network/activation_functions/mish.py15 Implements the Mish activation function. Parameters: vector (np.ndarray): The input array
HIGHneural_network/activation_functions/swish.py34 Implements the Sigmoid Linear Unit (SiLU) or swish function Parameters: vector (np.ndarray): A numpy
HIGHneural_network/activation_functions/swish.py54 Parameters: vector (np.ndarray): A numpy array consisting of real values trainable_parameter: Use
HIGHneural_network/activation_functions/squareplus.py13 Implements the SquarePlus activation function. Parameters: vector (np.ndarray): The input array for th
HIGHneural_network/activation_functions/softplus.py13 Implements the Softplus activation function. Parameters: vector (np.ndarray): The input array for the
HIGHciphers/diffie.py5 Find a primitive root modulo modulus, if one exists. Args: modulus : The modulus for which to find a p
HIGHmaths/binary_multiplication.py24 Multiply 'a' and 'b' using bitwise multiplication. Parameters: a (int): The first number. b (int): The
HIGHmaths/binary_multiplication.py62 Calculate (a * b) % c using binary multiplication and modular arithmetic. Parameters: a (int): The first n
HIGHmaths/tanh.py17 Implements the tanh function Parameters: vector: np.ndarray Returns:
HIGHmaths/perfect_number.py16 Check if a number is a perfect number. A perfect number is a positive integer that is equal to the sum of its
HIGHmaths/josephus_problem.py19 Solve the Josephus problem for num_people and a step_size recursively. Args: num_people: A positive in
HIGHmaths/josephus_problem.py81 Find the winner of the Josephus problem for num_people and a step_size. Args: num_people (int): Number
HIGHmaths/josephus_problem.py101 Solve the Josephus problem for num_people and a step_size iteratively. Args: num_people (int): The num
32 more matches not shown…
Cross-Language Confusion111 hits · 450 pts
SeverityFileLineSnippet
HIGHdata_structures/stacks/dijkstras_two_stack_algorithm.py61 operand_stack.push(int(i))
HIGHdata_structures/stacks/dijkstras_two_stack_algorithm.py64 operator_stack.push(i)
HIGHdata_structures/stacks/dijkstras_two_stack_algorithm.py75 operand_stack.push(total)
HIGHdata_structures/stacks/stack_with_singly_linked_list.py28 >>> stack.push(5)
HIGHdata_structures/stacks/stack_with_singly_linked_list.py29 >>> stack.push(9)
HIGHdata_structures/stacks/stack_with_singly_linked_list.py30 >>> stack.push('python')
HIGHdata_structures/stacks/stack_with_singly_linked_list.py35 >>> stack.push('algorithms')
HIGHdata_structures/stacks/stack_with_singly_linked_list.py62 >>> stack.push("c")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py63 >>> stack.push("b")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py64 >>> stack.push("a")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py75 >>> stack.push("c")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py76 >>> stack.push("b")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py77 >>> stack.push("a")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py88 >>> stack.push(1)
HIGHdata_structures/stacks/stack_with_singly_linked_list.py97 >>> stack.push("Python")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py98 >>> stack.push("Java")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py99 >>> stack.push("C")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py115 >>> stack.push("c")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py116 >>> stack.push("b")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py117 >>> stack.push("a")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py135 >>> stack.push("Java")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py136 >>> stack.push("C")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py137 >>> stack.push("Python")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py150 >>> stack.push("Java")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py151 >>> stack.push("C")
HIGHdata_structures/stacks/stack_with_singly_linked_list.py152 >>> stack.push("Python")
HIGHdata_structures/stacks/stack_with_doubly_linked_list.py26 ... stack.push(i)
HIGHdata_structures/stacks/stack_with_doubly_linked_list.py100 stack.push(4)
HIGHdata_structures/stacks/stack_with_doubly_linked_list.py103 stack.push(5)
HIGHdata_structures/stacks/stack_with_doubly_linked_list.py106 stack.push(6)
HIGHdata_structures/stacks/stack_with_doubly_linked_list.py109 stack.push(7)
HIGHdata_structures/stacks/balanced_parentheses.py21 stack.push(bracket)
HIGHdata_structures/stacks/stack.py40 >>> S.push(10)
HIGHdata_structures/stacks/stack.py41 >>> S.push(20)
HIGHdata_structures/stacks/stack.py46 >>> S.push(10)
HIGHdata_structures/stacks/stack.py47 >>> S.push(20)
HIGHdata_structures/stacks/stack.py62 >>> S.push(-5)
HIGHdata_structures/stacks/stack.py63 >>> S.push(10)
HIGHdata_structures/stacks/stack.py81 >>> S.push(-5)
HIGHdata_structures/stacks/stack.py82 >>> S.push(10)
HIGHdata_structures/stacks/stack.py104 >>> S.push(10)
HIGHdata_structures/stacks/stack.py117 >>> S.push(10)
HIGHdata_structures/stacks/stack.py132 >>> S.push(10)
HIGHdata_structures/stacks/stack.py137 >>> S.push(10)
HIGHdata_structures/stacks/stack.py138 >>> S.push(20)
HIGHdata_structures/stacks/stack.py149 >>> S.push(10)
HIGHdata_structures/stacks/stack.py154 >>> S.push(10)
HIGHdata_structures/stacks/stack.py185 stack.push(i)
HIGHdata_structures/stacks/stack.py194 stack.push(100)
HIGHdata_structures/stacks/stack.py198 stack.push(200)
HIGHdata_structures/stacks/infix_to_postfix_conversion.py74 stack.push(char)
HIGHdata_structures/stacks/infix_to_postfix_conversion.py82 stack.push(char)
HIGHdata_structures/stacks/infix_to_postfix_conversion.py89 stack.push(char)
HIGHdata_structures/stacks/infix_to_postfix_conversion.py96 stack.push(char)
HIGHdata_structures/stacks/stack_using_two_queues.py13 >>> stack.push(1)
HIGHdata_structures/stacks/stack_using_two_queues.py14 >>> stack.push(2)
HIGHdata_structures/stacks/stack_using_two_queues.py15 >>> stack.push(3)
HIGHdata_structures/stacks/stack_using_two_queues.py67 stack.push(element)
HIGHdata_structures/binary_tree/avl_tree.py301 q.push(self.root)
HIGHdata_structures/binary_tree/avl_tree.py312 q.push(None)
51 more matches not shown…
Cross-File Repetition75 hits · 375 pts
SeverityFileLineSnippet
HIGHdata_structures/hashing/number_theory/prime_numbers.py0checks 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
HIGHproject_euler/problem_037/sol1.py0checks 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
HIGHproject_euler/problem_041/sol1.py0checks 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
HIGHproject_euler/problem_046/sol1.py0checks 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
HIGHproject_euler/problem_049/sol1.py0checks 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
HIGHproject_euler/problem_058/sol1.py0checks 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
HIGHproject_euler/problem_007/sol3.py0project euler problem 7: https://projecteuler.net/problem=7 10001st prime by listing the first six prime numbers: 2, 3,
HIGHproject_euler/problem_007/sol2.py0project euler problem 7: https://projecteuler.net/problem=7 10001st prime by listing the first six prime numbers: 2, 3,
HIGHproject_euler/problem_007/sol1.py0project euler problem 7: https://projecteuler.net/problem=7 10001st prime by listing the first six prime numbers: 2, 3,
HIGHproject_euler/problem_007/sol3.py0checks 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
HIGHproject_euler/problem_007/sol2.py0checks 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
HIGHproject_euler/problem_007/sol1.py0checks 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
HIGHproject_euler/problem_003/sol1.py0checks 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
HIGHproject_euler/problem_009/sol3.py0project euler problem 9: https://projecteuler.net/problem=9 special pythagorean triplet a pythagorean triplet is a set o
HIGHproject_euler/problem_009/sol2.py0project euler problem 9: https://projecteuler.net/problem=9 special pythagorean triplet a pythagorean triplet is a set o
HIGHproject_euler/problem_009/sol1.py0project euler problem 9: https://projecteuler.net/problem=9 special pythagorean triplet a pythagorean triplet is a set o
HIGHproject_euler/problem_008/sol3.py0project euler problem 8: https://projecteuler.net/problem=8 largest product in a series the four adjacent digits in the
HIGHproject_euler/problem_008/sol2.py0project euler problem 8: https://projecteuler.net/problem=8 largest product in a series the four adjacent digits in the
HIGHproject_euler/problem_008/sol1.py0project euler problem 8: https://projecteuler.net/problem=8 largest product in a series the four adjacent digits in the
HIGHproject_euler/problem_006/sol3.py0project euler problem 6: https://projecteuler.net/problem=6 sum square difference the sum of the squares of the first te
HIGHproject_euler/problem_006/sol2.py0project euler problem 6: https://projecteuler.net/problem=6 sum square difference the sum of the squares of the first te
HIGHproject_euler/problem_006/sol1.py0project euler problem 6: https://projecteuler.net/problem=6 sum square difference the sum of the squares of the first te
HIGHproject_euler/problem_006/sol4.py0project euler problem 6: https://projecteuler.net/problem=6 sum square difference the sum of the squares of the first te
HIGHproject_euler/problem_006/sol3.py0returns the difference between the sum of the squares of the first n natural numbers and the square of the sum. >>> solu
HIGHproject_euler/problem_006/sol2.py0returns the difference between the sum of the squares of the first n natural numbers and the square of the sum. >>> solu
HIGHproject_euler/problem_006/sol1.py0returns the difference between the sum of the squares of the first n natural numbers and the square of the sum. >>> solu
HIGHproject_euler/problem_006/sol4.py0returns the difference between the sum of the squares of the first n natural numbers and the square of the sum. >>> solu
HIGHproject_euler/problem_001/sol7.py0project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo
HIGHproject_euler/problem_001/sol3.py0project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo
HIGHproject_euler/problem_001/sol2.py0project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo
HIGHproject_euler/problem_001/sol6.py0project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo
HIGHproject_euler/problem_001/sol1.py0project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo
HIGHproject_euler/problem_001/sol5.py0project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo
HIGHproject_euler/problem_001/sol4.py0project euler problem 1: https://projecteuler.net/problem=1 multiples of 3 and 5 if we list all the natural numbers belo
HIGHproject_euler/problem_001/sol7.py0returns the sum of all the multiples of 3 or 5 below n. >>> solution(3) 0 >>> solution(4) 3 >>> solution(10) 23 >>> solu
HIGHproject_euler/problem_001/sol2.py0returns the sum of all the multiples of 3 or 5 below n. >>> solution(3) 0 >>> solution(4) 3 >>> solution(10) 23 >>> solu
HIGHproject_euler/problem_001/sol6.py0returns the sum of all the multiples of 3 or 5 below n. >>> solution(3) 0 >>> solution(4) 3 >>> solution(10) 23 >>> solu
HIGHproject_euler/problem_001/sol4.py0returns the sum of all the multiples of 3 or 5 below n. >>> solution(3) 0 >>> solution(4) 3 >>> solution(10) 23 >>> solu
HIGHproject_euler/problem_025/sol3.py0the fibonacci sequence is defined by the recurrence relation: fn = fn-1 + fn-2, where f1 = 1 and f2 = 1. hence the first
HIGHproject_euler/problem_025/sol2.py0the fibonacci sequence is defined by the recurrence relation: fn = fn-1 + fn-2, where f1 = 1 and f2 = 1. hence the first
HIGHproject_euler/problem_025/sol1.py0the fibonacci sequence is defined by the recurrence relation: fn = fn-1 + fn-2, where f1 = 1 and f2 = 1. hence the first
HIGHproject_euler/problem_025/sol3.py0returns the index of the first term in the fibonacci sequence to contain n digits. >>> solution(1000) 4782 >>> solution(
HIGHproject_euler/problem_025/sol2.py0returns the index of the first term in the fibonacci sequence to contain n digits. >>> solution(1000) 4782 >>> solution(
HIGHproject_euler/problem_025/sol1.py0returns the index of the first term in the fibonacci sequence to contain n digits. >>> solution(1000) 4782 >>> solution(
HIGHproject_euler/problem_003/sol3.py0project euler problem 3: https://projecteuler.net/problem=3 largest prime factor the prime factors of 13195 are 5, 7, 13
HIGHproject_euler/problem_003/sol2.py0project euler problem 3: https://projecteuler.net/problem=3 largest prime factor the prime factors of 13195 are 5, 7, 13
HIGHproject_euler/problem_003/sol1.py0project euler problem 3: https://projecteuler.net/problem=3 largest prime factor the prime factors of 13195 are 5, 7, 13
HIGHproject_euler/problem_003/sol3.py0returns the largest prime factor of a given number n. >>> solution(13195) 29 >>> solution(10) 5 >>> solution(17) 17 >>>
HIGHproject_euler/problem_003/sol2.py0returns the largest prime factor of a given number n. >>> solution(13195) 29 >>> solution(10) 5 >>> solution(17) 17 >>>
HIGHproject_euler/problem_003/sol1.py0returns the largest prime factor of a given number n. >>> solution(13195) 29 >>> solution(10) 5 >>> solution(17) 17 >>>
HIGHproject_euler/problem_002/sol3.py0project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen
HIGHproject_euler/problem_002/sol2.py0project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen
HIGHproject_euler/problem_002/sol1.py0project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen
HIGHproject_euler/problem_002/sol5.py0project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen
HIGHproject_euler/problem_002/sol4.py0project euler problem 2: https://projecteuler.net/problem=2 even fibonacci numbers each new term in the fibonacci sequen
HIGHproject_euler/problem_002/sol3.py0returns the sum of all even fibonacci sequence elements that are lower or equal to n. >>> solution(10) 10 >>> solution(1
HIGHproject_euler/problem_002/sol2.py0returns the sum of all even fibonacci sequence elements that are lower or equal to n. >>> solution(10) 10 >>> solution(1
HIGHproject_euler/problem_002/sol1.py0returns the sum of all even fibonacci sequence elements that are lower or equal to n. >>> solution(10) 10 >>> solution(1
HIGHproject_euler/problem_002/sol5.py0returns the sum of all even fibonacci sequence elements that are lower or equal to n. >>> solution(10) 10 >>> solution(1
HIGHproject_euler/problem_020/sol3.py0problem 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…
Unused Imports249 hits · 248 pts
SeverityFileLineSnippet
LOWsearches/simple_binary_search.py11
LOWsearches/double_linear_search.py1
LOWsearches/exponential_search.py16
LOWsearches/ternary_search.py10
LOWsearches/binary_tree_traversal.py5
LOWdata_structures/kd_tree/kd_node.py9
LOWdata_structures/stacks/next_greater_element.py1
LOWdata_structures/stacks/stack_with_singly_linked_list.py3
LOWdata_structures/stacks/stack_with_doubly_linked_list.py4
LOWdata_structures/stacks/stack.py1
LOWdata_structures/stacks/stack_using_two_queues.py1
LOW…ctures/binary_tree/flatten_binarytree_to_linkedlist.py14
LOWdata_structures/binary_tree/wavelet_tree.py11
LOWdata_structures/binary_tree/merge_two_binary_trees.py9
LOWdata_structures/binary_tree/avl_tree.py9
LOWdata_structures/binary_tree/treap.py1
LOW…a_structures/binary_tree/non_recursive_segment_tree.py39
LOWdata_structures/binary_tree/mirror_binary_tree.py7
LOWdata_structures/binary_tree/is_sum_tree.py7
LOWdata_structures/binary_tree/binary_search_tree.py92
LOWdata_structures/binary_tree/binary_tree_traversals.py1
LOWdata_structures/binary_tree/red_black_tree.py1
LOWdata_structures/binary_tree/floor_and_ceiling.py13
LOWdata_structures/binary_tree/binary_tree_path_sum.py10
LOWdata_structures/binary_tree/symmetric_tree.py8
LOW…ta_structures/binary_tree/diff_views_of_binary_tree.py9
LOWdata_structures/binary_tree/distribute_coins.py40
LOWdata_structures/binary_tree/basic_binary_tree.py1
LOWdata_structures/binary_tree/lowest_common_ancestor.py4
LOWdata_structures/binary_tree/diameter_of_binary_tree.py6
LOWdata_structures/binary_tree/lazy_segment_tree.py1
LOW…tures/binary_tree/serialize_deserialize_binary_tree.py1
LOW…structures/binary_tree/binary_search_tree_recursive.py11
LOWdata_structures/binary_tree/maximum_sum_bst.py1
LOWdata_structures/binary_tree/binary_tree_node_sum.py11
LOWdata_structures/binary_tree/is_sorted.py17
LOWdata_structures/linked_list/merge_two_lists.py5
LOWdata_structures/linked_list/is_palindrome.py1
LOWdata_structures/linked_list/__init__.py9
LOW…tructures/linked_list/middle_element_of_linked_list.py1
LOWdata_structures/linked_list/rotate_to_the_right.py1
LOWdata_structures/linked_list/skip_list.py6
LOWdata_structures/linked_list/circular_linked_list.py1
LOWdata_structures/linked_list/swap_nodes.py1
LOWdata_structures/linked_list/reverse_k_group.py1
LOWdata_structures/linked_list/print_reverse.py1
LOWdata_structures/linked_list/has_loop.py1
LOWdata_structures/linked_list/singly_linked_list.py1
LOWdata_structures/heap/heap.py1
LOWdata_structures/heap/skew_heap.py3
LOWdata_structures/heap/randomized_heap.py3
LOWdata_structures/queues/linked_queue.py3
LOWdata_structures/queues/double_ended_queue.py5
LOWdata_structures/queues/circular_queue_linked_list.py4
LOWdata_structures/suffix_tree/suffix_tree_node.py9
LOWhashes/luhn.py3
LOWstrings/anagrams.py1
LOWstrings/autocomplete_using_trie.py1
LOWstrings/knuth_morris_pratt.py1
LOWstrings/aho_corasick.py1
189 more matches not shown…
Hyper-Verbose Identifiers244 hits · 246 pts
SeverityFileLineSnippet
LOWsearches/binary_search.py245def binary_search_with_duplicates(sorted_collection: list[int], item: int) -> list[int]:
LOWsearches/binary_search.py320def binary_search_by_recursion(
LOWsearches/exponential_search.py19def binary_search_by_recursion(
LOWsearches/interpolation_search.py76def interpolation_search_by_recursion(
LOWdata_structures/kd_tree/tests/test_kdtree.py61def test_nearest_neighbour_search():
LOWdata_structures/stacks/next_greater_element.py7def next_greatest_element_slow(arr: list[float]) -> list[float]:
LOWdata_structures/stacks/next_greater_element.py40def next_greatest_element_fast(arr: list[float]) -> list[float]:
LOWdata_structures/stacks/dijkstras_two_stack_algorithm.py40def dijkstras_two_stack_algorithm(equation: str) -> int:
LOWdata_structures/binary_tree/binary_tree_traversals.py119def get_nodes_from_left_to_right(root: Node | None, level: int) -> Generator[int]:
LOWdata_structures/binary_tree/binary_tree_traversals.py141def get_nodes_from_right_to_left(root: Node | None, level: int) -> Generator[int]:
LOW…ta_structures/binary_tree/diff_views_of_binary_tree.py30def binary_tree_right_side_view(root: TreeNode) -> list[int]:
LOW…ta_structures/binary_tree/diff_views_of_binary_tree.py70def binary_tree_left_side_view(root: TreeNode) -> list[int]:
LOW…ta_structures/binary_tree/diff_views_of_binary_tree.py110def binary_tree_top_side_view(root: TreeNode) -> list[int]:
LOW…ta_structures/binary_tree/diff_views_of_binary_tree.py159def binary_tree_bottom_side_view(root: TreeNode) -> list[int]:
LOW…structures/binary_tree/binary_search_tree_recursive.py546def binary_search_tree_example() -> None:
LOWdata_structures/linked_list/skip_list.py269def test_insert_overrides_existing_value():
LOWdata_structures/linked_list/skip_list.py297def test_searching_empty_list_returns_none():
LOWdata_structures/linked_list/skip_list.py318def test_deleting_item_from_empty_list_do_nothing():
LOWdata_structures/linked_list/skip_list.py325def test_deleted_items_are_not_founded_by_find_method():
LOWdata_structures/linked_list/skip_list.py340def test_delete_removes_only_given_key():
LOWdata_structures/linked_list/skip_list.py373def test_delete_doesnt_leave_dead_nodes():
LOWdata_structures/linked_list/skip_list.py391def test_iter_always_yields_sorted_values():
LOWdata_structures/linked_list/circular_linked_list.py151def test_circular_linked_list() -> None:
LOWdata_structures/hashing/tests/test_hash_map.py77def test_hash_map_is_the_same_as_dict(operations):
LOWdata_structures/hashing/tests/test_hash_map.py90def test_no_new_methods_was_added_to_api():
LOWdata_structures/arrays/median_two_array.py6def find_median_sorted_arrays(nums1: list[int], nums2: list[int]) -> float:
LOWdata_structures/queues/circular_queue_linked_list.py142 def check_can_perform_operation(self) -> None:
LOWdata_structures/suffix_tree/tests/test_suffix_tree.py20 def test_search_existing_patterns(self) -> None:
LOWdata_structures/suffix_tree/tests/test_suffix_tree.py29 def test_search_non_existing_patterns(self) -> None:
LOWdata_structures/suffix_tree/tests/test_suffix_tree.py38 def test_search_empty_pattern(self) -> None:
LOWstrings/damerau_levenshtein_distance.py11def damerau_levenshtein_distance(first_string: str, second_string: str) -> int:
LOWstrings/can_string_be_rearranged_as_palindrome.py11def can_string_be_rearranged_as_palindrome_counter(
LOWstrings/can_string_be_rearranged_as_palindrome.py29def can_string_be_rearranged_as_palindrome(input_str: str = "") -> bool:
LOWstrings/is_srilankan_phone_number.py4def is_sri_lankan_phone_number(phone: str) -> bool:
LOWstrings/alternative_string_arrange.py1def alternative_string_arrange(first_str: str, second_str: str) -> str:
LOWstrings/levenshtein_distance.py54def levenshtein_distance_optimized(first_word: str, second_word: str) -> int:
LOWstrings/levenshtein_distance.py99def benchmark_levenshtein_distance(func: Callable) -> None:
LOWstrings/credit_card_validator.py55def validate_credit_card_number(credit_card_number: str) -> bool:
LOWbit_manipulation/find_previous_power_of_two.py1def find_previous_power_of_two(number: int) -> int:
LOWbit_manipulation/bitwise_addition_recursive.py7def bitwise_addition_recursive(number: int, other_number: int) -> int:
LOWbit_manipulation/count_number_of_one_bits.py4def get_set_bits_count_using_brian_kernighans_algorithm(number: int) -> int:
LOWbit_manipulation/count_number_of_one_bits.py33def get_set_bits_count_using_modulo_operator(number: int) -> int:
LOWbit_manipulation/gray_code_sequence.py50def gray_code_sequence_string(bit_count: int) -> list:
LOWbit_manipulation/binary_count_trailing_zeros.py4def binary_count_trailing_zeros(a: int) -> int:
LOWbit_manipulation/largest_pow_of_two_le_num.py22def largest_pow_of_two_le_num(number: int) -> int:
LOWbit_manipulation/index_of_rightmost_set_bit.py4def get_index_of_rightmost_set_bit(number: int) -> int:
LOWbit_manipulation/highest_set_bit.py1def get_highest_set_bit_position(number: int) -> int:
LOWdata_compression/peak_signal_to_noise_ratio.py17def peak_signal_to_noise_ratio(original: float, contrast: float) -> float:
LOWproject_euler/problem_203/sol1.py34def get_pascal_triangle_unique_coefficients(depth: int) -> set[int]:
LOWproject_euler/problem_054/test_poker_hand.py161def test_hand_is_five_high_straight(hand, expected, card_values):
LOWproject_euler/problem_054/test_poker_hand.py196def test_custom_sort_five_high_straight():
LOWproject_euler/problem_054/test_poker_hand.py203def test_multiple_calls_five_high_straight():
LOWproject_euler/problem_205/sol1.py17def total_frequency_distribution(sides_number: int, dice_number: int) -> list[int]:
LOWproject_euler/problem_064/sol1.py19def continuous_fraction_period(n: int) -> int:
LOWproject_euler/problem_187/sol1.py17def slow_calculate_prime_numbers(max_number: int) -> list[int]:
LOWproject_euler/problem_587/sol1.py32def circle_bottom_arc_integral(point: float) -> float:
LOWproject_euler/problem_012/sol2.py26def triangle_number_generator():
LOWfinancial/straight_line_depreciation.py32def straight_line_depreciation(
LOWfinancial/exponential_moving_average.py15def exponential_moving_average(
LOWfinancial/equated_monthly_installments.py11def equated_monthly_installments(
184 more matches not shown…
Deep Nesting162 hits · 158 pts
SeverityFileLineSnippet
LOWsearches/simulated_annealing.py9
LOWsearches/hill_climbing.py86
LOWsearches/ternary_search.py62
LOWsearches/ternary_search.py112
LOWsearches/tabu_search.py127
LOWsearches/tabu_search.py188
LOWsearches/interpolation_search.py6
LOWsearches/fibonacci_search.py58
LOWsearches/median_of_medians.py61
LOWdata_structures/stacks/next_greater_element.py71
LOWdata_structures/stacks/dijkstras_two_stack_algorithm.py40
LOWdata_structures/stacks/infix_to_prefix_conversion.py18
LOWdata_structures/stacks/infix_to_postfix_conversion.py45
LOWdata_structures/binary_tree/avl_tree.py198
LOWdata_structures/binary_tree/avl_tree.py296
LOWdata_structures/binary_tree/binary_search_tree.py170
LOWdata_structures/binary_tree/red_black_tree.py112
LOWdata_structures/binary_tree/red_black_tree.py150
LOWdata_structures/binary_tree/red_black_tree.py367
LOWdata_structures/binary_tree/red_black_tree.py384
LOWdata_structures/linked_list/is_palindrome.py124
LOWdata_structures/linked_list/skip_list.py163
LOWdata_structures/linked_list/doubly_linked_list.py62
LOWdata_structures/linked_list/doubly_linked_list.py114
LOWdata_structures/trie/radix_tree.py50
LOWdata_structures/trie/radix_tree.py131
LOWdata_structures/arrays/find_triplets_with_0_sum.py27
LOWhashes/sha1.py88
LOWhashes/hamming_code.py71
LOWhashes/hamming_code.py147
LOWhashes/md5.py297
LOWstrings/camel_case_to_snake_case.py1
LOWstrings/wildcard_pattern_matching.py10
LOWstrings/aho_corasick.py67
LOWproject_euler/problem_009/sol1.py20
LOWproject_euler/problem_054/sol1.py141
LOWproject_euler/problem_054/sol1.py187
LOWproject_euler/problem_054/sol1.py279
LOWproject_euler/problem_039/sol1.py17
LOWproject_euler/problem_180/sol1.py88
LOWproject_euler/problem_135/sol1.py23
LOWproject_euler/problem_551/sol1.py20
LOWproject_euler/problem_049/sol1.py95
LOWproject_euler/problem_004/sol1.py16
LOWproject_euler/problem_027/sol1.py62
LOWproject_euler/problem_087/sol1.py18
LOWproject_euler/problem_017/sol1.py19
LOWproject_euler/problem_026/sol1.py27
LOWproject_euler/problem_019/sol1.py24
LOWcomputer_vision/flip_augmentation.py78
LOWcomputer_vision/mosaic_augmentation.py87
LOWscheduling/round_robin.py12
LOWscheduling/non_preemptive_shortest_job_first.py13
LOWconversions/rgb_hsv_conversion.py15
LOWelectronics/electric_power.py12
LOWelectronics/electric_conductivity.py6
LOWelectronics/coulombs_law.py8
LOWelectronics/builtin_voltage.py8
LOWelectronics/carrier_concentration.py8
LOWelectronics/resistor_color_code.py260
102 more matches not shown…
Redundant / Tautological Comments76 hits · 118 pts
SeverityFileLineSnippet
LOWdata_structures/kd_tree/example/example_usage.py38 # Print the results
LOWdata_structures/kd_tree/tests/test_kdtree.py47 # Check if root node is not None
LOWdata_structures/kd_tree/tests/test_kdtree.py50 # Check if root has correct dimensions
LOWdata_structures/linked_list/rotate_to_the_right.py97 # Check if the list is empty or has only one element
LOWdata_structures/linked_list/from_sequence.py53 # Loop through elements from position 1
LOWdata_structures/linked_list/singly_linked_list.py437 # Check if it's empty or not
LOWdata_structures/arrays/find_triplets_with_0_sum.py69 # Verify if the desired value exists in the set.
LOWstrings/can_string_be_rearranged_as_palindrome.py7# Check if characters of the given string can be rearranged to form a palindrome.
LOWlinear_programming/simplex.py49 # Check if RHS is negative
LOWcomputer_vision/intensity_based_segmentation.py49 # Display the results
LOWscheduling/shortest_job_first.py71 # Increment time
LOWgenetic_algorithm/basic_string.py122 # Verify if N_POPULATION is bigger than N_SELECTED
LOWgenetic_algorithm/basic_string.py161 # Check if there is a matching evolution.
LOWgenetic_algorithm/basic_string.py189 # Check if the population has already reached the maximum value and if so,
LOWmachine_learning/gradient_boosting_classifier.py43 >>> # Check if the model is trained
LOWmachine_learning/gradient_boosting_classifier.py73 >>> # Check if the predictions have the correct shape
LOWmachine_learning/gradient_boosting_classifier.py99 >>> # Check if residuals have the correct shape
LOWmachine_learning/dimensionality_reduction.py106 # Check if the features have been loaded
LOWmachine_learning/dimensionality_reduction.py142 # Check if the dimension desired is less than the number of classes
LOWmachine_learning/dimensionality_reduction.py145 # Check if features have been already loaded
LOWmachine_learning/sequential_minimum_optimization.py161 # Check if alpha violates the KKT condition
LOWbacktracking/rat_in_maze.py123 # Check if source and destination coordinates are Invalid.
LOWbacktracking/n_queens.py48 # Check if there is any queen in the same upper column,
LOWother/word_search.py85 # Check if there is space for the word above the row
LOWother/word_search.py91 # Check if there is space to the right of the word as well as above
LOWother/word_search.py95 # Check if there are existing letters
LOWother/word_search.py155 # Check if there is space for the word below the row
LOWother/word_search.py161 # Check if there is space to the right of the word as well as below
LOWother/word_search.py165 # Check if there are existing letters
LOWother/word_search.py225 # Check if there is space for the word below the row
LOWother/word_search.py231 # Check if there is space to the left of the word as well as below
LOWother/word_search.py235 # Check if there are existing letters
LOWother/word_search.py295 # Check if there is space for the word above the row
LOWother/word_search.py301 # Check if there is space to the left of the word as well as above
LOWother/word_search.py305 # Check if there are existing letters
LOWother/word_search.py53 # Check if there is space above the row to fit in the word
LOWother/word_search.py125 # Check if there is space to the right of the word
LOWother/word_search.py129 # Check if there are existing letters
LOWother/word_search.py193 # Check if there is space below the row to fit in the word
LOWother/word_search.py265 # Check if there is space to the left of the word
LOWother/word_search.py269 # Check if there are existing letters
LOWdynamic_programming/largest_divisible_subset.py37 # Iterate through the array
LOWdynamic_programming/k_means_clustering_tensorflow.py138 # Assign value to appropriate variable
LOWdynamic_programming/narcissistic_number.py84 # Check if narcissistic
LOWneural_network/two_hidden_layers_neural_network.py289 # Set give_loss to True if you want to see loss in every iteration.
LOWciphers/base64_cipher.py106 # Check if the encoded string contains non base64 characters
LOWscripts/close_pull_requests_with_require_type_hints.sh12 # Check if the "require type hints" label is present
LOW…/close_pull_requests_with_require_descriptive_names.sh12 # Check if the "require descriptive names" label is present
LOWscripts/close_pull_requests_with_require_tests.sh12 # Check if the "require_tests" label is present
LOWscripts/close_pull_requests_with_awaiting_changes.sh12 # Check if the "awaiting changes" label is present
LOWscripts/close_pull_requests_with_failing_tests.sh12 # Check if the "tests are failing" label is present
LOWmaths/line_length.py48 # Increment step
LOWmaths/area_under_curve.py45 # Increment step
LOWmaths/numerical_analysis/bisection_2.py46 # Check if middle point is root
LOWmaths/numerical_analysis/numerical_integration.py49 # Increment step
LOWgreedy_methods/minimum_coin_change.py98 # Print result
LOWgraphs/bidirectional_search.py34 # Check if this creates an intersection
LOWgraphs/bidirectional_search.py95 # Check if start and goal are in the graph
LOWgraphs/minimum_spanning_tree_prims2.py98 # Check if the priority queue is empty
LOWgraphs/dijkstra_algorithm.py246 # Check if u already in graph
16 more matches not shown…
Self-Referential Comments29 hits · 82 pts
SeverityFileLineSnippet
MEDIUMdata_structures/stacks/stock_span_problem.py34 # Create a stack and push index of fist element to it
MEDIUMdata_structures/stacks/postfix_evaluation.py191 # Create a loop so that the user can evaluate postfix expressions multiple times
MEDIUMdata_structures/linked_list/floyds_cycle_detection.py107 # Create a cycle in the linked list
MEDIUMdata_structures/linked_list/floyds_cycle_detection.py139 # Create a cycle in the linked list
MEDIUMstrings/damerau_levenshtein_distance.py36 # Create a dynamic programming matrix to store the distances
MEDIUMstrings/word_occurrence.py18 # Creating a dictionary containing count of each word
MEDIUMdata_compression/lz77.py217 # Initialize compressor class
MEDIUMproject_euler/problem_054/sol1.py186 # This function is not part of the problem, I did it just for fun
MEDIUMcomputer_vision/intensity_based_segmentation.py3# Importing necessary libraries
MEDIUMcomputer_vision/horn_schunck.py42 # Create a grid of all pixel coordinates and subtract the flow to get the
MEDIUMscheduling/job_sequencing_with_deadline.py24 # Create a list of size equal to the maximum deadline
MEDIUMconversions/prefix_conversions_string.py16# Create a generic variable that can be 'Enum', or any subclass.
MEDIUMfile_transfer/send_file.py5 sock = socket.socket() # Create a socket object
MEDIUMknapsack/greedy_knapsack.py46 # Creating a copy of the list and sorting profit/weight in ascending order
MEDIUMmachine_learning/xgboost_classifier.py59 # Create an XGBoost Classifier from the training data
MEDIUMdynamic_programming/k_means_clustering_tensorflow.py89 # Initialize all variables
MEDIUMdynamic_programming/longest_increasing_subsequence.py19def longest_subsequence(array: list[int]) -> list[int]: # This function is recursive
MEDIUM…ital_image_processing/test_digital_image_processing.py125 # Create a numpy array as the same height and width of read image
MEDIUM…gital_image_processing/filters/local_binary_pattern.py69 # Create a numpy array as the same height and width of read image
MEDIUMciphers/simple_keyword_cypher.py27 # Create a list of the letters in the alphabet
MEDIUMciphers/fractionated_morse_cipher.py75# Create a reverse dictionary for Morse code
MEDIUMgeometry/tests/test_graham_scan.py222 # Create a circle of points
MEDIUMcellular_automata/one_dimensional.py11# Define the first generation of cells
MEDIUMcellular_automata/one_dimensional.py38 # Define a new cell and add it to the new generation
MEDIUMcellular_automata/one_dimensional.py55 # Create the output image
MEDIUMcellular_automata/nagel_schrekenberg.py47 highway = [[-1] * number_of_cells] # Create a highway without any car
MEDIUMphysics/casimir_effect.py42# Define the Reduced Planck Constant ℏ (H bar), speed of light C, value of
MEDIUMphysics/newtons_law_of_gravitation.py24# Define the Gravitational Constant G and the function
MEDIUMweb_programming/current_weather.py14# Define the URL for the APIs with placeholders
Decorative Section Separators28 hits · 71 pts
SeverityFileLineSnippet
MEDIUMhashes/hamming_code.py234# ---------------------------------------------------------------------
MEDIUMneural_network/input_data.py14# ==============================================================================
MEDIUMmaths/primelib.py92# ------------------------------------------
MEDIUMmaths/primelib.py138# --------------------------------
MEDIUMmaths/primelib.py176# -----------------------------------------
MEDIUMmaths/primelib.py232# -----------------------------------------
MEDIUMmaths/primelib.py274# ----------------------------------------------
MEDIUMmaths/primelib.py316# ----------------------
MEDIUMmaths/primelib.py345# ------------------------
MEDIUMmaths/primelib.py374# ------------------------
MEDIUMmaths/primelib.py444# ----------------------------------------------
MEDIUMmaths/primelib.py535# ----------------------------------
MEDIUMmaths/primelib.py584# ---------------------------------------------------
MEDIUMmaths/primelib.py648# ----------------------------------------------------
MEDIUMmaths/primelib.py685# ----------------------------------------------------
MEDIUMmaths/primelib.py725# ------------------------------------------------------------
MEDIUMmaths/primelib.py764# -----------------------------------------------------------------
MEDIUMmaths/primelib.py797# -------------------------------------------------------------------
MEDIUMgeometry/ramer_douglas_peucker.py138 # ---------------------------------------------------------------------------
MEDIUMgeometry/ramer_douglas_peucker.py146 # ---------------------------------------------------------------------------
MEDIUMquantum/quantum_entanglement.py.DISABLED.txt21 # q_1: ─────┤ X ├─╫─┤M├
MEDIUMquantum/quantum_entanglement.py.DISABLED.txt23 # c: 2/═══════════╩══╩═
MEDIUMquantum/quantum_teleportation.py.DISABLED.txt24 # ┌─────────────────┐ ┌───┐
MEDIUMquantum/quantum_teleportation.py.DISABLED.txt25 #qr_0: ┤ U(π/2,π/2,π/2) ├───────■──┤ H ├─■─────────
MEDIUMquantum/quantum_teleportation.py.DISABLED.txt26 # └──────┬───┬──────┘ ┌─┴─┐└───┘ │
MEDIUMquantum/quantum_teleportation.py.DISABLED.txt27 #qr_1: ───────┤ H ├─────────■──┤ X ├──────┼───■─────
MEDIUMquantum/quantum_teleportation.py.DISABLED.txt29 #qr_2: ───────────────────┤ X ├───────────■─┤ X ├┤M├
MEDIUMquantum/quantum_teleportation.py.DISABLED.txt31 #cr: 1/═══════════════════════════════════════════╩═
Over-Commented Block23 hits · 23 pts
SeverityFileLineSnippet
LOWproject_euler/problem_054/sol1.py161 'Tie'
LOWproject_euler/problem_054/sol1.py281 # 7: Four of a kind
LOWproject_euler/problem_191/sol1.py61 # First, check if the combination is already in the cache, and
LOWgenetic_algorithm/basic_string.py141 while True:
LOWbacktracking/n_queens_math.py101 # If row is equal to the size of the board it means there are a queen in each row in
LOWfractals/mandelbrot.py141 # img = get_image(figure_center_x = -0.6, figure_center_y = -0.4,
LOWdynamic_programming/optimal_binary_search_tree.py1#!/usr/bin/env python3
LOWdynamic_programming/k_means_clustering_tensorflow.py81 ##INITIALIZING STATE VARIABLES
LOWneural_network/input_data.py1# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
LOWdigital_image_processing/index_calculation.py41 Wavelength Range 520 nm to 560 nm
LOWdigital_image_processing/index_calculation.py61 #"CIgreen" -- green, nir
LOWciphers/xor_cipher.py241 from doctest import testmod
LOWciphers/xor_cipher.py261# print("encrypt successful")
LOWmaths/pollard_rho.py41 # Because of the relationship between ``f(f(x))`` and ``f(x)``, this
LOWmaths/pollard_rho.py101 else:
LOWmaths/entropy.py121 # "of message cottage windows do besides against uncivil. Delightful "
LOWgraphs/matching_min_vertex_cover.py61 # graph = {0: [1, 3], 1: [0, 3], 2: [0, 3, 4], 3: [0, 1, 2], 4: [2, 3]}
LOWgraphs/dijkstra_algorithm.py461
LOWgraphs/dijkstra_algorithm.py481# Node 8 has distance: 14
LOWgraphs/graph_list.py101 # if only source vertex is present in adjacency list, add destination vertex
LOWgraphs/graph_list.py121 self.adj_list[source_vertex] = [destination_vertex]
LOWgraphs/graphs_floyd_warshall.py81 # Enter number of edges: 2
LOWgraphs/graphs_floyd_warshall.py101 # INF 0 2
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALfile_transfer/tests/test_send_file.py26 file.return_value.__enter__.return_value.read.assert_called()
Example Usage Blocks5 hits · 8 pts
SeverityFileLineSnippet
LOWdynamic_programming/floyd_warshall.py66 # Example usage
LOWciphers/vernam_cipher.py34 # Example usage
LOWmaths/spearman_rank_correlation_coefficient.py75 # Example usage:
LOWgeometry/graham_scan.py230 # Example usage
LOWgeometry/jarvis_march.py184 # Example usage
Excessive Try-Catch Wrapping5 hits · 6 pts
SeverityFileLineSnippet
LOWdata_structures/hashing/tests/test_hash_map.py23 except Exception as e:
MEDIUMdata_structures/hashing/tests/test_hash_map.py20def _run_operation(obj, fun, *args):
LOWhashes/enigma_machine.py49 except Exception as error:
MEDIUMmachine_learning/decision_tree.py41 print("Error: Input labels must be one dimensional")
LOWphysics/newtons_second_law_of_motion.py77 except Exception:
AI Slop Vocabulary3 hits · 4 pts
SeverityFileLineSnippet
MEDIUMdata_structures/stacks/stack.py17 """A stack is an abstract data type that serves as a collection of
LOWstrings/text_justification.py62 # just add the last word to the sentence
LOWciphers/mono_alphabetic_ciphers.py26 # symbol is not in LETTERS, just add it
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippet
LOWsearches/hill_climbing.py28 >>> def test_function(x, y):
LOWgraphs/multi_heuristic_astar.py81def do_something(back_pointer, goal, start):
Fake / Example Data1 hit · 0 pts
SeverityFileLineSnippet
LOWhashes/elf.py5 >>> elf_hash('lorem ipsum')