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 sys | |
import tty | |
import termios | |
def getchar(): | |
tattr = termios.tcgetattr(sys.stdin) | |
tty.setcbreak(sys.stdin.fileno(), termios.TCSANOW) | |
out = sys.stdin.read(1) | |
termios.tcsetattr(sys.stdin, termios.TCSANOW, tattr) | |
return out |
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
|\ _,,,---,,_ | |
/,`.-'`' -. ;-;;,_ | |
|,4- ) )-,_..;\ ( `'-' | |
'---''(_/--' `-'\_) | |
Felix Lee <[email protected]> |

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
trash/ | |
.gitignore | |
* copy* | |
__pycache__/ | |
target/ | |
Cargo.lock | |
TOKEN.py |
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
git clone https://{username}:ghp_{your PAT token}@gist.github.com/{gist ID}.git |
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
#cogs / test.py | |
from discord.ext import commands | |
class Test(commands.Cog): | |
def __init__(self, client): | |
self.client = client | |
@commands.hybrid_command() | |
@commands.cooldown(1, 10, commands.BucketType.user) |
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 rsa | |
public, private = rsa.newkeys(512) | |
# private = rsa.PrivateKey.load_pkcs1(open('private.pem', mode='rb').read()) | |
print(f"Public key: {public}") | |
print(f"Private key: {private}") | |
message = b"Hello world!" |
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
Egzaminator przygotował 30 pytań, wypisując na każdej kartce 4 pytania. Zdający umie odpowiedzieć poprawnie na połowę pytań. Jakie jest prawdopodobieństwo że zdający odpowie poprawnie na 4 pytania? | |
Rozwiązanie: | |
1. Oblicz |Ω| | |
|Ω| oznacza liczbę wszystkich możliwych wyników. W tym przypadku mamy 30 pytań, a zdający może wybrać 4 z nich. Możemy to obliczyć na dwa sposoby: | |
Metoda 1: Kombinacja |
The Weston backend ABI (Application Binary Interface) defines the internal interfaces that Weston backends must implement to integrate with the core compositor. This documentation covers the key structures, functions, and protocols used by backends.
The main backend structure that all backends must implement. Key fields: