The Way of the Serpent

How to get the Greatest Common Denominator and Least Common Multipliers using Python

Image for post
Image for post
Photo by 浮萍 闪电 on Unsplash
def get_gcd_1(num1, num2): while num1 != num2: if num1…


The Way of the Serpent

How to Identify and Index Duplicates in a List

Image for post
Image for post
Photo by Wolfgang Hasselmann on Unsplash
def duplicates(example_list): return len(example_list) !=…


Tales from the Crypt

Using Python to Decipher Encoded Messages

Image for post
Image for post
Photo by Arget on Unsplash

Getting the Sum of all Digits in an Integer


The Way of the Serpent

Interesting ways to use List Comprehension

Image for post
Image for post
Photo by Cathryn Lavery on Unsplash
sample_string = 'sample_for_list_comprehension'
sample_list =[]
for s in sample_string:
sample_list.append(s)
sample_list


The Way of the Serpent

How to apply the Lambda function in Python

Image for post
Image for post
Photo by Tim Marshall on Unsplash

The Benefits of Lambda

def mult_ten(original):
return original * 10
number = mult_ten(5)


The Way of the Serpent

How to construct a DataFrame from a List

Image for post
Image for post
Photo by Stijn Swinnen on Unsplash


Data Storytelling with Python

Crafting a narrative for the Titanic Dataset

Image for post
Image for post
Photo by Clay Banks on Unsplash


How to derive more features from an image to improve clustering results

Image for post
Image for post
K Means Generated Art (Image by Author)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D from matplotlib import colors from skimage.color…


How to use the K-Means algorithm to automatically segment an image

Image for post
Image for post
Modern Art Doggos (Image by Author)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import colors
from skimage.color import rgb2gray, rgb2hsv, hsv2rgb
from skimage.io import imread, imshow
from sklearn.cluster import KMeans


How to use the Gaussian Distribution for Image Segmentation

Image for post
Image for post
Masked Red Tree (Image by Author)
import numpy as np
import matplotlib.pyplot as plt
from skimage.io import imread, imshow
from numpy import ndarray
from matplotlib.patches import Rectangle
from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from…

Tonichi Edeza

Just a kid that writes about data and the world.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store