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:
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): |
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 base64 | |
import hashlib | |
import hmac | |
import secrets | |
import time | |
class TOTP: | |
def __init__(self, secret: str): | |
self.secret = secret |
import math | |
#term = input(">> ").split() | |
stack = [] | |
running = True | |
while running: | |
for t in input(">> ").split(): | |
if t == "exit": | |
running = False | |
break |
version: '3.7' | |
services: | |
db: | |
container_name: mysql_server | |
image: mariadb | |
restart: always | |
environment: | |
MYSQL_USER: "user" | |
MYSQL_PASSWORD: "password" | |
MYSQL_DATABASE: "db" |
#!/bin/bash | |
[[ $# -lt 2 ]] && echo "usage: $0 <first display> <second display>" && exit 1 | |
clipread() { | |
xclip -selection clip -r -o -display $1 2> /dev/null | |
} | |
clipwrite() { | |
xclip -selection clip -r -i -display $1 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | |
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script> | |
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"></script> | |
<script> | |
function _katex_render(elem) { | |
renderMathInElement( | |
elem, | |
{ | |
delimiters: [ |
[W:=10,H:=10,find:=lambda x:x if x==uf[x]else(uf.__setitem__(x,x:=find(uf[x]))or x),union:=lambda a,b:uf.__setitem__(find(a),find(b)),c2i:=lambda x,y:y*W+x,i2c:=lambda i:(i%W,i//W),uf:=[*range(W*H)],E:=[(c2i(x,y),c2i(x+1-z,y+z))for x in range(W-1)for y in range(H-1)for z in range(2)]+[(c2i(x,H-1),c2i(x+1,H-1))for x in range(W-1)]+[(c2i(W-1,y),c2i(W-1,y+1))for y in range(H-1)],__import__("random").shuffle(E),PE:=[],N:=[[[]for _ in'*'*W]for _ in'*'*H],[[union(a,b),c1:=i2c(a),c2:=i2c(b),N[c1[1]][c1[0]].append(c2),N[c2[1]][c2[0]].append(c1),PE.extend([((2*c1[0]+1,2*c1[1]),(2*c1[0]+2,2*c1[1])),((2*c1[0]+1,2*c1[1]+1),(2*c1[0]+2,2*c1[1]+1))]if c1[1]==c2[1]else[((2*c1[0],2*c1[1]+1),(2*c1[0],2*c1[1]+2)),((2*c1[0]+1,2*c1[1]+1),(2*c1[0]+1,2*c1[1]+2))])]for a,b in E if find(a)!=find(b)],[[[0 if(x-1,y)in N[y][x]else PE.append(((2*x,2*y),(2*x,2*y+1))),0 if(x+1,y)in N[y][x]else PE.append(((2*x+1,2*y),(2*x+1,2*y+1))),0 if(x,y-1)in N[y][x]else PE.append(((2*x,2*y),(2*x+1,2*y))),0 if(x,y+1)in N[y][x]else PE.append(((2*x,2*y+1) |