Skip to content

Instantly share code, notes, and snippets.

View Defelo's full-sized avatar
🏳️‍🌈

Felix Bargfeldt Defelo

🏳️‍🌈
View GitHub Profile
import math
#term = input(">> ").split()
stack = []
running = True
while running:
for t in input(">> ").split():
if t == "exit":
running = False
break
@Defelo
Defelo / arch-arm-rpi3-b-plus.md
Last active October 27, 2019 17:35 — forked from theramiyer/arch-arm-rpi3-b-plus.md
Install Arch Linux (ARM) on Raspberry Pi 3 Model B+

Install Arch Linux (ARM) on Raspberry Pi B+

Created 17 Aug 2018

This is a simple installation that I did on my Raspberry Pi. Of course, this is only one of the many reasons to do it.

Here are my requirements:

@Defelo
Defelo / totp.py
Last active November 30, 2021 13:22
import base64
import hashlib
import hmac
import secrets
import time
class TOTP:
def __init__(self, secret: str):
self.secret = secret
@Defelo
Defelo / lineqsysolver.py
Last active June 9, 2019 21:44
Linear Equation System Solver
from typing import List
def solve(matrix: List[List[float]]) -> List[float]:
# check size of matrix
n: int = len(matrix)
assert n >= 1
assert all(len(row) == n + 1 for row in matrix)
# Gaussian elimination
import math
def deg2rad(angle: float) -> float:
return (angle % 360) / 180 * math.pi
def rad2deg(angle: float) -> float:
return (angle * 180 / math.pi) % 360
class Point:
def __init__(self, x: float, y: float):