This file contains 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
FROM debian:bullseye as base | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
WORKDIR /workspace | |
RUN mkdir -pv "/workspace/bin" && echo 'echo test' > '/workspace/bin/test.sh' && chmod +x '/workspace/bin/test.sh' | |
ENV PATH="/workspace/bin:${PATH}" | |
FROM base as builder |
This file contains 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 numpy as np | |
def gs_cofficient(v1, v2): | |
return np.dot(v2, v1) / np.dot(v1, v1) | |
def multiply(cofficient, v): | |
return map((lambda x : x * cofficient), v) | |
def proj(v1, v2): | |
return multiply(gs_cofficient(v1, v2) , v1) |