Skip to content

Instantly share code, notes, and snippets.

View Sigmanificient's full-sized avatar
🎲
Continuing random projets

Yohann Boniface Sigmanificient

🎲
Continuing random projets
View GitHub Profile
@Sigmanificient
Sigmanificient / voxworld_theme.css
Last active April 29, 2022 10:03
A Theme for VoxWorld
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700&display=swap');
/* - Animations ------------------------------------------------------------- */
@keyframes blinkTxt {
0% {
opacity: 100%;
}
@Sigmanificient
Sigmanificient / copyit
Created May 4, 2022 22:25
Just copy the stdin
#!/usr/bin/env python
import sys
import pyperclip
pyperclip.copy(sys.stdin.read())
@Sigmanificient
Sigmanificient / unrecursify.py
Created June 14, 2022 21:55
A decorator that remove reccursion limit on simple recursive function
def unrecursify(func):
class Unrecursify(Exception):
pass
call_args = []
call_result = []
def out(*_args):
return call_result[-1]
@Sigmanificient
Sigmanificient / Makefile
Last active June 22, 2022 19:47
Makefile for python & pytest package
all: start
PKG =
VENV = venv
VBIN = $(VENV)/bin
TEST = tests
$(VBIN)/python:
python3 -m venv venv
@Sigmanificient
Sigmanificient / benchmark.txt
Created July 31, 2022 13:26
A slow... very slow sorting algorithm
1 => 1 ------------------------------------------------------
< Min 0.00001 | 1 | 0.00x
> Max 0.00003 | 1 | 0.00x
~ Avg 0.00001 | 1.0 | 0.00x
2 => 1 ------------------------------------------------------
< Min 0.00001 | 1 | 1.00x
> Max 0.00030 | 30 | 29.07x
~ Avg 0.00004 | 8.48 | 4.17x
3 => 1 ------------------------------------------------------
< Min 0.00003 | 2 | 0.61x
@Sigmanificient
Sigmanificient / hashmap.py
Created August 1, 2022 20:58
Implementation of a hahmap in python (dict equivalent)
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Optional, List, Generic, TypeVar, NoReturn, Callable, Union, Tuple
_K = TypeVar('_K')
_V = TypeVar('_V')
@dataclass
@Sigmanificient
Sigmanificient / style.css
Last active August 9, 2022 09:34
Stylus dark theme for HŸPE dashboard
/* */
body {
background: #0b0815;
}
header {
background-color: #0b0815 !important;
}
import os
from github import Github
BASE_DIR = '...'
GITHUB_TOKEN = '...'
CWD = os.getcwd()
@Sigmanificient
Sigmanificient / _one_line.py
Created November 11, 2022 20:22
Lights out in 1 line
print("Light out in 1 line, use A1 to E5 to play (A-E vertical, 1-5 horizontal)"*0,type('',((__:=setattr)and(BS:=5)and(r:=__import__('random'))and()),{'__init__':lambda s:(__(s,'b',[[0 for _ in range(BS)]for _ in range(BS)])or __(s,'ir',0)or s.sb())and None,'__iter__':lambda s: s,'__next__':lambda s: s.ir,'__repr__':lambda s:'\n'.join(' '.join('.x'[c]for c in line)for line in s.b),'main':lambda s:(__(s,'ir',0),[(print(s),(s.hp(),s.cw()))for _ in iter(s.__next__, 1)], "You won!")[2],'c':property(lambda s:sum(map(sum,s.b))),'cp':lambda _,cs:(len(cs) == 2 and cs[0]in'ABCDE'and cs[1] in '12345'),'cw':lambda s:(__(s,'ir',s.iw)),'iw':property(lambda s: (s.c==0)),'hp':lambda s:(s.cp(p:=input("Where to play? "))and(s.sl(*s.tc(p)))),'sb':lambda s:[s.sl(r.randrange(0,BS),r.randrange(0,BS))for _ in range(100)],'sl':(lambda s,x,y:[s.sw(x+dx,y+dy)for dx,dy in((0,0),(0,-1),(0,1),(-1,0),(1,0))if((0<=(x+dx)<BS)and(0<=(y+dy)<BS))]),'sw':lambda s,x,y:(__(s,'b',[[c if((cx!=x)or(cy!=y))else(not(s.b[y][x]))for cx,c in enumerate(l
git clone https://github.com/Epitech/banana-vera.git || exit 1
cd banana-vera
yay -Sy boost
cmake . -DVERA_LUA=OFF -DPANDOC=OFF -DVERA_USE_SYSTEM_BOOST=ON
make -j
sudo make install