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 base64 | |
| import hashlib | |
| import json | |
| import grpc | |
| import bilibili.app.dynamic.v2.dynamic_pb2 as dynamic_pb2 | |
| import bilibili.app.dynamic.v2.dynamic_pb2_grpc as dynamic_pb2_grpc | |
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
| { | |
| "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
| "blocks": [ | |
| { | |
| "alignment": "left", | |
| "segments": [ | |
| { | |
| "foreground": "#ff479c", | |
| "properties": { | |
| "folder_separator_icon": "/", |
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 | |
| from broadcastlv.command import DanmuMsg | |
| from broadcastlv.connection import Connection | |
| from broadcastlv.event import Auth, Heartbeat, NeedData | |
| async def heartbeat(conn: Connection, writer: asyncio.StreamWriter): | |
| while True: | |
| await asyncio.sleep(30) | |
| writer.write(conn.send(Heartbeat(b""))) |
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
| def resolve_requirements( | |
| querys: list[Query], integrates: list[Integrate] | |
| ) -> list[set[Integrate]]: | |
| # sourcery skip: use-named-expression | |
| query_intergrate_map: dict[Query, Integrate] = {} | |
| for query in querys: | |
| for integrate in integrates: | |
| if integrate.has_capability(query): | |
| query_intergrate_map[query] = integrate |
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 schema_gen import schema_gen | |
| def add(x: int, y: int): | |
| """calculate x + y""" | |
| return x + y | |
| async def sub(x: int, y: int) -> int: | |
| """calculate x - y""" | |
| return x - y |
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 __future__ import annotations | |
| from abc import get_cache_token | |
| from functools import partial | |
| from numbers import Number | |
| from typing import Any, Callable, cast, get_type_hints | |
| from itertools import chain | |
| class Overload: | |
| """ |
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
| { | |
| "INTERACT_WORD": { | |
| "cmd": "INTERACT_WORD", | |
| "data": { | |
| "uid": 69871196, | |
| "uname": "榟港", | |
| "uname_color": "", | |
| "identities": [ | |
| 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
| from pprint import pprint | |
| from random import shuffle | |
| from typing import Set, List | |
| class LaunchComponent: | |
| id: str | |
| required: Set[str] | |
| def __init__(self, id, required=None): |