Hex to RGB
Converts a hexadecimal color code to a tuple of integers corresponding to its RGB components.
The Python snippet collection contains helper functions for Python 3.6. It includes utilities for most common data types, such as primitivies, lists, dictionaries and date objects.
Converts a hexadecimal color code to a tuple of integers corresponding to its RGB components.
Converts a number to a list of digits.
Finds the items that are parity outliers in a given list.
Returns the sum of the powers of all the numbers from start
to end
(both inclusive).
Converts an integer to its roman numeral representation.
Accepts value between 1
and 3999
(both inclusive).
Converts the values of RGB components to a hexadecimal color code.
Calculates the average of a list, after mapping each element to a value using the provided function.
Initializes a list containing the numbers in the specified geometric progression range.
Returns the maximum value of a list, after mapping each element to a value using the provided function.
Finds the median of a list of numbers.
Returns the minimum value of a list, after mapping each element to a value using the provided function.
Calculates the sum of a list, after mapping each element to a value using the provided function.
Returns the n
maximum elements from the provided list.
Returns the n
minimum elements from the provided list.
Finds and returns the list of prime factors of a number.
Reverses a number.
Calculates the greatest common divisor of a list of numbers.
Returns the least common multiple of a list of numbers.
Returns the powerset of a given iterable.
Returns the weighted average of two or more numbers.
Calculates the Hamming distance between two values.
Generates a list of numbers in the arithmetic progression starting with the given positive integer and up to the specified limit.
Returns the index of the element with the maximum value in a list.
Maps a number from one range to another range.