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
SCREEN_SIZE = 600 | |
pla = None | |
FPS = 12 | |
def round20(x, base=20): | |
return int(base * round(float(x)/base)) | |
APPLE_POS = [round20(random(SCREEN_SIZE)), round20(random(SCREEN_SIZE))] | |
class Snake: |
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
font = None | |
p = None | |
foodBlobs = [] | |
class Blob: | |
def __init__(self, r, p, c=color(50,100,100), player=False): | |
if player: | |
self.pos = PVector(width/2, height/2) | |
else: | |
self.pos = PVector(random(width*3), random(height*3)) |
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 java.util.*; | |
public class animal { | |
public static final double FAVNUMBER = 1.082; | |
private String name; | |
private int weight; | |
private boolean owner = false; | |
private byte age; | |
private long uniqueID; |
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 re | |
import math | |
class SteamID: | |
Universe = { | |
"INVALID": 0, | |
"PUBLIC": 1, | |
"BETA": 2, | |
"INTERVAL": 3, |
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 | |
import time | |
def run(code): | |
for i, line in enumerate(code.split('\n')): | |
l = Line(line, i) | |
asyncio.ensure_future(l.run()) | |
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 | |
import re | |
lines = [] | |
async def run(code): | |
tasks = [] | |
for i, line in enumerate(code.split('\n')): | |
l = Line(line, i) | |
tasks.append(asyncio.ensure_future(l.run())) |
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 time | |
import threading | |
import requests | |
import asyncio | |
import aiohttp | |
URL = 'https://google.com' | |
MAX_CLIENTS = 500 | |
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
from json import load | |
import pygame | |
from pygame.locals import QUIT, K_UP, K_RIGHT, K_LEFT, K_DOWN | |
from quicknet.client import QClient | |
with open('settings.json') as file: | |
SETTINGS = load(file) | |
SELF = None | |
PLAYERS = {} |
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
from urllib.parse import quote, unquote | |
def dirty(obj: any): | |
if isinstance(obj, str): | |
return quote("S{obj}".format(obj=obj)) | |
elif isinstance(obj, bool): | |
return "B{v}".format(v=1 if obj else 0) | |
elif isinstance(obj, int): | |
return "I{obj}".format(obj=obj) |
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 builtins | |
from urllib.parse import quote, unquote | |
from types import BuiltinFunctionType, BuiltinMethodType | |
from quicknet.utils import UnSterilizable, BadSterilization | |
__all__ = ["dirty", "clean"] | |
def dirty(obj: any) -> str: |
OlderNewer