Skip to content

Instantly share code, notes, and snippets.

View themixray's full-sized avatar
🦦
пр

TheMixRay themixray

🦦
пр
View GitHub Profile
@themixray
themixray / pygame-template.py
Created April 3, 2022 17:09
Pygame template
import pygame
pygame.init()
win = pygame.display.set_mode((500,500))
pygame.display.set_caption("My Game")
clock = pygame.time.Clock()
run = True
while run:
@themixray
themixray / client.py
Last active December 12, 2021 10:58
communication python
import communicate as c
s = c.client('localhost',int(input('port> ')))
while 1:
s.send(input('send> '))
@barneygale
barneygale / check_mode.py
Last active November 28, 2022 18:02
Check if a minecraft server is in offline or online mode
import json
import socket
### Helper functions
# Read n bytes from the socket
def read(sock, n):
o = ""
while len(o) < n:
o += sock.recv(n-len(o))