Skip to content

Instantly share code, notes, and snippets.

@beeman
beeman / Dockerfile
Last active December 6, 2024 16:10
Docker image with solana-test-validator that works on Apple Silicon 👉 Image here https://github.com/beeman/solana-test-validator 👈
FROM debian:bullseye AS base
ARG AGAVE_VERSION=2.0.15
ARG RUST_VERSION=stable
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'
@iizukak
iizukak / gram_schmidt.py
Created October 14, 2011 18:18
Gram-Schmidt Orthogonization using Numpy
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)