Total 4 steps for connect & exit Jupyter Notebook with a SSH server:
- SSH to the Server. Run:
jupyter notebook --no-browser --port=8888
- Open another terminal window on your local machine, input:
| import math | |
| import typing | |
| import torch | |
| class StringArray: | |
| def __init__(self, strings : typing.List[str], encoding : typing.Literal['ascii', 'utf_32_le'] = 'ascii'): | |
| strings = list(strings) | |
| self.encoding = encoding | |
| self.multiplier = dict(ascii = 1, utf_32_le = 4)[encoding] | |
| # TODO: support varlen encodings: utf-8 and utf-16-le |