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
if __name__ == '__main__': | |
app.run(host='0.0.0.0', port=8080) |
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
# ... | |
return get(f'{SITE_NAME}{path}').content |
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
SITE_NAME = 'https://youtube.com' | |
@app.route('/', defaults={'path': ''}) | |
@app.route('/<path:path>') | |
def proxy(path): | |
# ... |
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 flask import Flask | |
from requests import get | |
app = Flask(__name__) |
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: |
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
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
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
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 asyncio | |
import time | |
def run(code): | |
for i, line in enumerate(code.split('\n')): | |
l = Line(line, i) | |
asyncio.ensure_future(l.run()) | |