Skip to content

Instantly share code, notes, and snippets.

View Olikonsti's full-sized avatar
🐢

Konstantin Ehmann Olikonsti

🐢
View GitHub Profile
import random
import RPi.GPIO as GPIO
import time
import serial
import mysql.connector
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
ser.reset_input_buffer()
#include <LiquidCrystal_I2C.h>
#define NUM_SAMPLES_V 30
#define NUM_SAMPLES_C
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <Arduino.h>
import ctypes as ct
import time
from BlurWindow.blurWindow import *
def enable_blur(win, dark_mode=True):
global DRAG
get_parent = ct.windll.user32.GetParent
HWND = get_parent(win.winfo_id())
import ctypes as ct
def dark_title_bar(window):
"""
MORE INFO:
https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
"""
window.update()
DWMWA_USE_IMMERSIVE_DARK_MODE = 20
set_window_attribute = ct.windll.dwmapi.DwmSetWindowAttribute
get_parent = ct.windll.user32.GetParent
@Olikonsti
Olikonsti / ScreenPixels.py
Created April 26, 2021 13:45
ScreenPixels Gravity
from tkinter import *
import random
import pygame
pixellist = []
updatelist = []
class Pixel:
def __init__(self, app):
self.window = Tk()
from tkinter import *
import random
pixellist = []
class Pixel:
def __init__(self, app):
self.window = Tk()
self.window.config(bg=random.choice(["red", "green", "blue", "yellow", "lime", "cyan"]))
self.window.overrideredirect(True)