Skip to content

Instantly share code, notes, and snippets.

View blackmius's full-sized avatar

blackmius blackmius

View GitHub Profile
@blackmius
blackmius / masque_client.py
Last active January 9, 2025 06:00
masque client
#!/usr/bin/python3
import asyncio
import ssl
import base64
import argparse
import sys
import types
from collections import OrderedDict
from urllib.parse import urlparse
from aioquic.asyncio import connect
name: add 3
source code: |
input: '1111'
blank: ' '
start state: start
table:
start:
' ': {write: '1', R: add1}
'1': R
add1:
name: add x y
source code: |-
input: '1111 1111'
blank: ' '
start state: start
table:
start:
'1': {write: ' ', R: carry right x}
' ' : {L: done}
carry right x:
name: remove last symbol
source code: |
input: 'babbaababbb'
blank: ' '
start state: right
table:
# scan to the rightmost symbol
right:
['a','b']: R
' ' : {L: clear}