Skip to content

Commit

Permalink
Refactor: wrapped to rich
Browse files Browse the repository at this point in the history
  • Loading branch information
ishkhan42 committed Apr 14, 2023
1 parent 3d5529c commit c0ccfee
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
from PIL import Image
from ujrpc.rich_posix import Server

server = Server(port=8545)
server = Server(port=8545,
ssl_pk='./examples/login/certs/main.key',
ssl_certs=['./examples/login/certs/srv.crt',
'./examples/login/certs/cas.pem']
)


@server
Expand All @@ -23,7 +27,7 @@ def rotate_avatar(image: Image.Image) -> Image.Image:

@server
def validate_all_sessions(user_ids: np.ndarray, session_ids: np.ndarray) -> bool:
return not np.mod(np.logical_xor(user_ids, session_ids), 23).any()
return np.mod(np.logical_xor(user_ids, session_ids), 23)


if __name__ == '__main__':
Expand Down

0 comments on commit c0ccfee

Please sign in to comment.