Skip to content

Instantly share code, notes, and snippets.

View EncodeTheCode's full-sized avatar
💭
Coding useful tools for workflow.

EncodeTheCode

💭
Coding useful tools for workflow.
View GitHub Profile
import asyncio
from bleak import BleakClient, BleakScanner
BATTERY_UUID = "00002a19-0000-1000-8000-00805f9b34fb" # GATT Battery Level characteristic
async def main():
print("Scanning for Bluetooth LE devices...")
devices = await BleakScanner.discover(timeout=5.0)
headset = None
#!/usr/bin/env python3
"""
Automatically discover paired Bluetooth headset,
print its FriendlyName and battery percentage as reported by Windows PnP.
"""
import subprocess
import sys
import json
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GL.shaders import compileProgram, compileShader
import glm
import numpy as np
import math
# --- your shader code unchanged ---
vertex_shader_src = """
import pygame
import random
import time
# Init Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Level Loading with Stutters")
clock = pygame.time.Clock()
import pygame
import random
import time
# Init Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Level Loading with Stutters")
clock = pygame.time.Clock()
import pygame
import random
import time
# Init Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Level Loading with Stutters")
clock = pygame.time.Clock()
import pygame
import random
import time
# Init Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Level Loading with Stutters")
clock = pygame.time.Clock()
import pygame
import random
import time
# Init Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Level Loading with Stutters")
clock = pygame.time.Clock()
import pygame
import random
import time
# Init Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Level Loading with Stutters")
clock = pygame.time.Clock()
import pygame
import random
import time
# Init Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Level Loading with Stutters")
clock = pygame.time.Clock()