Skip to content

Instantly share code, notes, and snippets.

View kaigouthro's full-sized avatar
🔍
Looking For Work

kai gouthro kaigouthro

🔍
Looking For Work
View GitHub Profile
@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
@kaigouthro
kaigouthro / pinescript5ref.txt
Created December 17, 2022 05:34
pineforai
Pine Script™ language reference manual
Language Operators
!=
Not equal to. Applicable to expressions of any type.
expr1 != expr2
RETURNS
Boolean value, or series of boolean values.
%
@kaigouthro
kaigouthro / pine5.tmLanguage
Created January 12, 2023 04:15
pinescript5 tmlanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>Pinescript</string>
<key>fileTypes</key>
<array>
<string>pine</string>
<string>pinescript</string>
[{
"0": [
"\\b(\\w\\+.all)\\b"
]
},
{
"1": [
"(color)(\\.)(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)"
]
},
{
"keyords and operators": [
"!=",
"%",
"%=",
"*",
"*=",
"+",
"+=",
"-",
//@version=5
library("keyed_primatives")
export type float_item
string key = ''
float val = 0.
export type float_dict
float_item[] content
@kaigouthro
kaigouthro / Pine_Script_5_Mini_Reference.md
Last active September 25, 2025 15:27
A minimal reference to pine script v5

Pine Script Mini-Reference

This document provides a concise reference for Pine Script, a programming language specifically designed for trading strategies and indicators within TradingView.

Operators

Arithmetic Operators

Operator Description
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 / idea.md
Last active October 5, 2024 06:08
Test Basis for expanding.. The way forward to after AGI starts with a goat path. AI should be this easy to talk to itself... go crazy making it better

Project Documentation

Overview

This document provides an overview and detailed explanation of the codebase, including its primary functions, settings management, and interaction with the AI model.

Code Structure

Main Functions

@kaigouthro
kaigouthro / lua.py
Created January 11, 2024 07:20
logitech_lua_python.py
class LuaScriptGenerator:
def __init__(self):
self.function_templates = {
"PressAndReleaseKey": "PressAndReleaseKey({key})",
"PressKey": "PressKey({key})",
"ReleaseKey": "ReleaseKey({key})",
"PressAndReleaseMouseButton": "PressAndReleaseMouseButton({button})",
"PressMouseButton": "PressMouseButton({button})",
"ReleaseMouseButton": "ReleaseMouseButton({button})",
# Add more function templates as needed