Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env bash | |
set -eux | |
docker run --rm -it \ | |
-u vscode \ | |
-w /home/vscode \ | |
mcr.microsoft.com/devcontainers/python:0-${1:-3.11-bullseye} \ | |
bash |
This file contains 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 socketio | |
sio = socketio.Client() | |
usdjpy = {} | |
@sio.event | |
def connect(): | |
sio.emit("subscribe", "USDJPY") |
This file contains 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 | |
from typing import List | |
import pybotters | |
import streamlit as st | |
async def watch_event( | |
store: pybotters.BybitUSDTDataStore, name: str, result: List, event: asyncio.Event | |
): |
This file contains 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 os | |
import sys | |
import aiohttp | |
from loguru import logger | |
logger.remove() | |
logger.add( | |
sys.stdout, |
This file contains 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 json | |
import aiohttp | |
from rich.pretty import pprint | |
async def main(): | |
async with aiohttp.ClientSession() as session: | |
async with session.ws_connect( |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 aiohttp | |
import datetime | |
from aiohttp import web | |
heartbeat = 10.0 | |
status = {} | |
async def ping(ws: aiohttp.ClientWebSocketResponse, specific_ping: str): | |
await asyncio.sleep(heartbeat) |