Skip to content

Instantly share code, notes, and snippets.

View damp11113's full-sized avatar
❤️
Love open source

Dharm Pimsen damp11113

❤️
Love open source
View GitHub Profile
@damp11113
damp11113 / iKB1_CPY.py
Created February 11, 2025 16:59
iKB-1 library for RP2xxx circuitpython
import board
import busio
import time
import digitalio
IKB_1_ADDR = 0x48
IKB_1_ADDR_2 = 0x49
# Detect board type and set I2C pins accordingly
i2c1 = busio.I2C(board.GP1, board.GP0)
@damp11113
damp11113 / PyMiderV2.py
Last active November 16, 2024 07:41
The Midi player in python with visualizer
import sys
import threading
import easygui
import pygame
import psutil
import time
import mido
import pyfluidsynth
# Global Constants
@damp11113
damp11113 / pidanalyzer.py
Last active October 14, 2024 13:13
a PID control with simulation and output to plot (with animation)
import matplotlib.pyplot as plt
import time
class PIDController:
def __init__(self, kp, ki, kd, setpoint, output_limits=(None, None)):
self.kp = kp
self.ki = ki
self.kd = kd
self.setpoint = setpoint
self.output_limits = output_limits
@damp11113
damp11113 / yt_no_normalization_userscript.js
Last active October 16, 2024 07:58
YouTube No Normalization! (Userscript)
// ==UserScript==
// @name YouTube No Normalization!
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Disable auto normalization in youtube
// @author damp11113
// @match https://www.youtube.com/*
// @match https://youtube.com/*
// @grant none
// ==/UserScript==
local ws = assert(http.websocket("ws://127.0.0.1:5133"))
print("connected to server")
local id
local isrunning = true
function exitcheck()
while true do
local event = os.pullEventRaw("terminate")
if event == "terminate" then
@damp11113
damp11113 / RCF.md
Last active October 18, 2024 17:01

RCF (Really Comprehensive Feed)

Introduction

RCF (Really Comprehensive Feed) is a JSON-based feed format designed to provide comprehensive information about various content items, such as articles, blog posts, news updates, and more. RCF aims to offer extensive metadata and customization options to suit diverse content publishing needs.

Version

RCF is currently in version 1.

Format Overview

RCF consists of two main components:

@damp11113
damp11113 / camogenv2.py
Created May 5, 2024 07:49
camouflage generator using cellular automata algorithm v2. add smooth
import random
import numpy as np
from PIL import Image, ImageDraw, ImageFilter
from damp11113.processbar import indeterminateStatus
class camogen:
def __init__(self, grid_size=128, num_frames=15, color=[(75, 83, 32), (225, 215, 152), (103, 86, 69), (66, 71, 86)], ranseedx=0, ranseedy=100, blur=3, index=5):
self.grid_size = (grid_size, grid_size)
self.num_frames = num_frames
self.colors = color
@damp11113
damp11113 / camogen.py
Last active April 3, 2024 16:57
camouflage generator using cellular automata algorithm
import random
import numpy as np
from PIL import Image, ImageDraw
from damp11113.processbar import indeterminateStatus
class camogen:
def __init__(self, grid_size=128, num_frames=15, color=[(75, 83, 32), (225, 215, 152), (103, 86, 69), (66, 71, 86)], ranseedx=0, ranseedy=100):
self.grid_size = (grid_size, grid_size)
self.num_frames = num_frames
self.colors = color
import board
import digitalio
import time
import simpleio
def string_to_binary_list(input_string):
binary_list = []
for char in input_string:
# Convert each character to its ASCII value and then to binary
binary_char = bin(ord(char))[2:]
@damp11113
damp11113 / pygame_template.py
Created March 2, 2024 10:32
pygame project template
import sys
import pygame
class Game:
def __init__(self):
# System Variable
self.screen = None
self.clock = None
self.running = False