The ticker.py is a python asyncio implementation within a multiprocessing context.
ticker.py [-h] [-m {sync,async}] [-c COUNT] [-p PARALLEL] -t TICKERCONF [-o OUTDIR]
| openssl genrsa -out root-ca.key 2048 | |
| openssl req -x509 -new -nodes -key root-ca.key -days 365 -out root-ca.crt | |
| python3 ssl_web_server.py | |
| echo "then open browser: https://localhost:4433" |
| #!/bin/sh | |
| set -x | |
| sudo apt-get update -q | |
| sudo apt-get install -y \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg-agent \ |
| ... global user data | |
| user.signingkey=8F8EC40B4421AC93 | |
| commit.gpgsign=true | |
| gpg.program=/opt/homebrew/bin/gpg |
| # client.py | |
| import socket | |
| def main(): | |
| # creating the socket | |
| sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| # just connecting | |
| sck.connect(("localhost", 7456)) | |
| print("Sending data...") |
| class MetaSingleton(type): | |
| """Metaclass for creating classes that allow only a single instance to be created.""" | |
| _instances = {} | |
| def __call__(cls, *args, **kwargs): | |
| if cls not in cls._instances: | |
| cls._instances[cls] = super().__call__(*args, **kwargs) | |
| return cls._instances[cls] |
| FROM python:3-slim AS builder | |
| RUN mkdir /src | |
| COPY . /src/ | |
| RUN pip install --no-cache-dir --upgrade pip setuptools wheel \ | |
| # Install build tools to compile dependencies that don't have prebuilt wheels | |
| && apt update && apt install -y git build-essential \ | |
| && cd /src \ | |
| && pip install --user --no-cache-dir .[colorama,d] |
| import logging | |
| from functools import wraps | |
| def logged(cls=None, *, name=''): | |
| def logged_for_init(func): | |
| @wraps(func) | |
| def wrapper(self, *args, **kwargs): | |
| logger_name = name or self.__class__.__name__ | |
| self.log = logging.getLogger(logger_name) | |
| return func(self, *args, **kwargs) |
| lsof -ti:5901 | xargs kill -9 |
| name: catalyst | |
| channels: | |
| - conda-forge | |
| - defaults | |
| dependencies: | |
| - ca-certificates=2017.08.26 | |
| - certifi=2018.1.18 | |
| - intel-openmp=2018.0.0 | |
| - ipython=6.4.0 | |
| - jupyter=1.0.0 |