This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
class Overloadable(object): | |
def __init__(self, fn): | |
self.base = fn | |
self.overloads = (fn, inspect.signature(fn).parameters), | |
self.instance = None | |
def overload(self, fn): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import abstractmethod, ABC | |
from typing import Tuple, List, Generator | |
class Function(ABC): | |
"""Function for Newton-Raphson algorithm | |
""" | |
@abstractmethod | |
def calculate(self, x: float) -> float: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use 256 colors instead of 16, which is tmux default, no matter on which terminal it is running | |
set -g default-terminal "screen-256color" | |
set-option -sa terminal-overrides ',screen-256color:RGB' | |
# Vi keys to control copy mode | |
set-window-option -g mode-keys vi | |
# Reload config file (change file location to your the tmux.conf you want to use) | |
bind r source-file ~/.tmux.conf |