This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |