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 pygame
import numpy as np
import sys
import math
# Initialize Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("3D Line of Sight with Mouse Look")
clock = pygame.time.Clock()
import pygame
import numpy as np
import sys
import math
# Initialize Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("3D Line of Sight with Mouse Look")
clock = pygame.time.Clock()
import pygame
import sys
import math
# Initialize Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("3D Line of Sight with Mouse Look")
clock = pygame.time.Clock()
pygame.event.set_grab(True)
import pygame
import sys
import math
# Initialize Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("3D Line of Sight with Mouse Look")
clock = pygame.time.Clock()
pygame.event.set_grab(True)
import pygame
import sys
import math
# Initialize Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("3D Line of Sight with Mouse Look")
clock = pygame.time.Clock()
pygame.event.set_grab(True)
import pygame
import sys
import math
# Initialize Pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("3D Line of Sight with Mouse Look")
clock = pygame.time.Clock()
pygame.event.set_grab(True)
import pygame, sys, math
pygame.init()
screen = pygame.display.set_mode((800, 600))
clock = pygame.time.Clock()
# Colors
WHITE = (255,255,255); BLACK = (0,0,0); GRAY = (50,50,50)
BLUE = (0, 128, 255); RED = (200, 0, 0); YELLOW = (255, 255, 0); GREEN = (0,200,0); ORANGE = (255,165,0)
// Image2D_OpenGL.cpp
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <stb_image.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <iostream>
import warnings
warnings.filterwarnings("ignore")
import asyncio
from bleak import BleakScanner
def format_bytes(b):
return ' '.join(f'{byte:02X}' for byte in b)
async def main():
import asyncio
from bleak import BleakScanner
def format_bytes(b):
return ' '.join(f'{byte:02X}' for byte in b)
async def main():
print("🔍 Scanning for Bluetooth LE devices (5 seconds)...")
devices = await BleakScanner.discover(timeout=5.0)