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
class EducationFlags(FlagConverter): | |
ELEMENTARY_COMPLETED = 1 | |
MIDDLE_SCHOOL_COMPLETED = 2 | |
HIGHSCHOOL_COMPLETED = 4 | |
COLLEGE_COMPLETED = 8 | |
BACHELOR = 16 | |
MASTER = 32 | |
DOCTOR = 64 | |
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 io import BytesIO | |
from peels import Peel, SharedConsumption, Segment, ConstantConsumption, Condition, ValueCondition | |
class PayloadLengthContConsumer(ConstantConsumption): | |
def length(self, ctx, _): | |
length = ctx["payload_len"] | |
if length == 126: | |
return 2 |
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
[INFO] 2019-02-21 21:03:39,352 - Bot:485 - Adding plugin module at path "plugins.mod" | |
[INFO] 2019-02-21 21:03:39,869 - HTTPClient:271 - GET https://discordapp.com/api/v7/gateway (None) | |
Traceback (most recent call last): | |
File "C:\Users\User\PycharmProjects\Justice\venv\lib\site-packages\gevent\greenlet.py", line 536, in run | |
result = self._run(*self.args, **self.kwargs) | |
File "C:\Users\User\PycharmProjects\Justice\venv\lib\site-packages\disco\gateway\client.py", line 138, in connect_and_run | |
self._cached_gateway_url = self.client.api.gateway_get()['url'] | |
File "C:\Users\User\PycharmProjects\Justice\venv\lib\site-packages\disco\api\client.py", line 97, in gateway_get | |
data = self.http(Routes.GATEWAY_GET).json() | |
File "C:\Users\User\PycharmProjects\Justice\venv\lib\site-packages\disco\api\http.py", line 216, in __call__ |
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 os import path | |
from pathlib import Path | |
import time | |
import select | |
from subprocess import Popen | |
class GamePipe(Popen): |
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 typing import Any, Iterable, Union | |
import weakref | |
class CircleNode: | |
""" | |
A node inside a circular list (linked list node) | |
This object is used to have lists without end, and are quite useful when time comes. |
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 pycord.client import Client | |
client = Client(">>") | |
client.load_extensions([ | |
"test_extension.TestExtension" | |
]) | |
client.run() | |
# client = pycord.client.client.Client("!") | |
# |
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 itertools import count | |
from typing import Any, List | |
import re | |
from pycord.exceptions import ParseError | |
class Parser: | |
""" | |
A class to outline how a parser should act. |
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 enum import Enum | |
from typing import Union, List | |
PossiblePermissionType = Union[Enum, str, int] | |
class Permissions(Enum): | |
CREATE_INSTANT_INVITE = 0x00000001 | |
KICK_MEMBERS = 0x00000002 | |
BAN_MEMBERS = 0x00000004 |
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 asyncpg | |
import asyncio | |
class DB: | |
def __init__(self): | |
pass | |
def get_credits(self, id: 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
import random | |
class Piece: | |
def __init__(self, width: int, height: int, color: int=None): | |
self.width = width | |
self.height = height | |
self.color = color if color else random.randint(0x0000FF, 0xFFF00) |
NewerOlder