Skip to content

Instantly share code, notes, and snippets.

View strumer69's full-sized avatar

shahram moradpour strumer69

View GitHub Profile
@strumer69
strumer69 / python_SQL_connection.py
Created August 6, 2023 07:54
python_SQL_connection
import mysql.connector
try:
connection = mysql.connector.connect(host='localhost',
database='sakila',
user='root',
password='sql12345678')
sql_select_Query = "select * from customer"
cursor = connection.cursor()
@strumer69
strumer69 / outlier.py
Last active March 29, 2023 15:43
detecting outliers
def detect_outliers(data):
outliers=[]
threshold=3
mean = np.mean(data)
std =np.std(data)
for i in data:
z_score= (i - mean)/std
@strumer69
strumer69 / ShadowHighlightCorrection.py
Created January 18, 2023 09:46 — forked from HViktorTsoi/ShadowHighlightCorrection.py
Image shadow and highlight correction/adujstment with opencv.
import numpy as np
import cv2
def correction(
img,
shadow_amount_percent, shadow_tone_percent, shadow_radius,
highlight_amount_percent, highlight_tone_percent, highlight_radius,
color_percent
):
"""