Skip to content

Instantly share code, notes, and snippets.

View Diapolo10's full-sized avatar
🏠
Working from home

Lari Liuhamo Diapolo10

🏠
Working from home
View GitHub Profile
@Plutanium
Plutanium / Person.ts
Last active October 23, 2023 18:19
Person
type PartialPick<T, F extends keyof T> = Omit<T, F> & Partial<Pick<T, F>>;
type PersonParams = {
firstName: string,
lastName: string,
birthDate?: Date
gender: Gender
mother?: Person | PersonParams
fatherOrMother?: Person | PersonParams
}
@kg583
kg583 / hello_world.py
Created August 7, 2022 22:42
Hello World! with only 2 distinct punctuation marks
from operator import attrgetter
from operator import itemgetter
@itemgetter
@slice
@int
@next
@reversed
@str
@Diapolo10
Diapolo10 / n_fib.py
Last active December 15, 2021 23:45
Order N Fibonacci sequence generator
from collections import deque
from typing import Generator
import warnings
def n_fibonacci(n: int = 2) -> Generator[int, None, None]:
"""
Returns a generator that yields the values of a Fibonacci sequence of a given 'base'.
When `n == 0`, the returned sequence simplifies to an infinite sequence of `0`.