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
1. Creature new Sudo acc | |
-adduser ryan | |
-usermod -aG sudo ryan | |
-su - ryan | |
2.update repository | |
-sudo apt-get update | |
3. Install pip and nginx | |
-sudo apt-get install python-pip nginx |
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
# py_websockets/client/main.py | |
import asyncio | |
from typing import Any, Dict | |
import websockets | |
from pydantic import BaseModel | |
from py_websockets.models.models import WebsocketConnect | |
class WebsocketEvent(BaseModel): | |
event: 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 datetime import datetime | |
def new_event(functions: dict, event: str): | |
def func(callback): | |
def wrapper(self): | |
return callback(self) | |
functions[event] = wrapper | |
return callback |