Skip to content

Instantly share code, notes, and snippets.

View kaigouthro's full-sized avatar

kai gouthro kaigouthro

  • Alberta, Canada
View GitHub Profile
import pandas as pd
import sqlite3
conn = sqlite3.connect('/path/to/where/you/want/to/store/your/db')
c = conn.cursor()
df = pd.DataFrame([{'Column1':'Data','Column2':'Base'}])
df.to_sql("SQLDatabase", conn, if_exists="replace")
@kaigouthro
kaigouthro / color_conversion.py
Created October 17, 2022 08:52 — forked from mathebox/color_conversion.py
Python methods to convert colors between RGB, HSV and HSL
import math
def rgb_to_hsv(r, g, b):
r = float(r)
g = float(g)
b = float(b)
high = max(r, g, b)
low = min(r, g, b)
h, s, v = high, high, high